/* ═══════════════════════════════════════════════════════════════════
   ORDEGATE CLIENT DASHBOARD — dashboard.css v1.0.0
   
   Design philosophy: Apple-level refinement.
   Every spacing, shadow, radius, and color decision is intentional.
   The interface should feel like it was made by one person who cares
   deeply about every pixel.

   Design decisions:
   ─ Frosted glass everywhere — topbar, modals, cards on dark
   ─ Pill sidebar nav — no borders, just subtle background fills
   ─ Red focus rings — differentiates from admin, warm and intentional
   ─ Status dots — 8px circles, never text alone
   ─ Three-layer shadows — natural depth, no harsh lines
   ─ DM Sans + Playfair Display — modern + editorial contrast
   ─ 10px inputs, 14px cards, 16px large cards, 20px modals
   ═══════════════════════════════════════════════════════════════════ */

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

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
a { text-decoration: none; color: inherit; }
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,.12); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,.22); }

/* ═══════════════════════════════════════════════════════════════════
   DESIGN TOKENS
   Every value lives here. Components reference tokens.
   ═══════════════════════════════════════════════════════════════════ */
:root {
  /* ── Brand palette ── */
  --navy:        #0d1f3c;
  --navy-mid:    #0d1f3c;
  --navy-soft:   #162d54;
  --blue:        #2563eb;
  --blue-bright: #3b82f6;
  --blue-soft:   #eff6ff;
  --blue-border: #bfdbfe;
  --red:         #e8372a;
  --red-soft:    #fff1f0;
  --red-border:  #fca5a5;
  --green:       #10b981;
  --green-soft:  #ecfdf5;
  --green-border:#6ee7b7;
  --amber:       #f59e0b;
  --amber-soft:  #fffbeb;
  --amber-border:#fde68a;
  --purple:      #7c3aed;
  --purple-soft: #f5f3ff;

  /* ── Neutral palette ── */
  --white:    #ffffff;
  --snow:     #f9fafb;
  --ice:      #f3f4f6;
  --fog:      #e5e7eb;
  --mist:     #d1d5db;
  --slate:    #9ca3af;
  --steel:    #6b7280;
  --iron:     #374151;
  --charcoal: #1f2937;
  --ink:      #111827;

  /* ── Semantic text ── */
  --text-primary:   #0f172a;
  --text-secondary: #4b5563;
  --text-muted:     #9ca3af;
  --text-placeholder:#c4c9d4;

  /* ── Surfaces ── */
  --surface:      #ffffff;
  --surface-raised:#f9fafb;
  --surface-overlay: rgba(255,255,255,0.82);

  /* ── Status dot palette ── */
  --dot-navy:  #0a1628;
  --dot-blue:  #60a5fa;
  --dot-grey:  #d1d5db;
  --dot-green: #34d399;
  --dot-amber: #fbbf24;
  --dot-red:   #f87171;
  --dot-purple:#a78bfa;

  /* ── Layout ── */
  --sidebar-w: 252px;
  --topbar-h:  60px;

  /* ── Spacing scale ── */
  --sp-xs: .3rem;
  --sp-sm: .5rem;
  --sp:    1rem;
  --sp-md: 1.25rem;
  --sp-lg: 1.75rem;
  --sp-xl: 2.5rem;

  /* ── Border radius ──────────────────────────────────────────────
     Strict scale. Never use raw px values in components.
  ─────────────────────────────────────────────────────────────────── */
  --r-xs:   6px;    /* tiny: chips, inner elements */
  --r-sm:   10px;   /* inputs, buttons */
  --r-md:   14px;   /* cards */
  --r-lg:   16px;   /* large cards, panels */
  --r-xl:   20px;   /* modals, drawer */
  --r-2xl:  24px;   /* feature cards */
  --r-pill: 999px;  /* nav items, tags */

  /* ── Shadow system ──────────────────────────────────────────────
     Three-layer stacked shadows create natural depth.
     No single-layer harsh box-shadow. Inspired by macOS windows.
  ─────────────────────────────────────────────────────────────────── */
  --shadow-xs:
    0 1px 2px rgba(0,0,0,.04);
  --shadow-sm:
    0 1px 3px rgba(0,0,0,.06),
    0 3px 8px rgba(0,0,0,.07),
    0 0 0 1px rgba(0,0,0,.04);
  --shadow-md:
    0 2px 6px rgba(0,0,0,.08),
    0 6px 20px rgba(0,0,0,.1),
    0 12px 32px rgba(0,0,0,.07),
    0 0 0 1px rgba(0,0,0,.04);
  --shadow-lg:
    0 4px 8px rgba(0,0,0,.05),
    0 12px 32px rgba(0,0,0,.08),
    0 24px 48px rgba(0,0,0,.06),
    0 0 0 1px rgba(0,0,0,.03);
  --shadow-xl:
    0 8px 16px rgba(0,0,0,.06),
    0 24px 48px rgba(0,0,0,.1),
    0 48px 80px rgba(0,0,0,.08),
    0 0 0 1px rgba(0,0,0,.04);

  --tr-fast:   all .12s ease;
  --tr:        all .18s ease;
  --tr-slow:   all .28s ease;
  --tr-spring: all .22s cubic-bezier(.34,1.56,.64,1);
}

