/* ============================================================
   Hisparadise Clean — App Stylesheet
   Primary  : Deep Blue   #1565c0
   Secondary: Orange      #f97316
   Design   : Mobile-first · App-like · Card-based
   ============================================================ */


/* ============================================================
   1. DESIGN TOKENS
   ============================================================ */
:root {
  /* Brand */
  --primary:        #1565c0;
  --primary-dark:   #0d47a1;
  --primary-light:  #1976d2;
  --primary-50:     #e3f2fd;
  --primary-100:    #bbdefb;
  --primary-200:    #90caf9;

  --secondary:      #f97316;
  --secondary-dark: #ea580c;
  --secondary-light:#fb923c;
  --secondary-50:   #fff7ed;

  --gradient-brand: linear-gradient(135deg, #0d47a1 0%, #1565c0 50%, #1976d2 100%);
  --gradient-sky:   linear-gradient(135deg, #1565c0 0%, #f97316 100%);
  --gradient-card:  linear-gradient(135deg, #1565c0 0%, #1e88e5 100%);

  /* Neutrals */
  --white:          #ffffff;
  --bg:             #f0f4f8;
  --bg-alt:         #e8eef4;
  --surface:        #ffffff;

  /* Text */
  --text-primary:   #0f172a;
  --text-secondary: #475569;
  --text-muted:     #94a3b8;
  --text-invert:    #ffffff;

  /* Status */
  --success:        #10b981;
  --success-bg:     #d1fae5;
  --warning:        #f59e0b;
  --warning-bg:     #fef3c7;
  --danger:         #ef4444;
  --danger-bg:      #fee2e2;
  --info:           #3b82f6;
  --info-bg:        #dbeafe;

  /* Order status */
  --status-pending:    #f59e0b;
  --status-pickup:     #8b5cf6;
  --status-intake:     #3b82f6;
  --status-processing: #0ea5e9;
  --status-completed:  #10b981;
  --status-delivery:   #6366f1;
  --status-delivered:  #059669;
  --status-cancelled:  #ef4444;

  /* Border & Shadow */
  --border:         #e2e8f0;
  --border-focus:   #1565c0;
  --shadow-xs:      0 1px 2px rgba(0,0,0,.06);
  --shadow-sm:      0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow:         0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.05);
  --shadow-md:      0 10px 15px rgba(0,0,0,.08), 0 4px 6px rgba(0,0,0,.05);
  --shadow-lg:      0 20px 25px rgba(0,0,0,.10), 0 8px 10px rgba(0,0,0,.04);
  --shadow-primary: 0 4px 14px rgba(21,101,192,.35);

  /* Radius */
  --r-xs:   6px;
  --r-sm:   8px;
  --r:      12px;
  --r-lg:   16px;
  --r-xl:   20px;
  --r-2xl:  24px;
  --r-full: 9999px;

  /* Spacing */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;

  /* Typography */
  --font:       'Inter', 'Segoe UI', system-ui, sans-serif;
  --font-mono:  'JetBrains Mono', 'Consolas', monospace;

  /* Layout */
  --sidebar-w:    260px;
  --header-h:     64px;
  --bottom-nav-h: 68px;

  /* Transitions */
  --ease:      all .2s ease;
  --ease-slow: all .35s cubic-bezier(.4,0,.2,1);
}


/* ============================================================
   2. RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  font-size: .9375rem;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; transition: var(--ease); }
a:hover { color: var(--primary-dark); }

img, svg { display: block; max-width: 100%; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }
ul, ol { list-style: none; }
hr { border: none; border-top: 1px solid var(--border); }


/* ============================================================
   3. TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
}
h1 { font-size: 1.75rem; }
h2 { font-size: 1.375rem; }
h3 { font-size: 1.125rem; }
h4 { font-size: 1rem; }
h5, h6 { font-size: .875rem; }

.text-xs   { font-size: .75rem; }
.text-sm   { font-size: .8125rem; }
.text-base { font-size: .9375rem; }
.text-lg   { font-size: 1.0625rem; }
.text-xl   { font-size: 1.25rem; }
.text-2xl  { font-size: 1.5rem; }
.text-3xl  { font-size: 1.875rem; }

.fw-400 { font-weight: 400; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }

.text-primary   { color: var(--primary) !important; }
.text-secondary { color: var(--secondary) !important; }
.text-muted     { color: var(--text-muted) !important; }
.text-success   { color: var(--success) !important; }
.text-danger    { color: var(--danger) !important; }
.text-warning   { color: var(--warning) !important; }
.text-white     { color: var(--white) !important; }
.text-dark      { color: var(--text-primary) !important; }

.truncate    { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-center { text-align: center; }
.text-right  { text-align: right; }


/* ============================================================
   4. APP SHELL LAYOUT
   ============================================================ */

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

/* --- Sidebar (desktop) --- */
.sidebar {
  width: var(--sidebar-w);
  background: var(--gradient-brand);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 200;
  transform: translateX(-100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  overflow-y: auto;
  overflow-x: hidden;
}
.sidebar.open,
.sidebar-static { transform: translateX(0); }

.sidebar-brand {
  padding: var(--space-6) var(--space-5);
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.sidebar-brand .brand-name {
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -.3px;
}
.sidebar-brand .brand-sub {
  font-size: .75rem;
  color: rgba(255,255,255,.65);
  margin-top: 2px;
}

.sidebar-nav { padding: var(--space-4) 0; flex: 1; }

.nav-section-label {
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.45);
  padding: var(--space-4) var(--space-5) var(--space-2);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 11px var(--space-5);
  color: rgba(255,255,255,.8);
  font-size: .9rem;
  font-weight: 500;
  border-radius: 0;
  transition: var(--ease);
  position: relative;
  margin: 1px 0;
}
.nav-item:hover {
  color: var(--white);
  background: rgba(255,255,255,.1);
}
.nav-item.active {
  color: var(--white);
  background: rgba(255,255,255,.18);
  font-weight: 600;
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--secondary);
  border-radius: 0 2px 2px 0;
}
.nav-item .nav-icon {
  width: 20px; height: 20px;
  opacity: .85;
  flex-shrink: 0;
}
.nav-item.active .nav-icon,
.nav-item:hover .nav-icon { opacity: 1; }

.nav-badge {
  margin-left: auto;
  background: var(--secondary);
  color: var(--white);
  font-size: .65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--r-full);
  min-width: 20px;
  text-align: center;
}

.sidebar-footer {
  padding: var(--space-4) var(--space-5);
  border-top: 1px solid rgba(255,255,255,.12);
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.sidebar-user .user-avatar {
  width: 38px; height: 38px;
  border-radius: var(--r-full);
  background: rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  font-weight: 700;
  font-size: .9rem;
  flex-shrink: 0;
  overflow: hidden;
}
.sidebar-user .user-info .user-name {
  font-size: .875rem;
  font-weight: 600;
  color: var(--white);
  line-height: 1.2;
}
.sidebar-user .user-info .user-role {
  font-size: .72rem;
  color: rgba(255,255,255,.6);
  text-transform: capitalize;
}

/* --- Overlay (mobile sidebar) --- */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 199;
  backdrop-filter: blur(2px);
}
.sidebar-overlay.show { display: block; }

/* --- Main content area --- */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-bottom: var(--bottom-nav-h);
}

