@import url('https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,400;0,500;0,600;0,700;0,800;0,900;1,700&family=Inter:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');
@import "tailwindcss";
@import "./pages/home.css";
@import "./pages/customer_requests.css";

@theme {
  /* Fonts — Nunito mirrors the AvenirNext / vivoSansSC geometric rounded style */
  --font-display: 'Nunito', 'AvenirNext', 'Avenir Next', sans-serif;
  --font-body:    'Nunito', 'AvenirNext', 'Avenir Next', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Brand colours */
  --color-brand:         #1E46E6;
  --color-brand-dark:    #1535B8;
  --color-brand-light:   #DBEAFE;

  --color-violet:        #7C3AED;
  --color-violet-dark:   #5B21B6;
  --color-violet-light:  #EDE9FE;

  --color-amber:         #D97706;
  --color-amber-dark:    #92400E;
  --color-amber-light:   #FEF3C7;

  --color-rose:          #E11D48;
  --color-rose-dark:     #9F1239;
  --color-rose-light:    #FFE4E6;

  --color-sage:          #16A34A;
  --color-sage-dark:     #14532D;
  --color-sage-light:    #DCFCE7;

  --color-sky:           #0284C7;
  --color-sky-dark:      #0C4A6E;
  --color-sky-light:     #E0F2FE;

  --color-ink:           #0D0F14;
  --color-ink-soft:      #1A1D26;

  /* Semantic surfaces */
  --color-bg-base:       #F5F7FA;
  --color-bg-surface:    #FFFFFF;
  --color-bg-subtle:     #F5F5F2;
  --color-bg-raised:     #F3F4F6;
  --color-bg-sunken:     #E9EAF0;
  --color-border:        #E5E7EB;
  --color-border-strong: #D1D5DB;
  --color-text-primary:  #0D0F14;
  --color-text-secondary:#4B5563;
  --color-text-muted:    #9CA3AF;

  /* Layout */
  --spacing-nav-h: 56px;
  --spacing-sidebar-w: 240px;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 22px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.12);
}

/* ── CSS VARIABLE ALIASES (maps prototype names → Rails names) ── */
:root {
  --bg-base:       var(--color-bg-base);
  --bg-surface:    var(--color-bg-surface);
  --bg-raised:     var(--color-bg-raised);
  --bg-sunken:     var(--color-bg-sunken);
  --border:        var(--color-border);
  --border-strong: var(--color-border-strong);
  --text-primary:  var(--color-text-primary);
  --text-secondary:var(--color-text-secondary);
  --text-muted:    var(--color-text-muted);
  --text-inverse:  #FFFFFF;

  --brand:         var(--color-brand);
  --brand-light:   var(--color-brand-light);
  --brand-dark:    var(--color-brand-dark);
  --teal:          var(--color-brand);
  --teal-light:    var(--color-brand-light);
  --teal-dark:     var(--color-brand-dark);
  --violet:        var(--color-violet);
  --violet-light:  var(--color-violet-light);
  --violet-dark:   var(--color-violet-dark);
  --amber:         var(--color-amber);
  --amber-light:   var(--color-amber-light);
  --amber-dark:    var(--color-amber-dark);
  --rose:          var(--color-rose);
  --rose-light:    var(--color-rose-light);
  --rose-dark:     var(--color-rose-dark);
  --sage:          var(--color-sage);
  --sage-light:    var(--color-sage-light);
  --sage-dark:     var(--color-sage-dark);
  --sky:           var(--color-sky);
  --sky-light:     var(--color-sky-light);
  --sky-dark:      var(--color-sky-dark);
  --ink:           #0D0F14;
  --ink-soft:      #1A1D26;

  --nav-h:         var(--spacing-nav-h);
  --sidebar-w:     var(--spacing-sidebar-w);
}

[data-theme="dark"] {
  --color-bg-base:       #0D0F14;
  --color-bg-surface:    #1A1D26;
  --color-bg-subtle:     #1E2130;
  --color-bg-raised:     #22263A;
  --color-bg-sunken:     #13151E;
  --color-border:        #2A2D3E;
  --color-border-strong: #3A3D50;
  --color-text-primary:  #F1F0EC;
  --color-text-secondary:#9CA3AF;
  --color-text-muted:    #6B7280;
  --color-brand-light:   rgba(30,70,230,.18);
  --color-violet-light:  rgba(124,58,237,.18);
  --color-amber-light:   rgba(217,119,6,.18);
  --color-rose-light:    rgba(225,29,72,.18);
  --color-sage-light:    rgba(22,163,74,.18);
  --color-sky-light:     rgba(2,132,199,.18);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img { max-width: 100%; height: auto; display: block; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-primary);
  font-size: 16px;
  line-height: 1.6;
  transition: background .2s, color .2s;
  min-height: 100vh;
}


/* ── TOP NAV ── */
.top-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 20px;
  gap: 16px;
  backdrop-filter: blur(8px);
  overflow: visible;
}
.nav-logo {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-weight: 700; font-size: 15px;
  color: var(--text-primary); text-decoration: none;
}
.nav-logo-img { height: 14px; width: auto; display: block; }
.nav-logo-icon {
  height: 28px; background: var(--ink);
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; padding: 0 10px;
}
.nav-breadcrumb {
  font-family: var(--font-mono); font-size: 11px; color: var(--text-muted);
  display: flex; align-items: center; gap: 6px;
}
.nav-breadcrumb a { color: var(--text-secondary); text-decoration: none; }
.nav-breadcrumb a:hover { color: var(--teal); }
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

/* ── NOTIFICATION BELL ── */
.notif-btn {
  position: relative; padding: 7px; border-radius: 8px;
  background: none; border: none; cursor: pointer;
  color: var(--text-secondary);
  transition: background .15s, color .15s;
}
.notif-btn:hover { background: var(--bg-raised); color: var(--text-primary); }

.notif-badge {
  position: absolute; top: -2px; right: -2px;
  min-width: 17px; height: 17px; padding: 0 4px;
  background: var(--rose); color: #fff;
  font-family: var(--font-mono); font-size: 9px; font-weight: 700;
  border-radius: 100px;
  display: flex; align-items: center; justify-content: center; line-height: 1;
  box-shadow: 0 0 0 2px var(--bg-surface);
  pointer-events: none;
}

