/* ── Ayoke Store Design System ─────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;0,9..40,800;1,9..40,400&family=Playfair+Display:ital,wght@0,600;1,600&display=swap');

:root {
  /* Brand palette — derived from ÀYÒKÉ STORE flyer */
  --navy-950: #071428;
  --navy-900: #0B1B3E;
  --navy-800: #102A43;
  --navy-700: #1A3A5C;
  --navy-600: #243B53;
  --navy-500: #334E68;

  --gold-500: #F5C518;
  --gold-400: #FFD033;
  --gold-600: #D4A90A;

  --white: #FFFFFF;
  --gray-50: #F8FAFC;
  --gray-100: #F1F5F9;
  --gray-200: #E2E8F0;
  --gray-300: #CBD5E1;
  --gray-400: #94A3B8;
  --gray-500: #64748B;
  --gray-600: #475569;
  --gray-700: #334155;

  --success: #059669;
  --success-bg: #ECFDF5;
  --warning: #D97706;
  --warning-bg: #FFFBEB;
  --danger: #DC2626;
  --danger-bg: #FEF2F2;
  --info: #0284C7;
  --info-bg: #F0F9FF;

  /* Semantic tokens */
  --color-primary: var(--navy-800);
  --color-primary-light: var(--navy-600);
  --color-accent: var(--gold-500);
  --color-accent-hover: var(--gold-400);
  --color-bg: var(--gray-50);
  --color-surface: var(--white);
  --color-text: var(--navy-900);
  --color-text-muted: var(--gray-500);
  --color-border: var(--gray-200);

  /* Layout */
  --sidebar-width: 260px;
  --topbar-height: 60px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(7, 20, 40, 0.05);
  --shadow-md: 0 4px 12px rgba(7, 20, 40, 0.08);
  --shadow-lg: 0 12px 32px rgba(7, 20, 40, 0.12);
  --shadow-sidebar: 4px 0 24px rgba(7, 20, 40, 0.18);

  /* Typography */
  --font-sans: 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;

  /* Transitions */
  --transition: 180ms cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 0.9375rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

/* ── App Shell ─────────────────────────────────────────────────────── */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-width);
  background: linear-gradient(180deg, var(--navy-950) 0%, var(--navy-800) 100%);
  color: rgba(255, 255, 255, 0.85);
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sidebar);
  overflow-y: auto;
}

.sidebar-brand {
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--white);
}

.sidebar-brand img {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 2px solid var(--gold-500);
}

.sidebar-brand .brand-name {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.sidebar-brand .brand-sub {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold-500);
  font-weight: 600;
}

.sidebar-nav {
  padding: 0.75rem;
  flex: 1;
}

.sidebar-section {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.35);
  padding: 0.75rem 0.75rem 0.35rem;
  font-weight: 600;
}

.sidebar .nav-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.85rem;
  margin: 2px 0;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.875rem;
  transition: background var(--transition), color var(--transition);
  border-left: 3px solid transparent;
}

.sidebar .nav-link i { font-size: 1.05rem; opacity: 0.8; }

.sidebar .nav-link:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--white);
}

.sidebar .nav-link.active {
  background: rgba(245, 197, 24, 0.12);
  color: var(--gold-400);
  border-left-color: var(--gold-500);
  font-weight: 600;
}

.sidebar .nav-link.active i { opacity: 1; }

.sidebar .nav-link.nav-pos {
  background: var(--gold-500);
  color: var(--navy-900);
  font-weight: 700;
  margin-top: 0.5rem;
}

.sidebar .nav-link.nav-pos:hover {
  background: var(--gold-400);
  color: var(--navy-900);
}

.sidebar .nav-link.nav-pos.active {
  background: var(--gold-400);
  border-left-color: transparent;
}

.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
}

.main {
  margin-left: var(--sidebar-width);
  width: calc(100% - var(--sidebar-width));
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: var(--topbar-height);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-text);
}

.topbar-breadcrumb {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.topbar-breadcrumb a {
  color: var(--color-text-muted);
  text-decoration: none;
}

.topbar-breadcrumb a:hover { color: var(--navy-600); }

.topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8125rem;
  background: transparent;
  border: 0;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  color: inherit;
  cursor: pointer;
  transition: background var(--transition);
}

