/* ═══════════════════════════════════════════════════════
   MYFLAVORSUPPLY DESIGN SYSTEM v10
   Principios: Minimalismo funcional · Jerarquía estricta
               Consistencia absoluta · Performance visual
   ═══════════════════════════════════════════════════════ */

/* ── BASE: CSS Variables ─────────────────────────────── */
:root {
  /* Paleta de color — 2 marcas + 3 semánticos */
  --c-bg:        #f4f6f9;
  --c-surface:   #ffffff;
  --c-surface-2: #f0f3f7;
  --c-border:    #e3e8ef;

  /* Primario: Teal */
  --c-primary:       #16A344;
  --c-primary-hover: #0F5132;
  --c-primary-dim:   rgba(22,163,68,.10);
  --c-primary-light: #e8f9ee;

  /* Secundario: Orange */
  --c-orange:      #f97316;
  --c-orange-dim:  rgba(249,115,22,.10);
  --c-orange-light:#fff4ed;

  /* Estados semánticos */
  --c-ok:      #22C55E;
  --c-ok-dim:  rgba(34,197,94,.10);
  --c-warn:    #FBBF24;
  --c-warn-dim:rgba(251,191,36,.10);
  --c-crit:    #ef4444;
  --c-crit-dim:rgba(239,68,68,.10);

  /* Texto — 3 niveles */
  --c-text:   #111827;
  --c-text-2: #374151;
  --c-muted:  #94a3b8;

  /* Tipografía */
  --font-body:    'Poppins', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;
  --font-display: 'Montserrat', sans-serif;

  /* Una sola sombra base */
  --shadow: 0 1px 3px rgba(0,0,0,.07), 0 0 0 1px rgba(0,0,0,.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,.09), 0 0 0 1px rgba(0,0,0,.04);

  /* Espaciado: escala 4px */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-6: 24px;
  --sp-8: 32px;

  /* Bordes */
  --radius:    10px;
  --radius-lg: 14px;

  /* Transiciones ≤ 200ms */
  --t-fast: 150ms ease;
  --t-base: 180ms ease;

  /* Gradiente de marca único */
  --grad-primary: linear-gradient(135deg, #0F5132, #16A344);
  --grad-orange:  linear-gradient(135deg, #f97316, #ea580c);

  /* Sidebar */
  --sb-bg:     #1e3a4a;
  --sb-border: rgba(255,255,255,.10);
  --sb-text:   rgba(255,255,255,.65);
  --sb-active: rgba(22,163,68,.25);

  /* Compat aliases (keeps existing JS working) */
  --bg:           var(--c-bg);
  --surface:      var(--c-surface);
  --surface2:     var(--c-surface-2);
  --surface3:     var(--c-surface-2);
  --border:       var(--c-border);
  --border2:      var(--c-border);
  --accent:       var(--c-primary);
  --accent-light: var(--c-primary-light);
  --accent-glow:  var(--c-primary-dim);
  --accent2:      var(--c-orange);
  --accent2-light:var(--c-orange-light);
  --green:        var(--c-ok);
  --green-dim:    var(--c-ok-dim);
  --red:          var(--c-crit);
  --red-dim:      var(--c-crit-dim);
  --amber:        var(--c-warn);
  --amber-dim:    var(--c-warn-dim);
  --blue:         #3b82f6;
  --blue-dim:     rgba(59,130,246,.10);
  --purple:       #8b5cf6;
  --purple-dim:   rgba(139,92,246,.10);
  --ok:           var(--c-ok);
  --warn:         var(--c-warn);
  --crit:         var(--c-crit);
  --info:         var(--c-primary);
  --mono:         var(--font-mono);
  --display:      var(--font-display);
  --body:         var(--font-body);
  --input-bg:     #f8fafc;
  --text:         var(--c-text);
  --text2:        var(--c-text-2);
  --muted:        var(--c-muted);
  --shadow-lg:    var(--shadow-md);
  --shadow-accent:0 4px 14px rgba(22,163,68,.20);
  --grad-teal:    var(--grad-primary);
  --grad-warm:    var(--grad-orange);
  --grad-cool:    linear-gradient(135deg,#3b82f6,#6366f1);
}


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

html { height: 100%; }
body {
  height: 100%;
  font-family: var(--font-body);
  font-size: 13px; line-height: 1.55;
  background: var(--c-bg); color: var(--c-text);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
@media (max-width: 768px) { body { overflow: auto; } }

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(22,163,68,0.40); }

input, select, textarea, button { font-family: var(--font-body); }

/* ── SCREENS ── */
.screen { display: none; width: 100%; height: 100%; position: absolute; inset: 0; }
.screen.active { display: flex; }

/* ═══════════════════════════════════════════
   LOGIN — PREMIUM DARK LUXURY
   ═══════════════════════════════════════════ */

/* Premium CSS variables */
:root {
  --pm-gold: #C9A84C;
  --pm-gold-light: #E8C97A;
  --pm-gold-dim: rgba(201,168,76,0.15);
  --pm-glass: rgba(255,255,255,0.05);
  --pm-glass-hover: rgba(255,255,255,0.09);
  --pm-glass-border: rgba(255,255,255,0.10);
  --pm-glass-border-hover: rgba(255,255,255,0.22);
  --pm-text-1: rgba(255,255,255,0.95);
  --pm-text-2: rgba(255,255,255,0.58);
  --pm-text-3: rgba(255,255,255,0.30);
  --pm-bg-deep: #0F2A1A;
  --pm-t: 0.32s cubic-bezier(0.4,0,0.2,1);
  --pm-spring: 0.45s cubic-bezier(0.34,1.56,0.64,1);
}

/* ── LOGIN SCREEN ── */
#sw {
  flex-direction: column; align-items: center; justify-content: center;
  overflow: hidden; position: relative;
  background: #1a2f3f;
}

/* Animated orbs */
.pm-orb {
  position: absolute; border-radius: 50%; pointer-events: none; z-index: 0;
  animation: pmOrbFloat 14s ease-in-out infinite;
}
.pm-orb-1 {
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(74,48,128,0.28), transparent 70%);
  top: -280px; left: -220px; animation-delay: 0s;
}
.pm-orb-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(26,72,90,0.22), transparent 70%);
  top: 35%; right: -180px; animation-delay: -5s;
}
.pm-orb-3 {
  width: 350px; height: 350px;
  background: radial-gradient(circle, rgba(90,42,80,0.20), transparent 70%);
  bottom: -100px; left: 32%; animation-delay: -9s;
}
.pm-orb-4 {
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(201,168,76,0.08), transparent 70%);
  top: 20%; left: 20%; animation-delay: -3s;
}
@keyframes pmOrbFloat {
  0%,100%{ transform: translate(0,0) scale(1); }
  33%     { transform: translate(28px,-18px) scale(1.04); }
  66%     { transform: translate(-18px,26px) scale(0.96); }
}