.notif-dropdown {
  position: absolute; right: 0; top: calc(100% + 6px);
  width: 360px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 4px 6px rgba(0,0,0,.04), 0 12px 28px rgba(0,0,0,.10);
  z-index: 200;
  overflow: hidden;
}

.notif-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
}
.notif-title-row { display: flex; align-items: center; gap: 7px; }
.notif-title { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.notif-count-pill {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 1px 6px; min-width: 18px; height: 17px;
  background: var(--brand); color: #fff;
  font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  border-radius: 100px; line-height: 1;
}
.notif-mark-all {
  font-size: 11px; font-weight: 500; font-family: var(--font-mono);
  color: var(--brand); background: none; border: none; cursor: pointer;
  padding: 4px 8px; border-radius: 6px;
  transition: background .15s;
}
.notif-mark-all:hover { background: var(--bg-raised); }

.notif-list {
  max-height: 380px; overflow-y: auto;
}
.notif-list::-webkit-scrollbar { width: 4px; }
.notif-list::-webkit-scrollbar-track { background: transparent; }
.notif-list::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 2px; }

.notif-item {
  position: relative;
  display: flex; align-items: flex-start; gap: 10px;
  padding: 11px 16px 11px 20px;
  border-bottom: 1px solid var(--border);
  transition: background .12s;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--bg-raised); }
.notif-item.unread { background: rgba(30,70,230,.04); }
.notif-item.unread:hover { background: rgba(30,70,230,.07); }

.notif-unread-bar {
  position: absolute; left: 0; top: 10px; bottom: 10px;
  width: 3px; background: var(--brand);
  border-radius: 0 2px 2px 0;
}
.notif-icon {
  flex-shrink: 0; width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.notif-body { flex: 1; min-width: 0; }
.notif-subject {
  font-size: 13px; font-weight: 600; color: var(--text-primary);
  line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.notif-desc {
  font-size: 12px; color: var(--text-secondary);
  margin-top: 2px; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.notif-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 5px; }
.notif-time { font-size: 11px; color: var(--text-muted); font-family: var(--font-mono); }
.notif-link {
  font-size: 11px; font-weight: 600; color: var(--brand);
  text-decoration: none; font-family: var(--font-mono);
  transition: color .12s;
}
.notif-link:hover { color: var(--brand-dark); }
.notif-unread-dot {
  flex-shrink: 0; width: 7px; height: 7px;
  border-radius: 50%; background: var(--brand); margin-top: 4px;
}

.notif-footer {
  display: flex; align-items: center; justify-content: center; gap: 5px;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  font-size: 12px; font-weight: 600; color: var(--brand);
  text-decoration: none; transition: background .12s;
}
.notif-footer:hover { background: var(--bg-raised); }

.notif-empty {
  padding: 36px 16px;
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
}
.notif-empty-icon {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--bg-raised);
  display: flex; align-items: center; justify-content: center;
}

/* ── ROLE BADGE ── */
.role-badge {
  font-family: var(--font-mono); font-size: 10px; font-weight: 500;
  padding: 3px 10px; border-radius: 100px; border: 1px solid;
  letter-spacing: .04em;
}
.role-admin   { background: var(--violet-light); color: var(--violet-dark); border-color: rgba(124,58,237,.3); }
.role-agent   { background: var(--sage-light);   color: var(--sage-dark);   border-color: rgba(22,163,74,.3); }
.role-customer{ background: var(--sky-light);    color: var(--sky-dark);    border-color: rgba(2,132,199,.3); }

/* ── THEME TOGGLE ── */
.theme-toggle {
  width: 40px; height: 22px; background: var(--border-strong);
  border-radius: 11px; position: relative; cursor: pointer;
  border: none; transition: background .2s;
}
[data-theme="dark"] .theme-toggle { background: var(--teal); }
.theme-toggle::after {
  content: '';
  width: 16px; height: 16px; background: white; border-radius: 50%;
  position: absolute; top: 3px; left: 3px;
  transition: transform .22s cubic-bezier(.34,1.56,.64,1);
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
[data-theme="dark"] .theme-toggle::after { transform: translateX(18px); }

/* ── SIDEBAR ── */
.sidebar {
  position: fixed; top: var(--nav-h); left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  overflow-y: auto; z-index: 50; padding: 16px 0;
}
.sidebar-section { padding: 8px 16px 4px; }
.sidebar-label {
  font-family: var(--font-mono); font-size: 10px; font-weight: 500;
  color: var(--text-muted); letter-spacing: .1em; text-transform: uppercase;
  padding: 0 8px; margin-bottom: 4px; display: block;
}
.sidebar-link {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: var(--radius-sm);
  color: var(--text-secondary); text-decoration: none; font-size: 13px;
  transition: background .15s, color .15s;
  cursor: pointer;
}
.sidebar-link:hover { background: var(--bg-raised); color: var(--text-primary); }
.sidebar-link.active { background: var(--teal-light); color: var(--teal-dark); font-weight: 500; }
.sidebar-link .dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }

/* ── MAIN CONTENT ── */
.main { margin-left: var(--sidebar-w); padding-top: var(--nav-h); }
.main-inner { padding: 28px 28px 60px; position: relative; z-index: 1; }
.no-sidebar { margin-left: 0; }

/* ── HAMBURGER ── */
.nav-hamburger {
  display: none;
  flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; width: 36px; height: 36px;
  background: none; border: none; cursor: pointer;
  border-radius: var(--radius-sm); flex-shrink: 0;
  transition: background .15s;
}
.nav-hamburger:hover { background: var(--bg-raised); }
.nav-hamburger span {
  display: block; width: 18px; height: 2px;
  background: var(--text-primary); border-radius: 2px;
  transition: all .2s;
}

/* ── MOBILE BACKDROP ── */
.mobile-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 45;
  cursor: pointer;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .nav-hamburger { display: flex; }

  .sidebar {
    transform: translateX(-100%);
    transition: transform .25s cubic-bezier(.4,0,.2,1);
    z-index: 90;
    top: var(--nav-h);
  }

  html.sidebar-open .sidebar { transform: translateX(0); }
  html.sidebar-open .mobile-backdrop { display: block; }

  .main { margin-left: 0 !important; }
  .main-inner { padding: 20px 16px 60px; }

  .grid-2 { grid-template-columns: 1fr !important; }

  form[style*="grid-template-columns:1fr 320px"] {
    grid-template-columns: 1fr !important;
  }

  table { font-size: 13px; }
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* ── PAGE HEADER ── */
.page-header { margin-bottom: 24px; }
.page-title {
  font-family: var(--font-display); font-size: 24px; font-weight: 700;
  color: var(--text-primary); line-height: 1.2;
}
.page-subtitle { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }

/* ── CARD ── */
.card {
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px;
  box-shadow: var(--shadow-sm);
  position: relative; z-index: 1;
}
.card-title {
  font-family: var(--font-display); font-weight: 600; font-size: 15px;
  color: var(--text-primary); margin-bottom: 2px;
}
.card-subtitle { font-size: 12px; color: var(--text-muted); }

/* ── STAT CARD ── */
.stat-card {
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px;
  box-shadow: var(--shadow-sm);
}
.stat-value {
  font-family: var(--font-display); font-size: 32px; font-weight: 800;
  color: var(--text-primary); line-height: 1;
}
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; font-family: var(--font-mono); }
.stat-delta { font-size: 11px; font-family: var(--font-mono); margin-top: 8px; }
.delta-up   { color: var(--sage); }
.delta-down { color: var(--rose); }

