/* Precisión — tablero de instrumento financiero: barra lateral oscura de marca, lienzo claro,
   cifras protagonistas en Geist (incluida en la app), indicadores unidos en una sola franja. */
@font-face { font-family: "Geist"; font-style: normal; font-weight: 400 700; font-display: swap; src: url(../../fonts/geist-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 400 700; font-display: swap; src: url(../../fonts/geist-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF; }
html[data-tema="precision"]:not([data-z]) {
  color-scheme: light;
  --brand: #23397f; --brand-ink: #fff; --brand-soft: #e5e7f0; --navy: #14214a;
  --bg: #f4f5f7; --surface: #ffffff; --surface-2: #f6f7f9;
  --line: #e3e6eb; --line-strong: #cfd4dc;
  --ink: #0e1422; --ink-2: #454d5e; --ink-3: #7b8394;
  --ok: #0d7a4e; --ok-soft: #e3f4ec; --warn: #9a5a00; --warn-soft: #fcf0dc; --bad: #c42b1c; --bad-soft: #fcebe9; --info: #2456b3; --info-soft: #e8eefb;
  --radius: 10px; --shadow: 0 1px 2px rgba(14,20,34,.05);
  --font: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --side-bg: #14214a; --side-ink: #b7c0d4; --side-ink-3: #6f7c99; --side-hover: rgba(255,255,255,.06); --side-on: rgba(255,255,255,.1);
  --pri-bg: #14214a; --pri-ink: #ffffff; --top: 60px;
}
html[data-tema="precision"] body { font-size: 14px; }
html[data-tema="precision"] .num, html[data-tema="precision"] td.num, html[data-tema="precision"] .kpi .v { font-feature-settings: "tnum", "ss01"; letter-spacing: -.01em; }
html[data-tema="precision"] .side { background: var(--side-bg); border-right: 0; color: #e7ebf4; }
html[data-tema="precision"] .side .brand b { color: #fff; letter-spacing: -.01em; }
html[data-tema="precision"] .side .brand span { color: #8e9ab5; }
html[data-tema="precision"] .side .brand img { background: #fff; padding: 3px; }
html[data-tema="precision"] .side .brand:hover { background: var(--side-hover); }
html[data-tema="precision"] .side .grp { color: var(--side-ink-3); font-size: 10.5px; letter-spacing: .12em; font-weight: 600; }
html[data-tema="precision"] .side nav a { color: var(--side-ink); font-size: 13.5px; }
html[data-tema="precision"] .side nav a svg { opacity: .7; }
html[data-tema="precision"] .side nav a:hover { background: var(--side-hover); color: #fff; }
html[data-tema="precision"] .side nav a.on { background: var(--side-on); color: #fff; font-weight: 550; }
html[data-tema="precision"] .side nav a.on svg { opacity: 1; color: #9fb8ff; }
html[data-tema="precision"] .side .me { border-top-color: rgba(255,255,255,.08); color: #e7ebf4; }
html[data-tema="precision"] .side .me .muted { color: #8e9ab5; }
html[data-tema="precision"] .side .btn.ghost { color: var(--side-ink); }
html[data-tema="precision"] .side .btn.ghost:hover { background: var(--side-hover); }
html[data-tema="precision"] .topbar { background: var(--surface); border-bottom: 1px solid var(--line); backdrop-filter: none; padding: 0 28px; }
html[data-tema="precision"] .topbar h1 { font-size: 19px; font-weight: 600; letter-spacing: -.015em; }
html[data-tema="precision"] .content { padding: 24px 28px 56px; }
html[data-tema="precision"] .card { border: 1px solid var(--line); box-shadow: var(--shadow); }
html[data-tema="precision"] .card-h h2, html[data-tema="precision"] .card > h2 { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); }
html[data-tema="precision"] .grid.g4:has(> .kpi) { gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
html[data-tema="precision"] .grid.g4 > .kpi { border: 0; border-radius: 0; border-right: 1px solid var(--line); padding: 18px 20px 16px; }
html[data-tema="precision"] .grid.g4 > .kpi:last-child { border-right: 0; }
html[data-tema="precision"] .grid.g4 > a.kpi:hover { background: var(--surface-2); }
html[data-tema="precision"] .kpi .l { font-size: 11px; text-transform: uppercase; letter-spacing: .09em; font-weight: 600; }
html[data-tema="precision"] .kpi .v { font-size: 28px; font-weight: 600; letter-spacing: -.03em; margin-top: 10px; }
html[data-tema="precision"] .kpi .s { color: var(--ink-3); font-size: 12px; margin-top: 6px; }
html[data-tema="precision"] .btn { border-radius: 8px; font-weight: 550; font-size: 13.5px; box-shadow: 0 1px 1px rgba(14,20,34,.04); }
html[data-tema="precision"] .btn.pri { background: var(--pri-bg); border-color: var(--pri-bg); color: var(--pri-ink); }
html[data-tema="precision"] .btn.ghost { box-shadow: none; }
html[data-tema="precision"] .tabs a { font-size: 13.5px; font-weight: 500; }
html[data-tema="precision"] .tabs a.on { color: var(--ink); border-color: var(--ink); }
html[data-tema="precision"] .tbl th { font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em; font-weight: 600; background: var(--surface-2); padding: 9px 16px; }
html[data-tema="precision"] .tbl td { padding: 10px 16px; }
html[data-tema="precision"] .badge { border-radius: 5px; font-size: 11px; font-weight: 600; letter-spacing: .02em; padding: 1px 7px; }
html[data-tema="precision"] .alert { border-radius: 8px; border: 1px solid color-mix(in srgb, currentColor 18%, transparent); }
html[data-tema="precision"] .card .stack > * + * { margin-top: 0; }
html[data-tema="precision"] .card a.alert { background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 11px 0; color: var(--ink); font-size: 13.5px; }
html[data-tema="precision"] .card a.alert:last-child { border-bottom: 0; }
html[data-tema="precision"] .card a.alert svg { color: var(--info); }
html[data-tema="precision"] .card a.alert.warn svg { color: var(--warn); }
html[data-tema="precision"] .card a.alert.bad svg { color: var(--bad); }
html[data-tema="precision"] .card a.alert.bad { font-weight: 550; }
@media (max-width: 900px) {
  html[data-tema="precision"] .topbar { padding: 0 12px; }
  html[data-tema="precision"] .content { padding: 16px 16px calc(var(--tabbar) + 28px + env(safe-area-inset-bottom)); }
}
@media (max-width: 640px) {
  html[data-tema="precision"] .grid.g4 { grid-template-columns: 1fr 1fr; }
  html[data-tema="precision"] .grid.g4 > .kpi { border-right: 0; border-bottom: 1px solid var(--line); }
  html[data-tema="precision"] .grid.g4 > .kpi:first-child { grid-column: 1 / -1; }
  html[data-tema="precision"] .grid.g4 > .kpi:nth-child(2) { border-right: 1px solid var(--line); }
  html[data-tema="precision"] .kpi .v { font-size: 22px; }
  html[data-tema="precision"] .grid.g4 > .kpi:first-child .v { font-size: 32px; }
}

/* ---------- modo oscuro ---------- */
@media (prefers-color-scheme: dark) {
  html[data-tema="precision"]:not([data-theme="light"]) {
    color-scheme: dark;
    --brand: #9ca6c5; --brand-ink: #0a1122; --brand-soft: rgba(159,184,255,.14);
    --bg: #0b1120; --surface: #121a2c; --surface-2: #172036;
    --line: #232d45; --line-strong: #334063;
    --ink: #e8ecf5; --ink-2: #b3bccf; --ink-3: #7f8aa3;
    --ok: #3fcf8e; --ok-soft: rgba(63,207,142,.13); --warn: #f2b046; --warn-soft: rgba(242,176,70,.13); --bad: #ff7468; --bad-soft: rgba(255,116,104,.14); --info: #79a8ff; --info-soft: rgba(121,168,255,.13);
    --shadow: 0 1px 2px rgba(0,0,0,.35);
    --side-bg: #070c19; --pri-bg: #9ca6c5; --pri-ink: #0a1122;
  }
}
html[data-tema="precision"][data-theme="dark"] {
    color-scheme: dark;
    --brand: #9ca6c5; --brand-ink: #0a1122; --brand-soft: rgba(159,184,255,.14);
    --bg: #0b1120; --surface: #121a2c; --surface-2: #172036;
    --line: #232d45; --line-strong: #334063;
    --ink: #e8ecf5; --ink-2: #b3bccf; --ink-3: #7f8aa3;
    --ok: #3fcf8e; --ok-soft: rgba(63,207,142,.13); --warn: #f2b046; --warn-soft: rgba(242,176,70,.13); --bad: #ff7468; --bad-soft: rgba(255,116,104,.14); --info: #79a8ff; --info-soft: rgba(121,168,255,.13);
    --shadow: 0 1px 2px rgba(0,0,0,.35);
    --side-bg: #070c19; --pri-bg: #9ca6c5; --pri-ink: #0a1122;
  }
