/* Mesa de revisión: barra de pestañas arriba, índice de temas a la izquierda, tarjetas de hallazgo a la derecha */
:root {
  --bg: #f5f6f8; --panel: #ffffff; --fg: #1b2330; --muted: #5b6676; --line: #dde1e8; --soft: #eef1f5;
  --accent: #1d5c8f; --accent-fg: #ffffff; --accent-soft: #e3eef7;
  --ok: #1f7a4d; --ok-soft: #e2f3ea; --warn: #9a6200; --warn-soft: #fbf0d9; --bad: #b3362d; --bad-soft: #fbe5e2;
  --info: #5a4bb0; --info-soft: #ece9fa; --neutral-soft: #eceff3;
  --sans: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif; --mono: "IBM Plex Mono", Consolas, monospace;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #12161c; --panel: #1a2029; --fg: #e4e8ee; --muted: #9aa5b4; --line: #2c3440; --soft: #222a35;
  --accent: #6aa7dc; --accent-fg: #0d1520; --accent-soft: #1d3248;
  --ok: #5cc28d; --ok-soft: #173326; --warn: #e0a84a; --warn-soft: #3a2c12; --bad: #ee7b70; --bad-soft: #3d1c19;
  --info: #a99cf0; --info-soft: #2a2550; --neutral-soft: #262d38; color-scheme: dark } }
:root[data-theme="dark"] {
  --bg: #12161c; --panel: #1a2029; --fg: #e4e8ee; --muted: #9aa5b4; --line: #2c3440; --soft: #222a35;
  --accent: #6aa7dc; --accent-fg: #0d1520; --accent-soft: #1d3248;
  --ok: #5cc28d; --ok-soft: #173326; --warn: #e0a84a; --warn-soft: #3a2c12; --bad: #ee7b70; --bad-soft: #3d1c19;
  --info: #a99cf0; --info-soft: #2a2550; --neutral-soft: #262d38; color-scheme: dark }
* { box-sizing: border-box }
body { background: var(--bg); color: var(--fg); font-family: var(--sans); font-size: 14px; line-height: 1.45 }
code { font-family: var(--mono); font-size: .86em; background: var(--soft); padding: 0 .3em; border-radius: 3px; overflow-wrap: anywhere }
button, input, select { font: inherit; color: inherit }
button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px }
.wrap { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); max-width: 1320px; margin: 0 auto }

header.top { background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5 }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--panel) }
.top .wrap { padding-block: 12px 0 }
.titlerow { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px }
h1 { font-size: 20px; margin: 0; letter-spacing: -.01em; text-wrap: balance }
.sub { color: var(--muted); font-size: 13px }
.progress { margin-left: auto; display: flex; gap: 14px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums }
.progress b { color: var(--fg) }
nav.tabs { display: flex; gap: 2px; overflow-x: auto; margin-top: 10px }
nav.tabs button { border: 0; background: none; padding: 9px 14px; border-bottom: 3px solid transparent; cursor: pointer; color: var(--muted); font-weight: 500; white-space: nowrap }
nav.tabs button[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--accent) }
nav.tabs .n { font-family: var(--mono); font-size: 12px; margin-left: 6px; color: var(--muted) }

main .wrap { padding-block: 18px 60px }
.status { padding: 8px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 14px; background: var(--warn-soft); color: var(--warn) }
.status.ok { background: var(--ok-soft); color: var(--ok) }

/* Resumen */
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 16px 18px; min-width: 0 }
.panel h2 { font-size: 15px; margin: 0 0 10px }
.panel p { margin: 6px 0; max-width: 70ch }
table.sum { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums }
table.sum td, table.sum th { padding: 6px 4px; border-bottom: 1px solid var(--line); text-align: left }
table.sum td.num, table.sum th.num { text-align: right }
table.sum tr.go { cursor: pointer }
table.sum tr.go:hover td { background: var(--soft) }
ol.layers { margin: 4px 0 0; padding-left: 20px; display: grid; gap: 8px }

/* Pills */
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; padding: 1px 8px; border-radius: 999px; white-space: nowrap; letter-spacing: .01em }
.g-decidir { background: var(--warn-soft); color: var(--warn) }
.g-replicado { background: var(--info-soft); color: var(--info) }
.g-corregido { background: var(--ok-soft); color: var(--ok) }
.g-politica { background: var(--bad-soft); color: var(--bad) }
.g-otro { background: var(--neutral-soft); color: var(--muted) }

/* Módulo */
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px }
.chip { border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 4px 12px; cursor: pointer; font-size: 13px; font-variant-numeric: tabular-nums }
.chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-fg); border-color: var(--accent) }
.search { flex: 1 1 220px; min-width: 0; max-width: 360px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel) }
.layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 18px; align-items: start }
@media (max-width: 860px) { .layout { grid-template-columns: minmax(0, 1fr) } aside.secs { max-height: 260px } }
aside.secs { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; overflow: auto; max-height: calc(100vh - 190px); position: sticky; top: 150px }
aside.secs button.sec { display: flex; width: 100%; gap: 8px; justify-content: space-between; text-align: left; border: 0; border-bottom: 1px solid var(--line); background: none; padding: 8px 12px; cursor: pointer; font-size: 13px }
aside.secs button.sec:hover { background: var(--soft) }
aside.secs button.sec[aria-current="true"] { background: var(--accent-soft); font-weight: 600 }
aside.secs .cnt { font-family: var(--mono); font-size: 12px; color: var(--muted); flex: none }
.secbar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-bottom: 12px }
.secbar h2 { font-size: 16px; margin: 0; flex: 1 1 260px; min-width: 0; overflow-wrap: anywhere }
.btn { border: 1px solid var(--line); background: var(--panel); border-radius: 6px; padding: 5px 12px; cursor: pointer; font-size: 13px; font-weight: 500 }
.btn.primary { background: var(--accent); color: var(--accent-fg); border-color: var(--accent) }
.btn:disabled { opacity: .5; cursor: default }
.blocknote { font-size: 12.5px; color: var(--ok); }

