/* =====================================================================
   LGA Internal Command System — Foundations
   Dark, sober, corporate, technical. No gold. No neon. No emoji.
   ===================================================================== */

/* ---------- Fonts ---------- */
/* Inter for UI, IBM Plex Mono for figures / codes / IDs */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=IBM+Plex+Mono:wght@300;400;500;600&display=swap");

:root {
  /* ===== Surfaces ===== */
  --bg-0:        #080A0C;   /* App background (deepest) */
  --bg-1:        #0E1114;   /* Secondary surface */
  --bg-2:        #15191E;   /* Panels / cards */
  --bg-3:        #1B2026;   /* Elevated cards / hover */
  --bg-4:        #232932;   /* Highest elevation, popovers */
  --bg-inset:    #060709;   /* Inset wells (inputs, code) */

  /* ===== Borders / dividers ===== */
  --border:       #2A3038;
  --border-soft:  #20262D;
  --border-strong:#3A424C;
  --rule:         #1E232A;  /* Hairline dividers inside panels */

  /* ===== Text ===== */
  --fg-0:   #F4F1EA;   /* Primary text */
  --fg-1:   #E8E3D8;   /* Institutional white-bone (logo, headings) */
  --fg-2:   #B8B2A7;   /* Secondary */
  --fg-3:   #7E8790;   /* Muted */
  --fg-4:   #5A626B;   /* Disabled / placeholder */
  --fg-on-accent: #0B0D10;

  /* ===== Institutional accents ===== */
  --accent-bone:    #E8E3D8;   /* Logo / hero text */
  --accent-steel:   #5E7184;   /* Azul acero — technical accent */
  --accent-steel-2: #7A8B9D;
  --accent-olive:   #5F6B58;   /* Oliva humo — operational */
  --accent-olive-2: #7A8771;

  /* ===== Functional / status colors ===== */
  --ok:        #4F8A5B;   /* Cobrado, validado */
  --ok-bg:     #15241A;
  --ok-border: #2C4A33;

  --warn:        #C1843A;   /* Por vencer, observación */
  --warn-bg:     #2A1F12;
  --warn-border: #4A361F;

  --risk:        #A6403A;   /* Mora, riesgo */
  --risk-bg:     #2A1715;
  --risk-border: #4A2622;

  --crit:        #7E2525;   /* Judicial / crítico */
  --crit-bg:     #1F0E0D;
  --crit-border: #3C1817;

  --info:        #5E7184;   /* Info / sistema */
  --info-bg:     #16202A;
  --info-border: #283744;

  --neutral-state-bg:     #1B2026;
  --neutral-state-border: #2A3038;

  /* ===== Type families ===== */
  --font-ui:   "Inter", "Neue Haas Grotesk", "Helvetica Neue", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", "JetBrains Mono", "Roboto Mono", ui-monospace, Menlo, monospace;
  --font-display: "Inter", "Neue Haas Grotesk Display", system-ui, sans-serif;

  /* ===== Type scale ===== */
  /* Tight, dense, designed for dashboards. */
  --t-xs:    11px;
  --t-sm:    12px;
  --t-base:  13px;
  --t-md:    14px;
  --t-lg:    16px;
  --t-xl:    18px;
  --t-2xl:   22px;
  --t-3xl:   28px;
  --t-4xl:   36px;
  --t-5xl:   48px;

  --lh-tight:   1.15;
  --lh-snug:    1.3;
  --lh-normal:  1.45;
  --lh-loose:   1.65;

  --tracking-tight:   -0.01em;
  --tracking-normal:   0em;
  --tracking-wide:     0.04em;
  --tracking-caps:     0.12em;

  /* ===== Radii ===== */
  --r-0: 0px;
  --r-1: 2px;
  --r-2: 3px;   /* Default chips, inputs */
  --r-3: 4px;   /* Panels, buttons */
  --r-4: 6px;
  --r-pill: 999px;

  /* ===== Elevation ===== */
  --shadow-0: none;
  --shadow-1: 0 1px 0 rgba(0,0,0,0.4), 0 0 0 1px var(--border-soft);
  --shadow-2: 0 8px 24px -8px rgba(0,0,0,0.6), 0 0 0 1px var(--border);
  --shadow-3: 0 24px 60px -16px rgba(0,0,0,0.7), 0 0 0 1px var(--border);
  --shadow-inset: inset 0 1px 0 rgba(255,255,255,0.02);

  /* ===== Spacing (4px base) ===== */
  --s-1:  2px;
  --s-2:  4px;
  --s-3:  6px;
  --s-4:  8px;
  --s-5:  12px;
  --s-6:  16px;
  --s-7:  20px;
  --s-8:  24px;
  --s-9:  32px;
  --s-10: 40px;
  --s-11: 56px;
  --s-12: 72px;

  /* ===== Layout ===== */
  --sidebar-w: 232px;
  --sidebar-w-collapsed: 56px;
  --topbar-h: 48px;
  --row-h: 36px;
  --row-h-dense: 28px;

  /* ===== Motion ===== */
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur-1: 90ms;
  --dur-2: 160ms;
  --dur-3: 240ms;
}

/* =====================================================================
   Base
   ===================================================================== */
html, body {
  background: var(--bg-0);
  color: var(--fg-0);
  font-family: var(--font-ui);
  font-size: var(--t-base);
  line-height: var(--lh-normal);
  font-feature-settings: "ss01", "cv11", "cv02";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: var(--tracking-normal);
}

::selection { background: rgba(94,113,132,0.45); color: var(--fg-0); }

/* =====================================================================
   Semantic typography
   ===================================================================== */

.h-display {
  font-family: var(--font-display);
  font-size: var(--t-4xl);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  font-weight: 600;
  color: var(--fg-1);
}

.h1 {
  font-family: var(--font-display);
  font-size: var(--t-3xl);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  font-weight: 600;
  color: var(--fg-1);
}

.h2 {
  font-family: var(--font-ui);
  font-size: var(--t-xl);
  line-height: var(--lh-snug);
  font-weight: 600;
  color: var(--fg-0);
}

.h3 {
  font-family: var(--font-ui);
  font-size: var(--t-lg);
  line-height: var(--lh-snug);
  font-weight: 600;
  color: var(--fg-0);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: var(--fg-3);
  font-weight: 500;
}

.label {
  font-family: var(--font-ui);
  font-size: var(--t-sm);
  font-weight: 500;
  color: var(--fg-2);
  letter-spacing: 0.01em;
}

.p {
  font-family: var(--font-ui);
  font-size: var(--t-base);
  line-height: var(--lh-normal);
  color: var(--fg-0);
}

.p-sm {
  font-family: var(--font-ui);
  font-size: var(--t-sm);
  line-height: var(--lh-normal);
  color: var(--fg-2);
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "zero", "ss01";
}

.metric {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--t-3xl);
  line-height: var(--lh-tight);
  letter-spacing: -0.02em;
  color: var(--fg-1);
  font-weight: 500;
}

.metric-sm {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--t-xl);
  letter-spacing: -0.01em;
  color: var(--fg-0);
  font-weight: 500;
}

.code {
  font-family: var(--font-mono);
  font-size: var(--t-sm);
  background: var(--bg-inset);
  border: 1px solid var(--border-soft);
  padding: 1px 6px;
  border-radius: var(--r-1);
  color: var(--fg-2);
}

/* Utility */
.muted { color: var(--fg-3); }
.dim   { color: var(--fg-2); }
.fg    { color: var(--fg-0); }
.bone  { color: var(--fg-1); }
