/* ============================================================
   TIBOX DESIGN SYSTEM v1.0
   Sistema de diseño unificado para plataformas internas Tibox
   Autor: UI/UX Tibox · 2026
   ============================================================ */

/* ---------- 1. FUENTES ---------- */
@import url('https://fonts.googleapis.com/css2?family=Titillium+Web:wght@300;400;600;700;900&family=JetBrains+Mono:wght@400;500&display=swap');

/* ---------- 2. TOKENS DE MARCA ---------- */
:root {
  /* Colores corporativos Tibox */
  --azul-tibox-dark:      #0026bb;
  --azul-light-tibox:     #00D1FF;
  --naranjo-tibox:        #FF4222;
  --naranjo-light-tibox:  #EA7E18;
  --amarillo-tibox:       #FFB200;
  --amarillo-light-tibox: #E8DE03;
  --degradado-naranjo:    linear-gradient(0deg, #FF4222 0%, #EA7E18 100%);
  --degradado-azul:       linear-gradient(135deg, #0026bb 0%, #00D1FF 100%);

  /* Grises */
  --gray900: #0E1116;
  --gray800: #1A1D24;
  --gray700: #2A2E37;
  --gray600: #66686C;
  --gray500: #8A8D93;
  --gray400: #B5B7BB;
  --gray300: #CFD0D3;
  --gray200: #D7D7D7;
  --gray100: #E9E9E9;
  --gray050: #F2F2F3;
  --gray010: #F7F7F7;
  --disable: #e7e7e7;
  --white:   #FFFFFF;
  --black:   #000000;

  /* Semánticos */
  --success: #1FA971;
  --warning: var(--amarillo-tibox);
  --danger:  var(--naranjo-tibox);
  --info:    var(--azul-light-tibox);

  /* Tipografía */
  --font-sans: 'Titillium Web', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Escala tipográfica */
  --fs-xs: 0.75rem;     /* 12px */
  --fs-sm: 0.875rem;    /* 14px */
  --fs-base: 1rem;      /* 16px */
  --fs-md: 1.125rem;    /* 18px */
  --fs-lg: 1.375rem;    /* 22px */
  --fs-xl: 1.75rem;     /* 28px */
  --fs-2xl: 2.25rem;    /* 36px */

  /* Espaciado (escala de 4px) */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.25rem;
  --sp-6: 1.5rem;
  --sp-8: 2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-16: 4rem;

  /* Radios */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 999px;

  /* Sombras */
  --shadow-xs: 0 1px 2px rgba(14, 17, 22, 0.04);
  --shadow-sm: 0 2px 8px rgba(14, 17, 22, 0.06);
  --shadow-md: 0 8px 24px rgba(14, 17, 22, 0.08);
  --shadow-lg: 0 16px 48px rgba(14, 17, 22, 0.12);
  --shadow-glow-blue:   0 0 0 4px rgba(0, 38, 187, 0.12);
  --shadow-glow-orange: 0 0 0 4px rgba(255, 66, 34, 0.15);

  /* Transiciones */
  --t-fast: 120ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-slow: 320ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Layout */
  --sidebar-w: 248px;
  --sidebar-w-collapsed: 72px;
  --header-h: 64px;
  --container-max: 1320px;

  /* Tokens semánticos LIGHT (default) */
  --bg-app: var(--gray010);
  --bg-surface: var(--white);
  --bg-surface-2: var(--gray050);
  --bg-elevated: var(--white);
  --border-subtle: var(--gray100);
  --border-default: var(--gray200);
  --border-strong: var(--gray300);
  --text-primary: var(--gray900);
  --text-secondary: var(--gray600);
  --text-muted: var(--gray500);
  --text-on-brand: var(--white);
  --link: var(--azul-tibox-dark);
  --focus-ring: var(--azul-light-tibox);
}

/* ---------- 3. TEMA DARK MONITOR (seguridad.tiboxlab.cl) ---------- */
[data-theme="dark"] {
  --bg-app: #060812;
  --bg-surface: #0F1320;
  --bg-surface-2: #161A28;
  --bg-elevated: #1B2030;
  --border-subtle: #1F2434;
  --border-default: #2A3045;
  --border-strong: #3A4258;
  --text-primary: #E6E9F2;
  --text-secondary: #9099AE;
  --text-muted: #6A7184;
  --link: var(--azul-light-tibox);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.55);
}

/* ---------- 4. RESET ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; tab-size: 4; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-app);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: var(--link); text-decoration: none; transition: opacity var(--t-fast); }
a:hover { opacity: 0.8; }
h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 700; line-height: 1.2; }
p { margin: 0; }
hr { border: 0; height: 1px; background: var(--border-subtle); margin: var(--sp-6) 0; }

/* ---------- 5. TIPOGRAFÍA UTILITARIA ---------- */
.t-eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--azul-tibox-dark);
}
[data-theme="dark"] .t-eyebrow { color: var(--azul-light-tibox); }