.topbar-user:hover,
.topbar-user:focus,
.topbar-user.show {
  background: var(--gray-100);
  color: inherit;
}

.topbar-user::after { display: none; }

.topbar-user-info .fw-semibold { font-size: 0.8125rem; }
.topbar-user-info .text-muted { font-size: 0.7rem; }

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  border-color: var(--color-border);
  background: var(--color-surface);
}

.btn-icon:hover {
  color: var(--color-text);
  background: var(--gray-100);
  border-color: var(--color-border);
}

.topbar-user-menu {
  min-width: 220px;
  padding: 0.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}

.topbar-user-menu .dropdown-header {
  padding: 0.5rem 0.75rem;
  white-space: normal;
}

.topbar-user-menu .dropdown-item {
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.topbar-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy-700), var(--navy-500));
  color: var(--white);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.75rem;
}

.content {
  padding: 1.5rem;
  flex: 1;
}

/* ── Cards & Stats ─────────────────────────────────────────────────── */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--color-border);
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--color-text);
  background: var(--gray-50);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--navy-600);
}

.stat-card.accent::before { background: var(--gold-500); }
.stat-card.success::before { background: var(--success); }
.stat-card.warning::before { background: var(--warning); }
.stat-card.danger::before { background: var(--danger); }

.stat-card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.stat-card-icon.navy { background: rgba(16, 42, 67, 0.08); color: var(--navy-700); }
.stat-card-icon.gold { background: rgba(245, 197, 24, 0.15); color: var(--gold-600); }
.stat-card-icon.green { background: var(--success-bg); color: var(--success); }
.stat-card-icon.orange { background: var(--warning-bg); color: var(--warning); }