/* Grid overlay */
#sw::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.014) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.014) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(ellipse 65% 65% at 50% 50%, black 0%, transparent 100%);
}

/* Split layout: left brand + right form */
.login-split {
  position: relative; z-index: 2;
  display: flex; align-items: stretch;
  width: 100%; max-width: 860px; min-height: 520px;
  border-radius: 24px; overflow: hidden;
  border: 1px solid var(--pm-glass-border);
  box-shadow: 0 40px 100px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,255,255,0.04);
  animation: pmSlideIn .5s cubic-bezier(0.34,1.2,0.64,1) both;
}
@keyframes pmSlideIn {
  from { opacity:0; transform: translateY(24px) scale(.97); }
  to   { opacity:1; transform: none; }
}

/* LEFT: brand side */
.login-brand {
  flex: 1;
  background: linear-gradient(145deg, rgba(22,163,68,0.18) 0%, rgba(74,48,128,0.20) 50%, rgba(201,168,76,0.08) 100%);
  padding: 52px 44px;
  display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
  border-right: 1px solid var(--pm-glass-border);
  backdrop-filter: blur(10px);
}
.login-brand::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(22,163,68,0.06) 0%, transparent 60%);
  pointer-events: none;
}
.login-brand-logo {
  display: flex; align-items: center; gap: 14px; margin-bottom: 48px;
}
.login-brand-mark {
  width: 52px; height: 52px; border-radius: 14px;
  background: linear-gradient(135deg, #0F5132, #16A344);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 28px rgba(22,163,68,0.38);
  flex-shrink: 0;
}
.login-brand-wordmark { font-family: 'Montserrat', sans-serif; font-weight: 900;
  font-family: 'Montserrat', sans-serif;
  font-size: 26px; font-weight: 600;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: rgba(255,255,255,0.92);
  line-height: 1.1;
}
.login-brand-wordmark em {
  font-style: italic; color: var(--pm-gold);
}
.login-brand-sub {
  font-size: 10px; color: var(--pm-text-3);
  letter-spacing: 2px; text-transform: uppercase;
  margin-top: 2px;
}
.login-brand-headline {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(30px, 3.5vw, 44px);
  font-weight: 500; line-height: 1.12;
  color: rgba(255,255,255,0.90);
  letter-spacing: -0.5px;
  margin-bottom: 20px;
}
.login-brand-headline em {
  font-style: italic; color: var(--pm-gold);
}
.login-brand-desc {
  font-family: 'Montserrat', sans-serif;
  font-size: 14px; line-height: 1.7;
  color: var(--pm-text-2);
  max-width: 340px;
}
.login-brand-footer {
  margin-top: auto;
}
.login-brand-stats {
  display: flex; gap: 20px; margin-top: 40px;
}
.lbs-item {
  border-top: 1px solid rgba(201,168,76,0.3);
  padding-top: 12px;
}
.lbs-val {
  font-family: 'Montserrat', sans-serif;
  font-size: 26px; font-weight: 600;
  color: var(--pm-gold); letter-spacing: -0.5px;
}
.lbs-label {
  font-size: 11px; color: var(--pm-text-3);
  letter-spacing: 0.5px; margin-top: 2px;
}

/* RIGHT: form side */
.login-form-side {
  width: 360px; flex-shrink: 0;
  background: rgba(11,11,26,0.82);
  backdrop-filter: blur(30px);
  padding: 48px 40px;
  display: flex; flex-direction: column; justify-content: center;
  position: relative;
}
.login-form-eyebrow {
  font-size: 10px; font-weight: 600;
  letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--pm-gold); margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px;
}
.login-form-eyebrow::before {
  content: ''; width: 20px; height: 1px; background: var(--pm-gold);
}
.login-form-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 28px; font-weight: 500;
  color: rgba(255,255,255,0.92);
  margin-bottom: 32px; line-height: 1.2;
  letter-spacing: -0.3px;
}
.pm-input-wrap {
  margin-bottom: 14px;
}
.pm-input-label {
  font-size: 10px; font-weight: 600;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--pm-text-3); margin-bottom: 6px; display: block;
}
.pm-input {
  width: 100%; padding: 13px 16px;
  background: var(--pm-glass);
  border: 1px solid var(--pm-glass-border);
  border-radius: 12px;
  color: rgba(255,255,255,0.92); font-size: 14px;
  font-family: 'Montserrat', sans-serif;
  outline: none;
  transition: all var(--pm-t);
  backdrop-filter: blur(8px);
}
.pm-input::placeholder { color: var(--pm-text-3); }
.pm-input:focus {
  border-color: rgba(201,168,76,0.5);
  background: var(--pm-glass-hover);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.08);
}
.btn-login {
  width: 100%; padding: 14px;
  background: linear-gradient(135deg, var(--pm-gold), var(--pm-gold-light));
  border: none; color: #1A1208;
  font-size: 13px; font-weight: 700; border-radius: 12px;
  cursor: pointer; font-family: 'Montserrat', sans-serif;
  letter-spacing: 0.8px; text-transform: uppercase;
  transition: transform var(--pm-spring), box-shadow var(--pm-t);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 8px;
}
.btn-login:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 10px 36px rgba(201,168,76,0.38);
}
.btn-login:active { transform: scale(0.99); }
.login-err {
  color: #fca5a5; font-size: 11px; text-align: center;
  min-height: 16px; margin-top: 8px; font-family: 'Montserrat', sans-serif;
}