/* --- App Header --- */
.app-header {
  height: var(--header-h);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 var(--space-4);
  gap: var(--space-3);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-xs);
}
.app-header.header-colored {
  background: var(--gradient-brand);
  border-bottom: none;
}
.app-header.header-colored .header-title,
.app-header.header-colored .header-subtitle,
.app-header.header-colored .btn-icon-header { color: var(--white); }

.btn-menu-toggle {
  width: 40px; height: 40px;
  background: none;
  border: none;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-sm);
  color: var(--text-secondary);
  transition: var(--ease);
}
.btn-menu-toggle:hover { background: var(--bg); }

.header-title-group { flex: 1; overflow: hidden; }
.header-title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.header-subtitle {
  font-size: .75rem;
  color: var(--text-muted);
  margin-top: 1px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}
.btn-icon-header {
  width: 40px; height: 40px;
  background: none;
  border: none;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-full);
  color: var(--text-secondary);
  transition: var(--ease);
  position: relative;
}
.btn-icon-header:hover { background: var(--bg); }
.btn-icon-header .notif-dot {
  position: absolute; top: 8px; right: 8px;
  width: 8px; height: 8px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid var(--white);
}

/* --- Page content wrapper --- */
.page-content {
  flex: 1;
  padding: var(--space-5) var(--space-4);
  max-width: 100%;
}
.page-content-wide {
  flex: 1;
  padding: var(--space-5) var(--space-4);
}

/* --- Bottom Navigation (mobile app-like) --- */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--bottom-nav-h);
  background: var(--white);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 150;
  box-shadow: 0 -4px 12px rgba(0,0,0,.06);
  padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: var(--space-2) 0;
  color: var(--text-muted);
  font-size: .6875rem;
  font-weight: 500;
  transition: var(--ease);
  border: none;
  background: none;
  position: relative;
}
.bottom-nav-item svg, .bottom-nav-item i {
  width: 24px; height: 24px;
  font-size: 1.2rem;
  transition: var(--ease);
}
.bottom-nav-item.active {
  color: var(--primary);
}
.bottom-nav-item.active::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 28px; height: 3px;
  background: var(--primary);
  border-radius: 0 0 var(--r-full) var(--r-full);
}
.bottom-nav-item .nav-dot {
  position: absolute;
  top: 4px; right: calc(50% - 16px);
  width: 7px; height: 7px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid var(--white);
}

/* --- Page header section --- */
.page-header {
  margin-bottom: var(--space-5);
}
.page-header h1, .page-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
}
.page-header p {
  color: var(--text-secondary);
  font-size: .875rem;
  margin-top: 2px;
}
.page-header-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
}


/* ============================================================
   5. CARDS
   ============================================================ */