.t-display { font-size: var(--fs-2xl); font-weight: 700; letter-spacing: -0.02em; }
.t-h1 { font-size: var(--fs-xl); font-weight: 700; letter-spacing: -0.01em; }
.t-h2 { font-size: var(--fs-lg); font-weight: 700; }
.t-h3 { font-size: var(--fs-md); font-weight: 600; }
.t-muted { color: var(--text-secondary); }
.t-mono { font-family: var(--font-mono); }

/* ---------- 6. LAYOUT BASE (APP SHELL) ---------- */
.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: var(--header-h) 1fr;
  grid-template-areas:
    "sidebar header"
    "sidebar main";
  min-height: 100vh;
}
.app-shell__sidebar { grid-area: sidebar; }
.app-shell__header  { grid-area: header; }
.app-shell__main    { grid-area: main; overflow-x: hidden; }

@media (max-width: 880px) {
  .app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: var(--header-h) 1fr;
    grid-template-areas:
      "header"
      "main";
  }
  .app-shell__sidebar {
    position: fixed; inset: 0 auto 0 0;
    transform: translateX(-100%);
    transition: transform var(--t-base);
    z-index: 50;
    width: var(--sidebar-w);
  }
  .app-shell.is-sidebar-open .app-shell__sidebar { transform: translateX(0); }
  .app-shell.is-sidebar-open::before {
    content: ""; position: fixed; inset: 0;
    background: rgba(0,0,0,0.45); z-index: 49;
  }
}

/* ---------- 7. SIDEBAR ---------- */
.sidebar {
  height: 100%;
  background: var(--bg-surface);
  border-right: 1px solid var(--border-subtle);
  display: flex; flex-direction: column;
  padding: var(--sp-4) 0;
}
.sidebar__brand {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-5) var(--sp-5);
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: var(--sp-3);
}
.sidebar__brand-mark {
  width: 36px; height: 36px;
  border-radius: var(--radius-md);
  background: var(--degradado-naranjo);
  display: grid; place-items: center;
  color: var(--white); font-weight: 700;
  font-size: var(--fs-md);
  box-shadow: 0 4px 12px rgba(255,66,34,0.3);
}
.sidebar__brand-text { line-height: 1.1; }
.sidebar__brand-name { font-weight: 700; font-size: var(--fs-base); }
.sidebar__brand-sub  { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; color: var(--text-muted); text-transform: uppercase; }

.sidebar__section { padding: var(--sp-4) var(--sp-4) var(--sp-2); }
.sidebar__section-title {
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0 var(--sp-3);
}
.sidebar__nav { display: flex; flex-direction: column; gap: 2px; padding: 0 var(--sp-3); }
.sidebar__link {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-3);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-weight: 500; font-size: var(--fs-sm);
  transition: all var(--t-fast);
  position: relative;
}
.sidebar__link:hover {
  background: var(--bg-surface-2);
  color: var(--text-primary);
  opacity: 1;
}
.sidebar__link.is-active {
  background: var(--bg-surface-2);
  color: var(--text-primary);
  font-weight: 600;
}
.sidebar__link.is-active::before {
  content: ""; position: absolute; left: -8px; top: 8px; bottom: 8px;
  width: 3px; border-radius: 3px;
  background: var(--degradado-naranjo);
}
.sidebar__link svg { width: 18px; height: 18px; flex-shrink: 0; }

.sidebar__footer {
  margin-top: auto;
  padding: var(--sp-4) var(--sp-5);
  border-top: 1px solid var(--border-subtle);
}

