/* Precalificador Urba360 — sistema de diseño
   Una consola de trabajo para comerciales de grandes cuentas: densa, legible y tranquila.
   Lo único que se permite «hacer ruido» es la señal (ámbar) y el riesgo (rojo). */

@font-face {
  font-family: "Hanken Grotesk";
  src: url("/static/fonts/hanken-grotesk-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 900; font-style: normal; font-display: swap;
  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: "Hanken Grotesk";
  src: url("/static/fonts/hanken-grotesk-latin-ext-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #EDF1F2;
  --surface: #FFFFFF;
  --surface-2: #F5F7F8;
  --ink: #0F1F28;
  --ink-2: #43545E;
  --ink-3: #758690;
  --line: #D6DEE2;
  --line-2: #E7ECEF;
  --accent: #0A5C66;
  --accent-hover: #084A52;
  --accent-soft: #DCECEE;
  --accent-ink: #FFFFFF;
  --signal: #A86300;
  --signal-dot: #E39A1B;
  --signal-soft: #FBEFD9;
  --risk: #A3332A;
  --risk-soft: #F7E3E0;
  --ok: #2B7349;
  --ok-soft: #E0F0E6;
  --grade-c: #A7B4BA;
  --focus: #2B8A96;
  --shadow-pop: 0 12px 32px rgba(15, 31, 40, .16), 0 2px 6px rgba(15, 31, 40, .08);
  --r-panel: 10px;
  --r-ctl: 6px;
  --f: "Hanken Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --t-xs: 12px; --t-s: 13px; --t-m: 14px; --t-l: 16px; --t-xl: 19px; --t-2xl: 24px; --t-3xl: 32px; --t-num: 46px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0C1519; --surface: #121E23; --surface-2: #17252B; --ink: #E4ECEF; --ink-2: #A9B9C0; --ink-3: #7D8F97;
    --line: #26363D; --line-2: #1D2C32; --accent: #47A9B4; --accent-hover: #5DBAC4; --accent-soft: #163339; --accent-ink: #06171B;
    --signal: #F0B04A; --signal-dot: #F0B04A; --signal-soft: #33260F; --risk: #F08A7E; --risk-soft: #3A1E1A;
    --ok: #74C795; --ok-soft: #15301F; --grade-c: #4F6168; --focus: #6CC5CF;
    --shadow-pop: 0 12px 32px rgba(0,0,0,.5), 0 2px 6px rgba(0,0,0,.3); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0C1519; --surface: #121E23; --surface-2: #17252B; --ink: #E4ECEF; --ink-2: #A9B9C0; --ink-3: #7D8F97;
  --line: #26363D; --line-2: #1D2C32; --accent: #47A9B4; --accent-hover: #5DBAC4; --accent-soft: #163339; --accent-ink: #06171B;
  --signal: #F0B04A; --signal-dot: #F0B04A; --signal-soft: #33260F; --risk: #F08A7E; --risk-soft: #3A1E1A;
  --ok: #74C795; --ok-soft: #15301F; --grade-c: #4F6168; --focus: #6CC5CF;
  --shadow-pop: 0 12px 32px rgba(0,0,0,.5), 0 2px 6px rgba(0,0,0,.3); color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink); font: 400 var(--t-m)/1.5 var(--f);
  font-feature-settings: "tnum" 1, "ss01" 1; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -0.01em; }
p { margin: 0; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--ink-3); }
.soft { color: var(--ink-2); }
.num { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }

/* ───────────── barra superior ───────────── */
.top {
  position: sticky; top: 0; z-index: 30; height: 56px; display: flex; align-items: center; gap: 28px;
  padding: 0 24px; background: var(--surface); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand svg { flex: none; }
.brand b { font-weight: 700; font-size: var(--t-l); letter-spacing: -0.02em; }
.brand span { color: var(--ink-3); font-size: var(--t-s); }
.nav { display: flex; gap: 2px; height: 100%; }
.nav a {
  display: flex; align-items: center; gap: 7px; padding: 0 12px; color: var(--ink-2); font-weight: 550;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.nav a:hover { color: var(--ink); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.nav .count { font-size: var(--t-xs); color: var(--signal); font-weight: 650; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.search-btn {
  display: flex; align-items: center; gap: 10px; width: 300px; height: 34px; padding: 0 10px 0 12px;
  border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--surface-2); color: var(--ink-3); cursor: pointer;
}
.search-btn:hover { border-color: var(--ink-3); }
.search-btn svg { width: 16px; height: 16px; flex: none; }
.search-btn .lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-btn kbd { margin-left: auto; font: 600 11px var(--f); color: var(--ink-3); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; background: var(--surface); }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft);
  color: var(--accent); font-weight: 700; font-size: var(--t-s); border: 0; cursor: pointer;
}
.lang { height: 32px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--surface); padding: 0 6px; color: var(--ink-2); }