/* ── BUTTON ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 18px; border-radius: var(--radius-md); font-size: 13px;
  font-weight: 500; cursor: pointer; border: 1px solid transparent;
  transition: all .15s; text-decoration: none; white-space: nowrap;
  font-family: var(--font-body);
}
.btn-primary  { background: var(--teal); color: white; border-color: var(--teal-dark); }
.btn-primary:hover { background: var(--teal-dark); }
.btn-secondary { background: var(--bg-raised); color: var(--text-primary); border-color: var(--border); }
.btn-secondary:hover { background: var(--bg-sunken); }
.btn-danger  { background: var(--rose); color: white; border-color: var(--rose-dark); }
.btn-danger:hover { background: var(--rose-dark); }
.btn-ghost   { background: transparent; color: var(--text-secondary); border-color: var(--border); }
.btn-ghost:hover { background: var(--bg-raised); color: var(--text-primary); }
.btn-violet  { background: var(--violet); color: white; border-color: var(--violet-dark); }
.btn-violet:hover { background: var(--violet-dark); }
.btn-sm  { padding: 6px 12px; font-size: 12px; }
.btn-lg  { padding: 12px 24px; font-size: 15px; }
.btn-full { width: 100%; }

/* ── FORM ── */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block; font-size: 12px; font-weight: 500;
  color: var(--text-secondary); margin-bottom: 6px; font-family: var(--font-mono);
}
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 9px 12px; border-radius: var(--radius-md);
  border: 1px solid var(--border); background: var(--bg-surface);
  color: var(--text-primary); font-size: 15px; font-family: var(--font-body);
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--teal); box-shadow: 0 0 0 3px rgba(30,70,230,.12);
}
.form-textarea { resize: vertical; min-height: 80px; }
.form-hint { font-size: 11px; color: var(--text-muted); margin-top: 4px; font-family: var(--font-mono); }

/* ── TABLE ── */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; }
thead { background: var(--bg-raised); }
th {
  padding: 10px 14px; text-align: left; font-size: 11px; font-weight: 500;
  color: var(--text-muted); font-family: var(--font-mono); letter-spacing: .06em;
  text-transform: uppercase; border-bottom: 1px solid var(--border); white-space: nowrap;
}
td {
  padding: 11px 14px; font-size: 13px; color: var(--text-primary);
  border-bottom: 1px solid var(--border); vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--bg-raised); }

/* ── STATUS BADGES ── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 500; padding: 3px 8px;
  border-radius: 100px; font-family: var(--font-mono); white-space: nowrap;
}
.badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.badge-pending  { background: var(--amber-light); color: var(--amber-dark); }
.badge-booked   { background: var(--teal-light);  color: var(--teal-dark);  }
.badge-assigned { background: var(--violet-light); color: var(--violet-dark); }
.badge-completed{ background: var(--sage-light);  color: var(--sage-dark);  }
.badge-cancelled{ background: var(--rose-light);  color: var(--rose-dark);  }
.badge-flagged  { background: var(--amber-light); color: var(--amber-dark); }

/* ── TAG ── */
.tag {
  display: inline-block; font-size: 11px; padding: 2px 8px;
  border-radius: 4px; background: var(--bg-raised);
  color: var(--text-secondary); font-family: var(--font-mono); border: 1px solid var(--border);
}

/* ── DIVIDER ── */
.divider { height: 1px; background: var(--border); margin: 20px 0; }

/* ── MODAL ── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  z-index: 200; display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
@keyframes modal-in {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to   { opacity: 1; transform: scale(1)    translateY(0); }
}
.modal {
  background: var(--bg-surface); border-radius: var(--radius-xl);
  border: 1px solid var(--border); width: 100%; max-width: 480px;
  box-shadow: var(--shadow-lg); padding: 28px;
  position: relative; z-index: 201;
  animation: modal-in 0.18s ease-out;
}
.modal--wide { max-width: 560px; max-height: 90vh; overflow-y: auto; }
.modal-title {
  font-family: var(--font-display); font-size: 18px; font-weight: 700;
  margin-bottom: 4px;
}
.modal-subtitle { font-size: 12px; color: var(--text-secondary); margin-bottom: 20px; }
.modal-close {
  position: absolute; top: 16px; right: 16px; width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; color: var(--text-muted); background: none; border: none;
  cursor: pointer; font-size: 16px; transition: background 0.15s, color 0.15s;
}
.modal-close:hover { background: var(--bg-raised); color: var(--text-primary); }
.modal-footer { display: flex; gap: 8px; margin-top: 20px; }

/* ── ALERT ── */
.alert {
  padding: 12px 14px; border-radius: var(--radius-md); font-size: 13px;
  border: 1px solid; margin-bottom: 16px; display: flex; gap: 10px; align-items: flex-start;
}
.alert-info    { background: var(--sky-light);   color: var(--sky-dark);   border-color: rgba(2,132,199,.3); }
.alert-success { background: var(--sage-light);  color: var(--sage-dark);  border-color: rgba(22,163,74,.3); }
.alert-warning { background: var(--amber-light); color: var(--amber-dark); border-color: rgba(217,119,6,.3); }
.alert-danger  { background: var(--rose-light);  color: var(--rose-dark);  border-color: rgba(225,29,72,.3); }