.card {
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  overflow: hidden;
}
.card-body  { padding: var(--space-5); }
.card-header {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.card-header h3, .card-header h4 {
  font-size: .9375rem;
  font-weight: 600;
}
.card-footer {
  padding: var(--space-3) var(--space-5);
  border-top: 1px solid var(--border);
  background: var(--bg);
}

/* Stat cards (dashboard) */
.stat-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  transition: var(--ease-slow);
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.stat-icon {
  width: 48px; height: 48px;
  border-radius: var(--r);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 1.25rem;
}
.stat-icon.blue   { background: var(--primary-50);    color: var(--primary); }
.stat-icon.sky    { background: var(--secondary-50);  color: var(--secondary-dark); }
.stat-icon.green  { background: var(--success-bg);    color: var(--success); }
.stat-icon.amber  { background: var(--warning-bg);    color: var(--warning); }
.stat-icon.red    { background: var(--danger-bg);     color: var(--danger); }
.stat-icon.purple { background: #ede9fe;               color: #7c3aed; }

.stat-info { flex: 1; min-width: 0; }
.stat-value {
  font-size: 1.625rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text-primary);
}
.stat-label {
  font-size: .8125rem;
  color: var(--text-secondary);
  margin-top: 4px;
}
.stat-trend {
  font-size: .75rem;
  font-weight: 600;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 3px;
}
.stat-trend.up   { color: var(--success); }
.stat-trend.down { color: var(--danger); }

/* Wallet balance card */
.wallet-card {
  background: var(--gradient-card);
  border-radius: var(--r-xl);
  padding: var(--space-6);
  color: var(--white);
  box-shadow: var(--shadow-primary);
  position: relative;
  overflow: hidden;
}
.wallet-card::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
}
.wallet-card::after {
  content: '';
  position: absolute;
  bottom: -60px; left: -20px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: rgba(255,255,255,.05);
}
.wallet-label {
  font-size: .8125rem;
  opacity: .8;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 600;
}
.wallet-balance {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin: var(--space-2) 0;
  position: relative;
  z-index: 1;
}
.wallet-balance .currency { font-size: 1.5rem; opacity: .9; vertical-align: top; margin-top: 4px; }
.wallet-actions {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-5);
  position: relative;
  z-index: 1;
}

/* Order summary card (in wizard) */
.summary-card {
  background: var(--primary-50);
  border: 1px solid var(--primary-100);
  border-radius: var(--r-lg);
  padding: var(--space-4);
}
.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  font-size: .875rem;
  color: var(--text-secondary);
}
.summary-row.total {
  border-top: 1px solid var(--primary-100);
  margin-top: var(--space-2);
  padding-top: var(--space-3);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}
.summary-row .amount { font-weight: 600; color: var(--text-primary); }
.summary-row.total .amount { color: var(--primary); font-size: 1.125rem; }


/* ============================================================
   6. GRID & LAYOUT HELPERS
   ============================================================ */