/* ───────────── estructura ───────────── */
main { padding: 28px 24px 64px; max-width: 1480px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 20px; }
.page-head h1 { font-size: var(--t-2xl); }
.page-head .sub { color: var(--ink-3); margin-top: 2px; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); }
.panel-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.panel-head h2 { font-size: var(--t-l); }
.panel-head .hint { color: var(--ink-3); font-size: var(--t-s); }
.panel-head .tools { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.panel-body { padding: 16px 18px; }

/* ───────────── controles ───────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 34px; padding: 0 14px;
  border-radius: var(--r-ctl); border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font-weight: 600; cursor: pointer; white-space: nowrap; text-decoration: none;
}
.btn:hover { border-color: var(--ink-3); text-decoration: none; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.quiet { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn.quiet:hover { background: var(--surface-2); color: var(--ink); }
.btn.danger { color: var(--risk); }
.btn.small { height: 28px; padding: 0 10px; font-size: var(--t-s); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn .cost { font-weight: 500; color: var(--ink-3); font-size: var(--t-xs); }
.btn.primary .cost { color: inherit; opacity: .75; }
.spin { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: gira .7s linear infinite; display: inline-block; }
@keyframes gira { to { transform: rotate(360deg); } }

.field { display: grid; gap: 4px; }
.field > span { font-size: var(--t-xs); color: var(--ink-3); font-weight: 550; }
.input, .select, .textarea {
  height: 34px; width: 100%; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--r-ctl);
  background: var(--surface); color: var(--ink);
}
.textarea { height: auto; padding: 8px 10px; resize: vertical; line-height: 1.5; }
.select { padding-right: 28px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23758690' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--ink-3); }
.input::placeholder, .textarea::placeholder { color: var(--ink-3); }

.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.seg button {
  height: 30px; padding: 0 11px; border: 1px solid var(--line); background: var(--surface); border-radius: 999px;
  color: var(--ink-2); font-weight: 550; cursor: pointer; display: inline-flex; gap: 6px; align-items: center;
}
.seg button b { font-weight: 650; color: var(--ink-3); }
.seg button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.seg button[aria-pressed="true"] b { color: inherit; opacity: .7; }

.chip { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: var(--t-xs); font-weight: 600; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.chip.signal { background: var(--signal-soft); color: var(--signal); }
.chip.risk { background: var(--risk-soft); color: var(--risk); }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.accent { background: var(--accent-soft); color: var(--accent); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; background: var(--grade-c); }
.dot.signal { background: var(--signal-dot); }
.dot.risk { background: var(--risk); }
.dot.ok { background: var(--ok); }
.dot.accent { background: var(--accent); }

/* Nota de potencial: A relleno, B contorno, C gris. Es la marca visual de la herramienta. */
.grade { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; font-weight: 750; font-size: var(--t-s); border: 1.5px solid var(--accent); color: var(--accent); background: transparent; }
.grade.A { background: var(--accent); color: var(--accent-ink); }
.grade.C { border-color: var(--grade-c); color: var(--ink-3); }
.grade.lg { width: 52px; height: 52px; font-size: 28px; border-radius: 10px; border-width: 2px; }

.meter { position: relative; height: 6px; border-radius: 3px; background: var(--line-2); overflow: hidden; }
.meter i { position: absolute; inset: 0 auto 0 0; border-radius: 3px; background: var(--accent); }
.meter.sm { height: 4px; }

.empty { padding: 36px 18px; text-align: center; color: var(--ink-3); }
.empty h3 { color: var(--ink); font-size: var(--t-l); margin-bottom: 6px; }
.empty .btn { margin-top: 14px; }

/* ───────────── tabla de cartera ───────────── */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar .grow { flex: 1; }
.toolbar .input { width: 240px; }
.toolbar .select { width: auto; }
.table-wrap { overflow: visible; }
@media (max-width: 1100px) { .table-wrap { overflow-x: auto; } .grid th { position: static; } }
table.grid { width: 100%; border-collapse: separate; border-spacing: 0; }
.grid th { position: sticky; top: 56px; z-index: 2; background: var(--surface); text-align: left; font-size: var(--t-xs); font-weight: 600; color: var(--ink-3); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; cursor: pointer; user-select: none; }
.grid th[aria-sort] { color: var(--ink); }
.grid th .arrow { display: inline-block; width: 10px; }
.grid td { padding: 10px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.grid tbody tr { cursor: pointer; }
.grid tbody tr:hover td { background: var(--surface-2); }
.grid tbody tr[aria-selected="true"] td { background: var(--accent-soft); }
.grid td.chk, .grid th.chk { width: 36px; padding-right: 0; cursor: default; }
.grid .name { font-weight: 650; color: var(--ink); }
.grid .name-sub { font-size: var(--t-xs); color: var(--ink-3); margin-top: 1px; }
.fitcell { display: grid; grid-template-columns: 26px 64px; align-items: center; gap: 8px; }
.fitcell b { font-weight: 700; text-align: right; }
.grid td.overdue { color: var(--risk); font-weight: 600; }
.selbar { position: sticky; bottom: 16px; z-index: 5; margin: 14px auto 0; width: fit-content; display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 16px; background: var(--ink); color: var(--surface); border-radius: 10px; box-shadow: var(--shadow-pop); }
.selbar .btn { background: transparent; color: var(--surface); border-color: rgba(255,255,255,.25); }
.selbar .btn:hover { border-color: rgba(255,255,255,.6); }
.selbar .btn.primary { background: var(--surface); color: var(--ink); border-color: var(--surface); }

/* ───────────── hoy ───────────── */
.today { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.today .stack { display: grid; gap: 20px; }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; padding: 12px 18px; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.rows li:last-child { border-bottom: 0; }
.rows li:hover { background: var(--surface-2); }
.rows .r-title { font-weight: 650; display: flex; align-items: center; gap: 8px; min-width: 0; }
.rows .r-title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rows .r-meta { grid-column: 1; color: var(--ink-2); font-size: var(--t-s); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.rows .r-side { grid-row: 1 / span 2; grid-column: 2; display: flex; align-items: center; gap: 10px; color: var(--ink-3); font-size: var(--t-s); }
.mini-matrix { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line-2); border-radius: 8px; overflow: hidden; }
.mini-matrix a { background: var(--surface); padding: 14px; color: var(--ink); display: grid; gap: 2px; }
.mini-matrix a:hover { background: var(--surface-2); text-decoration: none; }
.mini-matrix b { font-size: var(--t-2xl); font-weight: 700; line-height: 1.1; }
.mini-matrix span { font-size: var(--t-s); color: var(--ink-2); }
.mini-matrix a.q-prioridad b { color: var(--accent); }
.axis-note { display: flex; justify-content: space-between; font-size: var(--t-xs); color: var(--ink-3); margin-top: 8px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: var(--t-s); }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; text-align: right; font-weight: 600; }

/* ───────────── mapa (matriz encaje × potencial) ───────────── */
.map-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.map { position: relative; }
.map svg { display: block; width: 100%; height: auto; }
.map .q-label { font: 650 13px var(--f); fill: var(--ink-2); }
.map .q-count { font: 400 12px var(--f); fill: var(--ink-3); }
.map .tick { font: 400 11px var(--f); fill: var(--ink-3); }
.map .axis-title { font: 600 12px var(--f); fill: var(--ink-2); }
.map circle.pt { cursor: pointer; stroke: var(--surface); stroke-width: 1.5; transition: r .12s; }
.map circle.pt:hover, .map circle.pt.hl { r: 9; }
.tip { position: absolute; pointer-events: none; z-index: 10; background: var(--ink); color: var(--surface); padding: 8px 10px; border-radius: 8px; font-size: var(--t-s); box-shadow: var(--shadow-pop); white-space: nowrap; transform: translate(-50%, calc(-100% - 12px)); }
.tip b { display: block; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: var(--t-s); color: var(--ink-2); }
.legend span { display: inline-flex; gap: 6px; align-items: center; }
.qlist h3 { font-size: var(--t-m); margin-bottom: 4px; }
.qlist p { font-size: var(--t-s); color: var(--ink-2); }
.qlist section { padding: 14px 16px; border-bottom: 1px solid var(--line-2); }
.qlist section:last-child { border-bottom: 0; }

/* ───────────── ficha de cuenta ───────────── */
.acct-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: start; margin-bottom: 22px; }
.acct-head h1 { font-size: var(--t-3xl); font-weight: 700; letter-spacing: -0.025em; line-height: 1.15; }
.acct-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 8px; color: var(--ink-2); font-size: var(--t-s); }
.acct-meta .select { height: 28px; width: auto; font-size: var(--t-s); }
.back { display: inline-flex; gap: 6px; align-items: center; color: var(--ink-3); font-size: var(--t-s); margin-bottom: 8px; }
.scores { display: flex; align-items: stretch; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); }
.score { padding: 12px 18px; display: grid; gap: 2px; min-width: 150px; }
.score + .score { border-left: 1px solid var(--line-2); }
.score .lbl { font-size: var(--t-xs); color: var(--ink-3); font-weight: 600; }
.score .big { display: flex; align-items: baseline; gap: 4px; }
.score .big b { font-size: var(--t-num); font-weight: 300; line-height: 1; letter-spacing: -0.04em; }
.score .big small { color: var(--ink-3); font-size: var(--t-m); }
.score .tier { font-size: var(--t-s); font-weight: 650; }
.score.q { max-width: 260px; }
.score.q .qname { font-size: var(--t-xl); font-weight: 700; color: var(--accent); }
.score.q p { font-size: var(--t-s); color: var(--ink-2); }
.acct { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
.acct-main { display: grid; gap: 20px; min-width: 0; }
.rail { position: sticky; top: 76px; display: grid; gap: 16px; max-height: calc(100vh - 92px); overflow: auto; padding-bottom: 8px; }

.why { display: grid; gap: 14px; }
.why .summary { font-size: var(--t-l); line-height: 1.55; max-width: 72ch; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.timeline li { display: grid; grid-template-columns: 92px 14px minmax(0, 1fr); gap: 12px; padding: 8px 0; }
.timeline .when { color: var(--ink-3); font-size: var(--t-s); text-align: right; padding-top: 1px; }
.timeline .rail-dot { position: relative; }
.timeline .rail-dot::before { content: ""; position: absolute; left: 6px; top: -8px; bottom: -8px; width: 1px; background: var(--line); }
.timeline li:first-child .rail-dot::before { top: 8px; }
.timeline li:last-child .rail-dot::before { bottom: calc(100% - 8px); }
.timeline .rail-dot i { position: absolute; left: 2px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--grade-c); border: 2px solid var(--surface); }
.timeline .rail-dot i.signal { background: var(--signal-dot); }
.timeline .rail-dot i.risk { background: var(--risk); }
.timeline .rail-dot i.accent { background: var(--accent); }
.timeline .what { font-size: var(--t-m); }
.timeline .what small { display: flex; gap: 8px; align-items: center; color: var(--ink-3); font-size: var(--t-xs); margin-top: 2px; }
.registers { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); border-top: 1px solid var(--line-2); overflow: hidden; border-radius: 0 0 var(--r-panel) var(--r-panel); }
.reg { background: var(--surface); box-shadow: 1px 0 0 var(--line-2), 0 1px 0 var(--line-2); padding: 12px 18px; display: grid; gap: 3px; align-content: start; }
.reg h4 { font-size: var(--t-s); display: flex; align-items: center; gap: 6px; }
.reg p { font-size: var(--t-s); color: var(--ink-2); }
.reg .nodata { color: var(--ink-3); font-size: var(--t-s); }
.reg .big { font-size: var(--t-xl); font-weight: 700; }