/* ---------- 8. HEADER ---------- */
.header {
  height: 100%;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  display: flex; align-items: center;
  padding: 0 var(--sp-6);
  gap: var(--sp-4);
}
.header__menu-btn {
  display: none;
  width: 40px; height: 40px;
  border-radius: var(--radius-md);
  align-items: center; justify-content: center;
  color: var(--text-secondary);
}
.header__menu-btn:hover { background: var(--bg-surface-2); }
@media (max-width: 880px) { .header__menu-btn { display: flex; } }

.header__title { font-weight: 600; font-size: var(--fs-md); }
.header__crumbs {
  display: flex; align-items: center; gap: var(--sp-2);
  color: var(--text-muted); font-size: var(--fs-sm);
}
.header__actions { margin-left: auto; display: flex; align-items: center; gap: var(--sp-3); }

.header__search {
  position: relative;
  display: flex; align-items: center;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0 var(--sp-3);
  width: 280px;
  transition: all var(--t-fast);
}
.header__search:focus-within {
  border-color: var(--azul-tibox-dark);
  box-shadow: var(--shadow-glow-blue);
}
.header__search input {
  background: transparent; border: 0; outline: 0;
  padding: var(--sp-2) var(--sp-2);
  font-size: var(--fs-sm); flex: 1; min-width: 0;
}
.header__search svg { color: var(--text-muted); width: 16px; height: 16px; }
@media (max-width: 720px) { .header__search { display: none; } }

.header__avatar {
  width: 36px; height: 36px; border-radius: var(--radius-full);
  background: var(--degradado-naranjo);
  display: grid; place-items: center;
  color: var(--white); font-weight: 700; font-size: var(--fs-sm);
}

/* ---------- 9. MAIN / PAGE ---------- */
.page { padding: var(--sp-8) var(--sp-8); max-width: var(--container-max); margin: 0 auto; }
@media (max-width: 720px) { .page { padding: var(--sp-5) var(--sp-4); } }

.page__header {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: var(--sp-4); margin-bottom: var(--sp-6); flex-wrap: wrap;
}
.page__title-block { display: flex; flex-direction: column; gap: var(--sp-2); }

/* ---------- 10. BOTONES ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--sp-2);
  padding: 0 var(--sp-5);
  height: 40px;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-weight: 600; font-size: var(--fs-sm);
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: all var(--t-fast);
  border: 1px solid transparent;
  text-decoration: none;
  position: relative;
}
.btn:disabled, .btn.is-disabled { opacity: 0.5; pointer-events: none; }
.btn svg { width: 16px; height: 16px; }

.btn--sm { height: 32px; padding: 0 var(--sp-3); font-size: var(--fs-xs); }
.btn--lg { height: 48px; padding: 0 var(--sp-6); font-size: var(--fs-base); }
.btn--block { width: 100%; }

.btn--primary {
  background: var(--gray900);
  color: var(--white);
}
.btn--primary:hover { background: var(--black); transform: translateY(-1px); }

.btn--brand {
  background: var(--degradado-naranjo);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(255,66,34,0.25);
}
.btn--brand:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(255,66,34,0.35); }

.btn--accent {
  background: var(--azul-tibox-dark);
  color: var(--white);
}
.btn--accent:hover { background: #001a8a; }

.btn--ghost {
  background: transparent;
  border-color: var(--border-default);
  color: var(--text-primary);
}
.btn--ghost:hover { background: var(--bg-surface-2); }

.btn--link {
  background: transparent; padding: 0; height: auto;
  color: var(--link); font-weight: 600;
}

.btn:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

/* ---------- 11. INPUTS / FORMS ---------- */
.field { display: flex; flex-direction: column; gap: var(--sp-2); margin-bottom: var(--sp-4); }
.field__label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.field__hint { font-size: var(--fs-xs); color: var(--text-muted); }
.field__error { font-size: var(--fs-xs); color: var(--danger); }

.input, .select, .textarea {
  width: 100%;
  height: 44px;
  padding: 0 var(--sp-4);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  color: var(--text-primary);
  transition: all var(--t-fast);
  outline: 0;
  font-family: var(--font-sans);
}
.textarea { height: auto; padding: var(--sp-3) var(--sp-4); min-height: 96px; resize: vertical; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--border-strong); }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--azul-tibox-dark);
  box-shadow: var(--shadow-glow-blue);
}
.input::placeholder, .textarea::placeholder { color: var(--text-muted); }
.input:disabled, .select:disabled { background: var(--disable); color: var(--text-muted); cursor: not-allowed; }