.cards { display: grid; gap: 10px }
article.card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; display: grid; gap: 8px; min-width: 0 }
article.card.decided { border-color: var(--accent) }
.chead { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center }
.hlid { font-family: var(--mono); font-weight: 600; font-size: 13.5px }
.apl { font-family: var(--mono); font-size: 12px; color: var(--muted); overflow-wrap: anywhere }
.pair { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 2px 10px; font-size: 13.5px }
.pair dt { color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; padding-top: 2px }
.pair dd { margin: 0; overflow-wrap: anywhere }
details > summary { cursor: pointer; color: var(--accent); font-size: 12.5px; list-style: none }
details > summary::-webkit-details-marker { display: none }
details[open] > summary { margin-bottom: 6px }
.decide { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; border-top: 1px dashed var(--line); padding-top: 8px }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; flex-wrap: wrap }
.seg button { border: 0; border-right: 1px solid var(--line); background: var(--panel); padding: 4px 11px; cursor: pointer; font-size: 12.5px; font-weight: 500 }
.seg button:last-child { border-right: 0 }
.seg button[aria-pressed="true"].d-ok { background: var(--ok); color: var(--panel) }
.seg button[aria-pressed="true"].d-bad { background: var(--bad); color: var(--panel) }
.seg button[aria-pressed="true"].d-info { background: var(--info); color: var(--panel) }
.seg button[aria-pressed="true"].d-warn { background: var(--warn); color: var(--panel) }
.ctitle { font-weight: 600; font-size: 15px; text-wrap: balance }
.rec { font-size: 13px; background: var(--ok-soft); color: var(--fg); border-radius: 6px; padding: 6px 10px }
.rec b { color: var(--ok) }
.opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 6px; border-top: 1px dashed var(--line); padding-top: 8px }
.opt { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; text-align: left; border: 1px solid var(--line); background: var(--panel); border-radius: 6px; padding: 8px 10px; cursor: pointer; font-size: 13px }
.opt:hover { border-color: var(--accent) }
.opt.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent) }
.opt .ok { font-family: var(--mono); font-weight: 600; color: var(--accent) }
.opt .ef { color: var(--muted); font-size: 12.5px }
.hint { font-size: 12px; color: var(--muted) }
ul.lineas { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 13.5px; max-width: 110ch }
ul.lineas li { overflow-wrap: anywhere }
.nota { flex: 1 1 200px; min-width: 0; padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); font-size: 13px }
.who { font-size: 12px; color: var(--muted) }
.more { text-align: center; padding: 8px }
.empty { color: var(--muted); padding: 30px; text-align: center; background: var(--panel); border: 1px dashed var(--line); border-radius: 8px }

/* Decisiones */
.declist { display: grid; gap: 6px }
.decrow { display: grid; grid-template-columns: 52px 110px 120px minmax(0, 1fr); gap: 10px; align-items: baseline; padding: 6px 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; font-size: 13px }
@media (max-width: 640px) { .decrow { grid-template-columns: 1fr 1fr } }
.decrow .t { overflow-wrap: anywhere; min-width: 0 }
@media (prefers-reduced-motion: reduce) { * { transition: none !important } }

/* ---- Infofin.Dev.Hallazgos: sesión, administración y cuenta ---- */
.who-am-i { display: flex; gap: 10px; align-items: center; font-size: 13px; color: var(--muted) }
.who-am-i b { color: var(--fg) }
.reunion { font-size: 12.5px; padding: 2px 10px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); font-weight: 600 }
.login { max-width: 380px; margin: 10vh auto 0; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 24px 26px }
.login h1 { margin-bottom: 4px }
.form { display: grid; gap: 12px }
.campo { display: grid; gap: 4px; min-width: 0 }
.campo label, .campo .lbl { font-size: 12.5px; font-weight: 600; color: var(--muted) }
.campo input, .campo select { padding: 7px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); min-width: 0 }
.fila { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: end }
.fila .campo { flex: 1 1 160px }
.checks { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px }
.checks label { display: inline-flex; gap: 5px; align-items: center; font-weight: 400; color: var(--fg) }
.error { color: var(--bad); font-size: 13px; min-height: 1.2em }
.aviso { background: var(--warn-soft); color: var(--warn); border-radius: 6px; padding: 8px 12px; font-size: 13px }
.secreto { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; background: var(--ok-soft); border-radius: 6px; padding: 10px 12px }
.secreto code { font-size: 13px; padding: 4px 8px; background: var(--panel) }
.tabla-wrap { overflow-x: auto }
table.datos { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums }
table.datos th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600 }
table.datos td, table.datos th { padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top }
table.datos td.num { text-align: right }
table.datos tr.inactivo td { color: var(--muted) }
.acciones { display: flex; gap: 6px; flex-wrap: wrap }
a.btn { display: inline-block; text-decoration: none; color: inherit; white-space: nowrap }
.btn.peligro { color: var(--bad); border-color: var(--bad) }
.stack { display: grid; gap: 16px }