/* Compat: login-box still used in JS, map to pm-input styles */
.login-box { width: 100%; }
.login-box input {
  width: 100%; padding: 13px 16px;
  background: var(--pm-glass);
  border: 1px solid var(--pm-glass-border);
  border-radius: 12px;
  color: rgba(255,255,255,0.92); font-size: 14px;
  font-family: 'Montserrat', sans-serif;
  outline: none;
  transition: all var(--pm-t);
  backdrop-filter: blur(8px);
  margin-bottom: 12px;
}
.login-box input::placeholder { color: var(--pm-text-3); }
.login-box input:focus {
  border-color: rgba(201,168,76,0.5);
  background: var(--pm-glass-hover);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.08);
}

/* Keep old structure */
.login-panel { display: none; } /* hidden — new .login-split is used */

.co-name { font-family: 'Montserrat', sans-serif; font-size: 20px; font-weight: 600; text-align: center; color: #fff; }
.co-trade { font-size: 11px; color: var(--pm-text-3); text-align: center; margin-top: 2px; }

.erp-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 12px; border: 1px solid rgba(201,168,76,0.32);
  color: rgba(201,168,76,0.85); background: rgba(201,168,76,0.07);
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 2px;
  border-radius: 20px; margin: 10px 0 20px;
}
.erp-pill::before {
  content: ''; width: 5px; height: 5px;
  border-radius: 50%; background: var(--pm-gold);
}

.lang-btn {
  padding: 7px 14px; border: 1px solid var(--pm-glass-border);
  background: var(--pm-glass); color: var(--pm-text-2);
  font-size: 11px; border-radius: 10px; cursor: pointer;
  transition: all var(--pm-t);
  display: flex; align-items: center; gap: 5px; font-family: 'Montserrat', sans-serif;
}
.lang-btn:hover, .lang-btn.sel {
  border-color: rgba(201,168,76,0.45);
  background: rgba(201,168,76,0.1);
  color: var(--pm-gold);
}
.lang-btn.sel { font-weight: 600; }

/* ═══════════════════════════════════════════
   APP SHELL
   ═══════════════════════════════════════════ */
#sa { flex-direction: row; }

/* ── SIDEBAR — PREMIUM DARK ── */
.sidebar {
  width: 232px; min-width: 232px;
  background: #1e3a4a;
  border-right: 1px solid rgba(255,255,255,0.10);
  display: flex; flex-direction: column;
  transition: width var(--t-base), min-width var(--t-base);
  overflow: hidden; z-index: 10;
  backdrop-filter: blur(20px);
}
.sidebar.slim { width: 54px; min-width: 54px; }
.sidebar.slim .sb-txt,
.sidebar.slim .u-nm,
.sidebar.slim .u-rl,
.sidebar.slim .sb-section,
.sidebar.slim .nav-lbl,
.sidebar.slim .btn-out-lbl { opacity: 0; pointer-events: none; width: 0; overflow: hidden; }

