/* Laboratorio de tesis: mismos colores que Inversión (dashboard/static/styles.css). */
:root {
  --bg: #f4f1ec; --surface: #fff; --surface-2: #faf8f5; --text: #15202e; --muted: #5c6776;
  --border: #e7e1d8; --navy: #0f1b2d; --copper: #b06a3b; --copper-soft: #f6e8dd;
  --accent: #2e6b5c; --accent-soft: #e2f0eb; --notice-bg: #fff7e8; --notice-border: #eed9ae;
  --danger: #9b3b2f; --radius: 14px; color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b121c; --surface: #121b27; --surface-2: #162131; --text: #e8ebf0; --muted: #9aa5b3;
    --border: #243244; --navy: #0a1422; --copper: #d9955f; --copper-soft: #33241a;
    --accent: #6cc2a6; --accent-soft: #19362e; --notice-bg: #2a2416; --notice-border: #4a3d1c;
    --danger: #e08a7c; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--copper); text-decoration: none; }
.top { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: var(--navy); }
.top .brand { color: #fff; font-weight: 600; }
.top button.link { color: #cfd6df; }
.page { max-width: 1040px; margin: 0 auto; padding: 16px; }
.card, details.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; margin: 0 0 16px; }
.card.narrow { max-width: 380px; margin: 40px auto; }
details.card > summary { cursor: pointer; font-weight: 600; }
details.card[open] > summary { margin-bottom: 10px; }
.decision { border-color: var(--copper); }
h1 { font-size: 1.45rem; margin: 0 0 4px; } h2 { font-size: 1.15rem; margin: 0 0 12px; } h3 { font-size: 1rem; margin: 18px 0 8px; }
.muted { color: var(--muted); }
small { font-size: .82rem; }
.hero { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: flex-start; margin-bottom: 12px; }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
input, select, textarea { font: inherit; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 9px 11px; width: 100%; }
textarea.mono { font: 13px/1.4 ui-monospace, Menlo, monospace; }
input.short { max-width: 130px; } input.tiny { max-width: 80px; }
label { display: flex; flex-direction: column; gap: 4px; font-size: .9rem; color: var(--muted); }
button { font: inherit; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); border-radius: 10px; padding: 9px 14px; cursor: pointer; }
button.primary { background: var(--copper); border-color: var(--copper); color: #fff; font-weight: 600; }
button.link { background: none; border: 0; padding: 4px; color: var(--copper); }
.row { display: flex; gap: 8px; align-items: center; } .row input { flex: 1; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.grid2, .grid3 { display: grid; gap: 12px; margin-top: 14px; }
.grid2 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid3 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); align-items: end; }
.end { display: flex; align-items: flex-end; }
form.inline { display: inline; }
table.list { width: 100%; border-collapse: collapse; font-size: .93rem; }
table.list th, table.list td { padding: 7px 8px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
table.list th { color: var(--muted); font-weight: 500; font-size: .82rem; }
table.list .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.list tr.total td { font-weight: 600; background: var(--surface-2); }
table.list tr.section td { font-weight: 600; color: var(--copper); padding-top: 14px; }
table.compact td, table.compact th { padding: 4px 6px; font-size: .85rem; }
.scroll { overflow-x: auto; }
.results { list-style: none; padding: 0; margin: 8px 0; } .results li { padding: 6px 0; border-bottom: 1px solid var(--border); }
.results .row span { flex: 1; }
.tag { display: inline-block; font-size: .78rem; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); }
.tag.ok { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.success { background: var(--accent-soft); border: 1px solid var(--accent); padding: 10px 12px; border-radius: 10px; }
.notice { background: var(--notice-bg); border: 1px solid var(--notice-border); padding: 10px 12px; border-radius: 10px; }
.error { color: var(--danger); background: var(--notice-bg); border: 1px solid var(--danger); padding: 10px 12px; border-radius: 10px; }
.committee { background: var(--copper-soft); padding: 10px 12px; border-radius: 10px; margin: 12px 0; }
ol.steps { padding-left: 20px; } ol.steps li.hecho { color: var(--accent); } ol.steps li.ahora { font-weight: 600; } ol.steps li.pendiente { color: var(--muted); }
ul.docs { padding-left: 18px; }
@media (max-width: 640px) { .hero { flex-direction: column; } table.list { font-size: .85rem; } }
.followup { border-top: 1px solid var(--border); padding-top: 8px; margin-top: 8px; }

/* Escenarios: tres niveles de lectura (resumen, negocio/números, auditoría) */
.scn { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; margin: 16px 0; background: var(--surface-2); }
.scn-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.scn-head h3 { margin: 0; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin: 10px 0 12px; border-bottom: 1px solid var(--border); }
.tab { background: none; border: 0; border-bottom: 2px solid transparent; padding: 6px 10px; cursor: pointer; color: var(--muted); font: inherit; }
.tab.on { color: var(--text); border-bottom-color: var(--copper); font-weight: 600; }
.panel { display: none; }
.panel.on { display: block; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 10px; }
.kpis > div { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; }
.kpis .k { font-size: .78rem; color: var(--muted); }
.kpis strong { font-size: 1.25rem; }
.verdict.ok { color: var(--accent); } .verdict.warn { color: var(--copper); } .verdict.bad { color: var(--danger); }
.idea { background: var(--copper-soft); border-radius: 10px; padding: 8px 12px; margin: 10px 0; }
.idea p { margin: 4px 0 0; }
.check { font-size: .9rem; margin: 4px 0; } .check.bad { color: var(--danger); } .check.warn { color: var(--copper); }
.engine { border-left: 3px solid var(--copper); padding: 2px 0 2px 10px; margin: 10px 0; }
.engine p { margin: 4px 0; }
.chain { font-weight: 500; }
.chains { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.chain-box { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; }
.chain-box ol { margin: 6px 0 0; padding-left: 18px; }
.warn { color: var(--copper); }
details.inner { margin-top: 8px; }
