/* ── CSS Variables ─────────────────────────────────────────────────────────── */
:root {
  --primary:        #16a34a;
  --primary-end:    #0d9488;
  --primary-hover:  #15803d;
  --primary-light:  rgba(22, 163, 74, 0.1);
  --grad-primary:   linear-gradient(135deg, #16a34a 0%, #0d9488 100%);
  --grad-pink:      linear-gradient(135deg, #db2777 0%, #ea580c 100%);
  --grad-green:     linear-gradient(135deg, #059669 0%, #0d9488 100%);
  --grad-amber:     linear-gradient(135deg, #d97706 0%, #dc2626 100%);
  --grad-blue:      linear-gradient(135deg, #2563eb 0%, #16a34a 100%);
  --grad-violet:    linear-gradient(135deg, #16a34a, #0d9488);

  /* Light theme backgrounds */
  --bg:        #f4f6ff;
  --surface:   #ffffff;
  --surface2:  #eef1fb;
  --surface3:  #dde3f5;
  --surface4:  #c5cfe8;

  --text:       #0c1426;
  --text-muted: #526080;
  --text-dim:   #8fa0bf;

  --success:       #059669;
  --success-light: rgba(5, 150, 105, 0.1);
  --warning:       #d97706;
  --warning-light: rgba(217, 119, 6, 0.1);
  --danger:        #dc2626;
  --danger-light:  rgba(220, 38, 38, 0.1);
  --info:          #0891b2;
  --info-light:    rgba(8, 145, 178, 0.1);

  --border:        rgba(12, 20, 38, 0.09);
  --border-bright: rgba(12, 20, 38, 0.16);

  --radius:    14px;
  --radius-sm: 9px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow:    0 4px 24px rgba(12, 20, 38, 0.1);
  --shadow-md: 0 8px 40px rgba(12, 20, 38, 0.13);
  --shadow-sm: 0 1px 6px rgba(12, 20, 38, 0.08);
  --shadow-glow-primary: 0 6px 28px rgba(22, 163, 74, 0.35);
  --shadow-glow-green:   0 6px 28px rgba(5, 150, 105, 0.28);
  --shadow-glow-pink:    0 6px 28px rgba(219, 39, 119, 0.28);

  --transition: 0.2s ease;
  --sidebar-w: 248px;
}

/* ── Reset & Base ──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }

/* ── Scrollbar ─────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--surface2); }
::-webkit-scrollbar-thumb { background: var(--surface4); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

/* ── Typography ────────────────────────────────────────────────────────────── */
h1 { font-size: 1.8rem; font-weight: 800; }
h2 { font-size: 1.4rem; font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 600; }

/* ── Gradient Text ─────────────────────────────────────────────────────────── */
.grad-text {
  background: var(--grad-primary);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border: none;
  border-radius: var(--radius-sm);
  font-size: 0.9rem; font-weight: 600;
  cursor: pointer; transition: all var(--transition);
  white-space: nowrap; text-decoration: none;
  letter-spacing: 0.01em;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-primary {
  background: var(--grad-primary);
  color: #fff;
  box-shadow: var(--shadow-glow-primary);
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(109, 40, 217, 0.42);
  filter: brightness(1.08);
}

.btn-success {
  background: var(--grad-green); color: #fff;
  box-shadow: var(--shadow-glow-green);
}
.btn-success:hover:not(:disabled) { transform: translateY(-2px); filter: brightness(1.08); }

.btn-danger {
  background: var(--grad-amber); color: #fff;
}
.btn-danger:hover:not(:disabled) { transform: translateY(-2px); filter: brightness(1.08); }

.btn-ghost {
  background: var(--surface);
  color: var(--text-muted);
  border: 1px solid var(--border-bright);
  box-shadow: var(--shadow-sm);
}
.btn-ghost:hover:not(:disabled) {
  background: var(--surface2);
  color: var(--text);
  border-color: var(--surface4);
}

.btn-icon { padding: 8px; width: 36px; height: 36px; justify-content: center; }
.btn-sm { padding: 6px 14px; font-size: 0.82rem; }

/* ── Inputs ────────────────────────────────────────────────────────────────── */
.input {
  width: 100%;
  padding: 10px 14px;
  background: var(--surface);
  border: 1.5px solid var(--border-bright);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  box-shadow: var(--shadow-sm);
}
.input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(109, 40, 217, 0.15);
}
.input::placeholder { color: var(--text-dim); }

select.input {
  cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23526080' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
  background-size: 20px; padding-right: 36px;
}

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label {
  font-size: 0.8rem; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.05em;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ── Cards ─────────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

/* ── Badges ────────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 20px;
  font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-success { background: var(--success-light); color: var(--success); }
.badge-warning { background: var(--warning-light); color: var(--warning); }
.badge-danger  { background: var(--danger-light);  color: var(--danger); }
.badge-info    { background: var(--info-light);    color: var(--info); }
.badge-muted   { background: var(--surface3);      color: var(--text-muted); }

/* ── Tables ────────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1.5px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
thead th {
  background: var(--surface2);
  padding: 12px 16px;
  text-align: left; font-weight: 700;
  font-size: 0.75rem; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-muted);
  white-space: nowrap;
}
tbody tr { border-bottom: 1px solid var(--border); transition: background var(--transition); }
tbody tr:hover { background: var(--surface2); }
tbody tr:last-child { border-bottom: none; }
tbody td { padding: 13px 16px; color: var(--text); vertical-align: middle; }
tbody td.muted { color: var(--text-muted); }

tr.low-stock td { background: rgba(217, 119, 6, 0.04); }
tr.low-stock .stock-val { color: var(--warning); font-weight: 700; }

/* ── Modal ─────────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(12, 20, 38, 0.5);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; opacity: 0; pointer-events: none;
  transition: opacity var(--transition);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px; width: min(540px, 92vw);
  max-height: 90vh; overflow-y: auto;
  transform: scale(0.94) translateY(16px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: var(--shadow-md);
}
.modal-overlay.open .modal { transform: scale(1) translateY(0); }
.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 24px; padding-bottom: 16px;
  border-bottom: 1.5px solid var(--border);
}
.modal-header h2 { font-size: 1.2rem; }
.modal-close {
  background: none; border: none; color: var(--text-muted);
  cursor: pointer; padding: 6px; border-radius: 8px;
  transition: all var(--transition); font-size: 1.2rem;
}
.modal-close:hover { color: var(--text); background: var(--surface2); }
.modal-footer {
  display: flex; gap: 12px; justify-content: flex-end;
  margin-top: 24px; padding-top: 20px;
  border-top: 1.5px solid var(--border);
}
.modal form { display: flex; flex-direction: column; gap: 16px; }

/* ── Toast ─────────────────────────────────────────────────────────────────── */
#toast-container {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 9999; display: flex; flex-direction: column;
  gap: 10px; pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px; border-radius: var(--radius-sm);
  font-size: 0.88rem; font-weight: 600;
  max-width: 360px; pointer-events: all;
  box-shadow: var(--shadow-md);
  animation: slideInRight 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), fadeOut 0.4s ease 3.2s forwards;
  border-left: 3px solid;
}
.toast-success { background: #fff; border-color: var(--success); color: var(--text); }
.toast-error   { background: #fff; border-color: var(--danger);  color: var(--text); }
.toast-info    { background: #fff; border-color: var(--primary); color: var(--text); }
.toast-icon { font-size: 1.1rem; }

@keyframes slideInRight {
  from { transform: translateX(110%) scale(0.85); opacity: 0; }
  to   { transform: translateX(0) scale(1);       opacity: 1; }
}
@keyframes fadeOut { to { opacity: 0; transform: translateX(110%); } }

/* ── Spinner ─────────────────────────────────────────────────────────────── */
.spinner {
  width: 18px; height: 18px;
  border: 2px solid var(--surface3);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: inline-block; flex-shrink: 0;
}
.spinner-lg { width: 40px; height: 40px; border-width: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }

.loading-state {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; padding: 60px; color: var(--text-muted);
}

/* ── Empty State ─────────────────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state .empty-icon { font-size: 3.5rem; margin-bottom: 12px; opacity: 0.35; }
.empty-state p { margin-top: 6px; font-size: 0.9rem; }

/* ═══════════════════════════════════════════════════════════════════════════ */
/* LOGIN PAGE                                                                  */
/* ═══════════════════════════════════════════════════════════════════════════ */
.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
}

/* Brand side — keep dark/gradient for contrast */
.auth-brand {
  background: linear-gradient(160deg, #1e0a4a 0%, #0c1a3a 50%, #03111f 100%);
  display: flex; flex-direction: column;
  justify-content: center; align-items: flex-start;
  padding: 64px 72px;
  position: relative; overflow: hidden;
}

.auth-brand .orb {
  position: absolute; border-radius: 50%;
  filter: blur(80px);
  animation: floatOrb 8s ease-in-out infinite;
  pointer-events: none;
}
.orb-1 { width: 400px; height: 400px; background: rgba(109,40,217,0.3);  top: -100px; left: -100px; animation-delay: 0s; }
.orb-2 { width: 300px; height: 300px; background: rgba(8,145,178,0.25);  bottom: -60px; right: -60px; animation-delay: 3s; }
.orb-3 { width: 200px; height: 200px; background: rgba(219,39,119,0.2);  top: 55%; left: 60%; animation-delay: 5s; }

@keyframes floatOrb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(18px, -28px) scale(1.06); }
  66%       { transform: translate(-14px, 18px) scale(0.96); }
}

.brand-logo {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 40px; z-index: 1;
}
.brand-logo .logo-icon {
  width: 54px; height: 54px;
  background: var(--grad-primary);
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  box-shadow: var(--shadow-glow-primary);
}
.brand-logo .logo-text {
  font-size: 1.6rem; font-weight: 800; letter-spacing: -0.03em;
  color: #fff;
}

.brand-headline {
  font-size: 2.7rem; font-weight: 900;
  line-height: 1.15; letter-spacing: -0.04em;
  margin-bottom: 18px; z-index: 1; color: #fff;
}
.brand-headline .hl-violet { color: #c4b5fd; }
.brand-headline .hl-cyan   { color: #67e8f9; }

.brand-tagline {
  font-size: 1rem; color: rgba(255,255,255,0.6);
  max-width: 380px; line-height: 1.75; z-index: 1; margin-bottom: 44px;
}

/* Stat Pills */
.brand-stats { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 44px; z-index: 1; }
.stat-pill {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 100px; padding: 10px 18px;
  display: flex; align-items: center; gap: 10px;
  backdrop-filter: blur(10px);
}
.stat-pill .sp-num {
  font-size: 1.2rem; font-weight: 900;
  background: var(--grad-primary);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-pill:nth-child(2) .sp-num { background: var(--grad-pink); -webkit-background-clip: text; background-clip: text; }
.stat-pill:nth-child(3) .sp-num { background: var(--grad-green); -webkit-background-clip: text; background-clip: text; }
.stat-pill .sp-label { font-size: 0.78rem; color: rgba(255,255,255,0.55); font-weight: 500; }

/* Journey Steps */
.brand-journey { z-index: 1; }
.journey-label {
  font-size: 0.72rem; text-transform: uppercase;
  letter-spacing: 0.1em; color: rgba(255,255,255,0.4);
  font-weight: 700; margin-bottom: 14px;
}
.journey-steps { display: flex; align-items: center; }
.journey-step { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.step-circle {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
}
.step-circle.s1 { background: linear-gradient(135deg, #6d28d9, #a78bfa); box-shadow: 0 4px 14px rgba(109,40,217,0.45); }
.step-circle.s2 { background: linear-gradient(135deg, #0891b2, #2563eb); box-shadow: 0 4px 14px rgba(8,145,178,0.45); }
.step-circle.s3 { background: linear-gradient(135deg, #db2777, #ea580c); box-shadow: 0 4px 14px rgba(219,39,119,0.45); }
.step-circle.s4 { background: linear-gradient(135deg, #059669, #0891b2); box-shadow: 0 4px 14px rgba(5,150,105,0.45); }
.step-label { font-size: 0.68rem; color: rgba(255,255,255,0.5); font-weight: 600; text-align: center; max-width: 68px; }
.step-connector {
  width: 32px; height: 2px;
  background: linear-gradient(90deg, rgba(109,40,217,0.5), rgba(8,145,178,0.5));
  margin: 0 4px; margin-bottom: 22px;
}

/* Form side — light */
.auth-form-side {
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  padding: 60px 72px;
  background: var(--bg);
}
.auth-box { width: 100%; max-width: 380px; }

.auth-tabs {
  display: flex; background: var(--surface2);
  border-radius: var(--radius-sm); padding: 4px;
  margin-bottom: 32px; border: 1.5px solid var(--border);
}
.auth-tab {
  flex: 1; padding: 9px; text-align: center;
  font-size: 0.88rem; font-weight: 600;
  color: var(--text-muted); cursor: pointer;
  border-radius: 7px; transition: all var(--transition); user-select: none;
}
.auth-tab.active {
  background: var(--grad-primary); color: #fff;
  box-shadow: var(--shadow-glow-primary);
}

.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-form h2 { margin-bottom: 2px; font-size: 1.5rem; }
.auth-form p { color: var(--text-muted); font-size: 0.88rem; margin-bottom: 6px; }

.btn-login-full {
  width: 100%; justify-content: center; padding: 13px;
  font-size: 0.95rem; border-radius: var(--radius-sm);
}

.demo-hint {
  margin-top: 24px; padding: 16px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.82rem; color: var(--text-muted);
  box-shadow: var(--shadow-sm);
}
.demo-hint strong { color: var(--text); display: block; margin-bottom: 10px; font-size: 0.85rem; }
.demo-creds { display: flex; flex-direction: column; gap: 6px; }
.demo-cred {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 12px; background: var(--surface2);
  border-radius: var(--radius-sm); border: 1.5px solid var(--border);
  cursor: pointer; transition: all var(--transition);
}
.demo-cred:hover { background: var(--surface3); border-color: var(--primary); }
.demo-cred-role { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 0.83rem; }
.demo-cred-role .role-dot { width: 8px; height: 8px; border-radius: 50%; }
.demo-cred-role .role-dot.manager  { background: var(--primary); box-shadow: 0 0 6px rgba(109,40,217,0.5); }
.demo-cred-role .role-dot.customer { background: var(--success); box-shadow: 0 0 6px rgba(5,150,105,0.5); }
.demo-cred code { font-family: 'Fira Code', monospace; font-size: 0.78rem; color: var(--text-dim); }

/* ═══════════════════════════════════════════════════════════════════════════ */
/* APP LAYOUT                                                                   */
/* ═══════════════════════════════════════════════════════════════════════════ */
.app-layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: 60px 1fr;
  min-height: 100vh;
}

/* Topbar */
.topbar {
  grid-column: 1 / -1;
  background: var(--surface);
  border-bottom: 1.5px solid var(--border);
  box-shadow: 0 1px 12px rgba(12, 20, 38, 0.06);
  display: flex; align-items: center;
  padding: 0 24px; gap: 16px;
  position: sticky; top: 0; z-index: 100;
}
.topbar-logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 1.05rem;
  margin-right: auto; letter-spacing: -0.02em; color: var(--text);
}
.topbar-logo .t-icon {
  width: 34px; height: 34px;
  background: var(--grad-primary);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; box-shadow: var(--shadow-glow-primary);
}

.topbar-actions { display: flex; align-items: center; gap: 10px; }
.topbar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 14px; background: var(--surface2);
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
}
.topbar-avatar {
  width: 30px; height: 30px;
  background: var(--grad-primary); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem; font-weight: 800; color: #fff;
}
.topbar-username { font-size: 0.88rem; font-weight: 600; color: var(--text); }

/* Sidebar */
.sidebar {
  background: var(--surface);
  border-right: 1.5px solid var(--border);
  padding: 20px 12px;
  display: flex; flex-direction: column; gap: 3px;
  overflow-y: auto;
}
.sidebar-label {
  font-size: 0.68rem; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--text-dim);
  padding: 12px 12px 6px; font-weight: 700;
}
.sidebar-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  color: var(--text-muted); font-size: 0.88rem; font-weight: 600;
  cursor: pointer; transition: all var(--transition);
  user-select: none; border: none; background: none;
  text-align: left; width: 100%;
}
.sidebar-item:hover { background: var(--surface2); color: var(--text); }
.sidebar-item.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
}
.sidebar-item .s-icon { font-size: 1.1rem; width: 22px; text-align: center; }

/* Main content */
.main-content { overflow-y: auto; padding: 28px; background: var(--bg); }

/* ═══════════════════════════════════════════════════════════════════════════ */
/* MANAGER DASHBOARD                                                            */
/* ═══════════════════════════════════════════════════════════════════════════ */
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 28px; flex-wrap: wrap; gap: 16px;
}
.page-title { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; color: var(--text); }
.page-subtitle { color: var(--text-muted); font-size: 0.88rem; margin-top: 3px; }

/* Stat cards — colorful on light bg */
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 16px; margin-bottom: 28px;
}
.stat-card {
  border-radius: var(--radius);
  padding: 22px;
  display: flex; flex-direction: column; gap: 14px;
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative; overflow: hidden;
  border: none;
}
.stat-card:hover { transform: translateY(-3px); }

.stat-card.sc-violet {
  background: linear-gradient(135deg, #6d28d9 0%, #7c3aed 100%);
  box-shadow: 0 8px 32px rgba(109, 40, 217, 0.35);
  color: #fff;
}
.stat-card.sc-cyan {
  background: linear-gradient(135deg, #0891b2 0%, #2563eb 100%);
  box-shadow: 0 8px 32px rgba(8, 145, 178, 0.35);
  color: #fff;
}
.stat-card.sc-green {
  background: linear-gradient(135deg, #059669 0%, #0891b2 100%);
  box-shadow: 0 8px 32px rgba(5, 150, 105, 0.35);
  color: #fff;
}
.stat-card.sc-amber {
  background: linear-gradient(135deg, #d97706 0%, #dc2626 100%);
  box-shadow: 0 8px 32px rgba(217, 119, 6, 0.35);
  color: #fff;
}

.stat-card.sc-violet:hover { box-shadow: 0 14px 44px rgba(109,40,217,0.45); }
.stat-card.sc-cyan:hover   { box-shadow: 0 14px 44px rgba(8,145,178,0.45); }
.stat-card.sc-green:hover  { box-shadow: 0 14px 44px rgba(5,150,105,0.45); }
.stat-card.sc-amber:hover  { box-shadow: 0 14px 44px rgba(217,119,6,0.45); }

.stat-icon-wrap {
  width: 46px; height: 46px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; background: rgba(255,255,255,0.2);
}
.stat-value { font-size: 2rem; font-weight: 900; letter-spacing: -0.04em; line-height: 1; color: #fff; }
.stat-label { font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: rgba(255,255,255,0.75); }

/* Dashboard layout */
.dash-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }

.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.section-title { font-size: 1rem; font-weight: 700; color: var(--text); }

.toolbar { display: flex; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.toolbar .input { max-width: 280px; }

.low-stock-list { display: flex; flex-direction: column; gap: 8px; }
.low-stock-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; background: var(--surface2);
  border-radius: var(--radius-sm); border: 1.5px solid var(--border);
  font-size: 0.85rem; transition: border-color var(--transition);
}
.low-stock-item:hover { border-color: var(--warning); }
.low-stock-item .ls-name { font-weight: 600; color: var(--text); }
.low-stock-item .ls-qty {
  font-weight: 800; color: var(--warning);
  background: var(--warning-light); padding: 2px 8px; border-radius: 8px;
}

.action-btns { display: flex; gap: 6px; }

/* ═══════════════════════════════════════════════════════════════════════════ */
/* CUSTOMER SHOP                                                                */
/* ═══════════════════════════════════════════════════════════════════════════ */
.shop-layout {
  display: grid; grid-template-columns: 210px 1fr;
  min-height: calc(100vh - 60px);
}

.shop-sidebar {
  background: var(--surface);
  border-right: 1.5px solid var(--border);
  padding: 24px 14px;
}
.shop-sidebar h3 {
  font-size: 0.72rem; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--text-dim);
  margin-bottom: 14px; font-weight: 700; padding-left: 4px;
}

.category-filter { display: flex; flex-direction: column; gap: 4px; }
.cat-btn {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border: none;
  border-radius: var(--radius-sm); background: none;
  color: var(--text-muted); font-size: 0.88rem;
  cursor: pointer; transition: all var(--transition);
  text-align: left; width: 100%; font-weight: 600;
}
.cat-btn:hover { background: var(--surface2); color: var(--text); }
.cat-btn.active { background: var(--primary-light); color: var(--primary); font-weight: 700; }
.cat-btn .cat-icon { font-size: 1.05rem; width: 20px; }
.cat-btn .cat-count {
  margin-left: auto; font-size: 0.72rem;
  background: var(--surface3); padding: 2px 8px;
  border-radius: 10px; color: var(--text-muted);
}
.cat-btn.active .cat-count { background: var(--primary); color: #fff; }

.shop-main { padding: 28px; overflow-y: auto; background: var(--bg); }
.shop-search-bar { display: flex; gap: 12px; margin-bottom: 28px; align-items: center; }
.shop-search-bar .input { max-width: 440px; }

/* Product grid */
.product-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px; margin-bottom: 32px;
}
.product-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-sm);
}
.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 48px rgba(12, 20, 38, 0.14);
  border-color: var(--surface4);
}
.product-card.out-of-stock { opacity: 0.55; }
.product-card.out-of-stock .btn-primary {
  background: var(--surface3); color: var(--text-dim);
  cursor: not-allowed; pointer-events: none; box-shadow: none;
}

/* Product image — vivid category gradients */
.product-img {
  height: 160px;
  display: flex; align-items: center; justify-content: center;
  font-size: 3.2rem; position: relative;
}
.product-img img { position: relative; z-index: 1; }

.cat-Electronics { background: linear-gradient(135deg, #1e1b4b, #312e81, #2563eb); }
.cat-Grocery     { background: linear-gradient(135deg, #064e3b, #065f46, #059669); }
.cat-Beverages   { background: linear-gradient(135deg, #083344, #0e4f63, #0891b2); }
.cat-Snacks      { background: linear-gradient(135deg, #431407, #7c2d12, #ea580c); }
.cat-Dairy       { background: linear-gradient(135deg, #1e3a5f, #1d4ed8, #3b82f6); }
.cat-General     { background: linear-gradient(135deg, #2e1065, #4c1d95, #6d28d9); }

.product-body { padding: 16px; flex: 1; display: flex; flex-direction: column; gap: 9px; }
.product-name { font-weight: 700; font-size: 0.93rem; line-height: 1.3; color: var(--text); }
.product-desc { font-size: 0.78rem; color: var(--text-muted); line-height: 1.45; flex: 1; }
.product-meta { display: flex; align-items: center; justify-content: space-between; }
.product-price { font-size: 1.15rem; font-weight: 900; letter-spacing: -0.02em; color: var(--primary); }

.stock-indicator {
  font-size: 0.72rem; padding: 3px 9px;
  border-radius: 10px; font-weight: 700;
}
.stock-ok  { background: var(--success-light); color: var(--success); }
.stock-low { background: var(--warning-light); color: var(--warning); }
.stock-out { background: var(--danger-light);  color: var(--danger); }

/* Cart sidebar */
.cart-overlay {
  position: fixed; inset: 0;
  background: rgba(12, 20, 38, 0.4);
  z-index: 200; opacity: 0; pointer-events: none;
  transition: opacity var(--transition);
  backdrop-filter: blur(4px);
}
.cart-overlay.open { opacity: 1; pointer-events: all; }

.cart-panel {
  position: fixed; top: 0; right: 0;
  width: min(420px, 100vw); height: 100vh;
  background: var(--surface);
  border-left: 1.5px solid var(--border);
  z-index: 201; display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.34, 1.2, 0.64, 1);
  box-shadow: -12px 0 60px rgba(12, 20, 38, 0.18);
}
.cart-panel.open { transform: translateX(0); }

.cart-header {
  padding: 22px 24px;
  border-bottom: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(135deg, rgba(109,40,217,0.08), rgba(8,145,178,0.05));
}
.cart-header h2 { font-size: 1.1rem; display: flex; align-items: center; gap: 10px; color: var(--text); }
.cart-count-badge {
  background: var(--grad-primary); color: #fff;
  font-size: 0.72rem; padding: 3px 8px;
  border-radius: 10px; font-weight: 800;
}

.cart-items { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.cart-item {
  display: flex; gap: 12px; padding: 12px;
  background: var(--surface2); border-radius: var(--radius-sm);
  border: 1.5px solid var(--border); align-items: center;
  transition: border-color var(--transition);
}
.cart-item:hover { border-color: var(--surface4); }
.cart-item-img {
  width: 50px; height: 50px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; flex-shrink: 0; overflow: hidden;
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-size: 0.85rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.cart-item-price { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }
.cart-item-controls { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.qty-btn {
  width: 28px; height: 28px; background: var(--surface3);
  border: none; color: var(--text); border-radius: 7px;
  cursor: pointer; font-size: 1rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.qty-btn:hover { background: var(--grad-primary); color: #fff; box-shadow: 0 2px 10px rgba(109,40,217,0.35); }
.qty-val { font-size: 0.9rem; font-weight: 800; min-width: 22px; text-align: center; color: var(--text); }
.cart-item-remove {
  background: none; border: none; color: var(--text-dim);
  cursor: pointer; padding: 4px; border-radius: 6px;
  transition: color var(--transition); font-size: 0.95rem;
}
.cart-item-remove:hover { color: var(--danger); }

.cart-footer {
  padding: 20px 24px; border-top: 1.5px solid var(--border);
  display: flex; flex-direction: column; gap: 14px;
}
.cart-total { display: flex; justify-content: space-between; align-items: center; }
.cart-total .total-label { color: var(--text-muted); font-weight: 600; }
.cart-total .total-value {
  font-size: 1.5rem; font-weight: 900; letter-spacing: -0.03em;
  background: var(--grad-primary);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.cart-trigger {
  position: relative;
  background: var(--primary-light);
  border: 1.5px solid rgba(109,40,217,0.25);
  border-radius: var(--radius-sm); padding: 8px 16px;
  cursor: pointer; display: flex; align-items: center; gap: 8px;
  color: var(--primary); font-size: 0.88rem; font-weight: 700;
  transition: all var(--transition);
}
.cart-trigger:hover { background: rgba(109,40,217,0.18); box-shadow: 0 0 16px rgba(109,40,217,0.2); }
.cart-badge {
  position: absolute; top: -6px; right: -6px;
  background: var(--grad-pink); color: #fff;
  font-size: 0.65rem; font-weight: 800;
  width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--bg);
}
.cart-badge.hidden { display: none; }

/* Checkout success */
.checkout-success { text-align: center; padding: 40px 20px; display: none; }
.checkout-success.show { display: block; }
.success-check {
  font-size: 4.5rem;
  animation: bounceIn 0.65s cubic-bezier(0.36, 0.07, 0.19, 0.97);
  margin-bottom: 16px;
}
.success-title { font-size: 1.2rem; font-weight: 800; margin-bottom: 8px; color: var(--text); }
.success-sub { font-size: 0.88rem; color: var(--text-muted); }

@keyframes bounceIn {
  0%   { transform: scale(0) rotate(-15deg); opacity: 0; }
  60%  { transform: scale(1.2) rotate(5deg); }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

/* Order history toggle */
.order-history-toggle {
  display: flex; align-items: center; gap: 8px;
  cursor: pointer; font-size: 0.88rem; color: var(--text-muted);
  padding: 7px 14px; background: var(--surface);
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-weight: 600; transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}
.order-history-toggle:hover { color: var(--text); border-color: var(--surface4); }

/* Notification dot */
.notif-btn {
  position: relative; background: var(--surface);
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  padding: 8px; cursor: pointer; color: var(--text-muted);
  transition: all var(--transition); font-size: 1rem;
  box-shadow: var(--shadow-sm);
}
.notif-btn:hover { background: var(--surface2); color: var(--text); }
.notif-dot {
  position: absolute; top: 5px; right: 5px;
  width: 8px; height: 8px; background: var(--danger);
  border-radius: 50%; border: 2px solid var(--surface);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.35); opacity: 0.8; }
}

.view-section { display: none; }
.view-section.active { display: block; }

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1200px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-grid { grid-template-columns: 1fr; }
}
@media (max-width: 1000px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-form-side { padding: 40px 24px; }
  .app-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .shop-layout { grid-template-columns: 1fr; }
  .shop-sidebar { display: none; }
}
@media (max-width: 640px) {
  .stats-grid { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .main-content { padding: 16px; }
  .brand-stats { flex-direction: column; gap: 10px; }
}

/* ── Landing page utilities ─────────────────────────────────────────────── */
.text-center { text-align: center; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