/* ── STEP INDICATOR ── */
.steps { display: flex; align-items: center; gap: 0; margin-bottom: 28px; }
.step-item {
  display: flex; align-items: center; gap: 8px; flex: 1;
  font-size: 12px; font-family: var(--font-mono);
}
.step-num {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 500; flex-shrink: 0;
  border: 2px solid var(--border); background: var(--bg-surface); color: var(--text-muted);
}
.step-item.active .step-num   { background: var(--teal); border-color: var(--teal); color: white; }
.step-item.done .step-num     { background: var(--sage); border-color: var(--sage); color: white; }
.step-label { color: var(--text-muted); }
.step-item.active .step-label { color: var(--text-primary); font-weight: 500; }
.step-item.done .step-label   { color: var(--sage); }
.step-line { flex: 1; height: 2px; background: var(--border); min-width: 20px; }
.step-item.done + .step-line  { background: var(--sage); }

/* ── EMPTY STATE ── */
.empty-state { text-align: center; padding: 48px 20px; }
.empty-icon { font-size: 40px; margin-bottom: 12px; opacity: .4; }
.empty-title { font-family: var(--font-display); font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.empty-desc { font-size: 13px; color: var(--text-secondary); }

/* ── AVATAR ── */
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; flex-shrink: 0;
  font-family: var(--font-display);
}
.avatar-teal   { background: var(--teal-light);  color: var(--teal-dark); }
.avatar-violet { background: var(--violet-light); color: var(--violet-dark); }
.avatar-amber  { background: var(--amber-light); color: var(--amber-dark); }

/* ── ANIMATIONS ── */
@keyframes fadeUp { from { opacity:0; transform:translateY(12px);} to { opacity:1; transform:translateY(0);} }
.fade-up { animation: fadeUp .35s ease both; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.5} }
.pulse { animation: pulse 2s ease infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── GRID HELPERS ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.grid-4 { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 16px; }
@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .sidebar { transform: translateX(-100%); }
  .main { margin-left: 0; }
}

/* ── MISC ── */
.mono { font-family: var(--font-mono); }
.text-teal   { color: var(--teal); }
.text-violet { color: var(--violet); }
.text-amber  { color: var(--amber); }
.text-rose   { color: var(--rose); }
.text-sage   { color: var(--sage); }
.text-muted  { color: var(--text-muted); }
.text-sm { font-size: 12px; }
.text-xs { font-size: 11px; }
.fw-600 { font-weight: 600; }
.mt-4  { margin-top: 4px; }  .mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-4  { margin-bottom: 4px; }  .mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; }
.flex { display: flex; }
.flex-center  { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-8  { gap: 8px; }  .gap-12 { gap: 12px; }
.gap-16 { gap: 16px; } .gap-20 { gap: 20px; }
.full-width { width: 100%; }

/* ── CUSTOMER PAGE ── */
.customer-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: calc(var(--nav-h) + 20px) 16px 40px;
  position: relative; z-index: 1;
}
.preorder-card {
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-xl); overflow: hidden; max-width: 440px; width: 100%;
  box-shadow: var(--shadow-lg);
}
.card-hero {
  background: linear-gradient(135deg, #0D0F14, #1A1D26);
  padding: 28px; color: white; position: relative;
}
.card-hero-badge {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em;
  text-transform: uppercase; background: rgba(30,70,230,.3); color: #93C5FD;
  padding: 4px 10px; border-radius: 100px; border: 1px solid rgba(30,70,230,.4);
  display: inline-block; margin-bottom: 12px;
}
.device-name {
  font-family: var(--font-display); font-size: 26px; font-weight: 800;
  line-height: 1.1; margin-bottom: 6px; color: white;
}
.device-sub { font-size: 13px; color: rgba(255,255,255,.6); }
.promo-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--teal); border: 1px solid var(--teal-dark);
  border-radius: 100px; padding: 6px 12px; font-size: 12px; font-weight: 600; color: white; margin-top: 16px;
}
.card-body { padding: 24px; }
.deposit-banner {
  background: var(--teal-light); border: 1px solid rgba(30,70,230,.3);
  border-radius: var(--radius-md); padding: 12px; text-align: center; margin-bottom: 20px;
}
.deposit-amount {
  font-family: var(--font-display); font-size: 28px; font-weight: 800; color: var(--teal-dark);
}

/* ── PRE-ORDER PAGE (mobile-first) ── */
.po-page {
  min-height: 100vh;
  background: var(--bg-base);
  padding-bottom: 40px;
  overflow-x: hidden;
}
/* Pre-order gallery */
.po-gallery { position: relative; width: 100%; }
.po-slide {
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
}
.po-dots { display: flex; align-items: center; }
/* Fallback hero (no images) */
.po-hero-fallback {
  background: linear-gradient(135deg, #0D0F14, #1A1D26);
  padding: 36px 24px; color: white;
  display: flex; flex-direction: column; align-items: flex-start;
}
/* Body content */
.po-body { padding: 20px 16px; max-width: 540px; margin: 0 auto; }
.po-device-header {
  margin-bottom: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
}
.po-device-name {
  font-family: var(--font-display); font-size: 24px; font-weight: 800;
  color: var(--text-primary);
  line-height: 1.15; margin-bottom: 8px;
}
.po-price-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.po-price {
  font-family: var(--font-display); font-size: 22px; font-weight: 800; color: var(--brand);
}
.po-orig-price {
  font-size: 14px; color: var(--text-secondary);
  text-decoration: line-through; font-family: var(--font-mono);
}
.po-discount-badge {
  font-size: 11px; font-family: var(--font-mono);
  background: var(--rose-light); color: var(--rose-dark);
  border: 1px solid rgba(225,29,72,.3);
  padding: 2px 8px; border-radius: 100px; font-weight: 600;
}
/* Key specs */
.po-specs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px;
}
.po-spec-item {
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 10px 12px;
}
.po-spec-key {
  font-size: 10px; font-family: var(--font-mono); color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .06em; margin-bottom: 3px;
}
.po-spec-val { font-size: 13px; font-weight: 500; line-height: 1.3; }
/* Description */
.po-desc {
  font-size: 14px; color: var(--text-secondary); line-height: 1.65;
  margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border);
}
/* Promo detail */
.po-promo-detail {
  display: flex; gap: 8px; align-items: flex-start;
  background: var(--teal-light); border-radius: var(--radius-md);
  padding: 12px; margin-bottom: 16px; font-size: 13px; color: var(--teal-dark);
  border-bottom: 1px solid var(--border);
}
/* Form section */
.po-form-section { padding-top: 4px; }