.pitch { display: grid; gap: 16px; }
.pitch h3 { font-size: var(--t-s); color: var(--ink-3); font-weight: 600; margin-bottom: 4px; }
.pitch p, .pitch li { max-width: 76ch; }
.pitch ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.pitch .opening { font-size: var(--t-l); border-left: 3px solid var(--accent); padding-left: 14px; }
.objection { display: grid; gap: 2px; }
.objection q { font-weight: 600; quotes: "«" "»"; }

.committee { list-style: none; margin: 0; padding: 0; }
.committee li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 18px; border-bottom: 1px solid var(--line-2); align-items: start; }
.committee li:last-child { border-bottom: 0; }
.committee .n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font-size: var(--t-xs); font-weight: 700; color: var(--ink-2); }
.committee li.entry .n { background: var(--accent); color: var(--accent-ink); }
.committee .role { font-weight: 650; }
.committee .person { color: var(--ink-2); font-size: var(--t-s); margin-top: 2px; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.committee .entry-tag { color: var(--accent); font-size: var(--t-xs); font-weight: 650; }
.notes { margin: 0; padding: 12px 18px; display: grid; gap: 6px; font-size: var(--t-s); color: var(--ink-2); list-style: none; border-top: 1px solid var(--line-2); }

.log { list-style: none; margin: 0; padding: 0; }
.log li { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; padding: 9px 18px; border-bottom: 1px solid var(--line-2); font-size: var(--t-s); }
.log li .when { color: var(--ink-3); }
.log li .who { color: var(--ink-3); font-size: var(--t-xs); }
.addnote { display: flex; gap: 8px; padding: 12px 18px; }
.outcome { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line-2); }