.grid { display: grid; gap: var(--space-4); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-5 { gap: var(--space-5); }
.flex-1 { flex: 1; }
.flex-wrap { flex-wrap: wrap; }
.shrink-0 { flex-shrink: 0; }

.stack { display: flex; flex-direction: column; }
.stack-sm  { gap: var(--space-3); }
.stack-md  { gap: var(--space-5); }

.w-full { width: 100%; }
.h-full { height: 100%; }

.p-0  { padding: 0 !important; }
.p-3  { padding: var(--space-3); }
.p-4  { padding: var(--space-4); }
.p-5  { padding: var(--space-5); }
.p-6  { padding: var(--space-6); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-5 { margin-bottom: var(--space-5); }
.mx-auto { margin-left: auto; margin-right: auto; }


/* ============================================================
   7. BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--r-full);
  font-size: .9rem;
  font-weight: 600;
  line-height: 1;
  border: 2px solid transparent;
  transition: var(--ease);
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
}
.btn:disabled {
  opacity: .5;
  cursor: not-allowed;
  pointer-events: none;
}
.btn svg, .btn i { font-size: 1rem; flex-shrink: 0; }

.btn-primary {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(21,101,192,.3);
}
.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 4px 12px rgba(21,101,192,.4);
  transform: translateY(-1px);
  color: var(--white);
}

.btn-secondary {
  background: var(--secondary);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(249,115,22,.3);
}
.btn-secondary:hover {
  background: var(--secondary-dark);
  transform: translateY(-1px);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover {
  background: var(--primary-50);
}

.btn-outline-white {
  background: rgba(255,255,255,.15);
  color: var(--white);
  border-color: rgba(255,255,255,.5);
  backdrop-filter: blur(4px);
}
.btn-outline-white:hover {
  background: rgba(255,255,255,.25);
  color: var(--white);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}
.btn-ghost:hover { background: var(--bg); }

.btn-danger {
  background: var(--danger);
  color: var(--white);
}
.btn-danger:hover { background: #dc2626; }

.btn-success {
  background: var(--success);
  color: var(--white);
}
.btn-success:hover { background: #059669; }

.btn-sm {
  padding: 7px 14px;
  font-size: .8125rem;
  border-radius: var(--r-full);
}
.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
  border-radius: var(--r-full);
}
.btn-xl {
  padding: 16px 36px;
  font-size: 1.0625rem;
  border-radius: var(--r-full);
}
.btn-block { width: 100%; }
.btn-square {
  padding: 0;
  width: 40px; height: 40px;
  border-radius: var(--r);
}
.btn-square-sm {
  width: 32px; height: 32px;
  border-radius: var(--r-sm);
  padding: 0;
  font-size: .875rem;
}

/* FAB — Floating Action Button */
.fab {
  position: fixed;
  bottom: calc(var(--bottom-nav-h) + 20px);
  right: 20px;
  width: 56px; height: 56px;
  border-radius: var(--r-full);
  background: var(--gradient-sky);
  color: var(--white);
  border: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 20px rgba(21,101,192,.45);
  z-index: 140;
  transition: var(--ease-slow);
}
.fab:hover, .fab:focus {
  transform: scale(1.08) rotate(8deg);
  box-shadow: 0 6px 24px rgba(21,101,192,.55);
}
.fab svg, .fab i { pointer-events: none; }


/* ============================================================
   8. BADGES & CHIPS
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge-dot::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

/* Order Status Badges */
.badge-pending    { background: var(--warning-bg);  color: #92400e; }
.badge-pickup     { background: #ede9fe;              color: #5b21b6; }
.badge-intake     { background: var(--info-bg);      color: #1e40af; }
.badge-processing { background: #cffafe;              color: #0e7490; }
.badge-completed  { background: var(--success-bg);   color: #065f46; }
.badge-delivery   { background: #e0e7ff;              color: #3730a3; }
.badge-delivered  { background: var(--success-bg);   color: #047857; }
.badge-cancelled  { background: var(--danger-bg);    color: #991b1b; }
.badge-paid       { background: var(--success-bg);   color: #065f46; }
.badge-unpaid     { background: var(--warning-bg);   color: #92400e; }
.badge-primary    { background: var(--primary-50);   color: var(--primary-dark); }
.badge-secondary  { background: var(--secondary-50); color: var(--secondary-dark); }
.badge-gray       { background: #f1f5f9;              color: #475569; }
.badge-danger     { background: var(--danger-bg);    color: #991b1b; }
.badge-success    { background: var(--success-bg);   color: #065f46; }


/* ============================================================
   9. FORMS & INPUTS
   ============================================================ */
.form-group { margin-bottom: var(--space-4); }

.form-label {
  display: block;
  font-size: .875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.form-label.required::after {
  content: ' *';
  color: var(--danger);
}

.form-control {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  font-size: .9375rem;
  color: var(--text-primary);
  background: var(--white);
  transition: var(--ease);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-50);
}
.form-control::placeholder { color: var(--text-muted); }
.form-control:disabled { background: var(--bg); cursor: not-allowed; opacity: .7; }

.form-control-lg { padding: 14px 16px; font-size: 1rem; }

textarea.form-control { resize: vertical; min-height: 100px; }
select.form-control { cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 40px; }

.form-hint {
  font-size: .78rem;
  color: var(--text-muted);
  margin-top: 4px;
}
.form-error {
  font-size: .78rem;
  color: var(--danger);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.form-control.is-invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px var(--danger-bg);
}
.form-control.is-valid {
  border-color: var(--success);
  box-shadow: 0 0 0 3px var(--success-bg);
}

/* Input with icon */
.input-group {
  position: relative;
  display: flex;
  align-items: center;
}
.input-icon {
  position: absolute;
  left: 13px;
  color: var(--text-muted);
  pointer-events: none;
  font-size: 1rem;
}
.input-icon-right {
  position: absolute;
  right: 13px;
  color: var(--text-muted);
  pointer-events: none;
}
.input-group .form-control {
  padding-left: 40px;
}
.input-group.icon-right .form-control {
  padding-left: 14px;
  padding-right: 40px;
}
.input-currency .form-control { padding-left: 36px; }
.input-currency::before {
  content: '₦';
  position: absolute;
  left: 13px;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: .9375rem;
  z-index: 1;
}

/* Checkbox & Radio */
.check-group { display: flex; align-items: flex-start; gap: var(--space-2); }
.check-group input[type="checkbox"],
.check-group input[type="radio"] {
  width: 18px; height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
  margin-top: 2px;
  flex-shrink: 0;
}
.check-group label { font-size: .9rem; cursor: pointer; line-height: 1.4; }

/* Search bar */
.search-bar {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--r-full);
  padding: 0 var(--space-4);
  transition: var(--ease);
}
.search-bar:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-50);
}
.search-bar input {
  flex: 1;
  border: none;
  background: none;
  padding: 10px 0;
  outline: none;
  font-size: .9rem;
  color: var(--text-primary);
}
.search-bar .search-icon { color: var(--text-muted); flex-shrink: 0; }


/* ============================================================
   10. ORDER ITEMS SELECTOR (Laundry order wizard)
   ============================================================ */
.item-selector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--space-3);
}

.item-tile {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--space-4) var(--space-3);
  text-align: center;
  cursor: pointer;
  transition: var(--ease);
  position: relative;
  user-select: none;
}
.item-tile:hover {
  border-color: var(--primary-200);
  background: var(--primary-50);
}
.item-tile.selected {
  border-color: var(--primary);
  background: var(--primary-50);
  box-shadow: 0 0 0 3px rgba(21,101,192,.15);
}
.item-tile.selected .item-tile-check {
  opacity: 1;
  transform: scale(1);
}
.item-tile-check {
  position: absolute;
  top: 8px; right: 8px;
  width: 20px; height: 20px;
  background: var(--primary);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  font-size: .65rem;
  opacity: 0;
  transform: scale(.5);
  transition: var(--ease-slow);
}
.item-tile-icon { font-size: 1.75rem; margin-bottom: 6px; }
.item-tile-name {
  font-size: .8125rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}
.item-tile-price {
  font-size: .75rem;
  color: var(--primary);
  font-weight: 700;
  margin-top: 3px;
}

/* Quantity control */
.qty-control {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--bg);
  border-radius: var(--r-full);
  padding: 2px;
}
.qty-btn {
  width: 30px; height: 30px;
  border: none;
  border-radius: var(--r-full);
  background: var(--white);
  color: var(--primary);
  font-size: 1.1rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-xs);
  transition: var(--ease);
  cursor: pointer;
  line-height: 1;
}
.qty-btn:hover { background: var(--primary); color: var(--white); }
.qty-btn:active { transform: scale(.93); }
.qty-value {
  min-width: 28px;
  text-align: center;
  font-size: .9375rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* Service type selector */
.service-type-tabs {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.service-type-tab {
  padding: 8px 16px;
  border-radius: var(--r-full);
  border: 2px solid var(--border);
  background: var(--white);
  font-size: .8375rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--ease);
}
.service-type-tab:hover {
  border-color: var(--primary-200);
  color: var(--primary);
}
.service-type-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

/* Cleaning service tiles */
.cleaning-tile {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--space-5) var(--space-4);
  text-align: center;
  cursor: pointer;
  transition: var(--ease-slow);
}
.cleaning-tile:hover {
  border-color: var(--secondary);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.cleaning-tile.selected {
  border-color: var(--primary);
  background: var(--primary-50);
  box-shadow: 0 0 0 4px rgba(21,101,192,.12);
}
.cleaning-tile-icon {
  width: 56px; height: 56px;
  background: var(--gradient-sky);
  border-radius: var(--r-lg);
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  font-size: 1.5rem;
  margin: 0 auto var(--space-3);
  box-shadow: var(--shadow-primary);
}
.cleaning-tile-name {
  font-size: .9rem;
  font-weight: 700;
  color: var(--text-primary);
}
.cleaning-tile-desc {
  font-size: .77rem;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.4;
}
.cleaning-tile-price {
  font-size: .9rem;
  font-weight: 700;
  color: var(--primary);
  margin-top: var(--space-3);
}

/* Variant selector (bedroom size etc.) */
.variant-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.variant-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px var(--space-4);
  border: 2px solid var(--border);
  border-radius: var(--r-lg);
  cursor: pointer;
  transition: var(--ease);
}
.variant-option:hover { border-color: var(--primary-200); background: var(--primary-50); }
.variant-option.selected {
  border-color: var(--primary);
  background: var(--primary-50);
}
.variant-option .variant-name { font-weight: 600; font-size: .9rem; }
.variant-option .variant-meta { font-size: .78rem; color: var(--text-muted); margin-top: 1px; }
.variant-option .variant-price { font-weight: 700; color: var(--primary); font-size: .9375rem; }


/* ============================================================
   11. ORDER TIMELINE & TRACKING
   ============================================================ */
.order-timeline {
  position: relative;
  padding-left: var(--space-8);
}
.order-timeline::before {
  content: '';
  position: absolute;
  left: 12px; top: 12px; bottom: 12px;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding-bottom: var(--space-5);
}
.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: -33px;
  top: 3px;
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 3px solid var(--border);
  background: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem;
  transition: var(--ease);
}
.timeline-item.done .timeline-dot {
  background: var(--success);
  border-color: var(--success);
  color: var(--white);
}
.timeline-item.current .timeline-dot {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
  box-shadow: 0 0 0 4px var(--primary-50);
}

.timeline-content .timeline-title {
  font-size: .9rem;
  font-weight: 600;
  color: var(--text-primary);
}
.timeline-item.pending .timeline-content .timeline-title {
  color: var(--text-muted);
}
.timeline-content .timeline-time {
  font-size: .75rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.timeline-content .timeline-note {
  font-size: .8125rem;
  color: var(--text-secondary);
  margin-top: 4px;
  background: var(--bg);
  border-radius: var(--r-sm);
  padding: var(--space-2) var(--space-3);
}

/* Step progress (order wizard) */
.step-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4) var(--space-5);
  gap: 0;
}
.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  position: relative;
}
.step-item:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 16px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--border);
  z-index: 0;
}
.step-item.done:not(:last-child)::after { background: var(--primary); }

.step-circle {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: .78rem;
  font-weight: 700;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
  transition: var(--ease);
}
.step-item.done .step-circle {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}
.step-item.current .step-circle {
  background: var(--white);
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-50);
}
.step-label {
  font-size: .68rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 6px;
  text-align: center;
  white-space: nowrap;
}
.step-item.current .step-label { color: var(--primary); }
.step-item.done .step-label   { color: var(--text-secondary); }


/* ============================================================
   12. ORDER CARD (list view)
   ============================================================ */
.order-card {
  background: var(--white);
  border-radius: var(--r-lg);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: var(--ease-slow);
  display: block;
  text-decoration: none;
  color: inherit;
}
.order-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--primary-200);
}
.order-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}
.order-number {
  font-size: .8125rem;
  font-weight: 700;
  color: var(--primary);
  font-family: var(--font-mono);
}
.order-card-body {
  font-size: .875rem;
  color: var(--text-secondary);
}
.order-items-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: var(--space-2);
}
.order-item-chip {
  background: var(--bg);
  border-radius: var(--r-full);
  padding: 3px 10px;
  font-size: .72rem;
  font-weight: 500;
  color: var(--text-secondary);
}
.order-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border);
}
.order-amount {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
}
.order-date {
  font-size: .75rem;
  color: var(--text-muted);
}