/* Desktop: center and constrain */
@media (min-width: 600px) {
  .po-page { display: flex; flex-direction: column; align-items: center; padding-bottom: 60px; }
  .po-gallery { width: 100%; max-width: 540px; border-radius: var(--radius-xl); overflow: hidden; }
  .po-body { width: 100%; }
}

/* ── THANK YOU CARD ── */
.ty-card {
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-xl); max-width: 440px; width: 100%;
  overflow: hidden; box-shadow: var(--shadow-lg);
}
.ty-hero {
  background: linear-gradient(135deg, var(--sage-dark), var(--teal-dark));
  padding: 32px; text-align: center; color: white;
}
.ty-icon  { font-size: 56px; margin-bottom: 12px; }
.ty-title { font-family: var(--font-display); font-size: 24px; font-weight: 800; }
.ty-sub   { font-size: 13px; opacity: .8; margin-top: 6px; }
.ty-body  { padding: 24px; }
.pay-option {
  border: 2px solid var(--border); border-radius: var(--radius-lg);
  padding: 18px; cursor: pointer; transition: all .2s; margin-bottom: 12px;
}
.pay-option:hover, .pay-option.selected {
  border-color: var(--teal); background: var(--teal-light);
}
.pay-option-title { font-weight: 700; font-size: 15px; margin-bottom: 2px; }
.pay-option-sub   { font-size: 12px; color: var(--text-secondary); }
.info-row {
  display: flex; justify-content: space-between;
  padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 13px;
}
.info-row:last-child { border-bottom: none; }

/* ── M-PESA PAYMENT CARD ── */
.pay-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: calc(var(--nav-h) + 20px) 16px 40px; position: relative; z-index: 1;
}
.pay-card {
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-xl); max-width: 400px; width: 100%;
  overflow: hidden; box-shadow: var(--shadow-lg);
}
.mpesa-header { background: #00A651; padding: 24px; text-align: center; color: white; }
.mpesa-logo   { font-family: var(--font-display); font-size: 28px; font-weight: 800; letter-spacing: -.5px; }
.mpesa-sub    { font-size: 12px; opacity: .85; margin-top: 4px; }
.pay-body     { padding: 24px; }
.phone-display {
  background: var(--bg-raised); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 16px; text-align: center; margin-bottom: 20px;
}
.stk-mockup {
  background: var(--ink); border-radius: 20px; padding: 24px;
  margin: 0 auto; max-width: 280px; color: white; text-align: center;
}
.stk-header  { font-size: 11px; opacity: .6; font-family: var(--font-mono); margin-bottom: 16px; }
.stk-amount  { font-family: var(--font-display); font-size: 32px; font-weight: 800; color: #00A651; margin: 8px 0; }
.stk-detail  { font-size: 12px; opacity: .7; margin-bottom: 20px; }
.stk-pin     { display: flex; flex-direction: column; gap: 6px; }
.stk-pin-label { font-size: 12px; opacity: .8; margin-bottom: 4px; }
.stk-pin-dots  { display: flex; justify-content: center; gap: 12px; }
.stk-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: rgba(255,255,255,.3); border: 1px solid rgba(255,255,255,.4);
}
.stk-dot.filled { background: white; }
.processing-ring {
  width: 60px; height: 60px; border: 3px solid var(--border);
  border-top-color: #00A651; border-radius: 50%;
  animation: spin 1s linear infinite; margin: 0 auto 16px;
}
.state { display: none; }
.state.active { display: block; }

/* ── VBA PWA ── */
.pwa-page {
  background: var(--bg-base); min-height: 100vh; display: flex;
  flex-direction: column; align-items: center;
  padding: calc(var(--nav-h) + 20px) 20px 90px;
  position: relative; z-index: 1;
}
.pwa-inner { width: 100%; max-width: 390px; }
.notif-card {
  background: var(--teal); border-radius: var(--radius-lg); padding: 16px;
  color: white; margin-bottom: 16px; cursor: pointer; transition: background .15s;
}
.notif-card:hover { background: var(--teal-dark); }
.pre-order-row {
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 14px; margin-bottom: 10px;
  cursor: pointer; transition: all .15s; text-decoration: none;
  display: block; color: var(--text-primary);
}
.pre-order-row:hover { border-color: var(--teal); background: var(--teal-light); }

/* ── CATALOG INDEX ── */
.catalog-wrap { padding-top: var(--nav-h); background: var(--bg-base); }

/* Dark hero banner */
.catalog-hero {
  background: #0D0F14; position: relative; overflow: hidden;
  padding: 52px 48px 44px;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 32px;
  flex-wrap: wrap;
}
.catalog-hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 65% 100% at 70% 50%, rgba(30,70,230,.16) 0%, transparent 70%);
  pointer-events: none;
}
.catalog-hero-text { position: relative; z-index: 1; }
.hero-mono-label {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 2.5px;
  text-transform: uppercase; color: rgba(255,255,255,.45);
  margin-bottom: 14px; display: block;
}
.hero-h1 {
  font-family: var(--font-display); font-size: clamp(30px,5vw,52px);
  font-weight: 900; color: #fff; line-height: 1.0;
  letter-spacing: -1px; margin-bottom: 12px;
}
.hero-subtitle {
  font-size: 14px; color: rgba(255,255,255,.5);
  max-width: 440px; line-height: 1.65;
}
.hero-stats {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  align-self: flex-end;
}
.hero-stat-badge {
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius-md); padding: 7px 14px;
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: 11px; color: rgba(255,255,255,.65);
  backdrop-filter: blur(8px);
}
.hero-stat-dot { width: 6px; height: 6px; border-radius: 50%; background: #1E46E6; flex-shrink: 0; }

/* Filter bar */
.filter-wrap { max-width: 1160px; margin: 0 auto; padding: 28px 32px 0; }
.filter-bar {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  padding: 14px 16px;
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
  margin-bottom: 28px;
}
.filter-bar .form-input, .filter-bar .form-select { margin-bottom: 0; }
.filter-search { flex: 1; min-width: 200px; }
.filter-category { min-width: 150px; }
.filter-promo { min-width: 150px; }

/* Product grid */
.products-wrap { max-width: 1160px; margin: 0 auto; padding: 0 32px 72px; }
.product-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 22px; }
.product-card {
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-xl); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s;
  display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-4px); box-shadow: 0 16px 48px rgba(0,0,0,.11); }
