/* ============================================================
   RuteroSales - Industrial Grey CSS
   Gris acero · Naranja herramienta · Alta legibilidad en campo
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=JetBrains+Mono:wght@400;500;600&family=Inter:wght@300;400;500;600&display=swap');

/* ─── CSS Variables — Paleta Gris Industrial ────────────────── */
:root {
  /* Fondos — escala de grises oscuros tipo acero */
  --c-bg:        #1a1c20;   /* gris carbón profundo */
  --c-surface:   #22252c;   /* gris acero oscuro */
  --c-surface2:  #2c3038;   /* gris plomo */
  --c-surface3:  #363b44;   /* gris medio */
  --c-border:    #3d434f;   /* borde sutil */
  --c-border2:   #4e5666;   /* borde activo */

  /* Acento principal — naranja herramienta / construcción */
  --c-primary:   #e07b2a;
  --c-primary-d: #b85f18;
  --c-primary-g: rgba(224, 123, 42, 0.12);

  /* Acento secundario — amarillo seguridad */
  --c-accent:    #f5c518;
  --c-accent-g:  rgba(245, 197, 24, 0.12);

  /* Estados */
  --c-danger:    #d94f4f;
  --c-danger-g:  rgba(217, 79, 79, 0.12);
  --c-warning:   #e07b2a;
  --c-success:   #5aab6e;
  --c-info:      #5b8fd4;

  /* Textos — escala sobre grises */
  --c-text:      #dce1ea;   /* blanco roto cálido */
  --c-text-2:    #8f96a8;   /* gris claro */
  --c-text-3:    #565e70;   /* gris apagado */

  --font-head:   'Syne', sans-serif;
  --font-mono:   'JetBrains Mono', monospace;
  --font-body:   'Inter', sans-serif;

  --r-sm:   6px;
  --r-md:   10px;
  --r-lg:   14px;
  --r-xl:   18px;
  --r-pill: 100px;

  --sh-card: 0 2px 12px rgba(0,0,0,0.5);
  --sh-pop:  0 6px 32px rgba(0,0,0,0.65);

  --nav-h:   62px;
  --tab-h:   58px;
  --safe-b:  env(safe-area-inset-bottom, 0px);
}

/* ─── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--c-bg);
  color: var(--c-text);
  height: 100%;
  overflow: hidden;
  position: fixed;
  width: 100%;
  -webkit-font-smoothing: antialiased;
}
input, button, select, textarea { font-family: inherit; }
button { cursor: pointer; border: none; background: none; }
a { color: var(--c-primary); text-decoration: none; }
img { max-width: 100%; }

/* ─── App Shell ──────────────────────────────────────────────── */
#app {
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  overflow: hidden;
}

/* ─── Top Nav ────────────────────────────────────────────────── */
#topnav {
  height: var(--nav-h);
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  flex-shrink: 0;
  position: relative;
  z-index: 100;
}
#topnav .logo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
#topnav .company-logo {
  height: 36px;
  width: 36px;
  border-radius: var(--r-sm);
  object-fit: contain;
  background: var(--c-surface2);
}
#topnav .company-name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 14px;
  color: var(--c-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#topnav .page-title {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 700;
  color: var(--c-primary);
}
.topnav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.topnav-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-text-2);
  transition: background 0.15s, color 0.15s;
  position: relative;
}
.topnav-btn:hover, .topnav-btn:active { background: var(--c-surface2); color: var(--c-text); }
.badge {
  position: absolute;
  top: 4px; right: 4px;
  background: var(--c-danger);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}

/* ─── Main Content ───────────────────────────────────────────── */
#main {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  padding-bottom: calc(var(--tab-h) + var(--safe-b) + 8px);
}
.page { display: none; animation: pageIn 0.2s ease; }
.page.active { display: block; }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Bottom Tab Bar ─────────────────────────────────────────── */
#tabbar {
  height: var(--tab-h);
  padding-bottom: var(--safe-b);
  background: var(--c-surface);
  border-top: 1px solid var(--c-border);
  display: flex;
  align-items: stretch;
  flex-shrink: 0;
  position: relative;
  z-index: 100;
}
.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--c-text-3);
  transition: color 0.15s;
  position: relative;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.tab-item svg { width: 22px; height: 22px; }