.stat-card label,
.stat-card .stat-label {
  display: block;
  color: var(--color-text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.stat-card strong {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-text);
  letter-spacing: -0.02em;
  line-height: 1.2;
  word-break: break-word;
}

.stat-card small {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

/* ── Page Layout ───────────────────────────────────────────────────── */
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.page-head h1 {
  font-size: 1.5rem;
  margin: 0;
  color: var(--navy-800);
}

.page-subtitle {
  color: var(--color-text-muted);
  font-size: 0.875rem;
  margin: 0.25rem 0 0;
}

.page-head-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* ── Filters ───────────────────────────────────────────────────────── */
.filters {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  background: var(--color-surface);
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

/* ── Tables ────────────────────────────────────────────────────────── */
.table { font-size: 0.875rem; }

.table thead th {
  background: var(--gray-50);
  color: var(--gray-600);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--color-border);
  padding: 0.75rem 1rem;
  white-space: nowrap;
}

.table tbody td {
  padding: 0.75rem 1rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--gray-100);
}

.table tbody tr:last-child td { border-bottom: 0; }

.table tbody tr:hover { background: var(--gray-50); }

.table .badge { font-weight: 600; font-size: 0.7rem; }

/* ── Buttons ───────────────────────────────────────────────────────── */
.btn {
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.btn-primary {
  background: var(--navy-800);
  border-color: var(--navy-800);
  color: var(--white);
}

.btn-primary:hover, .btn-primary:focus {
  background: var(--navy-700);
  border-color: var(--navy-700);
  color: var(--white);
}

.btn-accent {
  background: var(--gold-500);
  border-color: var(--gold-500);
  color: var(--navy-900);
  font-weight: 700;
}

.btn-accent:hover {
  background: var(--gold-400);
  border-color: var(--gold-400);
  color: var(--navy-900);
}

.btn-outline-primary {
  color: var(--navy-700);
  border-color: var(--navy-600);
}

.btn-outline-primary:hover {
  background: var(--navy-800);
  border-color: var(--navy-800);
  color: var(--white);
}

/* ── Forms ─────────────────────────────────────────────────────────── */
.form-control, .form-select {
  border-color: var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-control:focus, .form-select:focus {
  border-color: var(--navy-500);
  box-shadow: 0 0 0 3px rgba(36, 59, 83, 0.12);
}

.form-label {
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--gray-700);
  margin-bottom: 0.35rem;
}

.password-input-wrap {
  position: relative;
}

.password-input-wrap .form-control {
  padding-right: 2.75rem;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 0.55rem;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--color-text-muted);
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color var(--transition), background var(--transition);
}

.password-toggle:hover {
  color: var(--color-text);
  background: var(--gray-100);
}

.password-toggle .bi-eye,
.password-toggle .bi-eye-slash {
  font-size: 1rem;
  line-height: 1;
}

.password-toggle .bi-eye-slash {
  display: none;
}

.password-toggle.is-visible .bi-eye {
  display: none;
}

.password-toggle.is-visible .bi-eye-slash {
  display: inline;
}

.form-card {
  max-width: 720px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.form-page {
  max-width: 920px;
  margin: 0 auto;
}

.form-shell {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.form-shell .card-body,
.form-shell-body {
  padding: 1.75rem;
}

.form-section {
  margin-bottom: 1.75rem;
}

.form-section:last-of-type {
  margin-bottom: 0;
}

.form-section-title {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--navy-700);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-section-title i {
  color: var(--gold-600);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.15rem 1.25rem;
}

.form-field.full-width {
  grid-column: 1 / -1;
}

.field-error {
  color: var(--danger);
  font-size: 0.8125rem;
  margin-top: 0.3rem;
}

.form-field .form-control.is-invalid,
.form-field .form-select.is-invalid {
  border-color: var(--danger);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: 1.5rem;
  margin-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

.form-check.form-switch {
  padding-left: 2.5rem;
  min-height: 1.5rem;
}

.form-check.form-switch .form-check-input {
  width: 2.5rem;
  height: 1.25rem;
  margin-left: -2.5rem;
}

@media (max-width: 768px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Login ─────────────────────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.login-brand-panel {
  background: linear-gradient(160deg, var(--navy-950) 0%, var(--navy-800) 60%, var(--navy-700) 100%);
  color: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem;
  position: relative;
  overflow: hidden;
}

.login-brand-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 80%, rgba(245, 197, 24, 0.08) 0%, transparent 50%),
              radial-gradient(circle at 80% 20%, rgba(245, 197, 24, 0.05) 0%, transparent 40%);
}

.login-brand-panel > * { position: relative; z-index: 1; }

.login-brand-panel img {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-md);
  border: 3px solid var(--gold-500);
  margin-bottom: 1.5rem;
}

.login-brand-panel h1 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.login-brand-panel h1 span { color: var(--gold-500); }

.login-brand-panel .tagline {
  font-family: var(--font-display);
  font-style: italic;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.login-brand-panel .features {
  list-style: none;
  padding: 0;
  margin: 0;
}

.login-brand-panel .features li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.75);
}

.login-brand-panel .features li i {
  color: var(--gold-500);
  font-size: 1rem;
}

.login-form-panel {
  display: grid;
  place-items: center;
  padding: 2rem;
  background: var(--gray-50);
}

.login-card {
  width: min(400px, 100%);
  background: var(--white);
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
}

.login-card h2 {
  font-size: 1.375rem;
  margin-bottom: 0.25rem;
}

.login-card .subtitle {
  color: var(--color-text-muted);
  font-size: 0.875rem;
  margin-bottom: 1.75rem;
}

.login-card .form-group { margin-bottom: 1.25rem; }

.login-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 0.8125rem;
  margin-top: 1.5rem;
}

.login-back-link:hover { color: var(--navy-700); }

/* ── Dashboard ─────────────────────────────────────────────────────── */
.dashboard-greeting {
  margin-bottom: 1.5rem;
}

.dashboard-greeting h1 {
  font-size: 1.625rem;
  margin-bottom: 0.15rem;
}

.dashboard-greeting p {
  color: var(--color-text-muted);
  margin: 0;
  font-size: 0.875rem;
}

.quick-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.quick-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.8125rem;
  text-decoration: none;
  transition: all var(--transition);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
}