.product-image {
  height: 260px; display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.product-image img { transition: transform .4s ease; }
.product-card:hover .product-image img { transform: scale(1.05); }
.product-image-label {
  font-family: var(--font-display); font-size: 17px; font-weight: 800;
  color: white; text-align: center; padding: 0 20px;
  text-shadow: 0 1px 4px rgba(0,0,0,.3);
}
.promo-badge-card {
  position: absolute; top: 12px; left: 12px;
  font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 100px; white-space: nowrap;
}
.promo-amber { background: var(--amber-light); color: var(--amber-dark); border: 1px solid rgba(217,119,6,.25); }
.promo-violet { background: var(--violet-light); color: var(--violet-dark); border: 1px solid rgba(124,58,237,.25); }
.promo-rose { background: var(--rose-light); color: var(--rose-dark); border: 1px solid rgba(225,29,72,.25); }
.promo-teal { background: var(--brand-light); color: var(--brand-dark); border: 1px solid rgba(30,70,230,.25); }
.product-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.product-body .tag {
  display: inline-block;
  font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  letter-spacing: 1px; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 6px;
}
.product-name {
  font-family: var(--font-display); font-size: 17px; font-weight: 800;
  color: var(--text-primary); line-height: 1.25; margin-bottom: 10px;
  letter-spacing: -.2px;
}
.product-price-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.product-price-current {
  font-family: var(--font-display); font-size: 23px; font-weight: 900;
  color: var(--brand);
}
.product-price-was { font-size: 13px; color: var(--text-muted); text-decoration: line-through; }
.product-price-save {
  font-family: var(--font-mono); font-size: 10px;
  background: var(--sage-light); color: var(--sage-dark);
  padding: 2px 7px; border-radius: 4px;
}
.product-desc { font-size: 12px; color: var(--text-secondary); line-height: 1.55; flex: 1; }
.purchase-type-strip {
  display: flex; align-items: center; margin-top: 14px; padding-top: 14px;
  border-top: 1px solid var(--border);
}
.type-pill {
  font-family: var(--font-mono); font-size: 9px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 100px; border: 1px solid;
}
.type-pill-preorder { background: var(--brand-light); color: var(--brand-dark); border-color: rgba(30,70,230,.25); }
.type-pill-order { background: var(--sage-light); color: var(--sage-dark); border-color: rgba(22,163,74,.25); }
.hidden { display: none !important; }
.product-card.hidden { display: none; }
.no-results { grid-column: 1/-1; text-align: center; padding: 64px 20px; display: none; }
.no-results.visible { display: block; }
.no-results-icon { font-size: 36px; opacity: .25; margin-bottom: 14px; }
.no-results-title { font-family: var(--font-display); font-size: 17px; font-weight: 700; margin-bottom: 6px; color: var(--text-primary); }
.no-results-sub { font-size: 13px; color: var(--text-muted); }
@media (max-width: 960px) { .product-grid { grid-template-columns: repeat(2,1fr); } .catalog-hero { padding: 40px 24px 32px; } }
@media (max-width: 560px) { .product-grid { grid-template-columns: 1fr; } .hero-h1 { font-size: 28px; } .filter-bar { flex-direction: column; } .filter-search, .filter-category, .filter-promo { width: 100%; min-width: unset; } .filter-wrap, .products-wrap { padding-left: 16px; padding-right: 16px; } }

/* ── CATALOG PRODUCT PAGE ── */
.product-page { padding-top: var(--nav-h); background: var(--bg-base); }
.product-inner { max-width: 1160px; margin: 0 auto; padding: 0 32px 72px; }

/* Breadcrumb */
.breadcrumb-trail {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em;
  color: var(--text-muted); margin-top: 28px; margin-bottom: 28px;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.breadcrumb-trail a { color: var(--text-secondary); text-decoration: none; transition: color .12s; }
.breadcrumb-trail a:hover { color: var(--brand); }
.breadcrumb-back {
  display: inline-flex; align-items: center; gap: 5px;
  color: var(--brand); text-decoration: none;
  padding: 5px 12px 5px 8px; border-radius: var(--radius-sm);
  background: var(--brand-light); font-weight: 600;
  transition: background .12s;
}
.breadcrumb-back:hover { background: rgba(30,70,230,.15); color: var(--brand-dark); }
.breadcrumb-sep { color: var(--border-strong); }

/* Two-column layout */
.product-columns { display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; align-items: start; }
.gallery-main {
  height: 420px; border-radius: var(--radius-xl);
  border: 1px solid var(--border); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  position: relative; background: #F5F7FA;
  box-shadow: var(--shadow-sm);
}
.gallery-main-label { text-align: center; color: white; }
.gallery-main-title { font-family: var(--font-display); font-size: 22px; font-weight: 800; text-shadow: 0 1px 4px rgba(0,0,0,.3); }
.gallery-main-sub { font-size: 13px; opacity: .7; margin-top: 4px; text-shadow: 0 1px 3px rgba(0,0,0,.3); }
.gallery-zoom-hint { position: absolute; bottom: 14px; right: 14px; font-family: var(--font-mono); font-size: 10px; color: var(--text-muted); opacity: .6; pointer-events: none; }
.gallery-thumbs { margin-top: 12px; display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; }
.gallery-thumb { height: 72px; border-radius: var(--radius-md); border: 2px solid var(--border); cursor: pointer; transition: border-color .15s, box-shadow .15s; overflow: hidden; }
.gallery-thumb.active { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-light); }
.gallery-thumb:hover { border-color: var(--brand-dark); }
.gallery-thumb-label { font-family: var(--font-mono); font-size: 9px; color: var(--text-primary); background: rgba(255,255,255,.75); width: 100%; text-align: center; padding: 3px 4px; }

/* Product info panel */
.product-info { position: sticky; top: calc(var(--nav-h) + 24px); }
.product-promo-badge {
  font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  padding: 5px 13px; border-radius: 100px; display: inline-block;
}
.product-title {
  font-family: var(--font-display); font-size: clamp(26px,3.5vw,36px);
  font-weight: 900; color: var(--text-primary);
  margin-top: 14px; line-height: 1.1; letter-spacing: -.5px;
}
.product-tagline {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--text-muted); margin-top: 8px;
}
.rating-row { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 13px; color: var(--text-muted); }
.rating-stars { color: #F59E0B; letter-spacing: 1px; }
.divider { height: 1px; background: var(--border); margin: 20px 0; }
.price-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; }
.price-current {
  font-family: var(--font-display); font-size: clamp(30px,4vw,40px);
  font-weight: 900; color: var(--brand);
}
.price-was { font-size: 16px; color: var(--text-muted); text-decoration: line-through; }
.price-save {
  font-family: var(--font-mono); font-size: 11px;
  background: var(--sage-light); color: var(--sage-dark);
  padding: 3px 10px; border-radius: 4px;
}
.promo-detail-card { border-radius: var(--radius-md); padding: 16px; margin-top: 16px; }
.promo-detail-card.cashback { background: var(--amber-light); border: 1px solid rgba(217,119,6,.25); }
.promo-detail-card.free_gift { background: var(--violet-light); border: 1px solid rgba(124,58,237,.25); }
.promo-detail-card.on_sale { background: var(--brand-light); border: 1px solid rgba(30,70,230,.25); }
.promo-detail-card.new_arrival { background: var(--sage-light); border: 1px solid rgba(22,163,74,.25); }
.promo-detail-title { font-family: var(--font-display); font-weight: 700; font-size: 13px; margin-bottom: 6px; }
.promo-detail-card.cashback .promo-detail-title { color: var(--amber-dark); }
.promo-detail-card.free_gift .promo-detail-title { color: var(--violet-dark); }
.promo-detail-card.on_sale .promo-detail-title { color: var(--brand-dark); }
.promo-detail-card.new_arrival .promo-detail-title { color: var(--sage-dark); }
.promo-detail-body { font-size: 12px; line-height: 1.6; opacity: .85; }
.promo-detail-card.cashback .promo-detail-body { color: var(--amber-dark); }
.promo-detail-card.free_gift .promo-detail-body { color: var(--violet-dark); }
.promo-detail-card.on_sale .promo-detail-body { color: var(--brand-dark); }
.promo-detail-card.new_arrival .promo-detail-body { color: var(--sage-dark); }
.order-notice {
  background: var(--sage-light); border: 1px solid rgba(22,163,74,.22);
  border-radius: var(--radius-md); padding: 16px; margin-top: 16px;
  font-size: 13px; color: var(--sage-dark); line-height: 1.6;
}
.availability-label {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em;
  color: var(--sage); margin-top: 14px; display: flex; align-items: center; gap: 6px;
}
.availability-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--sage); flex-shrink: 0; }