/* Columna de cualificación */
.q-form { display: grid; }
.q-row { display: grid; grid-template-columns: minmax(0, 1fr) 34px; gap: 4px 10px; align-items: end; padding: 9px 16px; border-bottom: 1px solid var(--line-2); }
.q-row .field > span { display: flex; gap: 6px; align-items: center; }
.q-row .pts { font-size: var(--t-xs); font-weight: 700; color: var(--ink-3); text-align: right; padding-bottom: 8px; }
.q-row .pts.full { color: var(--accent); }
.q-row .src { font-weight: 600; color: var(--accent); font-size: 11px; }
.q-row.missing .select { border-color: var(--signal-dot); }
.q-group { padding: 10px 16px 6px; font-size: var(--t-xs); font-weight: 650; color: var(--ink-2); background: var(--surface-2); border-bottom: 1px solid var(--line-2); display: flex; justify-content: space-between; }
.q-group b { color: var(--ink); }
.q-actions { display: flex; gap: 8px; padding: 12px 16px; flex-wrap: wrap; }
.q-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.breakdown { display: grid; gap: 8px; padding: 14px 16px; }
.breakdown .b-row { display: grid; grid-template-columns: minmax(0, 1fr) 90px 40px; gap: 10px; align-items: center; font-size: var(--t-s); }
.breakdown .b-row span:last-child { text-align: right; color: var(--ink-3); font-size: var(--t-xs); }
.conf { display: flex; gap: 8px; align-items: center; font-size: var(--t-xs); color: var(--ink-3); padding: 0 16px 14px; }
.gap-hint { font-size: var(--t-s); color: var(--ink-2); padding: 0 16px 12px; }