.quick-action-btn:hover {
  border-color: var(--navy-600);
  background: var(--navy-800);
  color: var(--white);
}

.quick-action-btn.primary {
  background: var(--gold-500);
  border-color: var(--gold-500);
  color: var(--navy-900);
}

.quick-action-btn.primary:hover {
  background: var(--gold-400);
  border-color: var(--gold-400);
}

.quick-action-btn.primary:hover {
  background: var(--gold-400);
  border-color: var(--gold-400);
}

/* ── Analytics & breakdowns ─────────────────────────────────────────── */
.analytics-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  height: 100%;
}

.analytics-card h3 {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--navy-800);
  margin-bottom: 1rem;
}

.profit-breakdown {
  margin-top: 0.5rem;
}

.profit-breakdown-bar {
  display: flex;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--gray-100);
  margin-bottom: 0.75rem;
}

.profit-breakdown-cogs {
  background: var(--gray-400);
  transition: width 0.4s ease;
}

.profit-breakdown-profit {
  background: linear-gradient(90deg, var(--success), #34D399);
  transition: width 0.4s ease;
}

.profit-breakdown-expenses {
  background: linear-gradient(90deg, #F97316, #FB923C);
  transition: width 0.4s ease;
}

.profit-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8125rem;
}

.profit-legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--gray-600);
}

.profit-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.profit-legend-dot.cogs { background: var(--gray-400); }
.profit-legend-dot.expenses { background: #F97316; }
.profit-legend-dot.profit { background: var(--success); }

.share-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.share-bar-track {
  flex: 1;
  height: 6px;
  background: var(--gray-100);
  border-radius: 999px;
  overflow: hidden;
  min-width: 60px;
}

.share-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--navy-600), var(--gold-500));
  border-radius: 999px;
}

.share-bar-label {
  font-size: 0.75rem;
  color: var(--gray-500);
  min-width: 36px;
  text-align: right;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.table-actions .btn,
.table-actions a.btn {
  font-size: 0.75rem;
  padding: 0.2rem 0.55rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.detail-item label {
  display: block;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-400);
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.detail-item span {
  font-weight: 600;
  color: var(--navy-800);
  font-size: 0.875rem;
}

.summary-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 1rem 1.25rem;
  background: var(--gray-50);
  border-top: 1px solid var(--color-border);
  font-size: 0.875rem;
}

.summary-strip strong {
  color: var(--navy-900);
  font-size: 1rem;
}

.week-chart {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  padding: 0.5rem 0;
}

.week-bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.week-bar-track {
  width: 100%;
  max-width: 36px;
  height: 72px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.week-bar {
  width: 100%;
  background: linear-gradient(180deg, var(--gold-400), var(--gold-600));
  border-radius: 4px 4px 0 0;
  min-height: 0;
  transition: height 0.4s ease;
}

.week-bar.is-empty {
  height: 0 !important;
  min-height: 0;
}

.week-bar-label {
  font-size: 0.65rem;
  color: var(--color-text-muted);
  font-weight: 600;
}

.low-stock-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--gray-100);
  text-decoration: none;
  color: inherit;
  transition: background var(--transition);
}

.low-stock-item:hover { background: var(--warning-bg); }

.low-stock-item:last-child { border-bottom: 0; }

/* ── Alerts & Toasts ───────────────────────────────────────────────── */
.alert {
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  border: none;
}