[data-theme="dark"] .input,
[data-theme="dark"] .select,
[data-theme="dark"] .textarea {
  background: var(--bg-surface-2);
  border-color: var(--border-default);
}
[data-theme="dark"] .input:focus,
[data-theme="dark"] .select:focus,
[data-theme="dark"] .textarea:focus {
  border-color: var(--azul-light-tibox);
  box-shadow: 0 0 0 4px rgba(0, 209, 255, 0.18);
}

.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='%2366686C' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right var(--sp-4) center; padding-right: var(--sp-10); }

/* ---------- 12. CARDS ---------- */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--t-base), transform var(--t-base);
}
.card--interactive:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card--flush { padding: 0; }
.card--elevated { box-shadow: var(--shadow-md); border-color: transparent; }

.card__header {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: var(--sp-4); margin-bottom: var(--sp-4);
  border-bottom: 1px solid var(--border-subtle);
}
.card__title { font-size: var(--fs-md); font-weight: 700; }
.card__body { color: var(--text-secondary); font-size: var(--fs-sm); line-height: 1.6; }

/* KPI / Stat Card */
.stat {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--sp-5) var(--sp-6);
  display: flex; flex-direction: column; gap: var(--sp-2);
  position: relative; overflow: hidden;
}
.stat__label { font-family: var(--font-mono); font-size: 10px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted); }
.stat__value { font-size: var(--fs-2xl); font-weight: 700; letter-spacing: -0.02em; line-height: 1; }
.stat__meta { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-xs); color: var(--text-secondary); }
.stat__trend { font-weight: 600; }
.stat__trend--up { color: var(--success); }
.stat__trend--down { color: var(--danger); }
.stat__accent { position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--degradado-naranjo); }
.stat--accent-blue .stat__accent { background: var(--degradado-azul); }
.stat--accent-yellow .stat__accent { background: linear-gradient(0deg, var(--amarillo-tibox), var(--amarillo-light-tibox)); }
.stat--accent-success .stat__accent { background: var(--success); }

/* ---------- 13. TABLAS ---------- */
.table-wrap {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}
.table th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: var(--sp-3) var(--sp-5);
  background: var(--bg-surface-2);
  border-bottom: 1px solid var(--border-subtle);
}
.table td {
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  vertical-align: middle;
}
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background var(--t-fast); }
.table tbody tr:hover { background: var(--bg-surface-2); }
.table__cell--num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ---------- 14. BADGES / ESTADOS ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
  font-family: var(--font-mono);
}
.badge::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
}
.badge--success { background: rgba(31,169,113,0.12); color: var(--success); }
.badge--warning { background: rgba(255,178,0,0.15); color: #B27A00; }
.badge--danger  { background: rgba(255,66,34,0.12); color: var(--danger); }
.badge--info    { background: rgba(0,38,187,0.10); color: var(--azul-tibox-dark); }
.badge--neutral { background: var(--gray100); color: var(--gray600); }
[data-theme="dark"] .badge--neutral { background: rgba(255,255,255,0.06); color: var(--text-secondary); }
[data-theme="dark"] .badge--info    { background: rgba(0,209,255,0.12); color: var(--azul-light-tibox); }

/* ---------- 15. ALERT ---------- */
.alert {
  display: flex; gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  border-radius: var(--radius-md);
  border-left: 3px solid;
  font-size: var(--fs-sm);
}
.alert__icon { flex-shrink: 0; width: 20px; height: 20px; margin-top: 2px; }
.alert__title { font-weight: 700; margin-bottom: 2px; }
.alert--info    { background: rgba(0,38,187,0.06); border-color: var(--azul-tibox-dark); color: var(--azul-tibox-dark); }
.alert--success { background: rgba(31,169,113,0.08); border-color: var(--success); color: var(--success); }
.alert--warning { background: rgba(255,178,0,0.10); border-color: var(--amarillo-tibox); color: #8a5c00; }
.alert--danger  { background: rgba(255,66,34,0.08); border-color: var(--naranjo-tibox); color: var(--naranjo-tibox); }

/* ---------- 16. LOGIN ---------- */
.auth {
  min-height: 100vh;
  display: grid; place-items: center;
  padding: var(--sp-6);
  position: relative;
  overflow: hidden;
}
.auth__bg {
  position: absolute; inset: 0; z-index: 0;
  pointer-events: none;
}
.auth__card {
  position: relative; z-index: 1;
  width: 100%; max-width: 420px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--sp-10) var(--sp-8);
  box-shadow: var(--shadow-lg);
}
.auth__brand {
  display: flex; flex-direction: column; align-items: flex-start;
  gap: var(--sp-3); margin-bottom: var(--sp-8);
}
.auth__brand-mark {
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  background: var(--degradado-naranjo);
  display: grid; place-items: center;
  color: var(--white); font-weight: 700; font-size: var(--fs-md);
  box-shadow: 0 6px 16px rgba(255,66,34,0.3);
}
.auth__eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-xs); font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--azul-tibox-dark);
}
[data-theme="dark"] .auth__eyebrow { color: var(--azul-light-tibox); }
.auth__title { font-size: var(--fs-xl); font-weight: 700; letter-spacing: -0.01em; }
.auth__subtitle { color: var(--text-secondary); font-size: var(--fs-sm); margin-top: 4px; }
.auth__footer { text-align: center; margin-top: var(--sp-6); font-size: var(--fs-xs); color: var(--text-muted); }
.auth__footer strong { color: var(--text-secondary); font-weight: 600; }