.callout { display: flex; gap: 10px; padding: 10px 14px; border-radius: 8px; background: var(--surface-2); font-size: var(--t-s); color: var(--ink-2); }
.callout.signal { background: var(--signal-soft); color: var(--ink); }
.callout.risk { background: var(--risk-soft); color: var(--ink); }
.callout .btn { margin-left: auto; }

/* ───────────── superposiciones ───────────── */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(9, 20, 25, .38); display: flex; align-items: flex-start; justify-content: center; padding-top: 12vh; }
.overlay.side { justify-content: flex-end; padding: 0; align-items: stretch; }
.dialog { width: min(620px, calc(100vw - 32px)); background: var(--surface); border-radius: 12px; box-shadow: var(--shadow-pop); overflow: hidden; display: flex; flex-direction: column; max-height: 76vh; }
.dialog.sm { width: min(440px, calc(100vw - 32px)); }
.dialog-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line-2); }
.dialog-head h2 { font-size: var(--t-l); }
.dialog-head .btn { margin-left: auto; }
.dialog-body { padding: 18px 20px; overflow: auto; display: grid; gap: 14px; }
.dialog-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line-2); background: var(--surface-2); }
.drawer { width: min(560px, 100vw); height: 100%; background: var(--surface); box-shadow: var(--shadow-pop); overflow: auto; }
.drawer .dialog-body { max-height: none; }
.drawer article { display: grid; gap: 10px; }
.drawer article h3 { margin-top: 10px; font-size: var(--t-m); }
.drawer article p, .drawer article li { color: var(--ink-2); font-size: var(--t-s); }
.drawer table { width: 100%; border-collapse: collapse; font-size: var(--t-s); }
.drawer td, .drawer th { text-align: left; padding: 5px 0; border-bottom: 1px solid var(--line-2); }
.drawer td:last-child, .drawer th:last-child { text-align: right; }

.palette { width: min(640px, calc(100vw - 32px)); background: var(--surface); border-radius: 12px; box-shadow: var(--shadow-pop); overflow: hidden; }
.palette input { width: 100%; height: 54px; border: 0; border-bottom: 1px solid var(--line-2); padding: 0 20px; font-size: var(--t-l); background: transparent; outline: none; }
.palette ul { list-style: none; margin: 0; padding: 6px; max-height: 52vh; overflow: auto; }
.palette li { display: flex; align-items: center; gap: 12px; padding: 9px 14px; border-radius: 8px; cursor: pointer; }
.palette li[aria-selected="true"] { background: var(--accent-soft); }
.palette li .t { font-weight: 600; }
.palette li .s { color: var(--ink-3); font-size: var(--t-s); margin-left: auto; white-space: nowrap; }
.palette .group { padding: 10px 14px 4px; font-size: var(--t-xs); color: var(--ink-3); font-weight: 600; }

.menu { position: absolute; z-index: 60; min-width: 220px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-pop); padding: 6px; }
.menu button, .menu a, .menu label { display: flex; width: 100%; align-items: center; gap: 10px; padding: 8px 10px; border: 0; background: none; border-radius: 6px; text-align: left; cursor: pointer; color: var(--ink); font-size: var(--t-s); }
.menu button:hover, .menu a:hover, .menu label:hover { background: var(--surface-2); text-decoration: none; }
.menu hr { border: 0; border-top: 1px solid var(--line-2); margin: 6px 0; }
.menu .sub { padding: 6px 10px 2px; font-size: var(--t-xs); color: var(--ink-3); font-weight: 600; }

.toast { position: fixed; z-index: 80; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--surface); padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow-pop); display: flex; gap: 12px; align-items: center; font-size: var(--t-s); max-width: calc(100vw - 32px); }
.toast button { background: none; border: 0; color: var(--surface); font-weight: 700; cursor: pointer; text-decoration: underline; }
.toast.err { background: var(--risk); }