.sb-hd {
  padding: var(--sp-3) var(--sp-3);
  border-bottom: 1px solid var(--sb-border);
  display: flex; align-items: center; gap: var(--sp-2);
  min-height: 56px; flex-shrink: 0;
  background: rgba(22,163,68,.07);
}
.sb-mk {
  width: 32px; height: 32px; flex-shrink: 0;
  background: var(--grad-primary); border-radius: 8px;
  display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.sb-txt { overflow: hidden; white-space: nowrap; flex: 1; transition: opacity var(--t-base), width var(--t-base); }
.sb-co { font-size: 11px; color: #dde6f0; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-tr { font-size: 9px; color: rgba(255,255,255,.26); letter-spacing: .3px; margin-top: 1px; }
.sb-tog {
  background: none; border: 1px solid rgba(255,255,255,.09); color: rgba(255,255,255,.42);
  cursor: pointer; width: 23px; height: 23px; border-radius: 5px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 10px;
  transition: background var(--t-fast), color var(--t-fast);
}
.sb-tog:hover { background: rgba(255,255,255,.08); color: #fff; }

.sb-nav { flex: 1; overflow-y: auto; padding: 8px 0; }
.sb-section {
  font-size: 8px; color: rgba(201,168,76,0.45); letter-spacing: 2.5px;
  text-transform: uppercase; padding: 14px 18px 6px; font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
}
/* Sidebar group separator line */
.sb-section + .nav-item { margin-top: 0; }
.sb-section:not(:first-child) { border-top: 1px solid rgba(255,255,255,0.05); margin-top: 4px; }
/* BEM: .nav-item — PREMIUM */
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; cursor: pointer;
  transition: background .18s, color .18s; border-radius: 10px;
  margin: 1px 6px; white-space: nowrap; overflow: hidden;
  color: rgba(255,255,255,0.45);
  font-family: 'Montserrat', sans-serif;
}
.nav-item:hover {
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.80);
}
.nav-item.on {
  background: rgba(22,163,68,0.15);
  box-shadow: inset 3px 0 0 #16A344;
  color: #5eead4;
}
.nav-icon { font-size: 0; flex-shrink: 0; width: 19px; height: 19px; display: flex; align-items: center; justify-content: center; }
.nav-icon svg { width: 15px; height: 15px; flex-shrink: 0; }
.nav-lbl { font-size: 12px; font-weight: 500; flex: 1; overflow: hidden; text-overflow: ellipsis; transition: color .18s; }
.nav-item.on .nav-lbl { color: #5eead4; font-weight: 600; }
.nav-badge { background: var(--c-crit); color: #fff; border-radius: 20px; padding: 1px 6px; font-size: 9px; font-weight: 700; flex-shrink: 0; }

/* ── COLLAPSIBLE NAV GROUPS ── */
.nav-group {}
.nav-group-hd {
  display:flex;align-items:center;gap:10px;padding:10px 12px;cursor:pointer;
  border-radius:10px;margin:1px 6px;transition:background .18s,color .18s;
  color:rgba(255,255,255,0.75);font-family:'Montserrat',sans-serif;user-select:none;
}
.nav-group-hd:hover { background:rgba(255,255,255,0.06);color:rgba(255,255,255,0.95); }
.nav-group-hd.on  { background:rgba(22,163,68,0.18);box-shadow:inset 3px 0 0 #16A344;color:#5eead4; }
.nav-group-icon { font-size:0;flex-shrink:0;width:19px;height:19px;display:flex;align-items:center;justify-content:center; }
.nav-group-icon svg { width:15px;height:15px;flex-shrink:0; }
.nav-group-lbl  { font-size:12px;font-weight:600;flex:1;overflow:hidden;text-overflow:ellipsis; }
.nav-group-hd.on .nav-group-lbl { color:#5eead4; }
.nav-group-arrow { font-size:8px;opacity:.5;transition:transform .2s;flex-shrink:0; }
.nav-group-hd.open .nav-group-arrow { transform:rotate(90deg); }
.nav-group-body { overflow:hidden;max-height:0;transition:max-height .28s ease; }
.nav-group-body.open { max-height:700px; }
.nav-sub-item {
  display:flex;align-items:center;gap:9px;padding:7px 12px 7px 34px;cursor:pointer;
  border-radius:8px;margin:1px 6px;transition:background .15s,color .15s;
  color:rgba(255,255,255,0.40);font-family:'Montserrat',sans-serif;
  font-size:11px;font-weight:500;white-space:nowrap;overflow:hidden;position:relative;
}
.nav-sub-item:hover { background:rgba(255,255,255,0.05);color:rgba(255,255,255,0.75); }
.nav-sub-item.on  { color:#5eead4;background:rgba(22,163,68,0.10); }
.nav-sub-icon { font-size:0;flex-shrink:0;width:14px;height:14px;display:flex;align-items:center;justify-content:center; }
.nav-sub-icon svg { width:13px;height:13px;flex-shrink:0; }
.sidebar.slim .nav-group-lbl,.sidebar.slim .nav-group-arrow,.sidebar.slim .nav-sub-item { opacity:0;pointer-events:none;width:0;overflow:hidden; }
.sidebar.slim .nav-group-hd { padding:9px 12px;justify-content:center; }
.sidebar.slim .nav-group-body { max-height:0 !important; }

.sb-ft { padding: var(--sp-2); border-top: 1px solid var(--sb-border); flex-shrink: 0; }
.u-pill {
  display: flex; align-items: center; gap: var(--sp-2);
  padding: 6px var(--sp-1); border-radius: 7px;
  background: rgba(255,255,255,.04); overflow: hidden; white-space: nowrap; margin-bottom: var(--sp-1);
}
.av {
  width: 28px; height: 28px; flex-shrink: 0;
  background: var(--grad-primary); border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; color: #fff; font-family: var(--font-display);
}
.u-nm { font-size: 11px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; color: #dde6f0; }
.u-rl { font-size: 9px; color: rgba(255,255,255,.26); text-transform: uppercase; letter-spacing: .4px; }
.btn-out {
  width: 100%; margin-top: var(--sp-1); padding: 6px var(--sp-2);
  background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.07);
  color: rgba(255,255,255,.42); font-size: 11px; border-radius: 6px; cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast); font-family: var(--font-body);
  display: flex; align-items: center; justify-content: center; gap: var(--sp-1);
}
.btn-out:hover { background: rgba(255,255,255,.07); color: rgba(255,255,255,.80); }
.btn-out-lbl { transition: opacity var(--t-base); }

/* ── MAIN AREA — LIGHT ── */
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; background: #f0f4f8; }
.topbar {
  height: 54px; background: #ffffff; border-bottom: 1px solid #e2e8f0;
  display: flex; align-items: center; padding: 0 var(--sp-6); gap: var(--sp-3);
  flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.tb-title { font-family: var(--font-display); font-size: 12px; font-weight: 900; flex: 1; color: var(--c-text); }
.page { flex: 1; overflow-y: auto; padding: var(--sp-6); background: #f0f4f8; }

/* ═══════════════════════════════════════════
   COMPONENTES — BEM + legacy compat
   ═══════════════════════════════════════════ */

/* ── .card — LIGHT SURFACE ── */
.card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px; padding: var(--sp-6); margin-bottom: var(--sp-4);
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  transition: border-color .2s, box-shadow .2s;
}
.card:hover { border-color: #cbd5e1; box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.card__header, .card-hd {
  font-size: 13px; font-weight: 600; margin-bottom: var(--sp-4);
  display: flex; align-items: center; gap: var(--sp-2);
  color: var(--c-text);
  font-family: 'Montserrat', sans-serif;
}

/* ── Grids ── */
.g2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
.g3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: var(--sp-3); }
.g4 { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: var(--sp-3); margin-bottom: var(--sp-4); }

/* ── .kpi — LIGHT ── */
.kpi {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px; padding: var(--sp-4);
  transition: border-color .2s, box-shadow .2s;
}
.kpi:hover { border-color: #16A344; box-shadow: 0 4px 14px rgba(22,163,68,0.10); }
.kpi-ic {
  font-size: 0; margin-bottom: var(--sp-3);
  width: 34px; height: 34px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
}
.kpi-ic svg { width: 18px; height: 18px; }
.kpi.b .kpi-ic   { background: rgba(22,163,68,0.12);  color: #16A344; }
.kpi.g .kpi-ic   { background: rgba(16,185,129,0.12);  color: #10b981; }
.kpi.warn .kpi-ic,.kpi.gold .kpi-ic { background: rgba(245,158,11,0.12); color: #d97706; }
.kpi.r .kpi-ic   { background: rgba(239,68,68,0.12);   color: #ef4444; }
.kpi.p .kpi-ic   { background: rgba(139,92,246,0.12);  color: #8b5cf6; }
.kpi-lb { font-size: 10px; color: var(--c-muted); letter-spacing: 1px; text-transform: uppercase; margin-bottom: var(--sp-1); font-weight: 600; font-family: 'JetBrains Mono', monospace; }
.kpi-vl { font-family: var(--font-mono); font-size: 24px; font-weight: 700; color: var(--c-text); line-height: 1.1; }

/* ── .table — LIGHT ── */
.tw { overflow-x: auto; border-radius: 14px; border: 1px solid #e2e8f0; background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th {
  background: #f8fafc; color: var(--c-muted);
  font-size: 10px; letter-spacing: 1px; text-transform: uppercase;
  padding: 11px var(--sp-4); text-align: left;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap; font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
}
td { padding: 11px var(--sp-4); border-bottom: 1px solid #f1f5f9; vertical-align: middle; color: var(--c-text-2); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #f8fafc; }

/* ── .badge — LIGHT ── */
.badge { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 20px; font-size: 10px; font-weight: 600; white-space: nowrap; gap: 3px; font-family: 'JetBrains Mono', monospace; letter-spacing: 0.3px; }
.badge.ok     { background: rgba(16,185,129,0.12);  color: #065f46; border: 1px solid rgba(16,185,129,0.25); }
.badge.warn,
.badge.gold   { background: rgba(245,158,11,0.12);  color: #92400e; border: 1px solid rgba(245,158,11,0.28); }
.badge.crit   { background: rgba(239,68,68,0.10);   color: #b91c1c; border: 1px solid rgba(239,68,68,0.22); }
.badge.info   { background: rgba(22,163,68,0.10);  color: #0f766e; border: 1px solid rgba(22,163,68,0.22); }
.badge.muted  { background: #f1f5f9; color: var(--c-muted); border: 1px solid #e2e8f0; }
.badge.purple { background: rgba(139,92,246,0.10);  color: #6d28d9; border: 1px solid rgba(139,92,246,0.22); }
.badge.blue   { background: rgba(59,130,246,0.10);  color: #1d4ed8; border: 1px solid rgba(59,130,246,0.22); }

/* ── .btn — PREMIUM ── */
.btn {
  padding: 8px var(--sp-4); border: 1px solid transparent;
  border-radius: 10px; font-size: 12px; font-weight: 600; cursor: pointer;
  transition: opacity .18s, transform .18s, background .18s, border-color .18s;
  display: inline-flex; align-items: center; gap: var(--sp-1);
  white-space: nowrap; font-family: 'Montserrat', sans-serif;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: linear-gradient(135deg,#16A344,#16A344); color: #fff; border-color: transparent; box-shadow: 0 4px 14px rgba(22,163,68,0.25); }
.btn-primary:hover { opacity: .88; transform: translateY(-1px); }
.btn-secondary, .btn-green { background: rgba(16,185,129,0.10); color: #16A344; border-color: rgba(16,185,129,0.28); }
.btn-secondary:hover, .btn-green:hover { background: rgba(16,185,129,0.18); }
.btn-ghost { background: #f8fafc; color: var(--c-text-2); border-color: #e2e8f0; }
.btn-ghost:hover { border-color: #16A344; color: #16A344; background: rgba(22,163,68,0.05); }
.btn-info    { background: rgba(22,163,68,0.08); color: #0f766e; border-color: rgba(22,163,68,0.22); }
.btn-info:hover { background: rgba(22,163,68,0.15); }
.btn-danger  { background: rgba(239,68,68,0.06); border-color: rgba(239,68,68,0.20); color: #dc2626; }
.btn-danger:hover { background: rgba(239,68,68,0.12); border-color: rgba(239,68,68,0.35); }
.btn-warn    { background: rgba(245,158,11,0.08); color: #d97706; border-color: rgba(245,158,11,0.22); }
.btn-warn:hover  { background: rgba(245,158,11,0.16); }
.btn-purple  { background: rgba(139,92,246,0.08); color: #7c3aed; border-color: rgba(139,92,246,0.22); }
.btn-purple:hover { background: rgba(139,92,246,0.16); }
.btn-sm { padding: 6px var(--sp-3); font-size: 11px; border-radius: 8px; }
.btn-xs { padding: 3px 9px; font-size: 10px; border-radius: 6px; }

/* ── .form — LIGHT ── */
.fr  { display: flex; gap: var(--sp-2); margin-bottom: var(--sp-3); flex-wrap: wrap; }
.fg  { flex: 1; min-width: 140px; }
.fg label { display: block; font-size: 10px; color: var(--c-muted); letter-spacing: 1px; text-transform: uppercase; margin-bottom: var(--sp-1); font-weight: 600; font-family: 'JetBrains Mono', monospace; }
.fg input, .fg select, .fg textarea {
  width: 100%; padding: 10px var(--sp-3);
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: var(--c-text); font-size: 12px; border-radius: 10px; outline: none;
  transition: border-color .18s, box-shadow .18s, background .18s;
  font-family: 'Montserrat', sans-serif;
}
.fg input::placeholder, .fg textarea::placeholder { color: var(--c-muted); }
.fg input:focus, .fg select:focus, .fg textarea:focus {
  border-color: #16A344;
  box-shadow: 0 0 0 3px rgba(22,163,68,0.10);
  background: #ffffff;
}
.fg select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; background-size: 12px; padding-right: 32px; }
.fg textarea { resize: vertical; min-height: 70px; line-height: 1.5; }

/* ── .tabs — LIGHT ── */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid #e2e8f0; margin-bottom: var(--sp-4); flex-wrap: wrap; padding: 0 2px; }
.tab { padding: 9px var(--sp-4); font-size: 11px; color: var(--c-muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color .18s, background .18s; white-space: nowrap; font-weight: 500; border-radius: 8px 8px 0 0; font-family: 'Montserrat', sans-serif; }
.tab:hover { color: var(--c-text-2); background: #f1f5f9; }
.tab.on { color: #16A344; border-bottom-color: #16A344; background: rgba(22,163,68,0.06); font-weight: 600; }

/* ── .modal — PREMIUM ── */
.ov { display: none; position: fixed; inset: 0; background: rgba(5,5,15,.72); z-index: 2000; align-items: center; justify-content: center; backdrop-filter: blur(12px); }
.ov.open { display: flex; }
.modal {
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 20px;
  padding: var(--sp-6); width: 90%; max-width: 540px;
  position: relative; max-height: 88vh; overflow-y: auto;
  box-shadow: 0 32px 80px rgba(0,0,0,0.18), 0 0 0 1px rgba(0,0,0,0.04);
  animation: pop .18s ease both;
}
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(8px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.modal.wide { max-width: 760px; }
.modal.full { max-width: 960px; }
.m-title { font-family: 'Montserrat', sans-serif; font-size: 20px; font-weight: 600; color: var(--c-text); margin-bottom: var(--sp-4); letter-spacing: -0.3px; }
.m-close {
  position: absolute; top: var(--sp-4); right: var(--sp-4);
  background: rgba(0,0,0,0.05); border: 1px solid rgba(0,0,0,0.09);
  color: rgba(0,0,0,0.38); font-size: 13px; cursor: pointer;
  width: 28px; height: 28px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  transition: all .18s;
}
.m-close:hover { background: rgba(239,68,68,0.10); color: #ef4444; border-color: rgba(239,68,68,0.3); }
.m-foot { display: flex; gap: var(--sp-2); justify-content: flex-end; padding-top: var(--sp-4); border-top: 1px solid #e2e8f0; margin-top: var(--sp-4); flex-wrap: wrap; }
.confirm-box {
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 20px;
  padding: var(--sp-6); width: 90%; max-width: 370px;
  text-align: center; box-shadow: 0 24px 64px rgba(0,0,0,0.20);
  animation: pop .18s ease both;
}
.confirm-box h3 { font-family: 'Montserrat', sans-serif; font-size: 20px; margin-bottom: var(--sp-2); color: var(--c-text); }
.confirm-box p  { color: var(--c-text-2); margin-bottom: var(--sp-6); font-size: 13px; line-height: 1.6; font-family: 'Montserrat', sans-serif; }

/* ── Misc — LIGHT ── */
.empty { text-align: center; padding: var(--sp-8) var(--sp-6); color: var(--c-muted); font-size: 12px; line-height: 2.2; font-family: 'Montserrat', sans-serif; }
.empty > div:first-child { font-size: 36px; margin-bottom: var(--sp-3); opacity: .4; }
.sku-tag { display: inline-block; padding: 2px 8px; border-radius: 6px; background: #f1f5f9; border: 1px solid #e2e8f0; font-family: var(--font-mono); font-size: 10px; color: var(--c-text-2); }
.info-box { padding: var(--sp-3) var(--sp-4); border-radius: 10px; font-size: 12px; margin-bottom: var(--sp-3); line-height: 1.6; font-family: 'Montserrat', sans-serif; }
.info-box.blue  { background: rgba(22,163,68,0.08);  border: 1px solid rgba(22,163,68,0.20); color: #0f766e; }
.info-box.warn  { background: rgba(245,158,11,0.08);  border: 1px solid rgba(245,158,11,0.20); color: #92400e; }
.info-box.red   { background: rgba(239,68,68,0.08);   border: 1px solid rgba(239,68,68,0.20);  color: #b91c1c; }
.info-box.green { background: rgba(16,185,129,0.08);  border: 1px solid rgba(16,185,129,0.20); color: #065f46; }
.page-title { font-family: 'Montserrat', sans-serif; font-size: 1.6rem; font-weight: 600; letter-spacing: -0.02em; color: var(--c-text); line-height: 1.15; }
.page-title span { color: #16A344; font-style: italic; }
.page-sub { font-size: 10px; color: var(--c-muted); margin-top: var(--sp-1); letter-spacing: .4px; text-transform: uppercase; font-family: 'JetBrains Mono', monospace; }
.divider { height: 1px; background: #e2e8f0; margin: var(--sp-4) 0; }

/* ── .toast — LIGHT ── */
#toast-c { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast {
  padding: 12px 18px; border-radius: 12px; font-size: 12px; font-weight: 600;
  animation: toastIn .22s cubic-bezier(0.34,1.4,0.64,1) both;
  max-width: 310px; display: flex; align-items: center; gap: 10px;
  backdrop-filter: blur(12px);
  border: 1px solid transparent;
  font-family: 'Montserrat', sans-serif;
  box-shadow: 0 8px 28px rgba(0,0,0,0.12);
}
.toast.ok   { background: #ecfdf5; color: #065f46; border-color: rgba(16,185,129,0.30); }
.toast.warn { background: #fffbeb; color: #92400e; border-color: rgba(245,158,11,0.30); }
.toast.crit { background: #fef2f2; color: #b91c1c; border-color: rgba(239,68,68,0.30); }
.toast.info { background: #f0fdfa; color: #0f766e; border-color: rgba(22,163,68,0.30); }
@keyframes toastIn { from { opacity: 0; transform: translateX(20px) scale(.95); } to { opacity: 1; transform: none; } }

/* ── Home launcher — LIGHT ── */
.home-launcher { padding: 0; animation: fadeUp .28s ease both; }
.home-greeting {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 500; color: var(--c-text);
  margin-bottom: 6px; letter-spacing: -0.5px; line-height: 1.15;
}
.home-greeting em { font-style: italic; color: #16A344; }
.home-sub {
  font-size: 12px; color: var(--c-muted);
  margin-bottom: 28px; font-family: 'Montserrat', sans-serif;
  letter-spacing: 0.3px;
}

/* Hero band on home */
.home-hero-band {
  background: linear-gradient(135deg, rgba(22,163,68,0.06) 0%, rgba(59,130,246,0.05) 50%, rgba(16,185,129,0.04) 100%);
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 32px 36px;
  margin-bottom: 24px;
  position: relative; overflow: hidden;
}
.home-hero-band::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 60% 80% at 0% 50%, rgba(22,163,68,0.06) 0%, transparent 70%);
}
.home-kpi-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px; margin-bottom: 24px;
}
.home-kpi {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px; padding: 18px 20px;
  position: relative; overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.home-kpi:hover {
  border-color: #16A344;
  box-shadow: 0 4px 14px rgba(22,163,68,0.10);
}
.home-kpi-accent { position: absolute; bottom: 0; left: 0; right: 0; height: 2px; }
.home-kpi-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: 1.2px;
  color: var(--c-muted); font-family: 'JetBrains Mono', monospace;
  margin-bottom: 10px;
}
.home-kpi-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 26px; font-weight: 700;
  color: var(--c-text); letter-spacing: -0.5px;
}

/* Module grid — light tiles */
.mod-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 12px; margin-bottom: var(--sp-4);
}
.mod-tile {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 24px 12px 20px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  cursor: pointer; text-align: center;
  transition: background 0.22s, border-color 0.22s, transform 0.22s, box-shadow 0.22s;
  position: relative; overflow: hidden;
}
.mod-tile::before {
  content: '';
  position: absolute; inset: 0; border-radius: 16px;
  background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(22,163,68,0.04) 0%, transparent 60%);
  pointer-events: none;
}
.mod-tile:hover {
  background: #f0fdf9;
  border-color: #16A344;
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(22,163,68,0.12);
}
.mod-tile:hover .mod-tile-icon { transform: scale(1.1) translateY(-2px); }
.mod-tile-icon {
  width: 48px; height: 48px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(22,163,68,0.08);
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
  font-size: 0;
}
.mod-tile-icon svg { width: 22px; height: 22px; }
.mod-tile-label {
  font-size: 11px; font-weight: 600;
  color: var(--c-text-2); line-height: 1.3;
  font-family: 'Montserrat', sans-serif;
}
.mod-tile:hover .mod-tile-label { color: var(--c-text); }
.mod-tile-badge {
  position: absolute; top: 8px; right: 8px;
  background: #ef4444; color: #fff;
  border-radius: 20px; padding: 2px 7px;
  font-size: 9px; font-weight: 800;
  border: 1.5px solid #ffffff;
}
.mod-section-label {
  font-size: 9px; font-weight: 700; letter-spacing: 2.5px;
  text-transform: uppercase; color: #16A344;
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 10px;
}
.mod-section-label::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(to right, rgba(22,163,68,0.25), transparent);
}

/* ── Product grid — PREMIUM ── */
.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--sp-4); }
.prod-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px; overflow: hidden;
  transition: border-color .2s, transform .2s, box-shadow .2s;
  display: flex; flex-direction: column;
}
.prod-card:hover { transform: translateY(-3px); border-color: #16A344; box-shadow: 0 10px 28px rgba(22,163,68,0.12); }
.prod-card-img { width: 100%; height: 156px; display: flex; align-items: center; justify-content: center; background: #f8fafc; overflow: hidden; flex-shrink: 0; }
.prod-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.prod-card:hover .prod-card-img img { transform: scale(1.04); }
.prod-card-body { padding: var(--sp-3); flex: 1; display: flex; flex-direction: column; gap: 3px; }
.prod-card-name { font-weight: 600; font-size: 13px; line-height: 1.3; color: var(--c-text); font-family: 'Montserrat', sans-serif; }
.prod-card-cat { font-size: 9px; color: var(--c-muted); text-transform: uppercase; letter-spacing: .7px; font-weight: 600; font-family: 'JetBrains Mono', monospace; }
.prod-card-price { font-family: var(--font-mono); font-size: 15px; font-weight: 700; color: #16A344; margin-top: auto; padding-top: var(--sp-2); }

/* ── Misc components — LIGHT ── */
.tk-card { background: #ffffff; border: 1px solid #e2e8f0; border-radius: 14px; padding: var(--sp-4); margin-bottom: var(--sp-2); cursor: pointer; transition: border-color .18s, box-shadow .18s; }
.tk-card:hover { border-color: #16A344; box-shadow: 0 4px 16px rgba(22,163,68,0.10); }

.pay-btn { padding: var(--sp-4) var(--sp-3); border: 1px solid #e2e8f0; border-radius: 14px; cursor: pointer; transition: border-color .18s, background .18s; background: #f8fafc; display: flex; flex-direction: column; align-items: center; gap: var(--sp-2); font-family: 'Montserrat', sans-serif; font-size: 11px; font-weight: 600; color: var(--c-text-2); }
.pay-btn:hover, .pay-btn.sel { border-color: #16A344; background: rgba(22,163,68,0.06); color: #0f766e; }
.pay-btn .pi { font-size: 22px; }

/* ── Config panel — LIGHT ── */
.cfg-panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px; padding: var(--sp-6); margin-bottom: var(--sp-4);
  color: var(--c-text); position: relative; overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.cfg-panel::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, #16A344, #16A344); border-radius: 16px 16px 0 0; }
.cfg-panel-hd { font-size: 10px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: #16A344; margin-bottom: var(--sp-4); display: flex; align-items: center; gap: var(--sp-2); font-family: 'JetBrains Mono', monospace; }
.cfg-panel-hd svg { width: 14px; height: 14px; }
.cfg-input { width: 100%; padding: 10px var(--sp-3); background: #f8fafc; border: 1px solid #e2e8f0; color: var(--c-text); font-size: 12px; border-radius: 10px; outline: none; transition: border-color .18s; font-family: 'Montserrat', sans-serif; }
.cfg-input::placeholder { color: var(--c-muted); }
.cfg-input:focus { border-color: #16A344; box-shadow: 0 0 0 3px rgba(22,163,68,0.10); background: #fff; }
.cfg-label { font-size: 9px; color: var(--c-muted); letter-spacing: 1.2px; text-transform: uppercase; margin-bottom: 4px; font-weight: 700; display: block; font-family: 'JetBrains Mono', monospace; }
.cfg-select { width: 100%; padding: 10px var(--sp-3); background: #f8fafc; border: 1px solid #e2e8f0; color: var(--c-text); font-size: 12px; border-radius: 10px; outline: none; font-family: 'Montserrat', sans-serif; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; background-size: 12px; padding-right: 32px; transition: border-color .18s; }
.cfg-select:focus { border-color: #16A344; box-shadow: 0 0 0 3px rgba(22,163,68,0.10); }
.cfg-tag { display: inline-flex; align-items: center; gap: var(--sp-1); padding: 3px 9px; border-radius: 6px; background: rgba(22,163,68,0.10); border: 1px solid rgba(22,163,68,0.25); color: #16A344; font-size: 10px; font-weight: 600; font-family: var(--font-mono); }
.cfg-stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: var(--sp-2); margin-bottom: var(--sp-4); }
.cfg-stat { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: var(--sp-3); text-align: center; }
.cfg-stat-val { font-family: var(--font-mono); font-size: 20px; font-weight: 700; color: var(--c-text); margin-bottom: 2px; }
.cfg-stat-lbl { font-size: 9px; color: var(--c-muted); text-transform: uppercase; letter-spacing: 1px; font-family: 'JetBrains Mono', monospace; }
.cfg-api-key { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2) var(--sp-3); background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 10px; font-family: var(--font-mono); font-size: 11px; color: var(--c-muted); }
.cfg-api-key input { background: none; border: none; outline: none; color: var(--c-text-2); font-family: var(--font-mono); font-size: 11px; flex: 1; padding: 0; }
.cfg-api-key input::placeholder { color: var(--c-muted); }

/* Global select light fix */
select option { background: #ffffff; color: var(--c-text); }

/* LED: status dot */
.led { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.led.on  { background: #10b981; box-shadow: 0 0 6px rgba(16,185,129,0.5); }
.led.off { background: rgba(255,255,255,.12); }

/* ── Animations ── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ── Topbar clock ── */
#topbar-clock { border-left: 1px solid #e2e8f0; padding-left: var(--sp-4); }
#topbar-clock span { color: var(--c-text-2) !important; }
#clock-time { color: var(--c-text) !important; }

/* ── Topbar clock text color fix (inline style override) ── */
#clock-time { color: var(--c-text) !important; }
#clock-date { color: #16A344 !important; }
/* Topbar back button */
#topbar-back-btn { background: #f1f5f9 !important; border-color: #e2e8f0 !important; color: var(--c-text-2) !important; }

/* ── Alert strips — LIGHT ── */
.alert-strip { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; border-radius: 10px; margin-bottom: 8px; cursor: pointer; transition: opacity .18s; font-size: 12px; font-weight: 600; font-family: 'Montserrat', sans-serif; }
.alert-strip:hover { opacity: .82; }
.alert-strip.warn { background: rgba(245,158,11,0.08);  border: 1px solid rgba(245,158,11,0.22); color: #92400e; }
.alert-strip.blue { background: rgba(59,130,246,0.08);   border: 1px solid rgba(59,130,246,0.22); color: #1e40af; }
.alert-strip.teal { background: rgba(22,163,68,0.08);   border: 1px solid rgba(22,163,68,0.22); color: #0f766e; }

/* ── Cart FAB — PREMIUM ── */
.cart-fab { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 9px 20px; border-radius: 20px; background: linear-gradient(135deg,#16A344,#16A344); color: #fff; font-weight: 700; font-size: 12px; border: none; cursor: pointer; transition: opacity .18s, transform .18s; box-shadow: 0 4px 16px rgba(22,163,68,0.30); font-family: 'Montserrat', sans-serif; }
.cart-fab:hover { opacity: .88; transform: translateY(-2px); }
.cart-fab-count { background: #ef4444; color: #fff; border-radius: 50%; width: 18px; height: 18px; font-size: 9px; font-weight: 800; display: flex; align-items: center; justify-content: center; }

/* ── Category pills — PREMIUM ── */
.cat-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.cat-pill { padding: 7px 16px; border-radius: 20px; font-size: 11px; font-weight: 600; cursor: pointer; transition: background .18s, color .18s, border-color .18s; border: 1px solid #e2e8f0; background: #f8fafc; color: var(--c-text-2); font-family: 'Montserrat', sans-serif; }
.cat-pill:hover, .cat-pill.sel { background: rgba(22,163,68,0.10); color: #0f766e; border-color: rgba(22,163,68,0.35); }

/* ── Product detail price — PREMIUM ── */
.prod-detail-price { font-family: var(--font-mono); font-size: 28px; font-weight: 700; color: var(--pm-gold); margin: 8px 0; }

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 600px) {
  #topbar-clock { display: none !important; }
  .sidebar { display: none; }
  .page { padding: var(--sp-4) !important; }
  .login-split { flex-direction: column; max-width: 95vw; border-radius: 16px; }
  .login-brand { display: none; }
  .login-form-side { width: 100%; padding: 36px 28px; }
}
@media (max-width: 768px) {
  .g4 { grid-template-columns: 1fr 1fr; }
  .g2, .g3 { grid-template-columns: 1fr; }
  .page { padding: var(--sp-4); }
  .prod-grid { grid-template-columns: 1fr 1fr; }
  .modal { margin: var(--sp-4); max-height: calc(100vh - 2rem); overflow-y: auto; }
  .mod-grid { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
  .login-split { flex-direction: column; max-width: 96vw; }
  .login-brand { padding: 32px 28px 24px; min-height: auto; }
  .login-brand-headline { font-size: 26px; }
  .login-brand-stats { display: none; }
  .login-form-side { width: 100%; padding: 32px 28px; }
  .home-kpi-strip { grid-template-columns: 1fr 1fr; }
  .home-hero-band { padding: 24px 20px; }
}