/* ============================================================
   13. TABLES (Admin)
   ============================================================ */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
}
.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  font-size: .875rem;
}
.table thead th {
  padding: 13px 16px;
  text-align: left;
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table tbody td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text-primary);
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: var(--bg); }
.table tfoot td {
  padding: 12px 16px;
  font-weight: 700;
  border-top: 2px solid var(--border);
  background: var(--bg);
}
.table .actions { display: flex; gap: var(--space-1); }

/* Pricing grid (admin) */
.pricing-grid-table {
  font-size: .8125rem;
}
.pricing-grid-table thead th:first-child { min-width: 160px; }
.pricing-grid-table td.price-cell {
  font-weight: 700;
  color: var(--primary);
  font-family: var(--font-mono);
}
.pricing-grid-table td.no-price { color: var(--text-muted); text-align: center; }


/* ============================================================
   14. MODAL
   ============================================================ */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(15,23,42,.5);
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}
.modal-backdrop.show {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--white);
  border-radius: var(--r-2xl) var(--r-2xl) 0 0;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  padding-bottom: env(safe-area-inset-bottom, 16px);
}
.modal-backdrop.show .modal { transform: translateY(0); }

.modal-handle {
  width: 40px; height: 4px;
  background: var(--border);
  border-radius: var(--r-full);
  margin: 12px auto 0;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5) var(--space-3);
  border-bottom: 1px solid var(--border);
}
.modal-title {
  font-size: 1.0625rem;
  font-weight: 700;
}
.modal-close {
  width: 32px; height: 32px;
  border: none;
  background: var(--bg);
  border-radius: var(--r-full);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--ease);
  font-size: 1rem;
}
.modal-close:hover { background: var(--danger-bg); color: var(--danger); }
.modal-body { padding: var(--space-5); }
.modal-footer {
  padding: var(--space-3) var(--space-5) var(--space-4);
  display: flex;
  gap: var(--space-3);
}
.modal-footer .btn { flex: 1; }