.alert-success { background: var(--success-bg); color: #065F46; }
.alert-warning { background: var(--warning-bg); color: #92400E; }
.alert-danger { background: var(--danger-bg); color: #991B1B; }
.alert-info { background: var(--info-bg); color: #075985; }

.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast-item {
  background: var(--white);
  color: var(--navy-900);
  padding: 0.85rem 1.15rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
  font-size: 0.875rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  animation: toast-in 0.3s ease;
  max-width: 380px;
  pointer-events: auto;
}

.toast-item.success {
  border-left: 4px solid var(--success);
  background: var(--success-bg);
  color: #065F46;
}

.toast-item.error {
  border-left: 4px solid var(--danger);
  background: var(--danger-bg);
  color: #991B1B;
}

.toast-item.warning {
  border-left: 4px solid var(--warning);
  background: var(--warning-bg);
  color: #92400E;
}

.toast-item.info {
  border-left: 4px solid var(--info);
  background: var(--info-bg);
  color: #075985;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Pagination ────────────────────────────────────────────────────── */
.pagination-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  border-top: 1px solid var(--color-border);
  background: var(--gray-50);
  font-size: 0.8125rem;
}

.pagination .page-link {
  color: var(--navy-700);
  border-color: var(--color-border);
  font-size: 0.8125rem;
  font-weight: 600;
}

.pagination .page-item.active .page-link {
  background: var(--navy-800);
  border-color: var(--navy-800);
}

/* ── Status badges ─────────────────────────────────────────────────── */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.status-badge.completed { background: var(--success-bg); color: var(--success); }
.status-badge.pending { background: var(--warning-bg); color: var(--warning); }
.status-badge.voided { background: var(--danger-bg); color: var(--danger); }

.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--color-text-muted);
}

.empty-state i {
  font-size: 2.5rem;
  opacity: 0.3;
  margin-bottom: 1rem;
  display: block;
}

.link-button {
  border: 0;
  background: transparent;
  color: var(--navy-600);
  padding: 0;
  font-weight: 600;
}

/* ── Payment page ──────────────────────────────────────────────────── */
.payment-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: linear-gradient(160deg, var(--navy-950) 0%, var(--navy-800) 100%);
}

.payment-card {
  width: min(520px, 100%);
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
}

.status-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.75rem;
  margin: 0 auto 1rem;
}

.status-icon.success { background: var(--success-bg); color: var(--success); }
.status-icon.warning { background: var(--warning-bg); color: var(--warning); }
.status-icon.error { background: var(--danger-bg); color: var(--danger); }

.claim-code {
  font-family: 'Courier New', monospace;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  background: var(--gray-50);
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  text-align: center;
}

.order-line {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--gray-100);
  font-size: 0.95rem;
}

.order-line:last-child { border-bottom: 0; }

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 992px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }

  .sidebar.open { transform: none; }

  .main { margin-left: 0; width: 100%; }

  .filters { grid-template-columns: 1fr; }

  .login-page { grid-template-columns: 1fr; }

  .login-brand-panel { display: none; }
}

/* ── Profile page ───────────────────────────────────────────────────── */
.profile-summary-card .card-body { padding: 1.75rem; }

.profile-summary-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  margin: 0 auto;
  background: linear-gradient(135deg, var(--navy-700), var(--navy-500));
  color: var(--white);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 1.5rem;
}

.profile-summary-meta {
  display: grid;
  gap: 0.75rem;
  font-size: 0.875rem;
}

.profile-summary-meta label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  margin-bottom: 0.15rem;
}

/* ── Dark theme ─────────────────────────────────────────────────────── */
[data-theme="dark"] {
  --color-bg: #0A1018;
  --color-surface: #131C2B;
  --color-text: #E8EDF4;
  --color-text-muted: #8B9BB4;
  --color-border: #243044;
  --gray-50: #1A2436;
  --gray-100: #243044;
  --gray-200: #2E3A50;
  --gray-300: #3D4D66;
  --gray-700: #C5D0E0;
  --success-bg: rgba(5, 150, 105, 0.15);
  --warning-bg: rgba(217, 119, 6, 0.15);
  --danger-bg: rgba(220, 38, 38, 0.15);
  --info-bg: rgba(2, 132, 199, 0.15);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.45);
}

[data-theme="dark"] .card-header {
  background: var(--gray-50);
  color: var(--color-text);
}

[data-theme="dark"] .table thead th {
  background: var(--gray-50);
  color: var(--color-text-muted);
}

[data-theme="dark"] .table tbody tr:hover {
  background: var(--gray-50);
}

[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
  background: var(--gray-50);
  border-color: var(--color-border);
  color: var(--color-text);
}

