:root {
  /* ===== RIGA ADMIN DESIGN SYSTEM v2 (refresh Bloque I) ===== */
  /* Inspirado en Linear, Mercury, Stripe, Vercel — escala moderna con respiro */

  /* ===== Brand ===== */
  --brand-teal: #009FB3;
  --brand-navy: #1D4354;
  --brand-accent: #FCE200;

  /* ===== Sidebar ===== */
  --sidebar-bg: #0F2630;
  --sidebar-hover: rgba(255, 255, 255, 0.08);
  --sidebar-active: rgba(0, 159, 179, 0.18);
  --sidebar-text: rgba(255, 255, 255, 0.60);
  --sidebar-text-hover: rgba(255, 255, 255, 0.92);
  --sidebar-text-active: #ffffff;
  --sidebar-width: 252px;
  --sidebar-collapsed: 68px;
  --sidebar-accent: #00B5CC;
  --sidebar-border: rgba(255, 255, 255, 0.06);
  --sidebar-section-text: rgba(255, 255, 255, 0.38);

  /* ===== Primary (Teal) ===== */
  --primary: #009FB3;
  --primary-hover: #008094;
  --primary-active: #006D7F;
  --primary-light: #E6F9FB;
  --primary-subtle: rgba(0, 159, 179, 0.08);
  --primary-ring: rgba(0, 159, 179, 0.18);

  /* ===== Semantic ===== */
  --success: #059669;
  --success-hover: #047857;
  --success-light: #ECFDF5;
  --success-ring: rgba(5, 150, 105, 0.15);

  --danger: #DC2626;
  --danger-hover: #B91C1C;
  --danger-light: #FEF2F2;
  --danger-ring: rgba(220, 38, 38, 0.15);

  --warning: #D97706;
  --warning-hover: #B45309;
  --warning-light: #FFFBEB;
  --warning-ring: rgba(217, 119, 6, 0.15);

  --info: #2563EB;
  --info-hover: #1D4ED8;
  --info-light: #EFF6FF;
  --info-ring: rgba(37, 99, 235, 0.15);

  /* ===== Neutrals (Zinc/Slate moderno) ===== */
  --bg-page: #F6F8FA;                 /* fondo de la app */
  --bg-card: #FFFFFF;                 /* cards, modals */
  --bg-card-hover: #FAFBFC;           /* hover suave en filas */
  --bg-input: #FFFFFF;                /* inputs */
  --bg-input-disabled: #F3F4F6;
  --bg-subtle: #F8FAFB;               /* secciones secundarias, table headers */
  --bg-hover: #F1F3F5;
  --bg-muted: #F0F2F5;

  --border: #E4E7EB;                  /* borde default (sólido, más sutil que rgba) */
  --border-subtle: #EEF0F3;           /* para filas de tabla */
  --border-strong: #D1D5DB;
  --border-focus: var(--primary);

  --text-primary: #0B1220;            /* casi negro, alto contraste */
  --text-secondary: #475467;          /* labels, subtítulos */
  --text-muted: #8895A7;              /* hints, metadata */
  --text-disabled: #B0B8C4;
  --text-on-primary: #FFFFFF;
  --text-link: var(--primary);

  /* ===== Shadows — suaves pero presentes ===== */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.07), 0 2px 4px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.10), 0 4px 12px rgba(15, 23, 42, 0.05);
  --shadow-xl: 0 24px 56px rgba(15, 23, 42, 0.14), 0 8px 20px rgba(15, 23, 42, 0.06);
  --shadow-focus: 0 0 0 3px var(--primary-ring);
  --shadow-focus-danger: 0 0 0 3px var(--danger-ring);
  --shadow-focus-success: 0 0 0 3px var(--success-ring);

  /* ===== Radii ===== */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;                  /* inputs, buttons */
  --radius-lg: 14px;                  /* cards */
  --radius-xl: 20px;                  /* modals, hero */
  --radius-full: 9999px;

  /* ===== Spacing — escala 4px ===== */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* ===== Typography ===== */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Cascadia Code', 'Fira Code', 'Consolas', monospace;

  /* Escala — base 14px mobile, 15px desktop a través de html font-size */
  --font-size-xs: 0.6875rem;     /* 11px */
  --font-size-sm: 0.8125rem;     /* 13px */
  --font-size-md: 0.9375rem;     /* 15px — base */
  --font-size-lg: 1.0625rem;     /* 17px */
  --font-size-xl: 1.25rem;       /* 20px */
  --font-size-2xl: 1.5rem;       /* 24px */
  --font-size-3xl: 1.875rem;     /* 30px */
  --font-size-4xl: 2.25rem;      /* 36px */

  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  --line-height-tight: 1.25;
  --line-height-snug: 1.35;
  --line-height-normal: 1.55;
  --line-height-relaxed: 1.65;

  --letter-spacing-tight: -0.01em;
  --letter-spacing-normal: 0;
  --letter-spacing-wide: 0.02em;
  --letter-spacing-wider: 0.06em;     /* para labels uppercase */

  /* ===== Transitions ===== */
  --transition-fast: 120ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 180ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 280ms cubic-bezier(0.4, 0, 0.2, 1);

  /* ===== Badge states ===== */
  --badge-borrador-bg: #F1F3F5;
  --badge-borrador-text: #475467;
  --badge-confirmado-bg: #ECFDF5;
  --badge-confirmado-text: #047857;
  --badge-anulado-bg: #FEF2F2;
  --badge-anulado-text: #B91C1C;
  --badge-pendiente-bg: #FFFBEB;
  --badge-pendiente-text: #B45309;
  --badge-en-cartera-bg: #EFF6FF;
  --badge-en-cartera-text: #1D4ED8;
  --badge-depositado-bg: #F5F3FF;
  --badge-depositado-text: #6D28D9;
  --badge-cobrado-bg: #ECFDF5;
  --badge-cobrado-text: #047857;
  --badge-rechazado-bg: #FEF2F2;
  --badge-rechazado-text: #B91C1C;
  --badge-endosado-bg: #ECFEFF;
  --badge-endosado-text: #0E7490;
  --badge-descontado-bg: #FDF4FF;
  --badge-descontado-text: #A21CAF;
  --badge-emitido-bg: #EFF6FF;
  --badge-emitido-text: #1D4ED8;
  --badge-debitado-bg: #ECFDF5;
  --badge-debitado-text: #047857;
  --badge-activo-bg: #ECFDF5;
  --badge-activo-text: #047857;
  --badge-abierto-bg: #ECFDF5;
  --badge-abierto-text: #047857;
  --badge-cerrado-bg: #F1F3F5;
  --badge-cerrado-text: #475467;

  /* ===== Layout ===== */
  --header-height: 64px;
  --content-max-width: 1600px;
}

/* Base de 15px en desktop para tener más respiro */
html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-md);
  line-height: var(--line-height-normal);
  color: var(--text-primary);
  background: var(--bg-page);
  font-feature-settings: "cv11", "ss01", "ss03";  /* Inter tabular variants */
}

/* Tabular nums en todos los montos */
.amount, .tabular, code, input[type="number"] {
  font-feature-settings: "tnum" 1, "cv11" 1;
  font-variant-numeric: tabular-nums;
}