/* Desktop modal (centered) */
@media (min-width: 640px) {
  .modal-backdrop {
    align-items: center;
    padding: var(--space-5);
  }
  .modal {
    border-radius: var(--r-2xl);
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    transform: scale(.95) translateY(0);
  }
  .modal-backdrop.show .modal { transform: scale(1) translateY(0); }
  .modal-handle { display: none; }
}


/* ============================================================
   15. TOAST NOTIFICATIONS
   ============================================================ */
.toast-container {
  position: fixed;
  top: var(--space-4);
  right: var(--space-4);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  pointer-events: none;
  max-width: 360px;
  width: calc(100% - var(--space-8));
}

.toast {
  background: var(--white);
  border-radius: var(--r-lg);
  padding: 14px 16px;
  box-shadow: var(--shadow-lg);
  border-left: 4px solid var(--primary);
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  pointer-events: all;
  transform: translateX(calc(100% + 20px));
  opacity: 0;
  transition: all .35s cubic-bezier(.4,0,.2,1);
}
.toast.show { transform: translateX(0); opacity: 1; }
.toast.hide { transform: translateX(calc(100% + 20px)); opacity: 0; }

.toast-icon {
  width: 22px; height: 22px;
  flex-shrink: 0;
  margin-top: 1px;
}
.toast-body { flex: 1; min-width: 0; }
.toast-title { font-size: .875rem; font-weight: 700; line-height: 1.3; }
.toast-message { font-size: .8125rem; color: var(--text-secondary); margin-top: 2px; }
.toast-close {
  background: none; border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  font-size: 1rem;
  line-height: 1;
  flex-shrink: 0;
}

.toast.toast-success { border-left-color: var(--success); }
.toast.toast-success .toast-icon { color: var(--success); }
.toast.toast-error   { border-left-color: var(--danger); }
.toast.toast-error   .toast-icon { color: var(--danger); }
.toast.toast-warning { border-left-color: var(--warning); }
.toast.toast-warning .toast-icon { color: var(--warning); }
.toast.toast-info    { border-left-color: var(--info); }
.toast.toast-info    .toast-icon { color: var(--info); }


/* ============================================================
   16. ALERTS (inline)
   ============================================================ */
.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--r-lg);
  border: 1px solid;
  font-size: .875rem;
}
.alert-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }
.alert-title { font-weight: 700; margin-bottom: 2px; }
.alert-success { background: var(--success-bg); border-color: #a7f3d0; color: #065f46; }
.alert-danger  { background: var(--danger-bg);  border-color: #fca5a5; color: #7f1d1d; }
.alert-warning { background: var(--warning-bg); border-color: #fcd34d; color: #78350f; }
.alert-info    { background: var(--info-bg);    border-color: #93c5fd; color: #1e3a8a; }
.alert-primary { background: var(--primary-50); border-color: var(--primary-100); color: var(--primary-dark); }


/* ============================================================
   17. AUTH PAGES
   ============================================================ */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}
.auth-hero {
  background: var(--gradient-brand);
  padding: var(--space-10) var(--space-6) var(--space-12);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.auth-hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 250px; height: 250px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
}
.auth-hero::after {
  content: '';
  position: absolute;
  bottom: -80px; left: -40px;
  width: 280px; height: 280px;
  border-radius: 50%;
  background: rgba(41,182,246,.12);
}
.auth-logo {
  width: 70px; height: 70px;
  background: rgba(255,255,255,.15);
  border-radius: var(--r-xl);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto var(--space-4);
  font-size: 2rem;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,.2);
  position: relative; z-index: 1;
}
.auth-hero-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--white);
  position: relative; z-index: 1;
}
.auth-hero-sub {
  font-size: .875rem;
  color: rgba(255,255,255,.75);
  margin-top: 4px;
  position: relative; z-index: 1;
}