.tab-item span { font-size: 9px; font-weight: 600; letter-spacing: 0.02em; }
.tab-item.active { color: var(--c-primary); }
.tab-item.active::before {
  content: '';
  position: absolute;
  top: 0; left: 20%; right: 20%;
  height: 2px;
  background: var(--c-primary);
  border-radius: 0 0 2px 2px;
}
.tab-item.tab-center {
  flex: 0 0 72px;
}
.tab-item.tab-center .tab-fab {
  width: 52px; height: 52px;
  background: var(--c-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: -12px;
  box-shadow: 0 4px 20px rgba(224, 123, 42, 0.45);
  color: #fff;
  transition: transform 0.15s, box-shadow 0.15s;
}
.tab-item.tab-center .tab-fab:active {
  transform: scale(0.94);
  box-shadow: 0 2px 10px rgba(224, 123, 42, 0.3);
}

/* ─── Cards ──────────────────────────────────────────────────── */
.card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.card-header {
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.card-title {
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  color: var(--c-text-2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.card-body { padding: 16px; }

/* ─── Sections / Lists ───────────────────────────────────────── */
.section { padding: 0 16px; margin-bottom: 16px; }
.section-title {
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 700;
  color: var(--c-text-3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 16px 0 8px;
}

.list-item {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 14px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: border-color 0.15s, background 0.15s;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.list-item:active { background: var(--c-surface2); border-color: var(--c-border2); }
.list-item-icon {
  width: 44px; height: 44px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--c-surface2);
  font-size: 20px;
}
.list-item-body { flex: 1; min-width: 0; }
.list-item-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--c-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.list-item-sub {
  font-size: 12px;
  color: var(--c-text-2);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.list-item-right { text-align: right; flex-shrink: 0; }
.list-item-amount {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 14px;
  color: var(--c-text);
}
.list-item-meta {
  font-size: 11px;
  color: var(--c-text-3);
  margin-top: 2px;
}

/* ─── Chips / Pills ──────────────────────────────────────────── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.chip-success { background: rgba(34,197,94,0.15); color: #22c55e; }
.chip-danger  { background: var(--c-danger-g);    color: var(--c-danger); }
.chip-warning { background: var(--c-accent-g);    color: var(--c-accent); }
.chip-info    { background: rgba(59,130,246,0.15); color: var(--c-info); }
.chip-neutral { background: var(--c-surface3);    color: var(--c-text-2); }
.chip-primary { background: var(--c-primary-g);   color: var(--c-primary); }

/* ─── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--r-md);
  font-weight: 600;
  font-size: 14px;
  transition: opacity 0.15s, transform 0.1s, box-shadow 0.15s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; pointer-events: none; }
.btn-primary {
  background: var(--c-primary);
  color: #fff;
  box-shadow: 0 4px 16px rgba(224, 123, 42, 0.3);
}
.btn-primary:hover { box-shadow: 0 6px 24px rgba(224, 123, 42, 0.42); }
.btn-secondary {
  background: var(--c-surface2);
  color: var(--c-text);
  border: 1px solid var(--c-border);
}
.btn-danger {
  background: var(--c-danger);
  color: #fff;
}
.btn-ghost {
  background: transparent;
  color: var(--c-text-2);
  border: 1px solid var(--c-border);
}
.btn-full { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 12px; }
.btn-icon {
  width: 40px; height: 40px;
  padding: 0;
  border-radius: var(--r-sm);
}

/* ─── Forms ──────────────────────────────────────────────────── */
.form-group { margin-bottom: 14px; }
.form-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--c-text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}
.form-control {
  width: 100%;
  background: var(--c-surface2);
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  color: var(--c-text);
  font-size: 15px;
  padding: 12px 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
  appearance: none;
}
.form-control:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px var(--c-primary-g);
}
.form-control::placeholder { color: var(--c-text-3); }
.form-control-icon { position: relative; }
.form-control-icon input { padding-left: 42px; }
.form-control-icon .icon {
  position: absolute;
  left: 13px; top: 50%;
  transform: translateY(-50%);
  color: var(--c-text-3);
  pointer-events: none;
}
.input-row {
  display: flex;
  gap: 10px;
}
.input-row .form-group { flex: 1; }
select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239aa3be' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

/* ─── Search Bar ─────────────────────────────────────────────── */
.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.search-input {
  flex: 1;
  background: var(--c-surface2);
  border: 1px solid var(--c-border);
  border-radius: var(--r-pill);
  padding: 10px 16px 10px 40px;
  font-size: 14px;
  color: var(--c-text);
  width: 100%;
}
.search-input:focus { outline: none; border-color: var(--c-primary); }
.search-wrap { position: relative; flex: 1; }
.search-wrap svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--c-text-3); }

/* ─── Stats / KPI ────────────────────────────────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.kpi-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 16px;
}
.kpi-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--c-text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.kpi-value {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 600;
  color: var(--c-text);
  line-height: 1;
}
.kpi-value.primary { color: var(--c-primary); }
.kpi-value.danger  { color: var(--c-danger); }
.kpi-value.accent  { color: var(--c-accent); }
.kpi-sub {
  font-size: 11px;
  color: var(--c-text-3);
  margin-top: 4px;
}

/* ─── Modal / Drawer ─────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  animation: fadeIn 0.15s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-overlay.center { align-items: center; padding: 20px; }
.drawer {
  background: var(--c-surface);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  animation: slideUp 0.25s cubic-bezier(.32,.72,0,1);
  padding-bottom: calc(var(--safe-b) + 16px);
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
.drawer-handle {
  width: 40px; height: 4px;
  background: var(--c-border2);
  border-radius: 2px;
  margin: 12px auto 0;
}
.drawer-header {
  padding: 16px 20px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--c-border);
}
.drawer-title {
  font-family: var(--font-head);
  font-size: 17px;
  font-weight: 700;
}
.drawer-body { padding: 20px; }

/* ─── Scanner overlay ────────────────────────────────────────── */
.scanner-overlay {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 300;
  display: flex;
  flex-direction: column;
}
.scanner-overlay video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.scanner-frame {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -60%);
  width: 240px; height: 160px;
  border: 2px solid var(--c-primary);
  border-radius: var(--r-md);
  box-shadow: 0 0 0 9999px rgba(0,0,0,0.6);
}
.scanner-frame::before, .scanner-frame::after {
  content: '';
  position: absolute;
  width: 20px; height: 20px;
  border-color: var(--c-primary);
  border-style: solid;
}
.scanner-frame::before { top: -2px; left: -2px; border-width: 3px 0 0 3px; border-radius: 4px 0 0 0; }
.scanner-frame::after  { bottom: -2px; right: -2px; border-width: 0 3px 3px 0; border-radius: 0 0 4px 0; }
.scanner-line {
  position: absolute;
  left: 4px; right: 4px;
  height: 2px;
  background: var(--c-primary);
  animation: scanLine 2s linear infinite;
  box-shadow: 0 0 8px var(--c-primary);
}
@keyframes scanLine {
  from { top: 4px; }
  to   { top: calc(100% - 6px); }
}
.scanner-hint {
  position: absolute;
  bottom: 100%; left: 0; right: 0;
  text-align: center;
  padding-bottom: 12px;
  font-size: 13px;
  color: rgba(255,255,255,0.8);
  transform: translateY(0);
  margin-bottom: 8px;
}
.scanner-close {
  position: absolute;
  bottom: 40px; left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

/* ─── Status dots ────────────────────────────────────────────── */
.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.dot-success { background: var(--c-success); }
.dot-danger  { background: var(--c-danger); box-shadow: 0 0 6px var(--c-danger); }
.dot-warning { background: var(--c-accent); }
.dot-neutral { background: var(--c-text-3); }

/* ─── Offline Banner ─────────────────────────────────────────── */
#offline-banner {
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0;
  background: #2c3038;
  border-bottom: 2px solid var(--c-primary);
  color: var(--c-primary);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  padding: 6px;
  z-index: 150;
  display: none;
  letter-spacing: 0.03em;
}
#offline-banner.show { display: block; animation: slideDown 0.3s ease; }
@keyframes slideDown {
  from { transform: translateY(-100%); }
  to   { transform: translateY(0); }
}

/* ─── Toasts ─────────────────────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: calc(var(--tab-h) + var(--safe-b) + 16px);
  left: 16px; right: 16px;
  z-index: 250;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--c-surface3);
  border: 1px solid var(--c-border2);
  border-radius: var(--r-md);
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastIn 0.25s ease;
  pointer-events: auto;
  box-shadow: var(--sh-pop);
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.toast.success { border-left: 3px solid var(--c-success); }
.toast.error   { border-left: 3px solid var(--c-danger); }
.toast.warning { border-left: 3px solid var(--c-accent); }
.toast.info    { border-left: 3px solid var(--c-info); }

/* ─── Loading ────────────────────────────────────────────────── */
.spinner {
  width: 24px; height: 24px;
  border: 2px solid var(--c-border2);
  border-top-color: var(--c-primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  gap: 12px;
  color: var(--c-text-3);
  font-size: 13px;
}

/* ─── Empty State ────────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  gap: 12px;
}
.empty-state-icon { font-size: 48px; opacity: 0.4; }
.empty-state-title { font-family: var(--font-head); font-size: 16px; font-weight: 700; color: var(--c-text-2); }
.empty-state-sub   { font-size: 13px; color: var(--c-text-3); max-width: 240px; }

/* ─── Credit Status ──────────────────────────────────────────── */
.credit-bar {
  height: 6px;
  background: var(--c-surface3);
  border-radius: 3px;
  overflow: hidden;
  margin: 6px 0;
}
.credit-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}
.credit-fill.ok       { background: var(--c-success); }
.credit-fill.warning  { background: var(--c-accent); }
.credit-fill.critical { background: var(--c-danger); }

/* ─── Product rows ───────────────────────────────────────────── */
.stock-badge {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 2px 8px;
  border-radius: var(--r-pill);
}
.stock-ok       { background: rgba(34,197,94,0.12); color: #22c55e; }
.stock-low      { background: var(--c-accent-g); color: var(--c-accent); }
.stock-none     { background: var(--c-danger-g); color: var(--c-danger); }

/* ─── Qty stepper ────────────────────────────────────────────── */
.qty-stepper {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--c-border2);
  border-radius: var(--r-sm);
  overflow: hidden;
}
.qty-stepper button {
  width: 36px; height: 36px;
  background: var(--c-surface2);
  color: var(--c-text);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.qty-stepper button:active { background: var(--c-surface3); }
.qty-stepper input {
  width: 52px;
  text-align: center;
  background: transparent;
  border: none;
  color: var(--c-text);
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  border-left: 1px solid var(--c-border);
  border-right: 1px solid var(--c-border);
  padding: 0;
  height: 36px;
}
.qty-stepper input:focus { outline: none; background: var(--c-surface2); }

/* ─── File Upload Zone ───────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--c-border2);
  border-radius: var(--r-lg);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  color: var(--c-text-3);
  font-size: 13px;
}
.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--c-primary);
  background: var(--c-primary-g);
  color: var(--c-primary);
}
.upload-zone input { display: none; }

/* ─── Auth Screen ────────────────────────────────────────────── */
#auth-screen {
  position: fixed;
  inset: 0;
  background: var(--c-bg);
  /* Subtle industrial texture via gradient */
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 40px,
      rgba(255,255,255,0.015) 40px,
      rgba(255,255,255,0.015) 41px
    );
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
}
.auth-logo-wrap {
  width: 88px; height: 88px;
  border-radius: 18px;
  background: var(--c-surface);
  border: 2px solid var(--c-border2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: 0 0 0 4px rgba(224, 123, 42, 0.1);
}
.auth-logo-wrap img { width: 68px; height: 68px; object-fit: contain; }
.auth-title {
  font-family: var(--font-head);
  font-size: 26px;
  font-weight: 800;
  color: var(--c-text);
  text-align: center;
  line-height: 1.15;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}
.auth-title span { color: var(--c-primary); }
.auth-subtitle {
  font-size: 13px;
  color: var(--c-text-3);
  text-align: center;
  margin-bottom: 28px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}
.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-top: 3px solid var(--c-primary);
  border-radius: var(--r-xl);
  padding: 24px;
  box-shadow: var(--sh-pop);
}
.auth-step { display: none; }
.auth-step.active { display: block; animation: pageIn 0.2s ease; }

/* ─── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--c-border2); border-radius: 2px; }

/* ─── Responsive tweaks ──────────────────────────────────────── */
@media (min-width: 480px) {
  .kpi-grid { grid-template-columns: repeat(4, 1fr); }
  .auth-card { padding: 32px; }
}
@media (min-width: 768px) {
  #tabbar { max-width: 500px; margin: 0 auto; border-left: 1px solid var(--c-border); border-right: 1px solid var(--c-border); border-radius: var(--r-xl) var(--r-xl) 0 0; }
  .auth-card { padding: 40px; }
}

/* ─── Print ──────────────────────────────────────────────────── */
@media print {
  #topnav, #tabbar, #offline-banner, #toast-container, .btn { display: none !important; }
  body { background: #fff; color: #000; }
  #main { overflow: visible; padding: 0; }
}