[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus {
  background: var(--gray-50);
  color: var(--color-text);
}

[data-theme="dark"] .dropdown-menu {
  background: var(--color-surface);
  border-color: var(--color-border);
}

[data-theme="dark"] .dropdown-item {
  color: var(--color-text);
}

[data-theme="dark"] .dropdown-item:hover,
[data-theme="dark"] .dropdown-item:focus {
  background: var(--gray-100);
  color: var(--color-text);
}

[data-theme="dark"] .dropdown-header {
  color: var(--color-text-muted);
}

[data-theme="dark"] .dropdown-divider {
  border-color: var(--color-border);
}

[data-theme="dark"] .btn-outline-secondary {
  color: var(--color-text-muted);
  border-color: var(--color-border);
}

[data-theme="dark"] .btn-outline-secondary:hover {
  background: var(--gray-100);
  color: var(--color-text);
  border-color: var(--color-border);
}

[data-theme="dark"] .badge.bg-light {
  background: var(--gray-100) !important;
  color: var(--color-text) !important;
}

[data-theme="dark"] .toast-item {
  background: var(--color-surface);
  border-color: var(--color-border);
  color: var(--color-text);
}

[data-theme="dark"] .form-section-title {
  color: var(--color-text-muted);
  border-color: var(--color-border);
}

[data-theme="dark"] .analytics-card h3,
[data-theme="dark"] .stat-card label {
  color: var(--color-text-muted);
}

[data-theme="dark"] .table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--color-text);
  --bs-table-border-color: var(--color-border);
  --bs-table-hover-bg: var(--gray-50);
  --bs-table-striped-bg: var(--gray-50);
  --bs-table-striped-color: var(--color-text);
}

[data-theme="dark"] .table tbody td,
[data-theme="dark"] .table tbody th {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}

[data-theme="dark"] .table tbody tr {
  background: transparent;
}

[data-theme="dark"] .table a:not(.btn) {
  color: var(--gold-400);
}

[data-theme="dark"] .table a:not(.btn):hover {
  color: var(--gold-500);
}

[data-theme="dark"] .btn-outline-primary {
  color: var(--gold-400);
  border-color: rgba(245, 197, 24, 0.45);
}

[data-theme="dark"] .btn-outline-primary:hover {
  background: rgba(245, 197, 24, 0.12);
  border-color: var(--gold-400);
  color: var(--gold-400);
}

[data-theme="dark"] .quick-action-btn {
  background: var(--color-surface);
  color: var(--color-text);
  border-color: var(--color-border);
}

[data-theme="dark"] .quick-action-btn:hover {
  background: var(--gray-100);
  color: var(--color-text);
  border-color: var(--gray-300);
}

[data-theme="dark"] .quick-action-btn.primary {
  background: var(--gold-500);
  border-color: var(--gold-500);
  color: var(--navy-900);
}

[data-theme="dark"] .card-body {
  background: var(--color-surface);
  color: var(--color-text);
}

[data-theme="dark"] .text-muted {
  color: var(--color-text-muted) !important;
}

[data-theme="dark"] .pagination .page-link {
  background: var(--color-surface);
  border-color: var(--color-border);
  color: var(--color-text);
}

[data-theme="dark"] .pagination .page-item.active .page-link {
  background: var(--navy-700);
  border-color: var(--navy-700);
  color: var(--white);
}

[data-theme="dark"] .pagination .page-item.disabled .page-link {
  background: var(--gray-50);
  color: var(--color-text-muted);
}

[data-theme="dark"] .low-stock-item:hover {
  background: var(--gray-50);
}

[data-theme="dark"] .pos-total-row.grand {
  color: var(--color-text);
  border-top-color: var(--color-border);
}

[data-theme="dark"] .pos-panel-header {
  background: var(--gray-50);
  color: var(--color-text-muted);
}

[data-theme="dark"] .pos-totals,
[data-theme="dark"] .pos-checkout-meta {
  background: var(--gray-50);
}

[data-theme="dark"] .pos-payment-methods label {
  background: var(--color-surface);
  color: var(--color-text-muted);
}

[data-theme="dark"] .pos-payment-methods input:checked + label {
  background: var(--navy-700);
  border-color: var(--navy-600);
  color: var(--white);
}