.auth-card {
  background: var(--white);
  border-radius: var(--r-2xl) var(--r-2xl) 0 0;
  margin-top: -24px;
  flex: 1;
  padding: var(--space-8) var(--space-6);
  box-shadow: 0 -4px 30px rgba(0,0,0,.06);
  position: relative; z-index: 1;
}
.auth-tabs {
  display: flex;
  background: var(--bg);
  border-radius: var(--r-full);
  padding: 4px;
  margin-bottom: var(--space-6);
}
.auth-tab {
  flex: 1;
  padding: 9px;
  border: none;
  background: none;
  border-radius: var(--r-full);
  font-size: .9rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--ease);
}
.auth-tab.active {
  background: var(--white);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: var(--space-5) 0;
  color: var(--text-muted);
  font-size: .8125rem;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}


/* ============================================================
   18. UPLOAD AREA
   ============================================================ */
.upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--r-xl);
  padding: var(--space-8) var(--space-6);
  text-align: center;
  cursor: pointer;
  transition: var(--ease);
  background: var(--white);
}
.upload-area:hover, .upload-area.dragover {
  border-color: var(--primary);
  background: var(--primary-50);
}
.upload-area input[type="file"] { display: none; }
.upload-icon {
  width: 52px; height: 52px;
  background: var(--primary-50);
  border-radius: var(--r-lg);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary);
  font-size: 1.4rem;
  margin: 0 auto var(--space-3);
}
.upload-text { font-size: .875rem; color: var(--text-secondary); }
.upload-text strong { color: var(--primary); }
.upload-hint { font-size: .75rem; color: var(--text-muted); margin-top: 4px; }

.upload-preview {
  margin-top: var(--space-4);
  border-radius: var(--r-lg);
  overflow: hidden;
  position: relative;
  max-height: 200px;
}
.upload-preview img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}
.upload-preview .remove-btn {
  position: absolute;
  top: var(--space-2); right: var(--space-2);
  width: 28px; height: 28px;
  background: var(--danger);
  color: var(--white);
  border: none;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: .75rem;
}


/* ============================================================
   19. EMPTY STATE
   ============================================================ */
.empty-state {
  text-align: center;
  padding: var(--space-12) var(--space-6);
}
.empty-icon {
  width: 80px; height: 80px;
  background: var(--primary-50);
  border-radius: var(--r-2xl);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.25rem;
  margin: 0 auto var(--space-5);
  color: var(--primary);
}
.empty-title { font-size: 1.125rem; font-weight: 700; color: var(--text-primary); }
.empty-text  { font-size: .875rem; color: var(--text-secondary); margin-top: 6px; max-width: 300px; margin-left: auto; margin-right: auto; }


/* ============================================================
   20. SKELETON LOADING
   ============================================================ */
.skeleton {
  background: linear-gradient(90deg, #f0f4f8 25%, #e2e8f0 50%, #f0f4f8 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--r);
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skeleton-text  { height: 14px; border-radius: var(--r-full); }
.skeleton-title { height: 20px; border-radius: var(--r-full); }
.skeleton-card  { height: 100px; border-radius: var(--r-lg); }
.skeleton-avatar{ width: 44px; height: 44px; border-radius: 50%; }


/* ============================================================
   21. LOADING OVERLAY
   ============================================================ */
.loading-overlay {
  position: fixed; inset: 0;
  background: rgba(15,23,42,.4);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: var(--ease);
}
.loading-overlay.show { opacity: 1; visibility: visible; }
.spinner {
  width: 48px; height: 48px;
  border: 4px solid rgba(255,255,255,.25);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin .75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.btn-loading { position: relative; pointer-events: none; }
.btn-loading::after {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin .65s linear infinite;
  right: 14px; top: 50%; transform: translateY(-50%);
}
.btn-loading > * { opacity: 0; }


/* ============================================================
   22. TRANSACTION LIST
   ============================================================ */
.transaction-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--border);
}
.transaction-item:last-child { border-bottom: none; }
.tx-icon {
  width: 42px; height: 42px;
  border-radius: var(--r);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.tx-icon.credit { background: var(--success-bg); color: var(--success); }
.tx-icon.debit  { background: var(--danger-bg);  color: var(--danger); }
.tx-info { flex: 1; min-width: 0; }
.tx-desc { font-size: .875rem; font-weight: 600; }
.tx-date { font-size: .75rem; color: var(--text-muted); margin-top: 2px; }
.tx-amount {
  font-size: 1rem;
  font-weight: 800;
  flex-shrink: 0;
}
.tx-amount.credit { color: var(--success); }
.tx-amount.debit  { color: var(--danger); }


/* ============================================================
   23. FILTER BAR
   ============================================================ */
.filter-bar {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  padding-bottom: 4px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.filter-bar::-webkit-scrollbar { display: none; }
.filter-chip {
  padding: 7px 16px;
  border-radius: var(--r-full);
  border: 1.5px solid var(--border);
  background: var(--white);
  font-size: .8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  cursor: pointer;
  transition: var(--ease);
  flex-shrink: 0;
}
.filter-chip:hover   { border-color: var(--primary-200); color: var(--primary); }
.filter-chip.active  { background: var(--primary); border-color: var(--primary); color: var(--white); }


/* ============================================================
   24. QUICK ACTION GRID (dashboard)
   ============================================================ */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
}
.quick-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-2);
  background: var(--white);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: var(--ease-slow);
  text-decoration: none;
  box-shadow: var(--shadow-xs);
}
.quick-action:hover {
  border-color: var(--primary-200);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.qa-icon {
  width: 44px; height: 44px;
  border-radius: var(--r);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem;
  background: var(--primary-50);
  color: var(--primary);
}
.qa-label {
  font-size: .72rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.3;
}


/* ============================================================
   25. PROFILE & AVATAR
   ============================================================ */
.avatar {
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--primary-50);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary);
  font-weight: 700;
}
.avatar-sm  { width: 32px; height: 32px; font-size: .8125rem; }
.avatar-md  { width: 44px; height: 44px; font-size: 1rem; }
.avatar-lg  { width: 64px; height: 64px; font-size: 1.375rem; }
.avatar-xl  { width: 88px; height: 88px; font-size: 1.875rem; }
.avatar-online { position: relative; }
.avatar-online::after {
  content: '';
  position: absolute;
  bottom: 2px; right: 2px;
  width: 10px; height: 10px;
  background: var(--success);
  border-radius: 50%;
  border: 2px solid var(--white);
}


