/* ============================================================
   ProductManager Pro — Main Stylesheet
   ============================================================ */

:root {
  --primary:       #667eea;
  --primary-dark:  #5a67d8;
  --secondary:     #764ba2;
  --gradient:      linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --card-shadow:   0 2px 16px rgba(0,0,0,.07);
  --hover-shadow:  0 8px 32px rgba(102,126,234,.2);
  --radius:        12px;
  --transition:    .18s ease;
}

/* Base */
body { font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; }

/* ── Navbar ──────────────────────────────────────────────── */
.bg-gradient-primary {
  background: var(--gradient) !important;
}
.navbar .nav-link { color: rgba(255,255,255,.85) !important; transition: color var(--transition); }
.navbar .nav-link:hover { color: #fff !important; }

/* ── Avatar ──────────────────────────────────────────────── */
.avatar-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
  font-weight: 700;
  font-size: .85rem;
  flex-shrink: 0;
}
.avatar-sm { width: 28px; height: 28px; font-size: .75rem; }

/* ── Cards ───────────────────────────────────────────────── */
.card { border-radius: var(--radius) !important; }

.product-card {
  border-radius: var(--radius) !important;
  transition: box-shadow var(--transition), transform var(--transition);
}
.product-card:hover, .hover-lift:hover {
  box-shadow: var(--hover-shadow) !important;
  transform: translateY(-2px);
}

.product-emoji {
  font-size: 2.2rem;
  line-height: 1;
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn-primary {
  background: var(--gradient);
  border: none;
}
.btn-primary:hover {
  background: linear-gradient(135deg, #5a67d8, #6b46a0);
  border: none;
}
.btn-glow:hover {
  box-shadow: 0 4px 20px rgba(102,126,234,.45);
}
.btn-ghost-muted {
  background: transparent;
  border: 1px solid #dee2e6;
  color: #6c757d;
}
.btn-ghost-muted:hover { background: #f8f9fa; }
.btn-ghost-danger { background: transparent; border: none; color: #dc3545; padding: 4px 8px; }
.btn-ghost-danger:hover { background: #fff5f5; }
.btn-xs { padding: 2px 8px; font-size: .75rem; }

/* ── Badges / Stats ──────────────────────────────────────── */
.badge-stat {
  font-size: .78rem;
  color: #6c757d;
}

.bg-primary-soft  { background: rgba(102,126,234,.12); }
.bg-success-soft  { background: rgba(40,167,69,.12); }
.bg-danger-soft   { background: rgba(220,53,69,.12); }
.bg-warning-soft  { background: rgba(255,193,7,.12); }

.badge.bg-success-soft { color: #198754 !important; }
.badge.bg-danger-soft  { color: #dc3545 !important; }

.stat-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* ── Items list ──────────────────────────────────────────── */
.item-row { transition: background var(--transition); }
.item-empty { background: rgba(220,53,69,.04) !important; }

.qty-controls { user-select: none; }
.qty-btn { transition: all var(--transition); }

/* ── Log dots ────────────────────────────────────────────── */
.log-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
  margin-top: 5px;
}
.log-dot-success { background: #28a745; }
.log-dot-danger  { background: #dc3545; }
.log-dot-warning { background: #ffc107; }

/* ── Footer ──────────────────────────────────────────────── */
.footer-bar {
  border-top: 1px solid #e9ecef;
}

/* ── Empty state ─────────────────────────────────────────── */
.empty-state .empty-icon { font-size: 4rem; }

/* ── Dark mode ───────────────────────────────────────────── */
[data-bs-theme="dark"] {
  --bs-body-bg: #0f1117;
  --bs-body-color: #e2e8f0;
}
[data-bs-theme="dark"] .card { background: #1a1d2e !important; border-color: #2d3048 !important; }
[data-bs-theme="dark"] .table-light { --bs-table-bg: #252840; color: #cbd5e0; }
[data-bs-theme="dark"] .list-group-item { background: #1a1d2e; border-color: #2d3048; color: #e2e8f0; }
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select { background: #252840; border-color: #3d4268; color: #e2e8f0; }
[data-bs-theme="dark"] .modal-content { background: #1a1d2e; color: #e2e8f0; }
[data-bs-theme="dark"] .admin-topbar { background: #1a1d2e; border-color: #2d3048; }
[data-bs-theme="dark"] .dropdown-menu { background: #1a1d2e; border-color: #2d3048; }
[data-bs-theme="dark"] .dropdown-item { color: #e2e8f0; }
[data-bs-theme="dark"] .dropdown-item:hover { background: #252840; }
[data-bs-theme="dark"] .btn-ghost-muted { border-color: #3d4268; color: #a0aec0; }
[data-bs-theme="dark"] .footer-bar { border-color: #2d3048; }
[data-bs-theme="dark"] .item-empty { background: rgba(220,53,69,.08) !important; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 576px) {
  .product-card .card-body { padding: 1rem; }
  .qty-controls .btn { width: 28px; height: 28px; }
}