/* Tabs */
.tabs-section { margin-top: 52px; }
.tab-bar {
  display: flex; gap: 0; border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}
.tab-btn {
  padding: 11px 22px; font-family: var(--font-display); font-size: 13px; font-weight: 600;
  color: var(--text-muted); cursor: pointer; background: none; border: none;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color .15s, border-color .15s;
}
.tab-btn:hover { color: var(--text-primary); }
.tab-btn.active { color: var(--brand); border-bottom-color: var(--brand); }
/* tab-pane visibility is controlled by Stimulus tabs_controller via .hidden class */
.desc-body p { font-size: 14px; color: var(--text-secondary); line-height: 1.75; margin-bottom: 16px; }
.features-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 24px; }
.feature-card {
  background: var(--bg-raised); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 18px;
  transition: background .15s, box-shadow .15s;
}
.feature-card:hover { background: var(--bg-surface); box-shadow: var(--shadow-sm); }
.feature-title { font-family: var(--font-display); font-size: 13px; font-weight: 700; color: var(--text-primary); margin-bottom: 5px; }
.feature-desc { font-size: 12px; color: var(--text-secondary); line-height: 1.55; }
.spec-row { display: grid; grid-template-columns: 170px 1fr; border-bottom: 1px solid var(--border); }
.spec-row:last-child { border-bottom: none; }
.spec-label {
  font-family: var(--font-mono); font-size: 11px; color: var(--text-muted);
  padding: 12px 18px; text-transform: uppercase; letter-spacing: .06em; background: var(--bg-raised);
}
.spec-value { font-size: 13px; color: var(--text-primary); padding: 12px 18px; line-height: 1.5; }
@media (max-width: 860px) { .product-columns { grid-template-columns: 1fr; } .product-info { position: static; } .gallery-main { height: 340px; } }
@media (max-width: 600px) { .product-inner { padding-left: 16px; padding-right: 16px; } .product-title { font-size: 24px; } .price-current { font-size: 28px; } .features-grid { grid-template-columns: 1fr; } .spec-row { grid-template-columns: 120px 1fr; } }