/* ── DARK MODE TOKENS ── */
[data-dark] {
  --surface:         #111827;
  --surface-raised:  #1f2937;
  --surface-overlay: rgba(17,24,39,0.85);
  --snow:    #1f2937;
  --ice:     #374151;
  --fog:     #4b5563;
  --mist:    #6b7280;
  --text-primary:   #f9fafb;
  --text-secondary: #d1d5db;
  --text-muted:     #9ca3af;
  --blue-soft:   #1e3a5f;
  --blue-border: #2563eb;
  --red-soft:    #2d0f0f;
  --green-soft:  #052e1c;
  --amber-soft:  #2d1f00;
  --purple-soft: #1e1040;
  --dot-grey:    #6b7280;
}

/* ═══════════════════════════════════════════════════════════════════
   BASE
   ═══════════════════════════════════════════════════════════════════ */
html, body {
  height: 100%;
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--snow);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ═══════════════════════════════════════════════════════════════════
   LOGIN SCREEN
   Full-screen centered card on a gradient background.
   ═══════════════════════════════════════════════════════════════════ */
#login-screen {
  position: fixed; inset: 0;
  background:
    radial-gradient(ellipse 80% 80% at 50% -10%, rgba(37,99,235,.12) 0%, transparent 60%),
    linear-gradient(160deg, #f0f4ff 0%, #f9fafb 40%, #fff 100%);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
}
[data-dark] #login-screen {
  background:
    radial-gradient(ellipse 80% 80% at 50% -10%, rgba(37,99,235,.2) 0%, transparent 60%),
    linear-gradient(160deg, #0a1628 0%, #111827 100%);
}

.login-card {
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255,255,255,.8);
  border-radius: var(--r-xl);
  padding: 2.75rem 2.25rem;
  width: 100%; max-width: 400px;
  box-shadow: var(--shadow-xl);
}
[data-dark] .login-card {
  background: rgba(17,24,39,.9);
  border-color: rgba(255,255,255,.08);
}

.login-logo          { display: flex; align-items: center; gap: .75rem; margin-bottom: 2rem; }
.login-logo .lname   { font-size: 1.4rem; font-weight: 800; color: var(--navy-mid); letter-spacing: -.6px; }
.login-logo .lname span { color: var(--blue); }
.login-logo .lsub    { font-size: .7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .12em; margin-top: .15rem; }
.fg                  { margin-bottom: 1.1rem; }
.fl                  { display: block; font-size: .76rem; color: var(--text-secondary); margin-bottom: .4rem; font-weight: 600; letter-spacing: .01em; }
.login-err           { font-size: .76rem; color: var(--red); min-height: 1.1rem; text-align: center; margin-top: .65rem; font-weight: 500; }

/* ═══════════════════════════════════════════════════════════════════
   SIDEBAR
   Dark navy. Pill nav items — background highlight only, no borders.
   ═══════════════════════════════════════════════════════════════════ */
#app { display: none; }

#sidebar {
  position: fixed; top: 0; left: 0;
  height: 100vh; width: var(--sidebar-w);
  background: linear-gradient(180deg, #0d1f3c 0%, #0a1628 60%, #081322 100%);
  display: flex; flex-direction: column;
  z-index: 200; overflow-y: auto; overflow-x: hidden;
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  box-shadow: 4px 0 32px rgba(0,0,0,.35), 1px 0 0 rgba(255,255,255,.04);
}
#sidebar::-webkit-scrollbar { width: 3px; }
#sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.08); }