/* ============================================================
   26. DIVIDER
   ============================================================ */
.divider {
  height: 1px;
  background: var(--border);
  margin: var(--space-4) 0;
}
.divider-text {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: .8125rem;
  color: var(--text-muted);
  margin: var(--space-4) 0;
}
.divider-text::before, .divider-text::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}


/* ============================================================
   27. PILL TABS
   ============================================================ */
.pill-tabs {
  display: flex;
  background: var(--bg);
  border-radius: var(--r-full);
  padding: 4px;
  gap: 2px;
}
.pill-tab {
  flex: 1;
  padding: 9px 16px;
  border: none;
  background: none;
  border-radius: var(--r-full);
  font-size: .875rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--ease);
  text-align: center;
  white-space: nowrap;
}
.pill-tab.active {
  background: var(--white);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.tab-pane { display: none; }
.tab-pane.active { display: block; }


/* ============================================================
   28. MISC UTILITIES
   ============================================================ */
.rounded     { border-radius: var(--r); }
.rounded-sm  { border-radius: var(--r-sm); }
.rounded-lg  { border-radius: var(--r-lg); }
.rounded-full{ border-radius: var(--r-full); }

.shadow    { box-shadow: var(--shadow); }
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }

.bg-white   { background: var(--white); }
.bg-light   { background: var(--bg); }
.bg-primary { background: var(--primary); }

.border     { border: 1px solid var(--border); }
.border-top { border-top: 1px solid var(--border); }

.hidden { display: none !important; }
.invisible { visibility: hidden; }

.overflow-hidden { overflow: hidden; }
.overflow-auto   { overflow: auto; }
.overflow-x-auto { overflow-x: auto; }

.relative { position: relative; }
.sticky-top { position: sticky; top: 0; z-index: 10; }

/* Pulse dot (live indicator) */
.pulse {
  display: inline-flex;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--success);
  position: relative;
}
.pulse::before {
  content: '';
  position: absolute; inset: -4px;
  border-radius: 50%;
  background: var(--success);
  opacity: .3;
  animation: pulse-ring 1.5s ease-out infinite;
}
@keyframes pulse-ring { to { transform: scale(2.5); opacity: 0; } }

/* Fade in animation */
@keyframes fadeIn  { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
.animate-fade { animation: fadeIn .3s ease both; }
.animate-slide { animation: slideUp .35s ease both; }


/* ============================================================
   29. RESPONSIVE  (tablet / desktop)
   ============================================================ */
@media (min-width: 768px) {
  :root { --bottom-nav-h: 0px; }

  .bottom-nav { display: none; }

  .main-content { padding-bottom: 0; }

  .app-shell { flex-direction: row; }

  .sidebar {
    position: relative;
    transform: translateX(0);
    flex-shrink: 0;
  }
  .sidebar-overlay { display: none !important; }

  .btn-menu-toggle { display: none; }

  .page-content, .page-content-wide {
    padding: var(--space-6) var(--space-8);
  }

  .fab { bottom: 30px; }

  .grid-2-md { grid-template-columns: repeat(2, 1fr); }
  .grid-3-md { grid-template-columns: repeat(3, 1fr); }
  .grid-4-md { grid-template-columns: repeat(4, 1fr); }

  .auth-page { flex-direction: row; }
  .auth-hero {
    width: 380px;
    flex-shrink: 0;
    min-height: 100vh;
    display: flex; flex-direction: column; justify-content: center;
    border-radius: 0;
    padding: var(--space-12) var(--space-8);
  }
  .auth-card {
    flex: 1;
    border-radius: 0;
    margin-top: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 480px;
    padding: var(--space-12) var(--space-10);
    box-shadow: none;
  }
  .modal-backdrop { align-items: center; padding: var(--space-8); }
}

@media (min-width: 1024px) {
  .quick-actions { grid-template-columns: repeat(6, 1fr); }
  .item-selector-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

@media (min-width: 1280px) {
  .page-content { max-width: 1200px; }
}