/* ───────────── acceso ───────────── */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(380px, 0.9fr); }
.login-art { background: #0B3238; color: #E4F1F2; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; position: relative; }
.login-art h1 { font-size: 40px; font-weight: 300; letter-spacing: -0.03em; line-height: 1.1; max-width: 13ch; }
.login-art p { color: #9CC3C8; max-width: 42ch; margin-top: 14px; }
.login-art svg.field-art { position: absolute; right: -30px; top: 70px; width: 64%; opacity: .9; }
.login-art > div { position: relative; z-index: 1; }
.login-form { display: grid; place-items: center; padding: 32px; background: var(--surface); }
.login-form form { width: min(360px, 100%); display: grid; gap: 14px; }
.login-form h2 { font-size: var(--t-2xl); margin-bottom: 6px; }
.form-err { color: var(--risk); font-size: var(--t-s); min-height: 1.5em; }

/* ───────────── informes y ajustes ───────────── */
.settings { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; align-items: start; }
.settings > div { min-width: 0; grid-template-columns: minmax(0, 1fr); }
.settings nav { position: sticky; top: 76px; display: grid; gap: 2px; }
.settings nav a { padding: 7px 10px; border-radius: 6px; color: var(--ink-2); font-weight: 550; }
.settings nav a[aria-current="true"] { background: var(--surface); color: var(--ink); text-decoration: none; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; cursor: pointer; }
.check input { margin-top: 3px; accent-color: var(--accent); }
.check small { display: block; color: var(--ink-3); }
.src-list { display: grid; }
.src-list .check { padding: 12px 18px; border-bottom: 1px solid var(--line-2); }
.usage { display: flex; gap: 28px; flex-wrap: wrap; align-items: flex-end; }
.usage b { font-size: var(--t-2xl); font-weight: 700; display: block; line-height: 1.1; }
.usage span { color: var(--ink-3); font-size: var(--t-s); }
.users td, .users th { padding: 10px 18px; border-bottom: 1px solid var(--line-2); text-align: left; font-size: var(--t-s); }
.users th { color: var(--ink-3); font-weight: 600; font-size: var(--t-xs); }
.users { width: 100%; border-collapse: collapse; }
.secret { font: 700 var(--t-l) var(--f); letter-spacing: .04em; padding: 10px 14px; background: var(--surface-2); border-radius: 8px; user-select: all; }
.job { display: grid; gap: 6px; padding: 12px 18px; border-bottom: 1px solid var(--line-2); font-size: var(--t-s); }
.job:last-child { border-bottom: 0; }

/* ───────────── adaptación ───────────── */
@media (max-width: 1180px) {
  .acct, .today, .map-wrap { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; max-height: none; }
  .search-btn { width: 200px; }
}
@media (max-width: 820px) {
  .top { height: auto; flex-wrap: wrap; gap: 0 12px; padding: 8px 16px 0; }
  .top .brand { height: 40px; }
  .nav { order: 3; width: calc(100% + 32px); margin: 0 -16px; padding: 0 8px; height: 42px; overflow-x: auto; border-top: 1px solid var(--line-2); }
  .nav a { white-space: nowrap; }
  .grid th { top: 0; }
  .rail { top: 0; }
  .acct-meta .select { max-width: 100%; }
  .timeline li { grid-template-columns: 64px 14px minmax(0, 1fr); }
  .outcome, .q-two { grid-template-columns: minmax(0, 1fr); }
  .brand span, .search-btn kbd, .search-btn .lbl { display: none; }
  .search-btn { width: 40px; padding: 0; justify-content: center; }
  main { padding: 20px 16px 48px; }
  .acct-head { grid-template-columns: minmax(0, 1fr); }
  .scores { flex-wrap: wrap; }
  .login { grid-template-columns: minmax(0, 1fr); }
  .login-art { display: none; }
  .settings { grid-template-columns: minmax(0, 1fr); }
  .settings nav { position: static; display: flex; flex-wrap: wrap; }
  .toolbar .input { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
@media print {
  .top, .rail, .btn, .selbar { display: none !important; }
  .acct { grid-template-columns: 1fr; }
  body { background: #fff; }
}