.sb-logo {
  padding: 1.5rem 1.25rem 1.1rem;
  border-bottom: 1px solid rgba(255,255,255,.06);
  flex-shrink: 0;
}
.sb-logo .lname {
  font-size: 1.1rem; font-weight: 800; color: #fff;
  letter-spacing: -.4px;
}
.sb-logo .lname span { color: #60a5fa; }
.sb-logo .lsub {
  font-size: .62rem; color: rgba(255,255,255,.25);
  text-transform: uppercase; letter-spacing: .15em; margin-top: .2rem;
}
.sb-logo .lver {
  font-size: .55rem; color: rgba(255,255,255,.15); margin-top: 2px;
}

.sb-store-info {
  padding: .85rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.sb-store-info .sname {
  font-size: .82rem; font-weight: 600; color: rgba(255,255,255,.9);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sb-store-info .surl {
  font-size: .66rem; color: #60a5fa;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-top: .15rem;
}

.sb-nav { flex: 1; padding: .6rem 0 1rem; overflow-y: auto; }

.sb-section-label {
  padding: .9rem 1.25rem .25rem;
  font-size: .58rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .14em;
  color: rgba(255,255,255,.22);
}

/* ── PILL NAV ITEMS ─────────────────────────────────────────────────
   Full pill shape via border-radius: 999px.
   Margin creates breathing room so the pill floats in the sidebar.
   No left border accent — pure background highlight on active.
   Active = translucent light blue fill.
─────────────────────────────────────────────────────────────────── */
.nv {
  display: flex; align-items: center; gap: .65rem;
  padding: .5rem .9rem;
  font-size: .82rem; font-weight: 500;
  color: rgba(255,255,255,.45);
  cursor: pointer;
  border-radius: var(--r-pill);         /* Full pill */
  margin: 1.5px 10px;                   /* Floating pill with margin */
  border-left: none;                    /* No left border ever */
  transition: var(--tr);
  white-space: nowrap; overflow: hidden;
}
.nv:hover {
  color: rgba(255,255,255,.85);
  background: rgba(255,255,255,.06);
}
.nv.active {
  color: #fff;
  font-weight: 600;
  background: linear-gradient(135deg, rgba(96,165,250,.22) 0%, rgba(59,130,246,.16) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}
.nv .ni {
  width: 14px; text-align: center; flex-shrink: 0;
  font-size: .8rem; opacity: .55;
  transition: opacity .15s;
}
.nv.active .ni { opacity: 1; color: #93c5fd; }
.nv:hover .ni  { opacity: .85; }
.nv .arr { font-size: .58rem; margin-left: auto; transition: transform .2s; opacity: .4; }
.nv.open .arr  { transform: rotate(180deg); }

.nv-badge {
  margin-left: auto;
  font-size: .6rem; font-weight: 700;
  background: rgba(96,165,250,.18); color: #93c5fd;
  border-radius: 5px; padding: .12rem .4rem;
}

.nv-sub { display: none; }
.nv-sub.open { display: block; }
.nv-sub .nv  { padding-left: 2.4rem; font-size: .79rem; margin: 1px 10px; }

.sb-divider { height: 1px; background: rgba(255,255,255,.06); margin: .3rem 0; }

.pos-divider {
  font-size: .57rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .12em; color: rgba(255,255,255,.22);
  padding: .8rem 1.25rem .2rem; margin-top: .35rem;
}

.sb-bottom {
  padding: .9rem 1.25rem;
  border-top: 1px solid rgba(255,255,255,.06);
  flex-shrink: 0;
}
.sb-user { display: flex; align-items: center; gap: .6rem; }
.sb-user .av {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, #60a5fa 0%, #2563eb 100%);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 700; flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(37,99,235,.4);
}
.sb-user .ui   { flex: 1; min-width: 0; }
.sb-user .un   { font-size: .79rem; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-user .ue   { font-size: .64rem; color: rgba(255,255,255,.3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-user .logout {
  width: 28px; height: 28px; background: transparent; border: none;
  color: rgba(255,255,255,.3); cursor: pointer;
  border-radius: var(--r-xs);
  display: flex; align-items: center; justify-content: center;
  transition: var(--tr);
}
.sb-user .logout:hover { background: rgba(255,255,255,.08); color: rgba(255,255,255,.7); }

/* ═══════════════════════════════════════════════════════════════════
   FROSTED GLASS TOPBAR
   macOS-style frosted glass. backdrop-filter blurs content beneath.
   Semi-transparent so page content shows through softly.
   ═══════════════════════════════════════════════════════════════════ */
#topbar {
  position: fixed; top: 0; left: var(--sidebar-w); right: 0;
  height: var(--topbar-h);
  /* Frosted glass — primary implementation */
  background: rgba(249,250,251,.78);
  backdrop-filter: blur(28px) saturate(200%) brightness(1.02);
  -webkit-backdrop-filter: blur(28px) saturate(200%) brightness(1.02);
  border-bottom: 1px solid rgba(0,0,0,.07);
  display: flex; align-items: center;
  padding: 0 1.5rem; gap: .75rem;
  z-index: 100;
  /* Layered shadow for depth */
  box-shadow:
    0 1px 0 rgba(0,0,0,.06),
    0 4px 16px rgba(0,0,0,.06),
    0 8px 32px rgba(0,0,0,.04),
    inset 0 -1px 0 rgba(255,255,255,.8);
}
[data-dark] #topbar {
  background: rgba(17,24,39,.82);
  border-bottom-color: rgba(55,65,81,.5);
}

#tb-title {
  font-family: 'Playfair Display', serif;
  font-size: .95rem; font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -.2px;
}
.tb-spacer { flex: 1; }
.tb-btn {
  width: 36px; height: 36px;
  background: rgba(255,255,255,.7);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(0,0,0,.07);
  border-radius: var(--r-sm);
  color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: .84rem;
  transition: var(--tr);
  box-shadow: var(--shadow-xs);
}
.tb-btn:hover {
  background: var(--surface);
  border-color: var(--blue);
  color: var(--blue);
  box-shadow: var(--shadow-sm);
}
.store-link-chip {
  display: flex; align-items: center; gap: .4rem;
  background: var(--blue-soft); border: 1px solid var(--blue-border);
  border-radius: var(--r-pill); padding: .28rem .85rem;
  font-size: .73rem; color: var(--blue); font-weight: 600;
  cursor: pointer; transition: var(--tr);
}
.store-link-chip:hover { background: var(--blue); color: #fff; }

/* ═══════════════════════════════════════════════════════════════════
   MAIN CONTENT
   ═══════════════════════════════════════════════════════════════════ */
#main {
  margin-left: var(--sidebar-w);
  margin-top: var(--topbar-h);
  min-height: calc(100vh - var(--topbar-h));
  padding: 1.75rem;
  background: var(--snow);
}

.panel { display: none; }
.panel.active { display: block; }

/* Settings nav overrides — light context */
#panel-settings .nv, #settings-nav .nv {
  color: var(--text-secondary) !important;
  background: transparent !important;
  border-left: none !important;
}
#panel-settings .nv:hover, #settings-nav .nv:hover {
  color: var(--navy-mid) !important;
  background: var(--ice) !important;
}
#panel-settings .nv.active, #settings-nav .nv.active {
  color: var(--blue) !important;
  background: var(--blue-soft) !important;
  font-weight: 600 !important;
}
.panel input, .panel select, .panel textarea {
  color: var(--text-primary);
  background: var(--surface);
}
.panel label { color: var(--text-primary); }

/* ── PAGE HEADER ── */
.ph {
  display: flex; align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap; gap: .75rem;
}
.ph-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem; font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -.4px; line-height: 1.2;
}
.ph-sub { font-size: .78rem; color: var(--text-muted); margin-top: .3rem; }

/* ═══════════════════════════════════════════════════════════════════
   CARDS
   14px standard, 16px large, 20px modal-sized.
   Three-layer shadows — no harsh single borders.
   ═══════════════════════════════════════════════════════════════════ */
.card {
  background: var(--surface);
  border: 1px solid rgba(0,0,0,.05);
  border-radius: var(--r-md);           /* 14px */
  padding: 1.35rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s ease;
}
.card:hover { box-shadow: var(--shadow-md); }
.card-lg    { border-radius: var(--r-lg); } /* 16px */

/* ═══════════════════════════════════════════════════════════════════
   INPUTS — red focus ring
   Radius: 10px. Focus: soft red glow — not blue.
   ═══════════════════════════════════════════════════════════════════ */
input, select, textarea {
  font-family: 'DM Sans', sans-serif;
  background: var(--surface);
  border: 1.5px solid var(--fog);
  border-radius: var(--r-sm);           /* 10px */
  color: var(--text-primary);
  padding: .58rem .8rem;
  font-size: .84rem;
  width: 100%;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  appearance: none;
}
input:hover, select:hover, textarea:hover {
  border-color: var(--mist);
}
input:focus, select:focus, textarea:focus {
  border-color: var(--red);
  /* Soft red glow — the signature focus style of this dashboard */
  box-shadow: 0 0 0 3.5px rgba(232,55,42,.12),
              0 1px 4px rgba(232,55,42,.08);
}
input::placeholder, textarea::placeholder { color: var(--text-placeholder); }
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .75rem center; padding-right: 2.2rem; cursor: pointer; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .52rem 1.1rem;
  border-radius: var(--r-sm);
  font-family: 'DM Sans', sans-serif;
  font-weight: 600; font-size: .83rem;
  cursor: pointer; border: none;
  transition: var(--tr);
  white-space: nowrap;
  letter-spacing: .01em;
}
.btn-p {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  box-shadow: 0 1px 3px rgba(37,99,235,.3), 0 4px 12px rgba(37,99,235,.2);
}
.btn-p:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  box-shadow: 0 2px 6px rgba(37,99,235,.4), 0 6px 16px rgba(37,99,235,.25);
  transform: translateY(-1px);
}
.btn-p:active { transform: translateY(0); }
.btn-g {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  box-shadow: 0 1px 3px rgba(16,185,129,.3), 0 4px 12px rgba(16,185,129,.2);
}
.btn-g:hover { background: linear-gradient(135deg, #059669 0%, #047857 100%); transform: translateY(-1px); }
.btn-o {
  background: var(--surface);
  border: 1.5px solid var(--fog);
  color: var(--text-primary);
  box-shadow: var(--shadow-xs);
}
.btn-o:hover { border-color: var(--blue); color: var(--blue); box-shadow: var(--shadow-sm); }
.btn-d {
  background: linear-gradient(135deg, #e8372a 0%, #dc2626 100%);
  color: #fff;
  box-shadow: 0 1px 3px rgba(232,55,42,.3), 0 4px 12px rgba(232,55,42,.2);
}
.btn-d:hover { background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%); transform: translateY(-1px); }
.sm { padding: .4rem .8rem; font-size: .77rem; }
.xs { padding: .26rem .58rem; font-size: .71rem; }

/* ── BANNERS ── */
.banner { border-radius: var(--r-md); padding: .8rem 1rem; font-size: .8rem; margin-bottom: 1.1rem; display: flex; align-items: center; gap: .6rem; }
.bwarn    { background: var(--red-soft);    border: 1px solid var(--red-border);    color: var(--red);   }
.binfo    { background: var(--blue-soft);   border: 1px solid var(--blue-border);   color: var(--blue);  }
.bsuccess { background: var(--green-soft);  border: 1px solid var(--green-border);  color: var(--green); }

/* ── STAT CARDS ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 1rem; margin-bottom: 1.5rem;
}
.stat-card {
  background: var(--surface);
  border: 1px solid rgba(0,0,0,.05);
  border-radius: var(--r-md);
  padding: 1.2rem;
  box-shadow: var(--shadow-sm);
  transition: var(--tr);
  position: relative; overflow: hidden;
}
.stat-card::before {
  /* Subtle gradient wash behind icon */
  content: '';
  position: absolute; top: 0; right: 0;
  width: 80px; height: 80px;
  border-radius: 0 var(--r-md) 0 80px;
  background: var(--card-bg, var(--blue-soft));
  opacity: .6;
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.stat-card .sc-icon {
  width: 38px; height: 38px;
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: .92rem; margin-bottom: .75rem;
  background: var(--card-bg, var(--blue-soft));
  color: var(--card-ic, var(--blue));
  position: relative; z-index: 1;
}
.stat-card .sc-val   { font-size: 1.6rem; font-weight: 800; color: var(--text-primary); line-height: 1; font-family: 'DM Sans', sans-serif; }
.stat-card .sc-label { font-size: .7rem; color: var(--text-muted); margin-top: .3rem; font-weight: 500; text-transform: uppercase; letter-spacing: .04em; }

/* ── CHART CARDS ── */
.charts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px,1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.chart-card  { background: var(--surface); border: 1px solid rgba(0,0,0,.05); border-radius: var(--r-lg); padding: 1.35rem; box-shadow: var(--shadow-sm); }
.cc-title    { font-size: .84rem; font-weight: 700; color: var(--text-primary); margin-bottom: .85rem; letter-spacing: -.1px; }
.no-data     { text-align: center; padding: 2.5rem 1rem; color: var(--text-muted); font-size: .8rem; }
.no-data i   { font-size: 2rem; display: block; margin-bottom: .65rem; opacity: .2; }

/* ── TABLE ── */
.tbl-wrap { overflow-x: auto; border-radius: var(--r-md); border: 1px solid rgba(0,0,0,.05); box-shadow: var(--shadow-xs); }
.tbl      { width: 100%; border-collapse: collapse; background: var(--surface); }
.tbl th   { text-align: left; font-size: .7rem; color: var(--text-muted); padding: .7rem .9rem; border-bottom: 1px solid var(--fog); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; background: var(--ice); }
.tbl td   { padding: .78rem .9rem; border-bottom: 1px solid rgba(0,0,0,.04); font-size: .82rem; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tbody tr:hover td { background: rgba(37,99,235,.03); }
.tbl tr:first-child th:first-child { border-radius: var(--r-md) 0 0 0; }
.tbl tr:first-child th:last-child  { border-radius: 0 var(--r-md) 0 0; }

/* ═══════════════════════════════════════════════════════════════════
   STATUS DOTS
   Colored 8px circles — the signature status indicator.
   Used instead of text-only badges wherever status is shown.
   
   Usage:
     <span class="status-dot"><span class="dot dot-green"></span> Active</span>
     <span class="status-dot"><span class="dot dot-navy"></span> Draft</span>
   ═══════════════════════════════════════════════════════════════════ */
.dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(0,0,0,.06);
}
.dot-navy   { background: var(--dot-navy);   box-shadow: 0 0 0 2px rgba(10,22,40,.15);   }
.dot-blue   { background: var(--dot-blue);   box-shadow: 0 0 0 2px rgba(96,165,250,.2);  }
.dot-grey   { background: var(--dot-grey);   box-shadow: 0 0 0 2px rgba(209,213,219,.4); }
.dot-green  { background: var(--dot-green);  box-shadow: 0 0 0 2px rgba(52,211,153,.25); }
.dot-amber  { background: var(--dot-amber);  box-shadow: 0 0 0 2px rgba(251,191,36,.25); }
.dot-red    { background: var(--dot-red);    box-shadow: 0 0 0 2px rgba(248,113,113,.25);}
.dot-purple { background: var(--dot-purple); box-shadow: 0 0 0 2px rgba(167,139,250,.25);}

/* Dot + label row */
.status-dot {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .78rem; font-weight: 500; color: var(--text-secondary);
}

/* Dot pulse animation for live/active states */
@keyframes dot-pulse {
  0%,100% { opacity: 1; transform: scale(1);   }
  50%      { opacity: .7; transform: scale(1.2); }
}
.dot-live { animation: dot-pulse 2s ease-in-out infinite; }

/* ── BADGES (supplementary) ── */
.badge   { display: inline-flex; align-items: center; gap: 4px; padding: .22rem .65rem; border-radius: var(--r-xs); font-size: .69rem; font-weight: 600; letter-spacing: .01em; }
.b-green { background: var(--green-soft);  color: var(--green); }
.b-red   { background: var(--red-soft);    color: var(--red);   }
.b-gold  { background: var(--amber-soft);  color: var(--amber); }
.b-blue  { background: var(--blue-soft);   color: var(--blue);  }
.b-gray  { background: var(--ice);         color: var(--steel); }

/* POS badge classes */
.badge-green  { background: #dcfce7; color: #16a34a; border-radius: var(--r-xs); }
.badge-red    { background: #fee2e2; color: #dc2626; border-radius: var(--r-xs); }
.badge-amber  { background: #fef3c7; color: #d97706; border-radius: var(--r-xs); }
.badge-blue   { background: #dbeafe; color: #2563eb; border-radius: var(--r-xs); }
.badge-gray   { background: #f1f5f9; color: #64748b; border-radius: var(--r-xs); }
.badge-purple { background: #f3e8ff; color: #7c3aed; border-radius: var(--r-xs); }
.ibadge { font-size: .62rem; font-weight: 700; padding: .15rem .5rem; border-radius: 99px; white-space: nowrap; }

/* ── FORM GRID ── */
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.fgrid .full { grid-column: 1 / -1; }
@media (max-width: 600px) { .fgrid { grid-template-columns: 1fr; } }

/* ── TOGGLE SWITCH ── */
.toggle { position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle .sl { position: absolute; inset: 0; background: var(--fog); border-radius: 11px; cursor: pointer; transition: .25s; }
.toggle .sl:before { content: ''; position: absolute; width: 16px; height: 16px; left: 3px; bottom: 3px; background: #fff; border-radius: 50%; transition: .25s; box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.toggle input:checked + .sl { background: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.toggle input:checked + .sl:before { transform: translateX(18px); }

/* ── PROGRESS ── */
.prog-bar  { height: 8px; background: var(--fog); border-radius: 99px; overflow: hidden; margin: .5rem 0; }
.prog-fill { height: 100%; background: linear-gradient(90deg, var(--blue) 0%, var(--blue-bright) 100%); border-radius: 99px; transition: width .5s cubic-bezier(.4,0,.2,1); }
.progress-bar  { height: 6px; background: var(--fog); border-radius: 99px; overflow: hidden; margin-top: .3rem; }
.progress-fill { height: 100%; border-radius: 99px; transition: width .35s ease; }

/* ── SETUP GUIDE ── */
.setup-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .8rem; }
.setup-item {
  background: var(--surface);
  border: 1.5px solid var(--fog);
  border-radius: var(--r-md);
  padding: .95rem;
  display: flex; align-items: flex-start; gap: .7rem;
  transition: var(--tr);
  box-shadow: var(--shadow-xs);
  cursor: pointer;
}
.setup-item:hover { border-color: var(--blue-border); box-shadow: var(--shadow-sm); }
.setup-item.done  { border-color: var(--green-border); background: var(--green-soft); }
.setup-item .sic  { width: 24px; height: 24px; border-radius: 6px; border: 2px solid var(--fog); display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: .05rem; transition: var(--tr); }
.setup-item.done .sic { background: var(--green); border-color: var(--green); color: #fff; }
.setup-item .si-t    { font-size: .79rem; font-weight: 600; color: var(--text-primary); }
.setup-item .si-s    { font-size: .69rem; color: var(--text-muted); margin-top: .1rem; }
.setup-item .si-link { font-size: .69rem; color: var(--blue); margin-top: .3rem; display: inline-flex; align-items: center; gap: .25rem; }

/* ── APPS ── */
.apps-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 1rem; }
.app-card {
  background: var(--surface);
  border: 1px solid rgba(0,0,0,.05);
  border-radius: var(--r-lg);
  padding: 1.35rem;
  display: flex; flex-direction: column; gap: .9rem;
  box-shadow: var(--shadow-sm);
  transition: var(--tr);
}
.app-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.app-card.installed { border-color: var(--green-border); }
.app-card .ach   { display: flex; align-items: center; gap: .8rem; }
.app-card .acico { width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0; }
.app-card .acn   { font-size: .88rem; font-weight: 700; color: var(--text-primary); }
.app-card .acp   { font-size: .7rem; color: var(--green); font-weight: 600; }
.app-card .acd   { font-size: .78rem; color: var(--text-muted); line-height: 1.6; flex: 1; }
.app-card .acf   { display: flex; flex-direction: column; gap: .32rem; }
.app-card .acf li { font-size: .72rem; color: var(--text-muted); display: flex; align-items: flex-start; gap: .4rem; list-style: none; }
.app-card .acf li i { color: var(--green); margin-top: .1rem; flex-shrink: 0; font-size: .65rem; }
.app-card .acfoot { display: flex; gap: .5rem; margin-top: auto; }
.app-cat-tabs { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.35rem; }
.act { padding: .35rem .85rem; border-radius: var(--r-pill); font-size: .76rem; font-weight: 500; border: 1.5px solid var(--fog); color: var(--text-muted); cursor: pointer; background: var(--surface); transition: var(--tr); }
.act.active, .act:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-soft); }

/* ── WALLET ── */
.wallet-plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); gap: 1rem; }
.plan-card {
  background: var(--surface);
  border: 1.5px solid var(--fog);
  border-radius: var(--r-lg);
  padding: 1.5rem; text-align: center;
  box-shadow: var(--shadow-sm);
  transition: var(--tr);
  cursor: pointer;
}
.plan-card:hover { border-color: var(--blue); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.plan-card .pca { font-size: 1.8rem; font-weight: 800; color: var(--text-primary); letter-spacing: -.5px; }
.plan-card .pcl { font-size: .82rem; color: var(--text-muted); margin-bottom: 1.1rem; }
.plan-card ul   { list-style: none; margin-bottom: 1.25rem; display: flex; flex-direction: column; gap: .4rem; text-align: left; }
.plan-card ul li { font-size: .73rem; color: var(--text-muted); display: flex; align-items: center; gap: .4rem; }
.plan-card ul li i { color: var(--green); font-size: .65rem; }

/* ── SERVICE GALLERY ── */
.sg-cats { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.35rem; }
.sgc { padding: .35rem .85rem; border-radius: var(--r-pill); font-size: .76rem; font-weight: 500; border: 1.5px solid var(--fog); color: var(--text-muted); cursor: pointer; background: var(--surface); transition: var(--tr); display: flex; align-items: center; gap: .35rem; }
.sgc.active, .sgc:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-soft); }
.sg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: 1rem; }
.sg-card { background: var(--surface); border: 1px solid rgba(0,0,0,.05); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); transition: var(--tr); }
.sg-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.sg-card .sgi  { height: 120px; background: var(--ice); display: flex; align-items: center; justify-content: center; font-size: 2rem; color: var(--text-muted); }
.sg-card .sgb  { padding: 1rem; }
.sg-card .sgn  { font-size: .85rem; font-weight: 700; color: var(--text-primary); margin-bottom: .2rem; }
.sg-card .sgp  { font-size: .7rem; color: var(--text-muted); margin-bottom: .5rem; display: flex; align-items: center; gap: .3rem; }
.sg-card .sgpr { font-size: .82rem; font-weight: 700; color: var(--blue); }
.sg-card .sgr  { font-size: .72rem; color: var(--amber); display: flex; align-items: center; gap: .25rem; }

/* ═══════════════════════════════════════════════════════════════════
   MODAL — Frosted glass overlay, 20px radius
   ═══════════════════════════════════════════════════════════════════ */
.mov {
  position: fixed; inset: 0;
  background: rgba(10,14,26,.45);
  backdrop-filter: blur(8px) saturate(150%);
  -webkit-backdrop-filter: blur(8px) saturate(150%);
  z-index: 8000; display: none;
  align-items: center; justify-content: center;
  padding: 1rem;
}
.mov.open { display: flex; }

.modal {
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(20px) saturate(200%);
  -webkit-backdrop-filter: blur(20px) saturate(200%);
  border: 1px solid rgba(255,255,255,.8);
  border-radius: var(--r-xl);           /* 20px */
  width: 100%; max-width: 520px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-xl);
  animation: modal-in .22s cubic-bezier(.4,0,.2,1);
}
[data-dark] .modal {
  background: rgba(17,24,39,.95);
  border-color: rgba(255,255,255,.07);
}
@keyframes modal-in {
  from { opacity: 0; transform: scale(.97) translateY(8px); }
  to   { opacity: 1; transform: scale(1)   translateY(0);   }
}
.mh { display: flex; align-items: center; justify-content: space-between; padding: 1.35rem 1.6rem; border-bottom: 1px solid var(--fog); }
.mt { font-size: 1rem; font-weight: 700; color: var(--text-primary); letter-spacing: -.2px; }
.mc {
  background: var(--ice); border: none;
  color: var(--text-muted); font-size: .88rem;
  cursor: pointer; width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; transition: var(--tr);
}
.mc:hover { background: var(--fog); color: var(--text-primary); }
.mb { padding: 1.35rem 1.6rem; }
.mf { padding: 1rem 1.6rem; border-top: 1px solid var(--fog); display: flex; justify-content: flex-end; gap: .65rem; }

/* ── INFO BOX ── */
.ibox { border-radius: var(--r-sm); padding: .7rem .9rem; font-size: .78rem; line-height: 1.55; margin-bottom: .9rem; }
.ibox.warn    { background: var(--amber-soft); border: 1px solid var(--amber-border); color: #92400e; }
.ibox.info    { background: var(--blue-soft);  border: 1px solid var(--blue-border);  color: var(--blue); }
.ibox.danger  { background: var(--red-soft);   border: 1px solid var(--red-border);   color: var(--red); }
.ibox.success { background: var(--green-soft); border: 1px solid var(--green-border); color: var(--green); }

/* ═══════════════════════════════════════════════════════════════════
   TOAST
   Slides in from right. Frosted glass pill.
   ═══════════════════════════════════════════════════════════════════ */
#toast-cont {
  position: fixed; bottom: 1.5rem; right: 1.5rem;
  z-index: 9999; display: flex; flex-direction: column; gap: .5rem;
}
.toast {
  padding: .7rem 1.1rem;
  border-radius: var(--r-md);
  font-size: .82rem; font-weight: 500;
  display: flex; align-items: center; gap: .5rem;
  animation: toast-in .22s cubic-bezier(.34,1.56,.64,1);
  box-shadow: var(--shadow-lg);
  max-width: 310px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.toast.success { background: rgba(236,253,245,.95); border: 1px solid var(--green-border); color: var(--green); }
.toast.error   { background: rgba(255,241,240,.95); border: 1px solid var(--red-border);   color: var(--red);   }
.toast.info    { background: rgba(239,246,255,.95); border: 1px solid var(--blue-border);  color: var(--blue);  }
@keyframes toast-in {
  from { transform: translateX(60px) scale(.95); opacity: 0; }
  to   { transform: translateX(0)    scale(1);   opacity: 1; }
}

/* ═══════════════════════════════════════════════════════════════════
   POS MANAGEMENT SUITE
   ═══════════════════════════════════════════════════════════════════ */
.data-table { width: 100%; border-collapse: collapse; font-size: .79rem; }
.data-table th { padding: .55rem .8rem; text-align: left; font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--text-muted); border-bottom: 2px solid var(--fog); white-space: nowrap; background: var(--ice); }
.data-table td { padding: .55rem .8rem; border-bottom: 1px solid rgba(0,0,0,.04); vertical-align: middle; }
.data-table tr:hover td { background: rgba(37,99,235,.03); }

.kpi-grid  { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px,1fr)); gap: .75rem; margin-bottom: 1.1rem; }
.kpi-card  { background: var(--surface); border: 1px solid rgba(0,0,0,.05); border-radius: var(--r-md); padding: .85rem 1rem; box-shadow: var(--shadow-xs); }
.kpi-label { font-size: .64rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--text-muted); margin-bottom: .3rem; }
.kpi-value { font-size: 1.5rem; font-weight: 800; font-family: 'DM Mono', monospace; color: var(--navy-mid); }
.kpi-note  { font-size: .62rem; color: var(--text-muted); margin-top: .15rem; }