/* ── VBA BOTTOM NAV ── */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  background: var(--bg-surface); border-top: 1px solid var(--border);
  display: flex;
}
.bottom-nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 12px 0; gap: 2px;
  font-size: 11px; text-decoration: none; color: var(--text-muted);
  transition: color .15s;
}
.bottom-nav-item.active { color: var(--brand); }
.bottom-nav-item:hover { color: var(--text-primary); }
.bottom-nav-icon { font-size: 18px; }

/* ── VBA PHONE SEARCH ── */
.customer-type-chip { display:inline-flex;align-items:center;gap:5px;font-size:10px;font-family:var(--font-mono);padding:3px 8px;border-radius:100px;border:1px solid; }
.type-a { background:var(--sky-light);color:var(--sky-dark);border-color:rgba(2,132,199,.3); }
.type-b { background:var(--teal-light);color:var(--teal-dark);border-color:rgba(13,148,136,.3); }
.type-c { background:var(--violet-light);color:var(--violet-dark);border-color:rgba(124,58,237,.3); }
.type-d { background:var(--amber-light);color:var(--amber-dark);border-color:rgba(217,119,6,.3); }
.type-e { background:var(--rose-light);color:var(--rose-dark);border-color:rgba(225,29,72,.3); }
.result-card { background:var(--bg-surface);border:1px solid var(--border);border-radius:var(--radius-lg);padding:16px;margin-top:16px; }

/* ── VBA VERIFICATION ── */
.verify-result { border-radius:var(--radius-lg);padding:20px;text-align:center;margin-top:16px; }
.verify-true { background:var(--sage-light);border:2px solid rgba(22,163,74,.3); }
.verify-false { background:var(--rose-light);border:2px solid rgba(225,29,72,.3); }
.big-check { font-size:48px;margin-bottom:8px; }
.code-input { font-family:var(--font-mono);font-size:20px;letter-spacing:.15em;text-align:center;text-transform:uppercase; }

/* ── VBA CLOSE LEAD ── */
.proof-slot { border:2px dashed var(--border-strong);border-radius:var(--radius-lg);padding:20px;text-align:center;cursor:pointer;transition:all .2s;position:relative;overflow:hidden; }
.proof-slot:hover { border-color:var(--teal);background:var(--teal-light); }
.proof-slot.uploaded { border-style:solid;border-color:var(--sage);background:var(--sage-light); }
.proof-slot input[type=file] { position:absolute;inset:0;opacity:0;cursor:pointer; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }

@layer base {
  body { font-family: var(--font-body); }
}

@layer components {
  [data-theme="dark"] .theme-toggle::after { transform: translateX(18px); }
}

/* ── FORM FIELD ERROR HIGHLIGHTING ── */
/* Rails field_with_errors wrapper — use display:contents to avoid breaking layouts */
.field_with_errors { display: contents; }

.field_with_errors .form-input,
.field_with_errors .form-select,
.field_with_errors .form-textarea {
  border-color: var(--rose, #e11d48);
  background: var(--rose-light, #fff1f2);
}

.field_with_errors .form-input:focus,
.field_with_errors .form-select:focus {
  outline-color: var(--rose, #e11d48);
  box-shadow: 0 0 0 3px rgba(225, 29, 72, .15);
}

/* ── PORTAL COLOUR SCHEMES ── */

/* Admin portal — black */
[data-portal="admin"] {
  --teal:       #0D0F14;
  --teal-dark:  #000000;
  --teal-light: rgba(13,15,20,.07);
  --brand:      #0D0F14;
  --brand-dark: #000000;
  --brand-light:rgba(13,15,20,.07);
}
[data-portal="admin"] .top-nav {
  background: #0D0F14;
  border-bottom-color: #000;
}
[data-portal="admin"] .nav-logo { color: #fff; }
[data-portal="admin"] .nav-breadcrumb { color: rgba(255,255,255,.45); }
[data-portal="admin"] .nav-breadcrumb a { color: rgba(255,255,255,.65); }
[data-portal="admin"] .nav-breadcrumb a:hover { color: #fff; }
[data-portal="admin"] .nav-hamburger span { background: #fff; }
[data-portal="admin"] .nav-hamburger:hover { background: rgba(255,255,255,.1); }
[data-portal="admin"] .theme-toggle { background: rgba(255,255,255,.2); }
[data-portal="admin"] .nav-logo-icon { background: rgba(255,255,255,.12); }
[data-portal="admin"] .role-admin {
  background: rgba(255,255,255,.12);
  color: rgba(255,255,255,.9);
  border-color: rgba(255,255,255,.2);
}
[data-portal="admin"] .form-input:focus,
[data-portal="admin"] .form-select:focus,
[data-portal="admin"] .form-textarea:focus {
  border-color: #0D0F14;
  box-shadow: 0 0 0 3px rgba(13,15,20,.12);
}

/* VBA portal — blue */
[data-portal="vba"] {
  --teal:       #1E46E6;
  --teal-dark:  #1535B8;
  --teal-light: rgba(30,70,230,.08);
  --brand:      #1E46E6;
  --brand-dark: #1535B8;
  --brand-light:rgba(30,70,230,.08);
}
[data-portal="vba"] .top-nav {
  background: #1E46E6;
  border-bottom-color: #1535B8;
}
[data-portal="vba"] .nav-logo { color: #fff; }
[data-portal="vba"] .nav-breadcrumb { color: rgba(255,255,255,.5); }
[data-portal="vba"] .nav-breadcrumb a { color: rgba(255,255,255,.7); }
[data-portal="vba"] .nav-breadcrumb a:hover { color: #fff; }
[data-portal="vba"] .theme-toggle { background: rgba(255,255,255,.25); }
[data-portal="vba"] .nav-logo-icon { background: rgba(255,255,255,.15); }
[data-portal="vba"] .role-agent {
  background: rgba(255,255,255,.15);
  color: #fff;
  border-color: rgba(255,255,255,.25);
}
[data-portal="vba"] .form-input:focus,
[data-portal="vba"] .form-select:focus,
[data-portal="vba"] .form-textarea:focus {
  border-color: #1E46E6;
  box-shadow: 0 0 0 3px rgba(30,70,230,.15);
}
