/* ═══════════════════════════════════════════════════════════════════
   MiniFletesYA — panel.css  (single source of truth)
   Clean rewrite: no duplicates, no hacks, no !important abuse.
   ═══════════════════════════════════════════════════════════════════

   INDEX
   ─────
   1.  RESET
   2.  TOKENS
   3.  TYPOGRAPHY
   4.  LAYOUT (app shell, sidebar, topbar, main)
   5.  NAV (sidebar navigation)
   6.  CARDS
   7.  TABLES
   8.  BUTTONS
   9.  FORMS
   10. MODALS & OVERLAYS
   11. TABS
   12. BADGES / PILLS / DOTS
   13. COMPONENTS (toast, skeleton, empty, spinner, misc)
   14. LOGIN PAGE
   15. SUPERADMIN — SA-specific classes
   16. UTILITIES
   17. RESPONSIVE
   ═══════════════════════════════════════════════════════════════════ */

/* ── 1. RESET ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; min-width: 0; }
html, body { margin: 0; padding: 0; width: 100%; max-width: 100%; overflow-x: hidden; }
img  { max-width: 100%; height: auto; display: block; }
table { width: 100%; border-collapse: collapse; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--radius-sm); }
:focus:not(:focus-visible) { outline: none; }
:disabled, .disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }

/* ── 2. TOKENS ────────────────────────────────────────────────── */
:root {
  /* Layout */
  --sidebar-w: 260px;
  --topbar-h:  52px;

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

  /* Radius */
  --radius-xs: 5px;   --radius-sm: 8px;
  --radius-md: 12px;  --radius-lg: 18px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0,0,0,.12);
  --shadow-md: 0 8px 32px rgba(0,0,0,.3);

  /* Typography */
  --font: "DM Sans", system-ui, -apple-system, sans-serif;
  --text-xs: 12px;  --text-sm: 14px;  --text-md: 16px;
  --text-lg: 20px;  --text-xl: 28px;

  /* Component sizes */
  --input-h:  38px;
  --btn-h:    36px;
  --btn-h-sm: 30px;

  /* Z-index — ordered, no collisions */
  --z-base:     0;
  --z-dropdown: 500;
  --z-topbar:   900;
  --z-sidebar:  1000;
  --z-modal:    1200;
  --z-toast:    1300;
  --z-tooltip:  1400;

  /* Transitions */
  --t: .15s ease;
  --ease-out: cubic-bezier(.16,1,.3,1);

  /* Colors */
  --bg:       #0d0f14;
  --bg2:      #111420;
  --surface:  #161a24;
  --surface2: #1e2230;
  --surface3: #252840;
  --border:   rgba(255,255,255,.08);
  --border2:  rgba(255,255,255,.13);
  --text:     #f0f0ee;
  --text2:    #b8bcc8;
  --text3:    #7a8196;
  --accent:   #C8F04C;  --accent-l: rgba(200,240,76,.12);  --accent-d: rgba(200,240,76,.25);
  --green:    #22c55e;  --green-l:  rgba(34,197,94,.15);
  --red:      #ef4444;  --red-l:    rgba(239,68,68,.15);
  --amber:    #f59e0b;  --amber-l:  rgba(245,158,11,.15);
  --blue:     #3b82f6;  --blue-l:   rgba(59,130,246,.15);
  --purple:   #a855f7;  --purple-l: rgba(168,85,247,.15);

  /* Legacy aliases */
}

/* ── 3. TYPOGRAPHY ────────────────────────────────────────────── */
html, body { font-family: var(--font); font-size: 14px; line-height: 1.5; background: var(--bg); color: var(--text); }
h1,h2,h3,h4,h5,h6 { margin: 0; font-weight: 800; color: var(--text); line-height: 1.2; }
h1 { font-size: var(--text-xl); } h2 { font-size: var(--text-lg); }
h3 { font-size: var(--text-md); } h4 { font-size: var(--text-sm); }
p  { margin: 0; color: var(--text2); }
a  { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: "DM Mono", monospace; font-size: 11px; background: var(--surface2); padding: 1px 5px; border-radius: 4px; color: var(--accent); }

.page-title    { font-size: var(--text-lg); font-weight: 900; letter-spacing: -.3px; line-height: 1.2; }
.page-subtitle { font-size: var(--text-xs); color: var(--text3); margin-top: var(--space-1); display: flex; align-items: center; gap: var(--space-2); }
.page-header   { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: var(--space-5); gap: var(--space-3); flex-wrap: wrap; }
.page-actions  { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.card-title    { font-size: var(--text-xs); font-weight: 800; color: var(--text); text-transform: uppercase; letter-spacing: .04em; }
.card-subtitle { font-size: var(--text-xs); color: var(--text3); font-weight: 400; text-transform: none; letter-spacing: 0; }
.section-title { font-size: var(--text-xs); font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--text3); }
.kpi-val, .sa-kpi-val { font-size: var(--text-xl); font-weight: 900; letter-spacing: -1px; line-height: 1; }
.kpi-lbl, .sa-kpi-lbl { font-size: var(--text-xs); color: var(--text3); margin-top: var(--space-1); }