.panel-hd  { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.1rem; flex-wrap: wrap; gap: .5rem; }
.panel-hd h2 { font-size: .95rem; font-weight: 700; color: var(--navy-mid); margin: 0; }
.panel-hd .sub { font-size: .71rem; color: var(--text-muted); }

.pos-card { background: var(--surface); border: 1px solid rgba(0,0,0,.05); border-radius: var(--r-md); padding: 1rem; margin-bottom: .75rem; box-shadow: var(--shadow-xs); }
.pos-card-title { font-size: .71rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--text-muted); margin-bottom: .65rem; }

.filter-bar { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .85rem; align-items: center; }
.filter-bar select, .filter-bar input { padding: .38rem .65rem; font-size: .78rem; border: 1.5px solid var(--fog); border-radius: var(--r-sm); background: var(--surface); color: var(--text-primary); font-family: inherit; width: auto; }
.filter-bar select:focus, .filter-bar input:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(232,55,42,.1); }

.empty-state { text-align: center; padding: 3rem 1rem; color: var(--text-muted); }
.empty-state i { font-size: 1.8rem; opacity: .2; display: block; margin-bottom: .5rem; }
.empty-state p { font-size: .78rem; }

.row-item { display: flex; align-items: center; gap: .65rem; padding: .55rem .25rem; border-bottom: 1px solid rgba(0,0,0,.04); }
.row-item:last-child { border: none; }
.row-icon  { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: .8rem; }
.av-circle { width: 36px; height: 36px; border-radius: 50%; background: var(--navy-mid); color: #fff; font-size: .75rem; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

.tbl-actions { display: flex; gap: .3rem; }
.btn-xs      { padding: .25rem .58rem; font-size: .68rem; border-radius: var(--r-xs); border: none; cursor: pointer; font-weight: 600; transition: var(--tr); }
.btn-xs.edit { background: var(--blue-soft);  color: var(--blue);  }
.btn-xs.del  { background: var(--red-soft);   color: var(--red);   }
.btn-xs.view { background: var(--ice);         color: var(--steel); }
.btn-xs:hover { filter: brightness(.92); }

.chart-bar-row   { display: flex; align-items: center; gap: .6rem; margin-bottom: .55rem; }
.chart-bar-label { font-size: .72rem; font-weight: 600; min-width: 80px; color: var(--text-primary); }
.chart-bar-track { flex: 1; height: 7px; background: var(--fog); border-radius: 99px; overflow: hidden; }
.chart-bar-fill  { height: 100%; background: linear-gradient(90deg, var(--blue) 0%, var(--blue-bright) 100%); border-radius: 99px; transition: width .5s ease; }
.chart-bar-val   { font-size: .72rem; font-family: 'DM Mono', monospace; font-weight: 700; min-width: 60px; text-align: right; color: var(--text-secondary); }

.two-col   { display: grid; grid-template-columns: 1fr 1fr; gap: .85rem; }
.three-col { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: .85rem; }
@media (max-width: 768px) { .two-col, .three-col { grid-template-columns: 1fr; } }

/* ── CONFIRM MODAL (custom — no browser dialogs) ── */
#confirm-modal .modal { max-width: 400px; text-align: center; }
#confirm-modal .modal .mb { padding: 2rem 1.6rem 1.25rem; }
.confirm-icon  { font-size: 2.8rem; margin-bottom: var(--sp); }
.confirm-title { font-size: 1rem; font-weight: 700; color: var(--text-primary); margin-bottom: .4rem; }
.confirm-msg   { font-size: .83rem; color: var(--text-muted); line-height: 1.6; }

/* ── MOBILE ── */
#sb-ov { display: none; position: fixed; inset: 0; background: rgba(10,14,26,.5); z-index: 150; backdrop-filter: blur(3px); }
@media (max-width: 768px) {
  #sidebar          { transform: translateX(-100%); }
  #sidebar.open     { transform: translateX(0); }
  #sb-ov.open       { display: block; }
  #topbar           { left: 0; }
  #main             { margin-left: 0; padding: 1rem; }
  .stats-grid       { grid-template-columns: 1fr 1fr; }
  .kpi-grid         { grid-template-columns: 1fr 1fr; }
}

/* ── LOGO IMAGES ── */
.logo-img { height: 28px; width: auto; display: block; object-fit: contain; object-position: left center; }
.logo-img.dark  { mix-blend-mode: screen;   height: 26px; filter: brightness(1.1); }
.logo-img.light { mix-blend-mode: multiply; height: 24px; }