/* Fondo dark monitor: rejilla + halo */
.auth__bg--monitor {
  background:
    radial-gradient(ellipse 60% 50% at 50% 45%, rgba(0,38,187,0.25) 0%, transparent 60%),
    radial-gradient(ellipse 80% 40% at 50% 100%, rgba(255,66,34,0.12) 0%, transparent 60%),
    linear-gradient(180deg, #060812 0%, #0B0F1E 100%);
}
.auth__bg--monitor::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
}

/* Fondo light corporate: blobs suaves */
.auth__bg--corp {
  background: var(--gray010);
}
.auth__bg--corp::before, .auth__bg--corp::after {
  content: "";
  position: absolute;
  width: 480px; height: 480px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
}
.auth__bg--corp::before {
  top: -200px; left: -120px;
  background: radial-gradient(circle, rgba(0,38,187,0.20), transparent 70%);
}
.auth__bg--corp::after {
  bottom: -200px; right: -120px;
  background: radial-gradient(circle, rgba(255,66,34,0.15), transparent 70%);
}

/* ---------- 17. UTILIDADES ---------- */
.grid { display: grid; gap: var(--sp-4); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1024px) { .grid--4 { grid-template-columns: repeat(2, 1fr); } .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }

.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); }
.gap-4 { gap: var(--sp-4); }

.divider-mono {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--text-muted);
  display: flex; align-items: center; gap: var(--sp-3);
}
.divider-mono::before, .divider-mono::after {
  content: ""; flex: 1; height: 1px; background: var(--border-subtle);
}

.skeleton {
  background: linear-gradient(90deg, var(--bg-surface-2) 0%, var(--bg-surface) 50%, var(--bg-surface-2) 100%);
  background-size: 200% 100%;
  animation: tibox-shimmer 1.6s infinite;
  border-radius: var(--radius-sm);
}
@keyframes tibox-shimmer { to { background-position: -200% 0; } }

/* ---------- 18. ACCESIBILIDAD ---------- */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; border-radius: var(--radius-sm); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}



.hist-list {
    overflow: scroll;
    max-height: 200px;
}
.badge--info {
    background: rgba(0, 38, 187, 0.10);
    color: var(--azul-tibox-dark);
    /* width: 100px; */
    /* min-width: 100px; */
    max-width: 100px;
    white-space: nowrap;
    overflow: hidden;
    text-align: left;
    text-overflow: ellipsis;
    font-size: 9px;
    padding: 4px 4px;
}
img.front-logo-thumb {
    border: 0;
    box-shadow: none !important;
}

.stat__value {
    font-weight: 700;


}
.si-tabs {
    display: none;
}

.avance-track {
    opacity: 0;
}
.si-tabs {
    display: none;
}