/* INMOR Capital · CRM — monocromo, Jost (display) + Inter (texto), fotografía en blanco y negro */
@font-face { font-family: "Jost"; src: url("../fonts/jost-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Jost"; src: url("../fonts/jost-latin-ext-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-latin-ext-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --ink: #0e0e0e; --ink-2: #1a1a1a; --paper: #ffffff; --stone: #f4f2ee; --stone-2: #e9e5de; --stone-3: #dcd6cc;
  --line: rgba(14, 14, 14, .12); --line-2: rgba(14, 14, 14, .22); --muted: #6b6b6b; --faint: #9a968f;
  --accent: #b8925e; --brand: #2e3a2e;
  --viz-1: #257248; --viz-2: #b07a2c; /* verde y oro INMOR para gráficas (validados para daltonismo) */ --ok: #3d5a3d; --warn: #8a6a2f; --bad: #8c3b33;
  --side: #0e0e0e; --side-ink: #f5f3ef; --side-muted: rgba(245, 243, 239, .55);
  --display: "Jost", "Futura", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  --body: "Inter", "Helvetica Neue", Arial, system-ui, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1); --r: 2px; --shadow: 0 1px 0 rgba(0,0,0,.02), 0 18px 40px -24px rgba(0,0,0,.25);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #f2efe9; --ink-2: #dedad2; --paper: #161616; --stone: #0f0f0f; --stone-2: #222120; --stone-3: #2e2d2b;
    --line: rgba(242, 239, 233, .1); --line-2: rgba(242, 239, 233, .2); --muted: #a29e96; --faint: #75716b;
    --side: #080808; --ok: #8fb08f; --warn: #d1ad6b; --bad: #d48a80; color-scheme: dark;
    --viz-1: #2c8552; --viz-2: #bf8636;
  }
}
:root[data-theme="dark"] {
  --ink: #f2efe9; --ink-2: #dedad2; --paper: #161616; --stone: #0f0f0f; --stone-2: #222120; --stone-3: #2e2d2b;
  --line: rgba(242, 239, 233, .1); --line-2: rgba(242, 239, 233, .2); --muted: #a29e96; --faint: #75716b;
  --side: #080808; --ok: #8fb08f; --warn: #d1ad6b; --bad: #d48a80; color-scheme: dark;
  --viz-1: #2c8552; --viz-2: #bf8636;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--stone); color: var(--ink); font: 400 14px/1.6 var(--body); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 300; letter-spacing: -.01em; line-height: 1.12; margin: 0; }
img { display: block; max-width: 100%; }
::selection { background: var(--ink); color: var(--paper); }
:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }
.bw { filter: none; }

/* ── Shell ───────────────────────────────────────────────────────────── */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; background: var(--side); color: var(--side-ink); display: flex; flex-direction: column; padding: 28px 0 20px; z-index: 30; }
.brand { display: flex; align-items: baseline; gap: 10px; padding: 0 28px 30px; }
.brand img.logo { height: 46px; width: auto; display: block; }
.brand b { font: 400 19px var(--display); letter-spacing: .34em; }
.brand span { font: 500 9px var(--body); letter-spacing: .3em; color: var(--side-muted); }
.nav { display: flex; flex-direction: column; gap: 1px; padding: 0 14px; flex: 1; overflow-y: auto; }
.nav .sec { font: 500 9.5px var(--body); letter-spacing: .22em; text-transform: uppercase; color: var(--side-muted); padding: 18px 14px 8px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 9px 14px; color: rgba(245,243,239,.78); font-size: 13.5px; border-radius: var(--r); transition: background .2s, color .2s; }
.nav a:hover { color: #fff; background: rgba(255,255,255,.05); }
.nav a.on { color: #fff; background: rgba(255,255,255,.08); }
.nav a.on::before { content: ""; width: 2px; height: 16px; background: var(--accent); margin-left: -14px; margin-right: 12px; }
.nav a .n { margin-left: auto; font-size: 11px; color: var(--side-muted); }
.ico { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.side-foot { padding: 16px 28px 0; border-top: 1px solid rgba(255,255,255,.08); margin: 0 0 0; font-size: 12px; color: var(--side-muted); display: flex; align-items: center; gap: 10px; }
.side-foot .who { flex: 1; min-width: 0; }
.side-foot .who b { display: block; color: var(--side-ink); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-foot button { background: none; border: 0; color: var(--side-muted); cursor: pointer; padding: 6px; }
.side-foot button:hover { color: #fff; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px; padding: 14px 40px; background: color-mix(in srgb, var(--stone) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.top .crumbs { font-size: 12px; color: var(--muted); letter-spacing: .04em; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .crumbs b { color: var(--ink); font-weight: 500; }
.search-btn { display: flex; align-items: center; gap: 10px; min-width: 280px; padding: 8px 12px; border: 1px solid var(--line); background: var(--paper); color: var(--muted); cursor: pointer; border-radius: var(--r); font-size: 13px; }
.search-btn kbd { margin-left: auto; font: 500 10.5px var(--body); border: 1px solid var(--line); padding: 1px 6px; border-radius: 3px; }
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--paper); cursor: pointer; border-radius: var(--r); }
.menu-btn { display: none; }
.view { padding: 36px 40px 80px; max-width: 1480px; width: 100%; animation: rise .5s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ── Encabezados ──────────────────────────────────────────────────────── */
.kicker { font: 500 10.5px var(--body); letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.kicker.gold { color: var(--accent); }
.page-head { display: flex; align-items: flex-end; gap: 24px; justify-content: space-between; margin-bottom: 32px; flex-wrap: wrap; }
.page-head h1 { font-size: clamp(30px, 3.2vw, 44px); margin-top: 10px; }
.page-head h1 em { font-style: normal; color: var(--muted); }
.page-head p { color: var(--muted); max-width: 620px; margin: 10px 0 0; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ── Botones y formularios ────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 11px 20px; border: 1px solid var(--ink); background: var(--ink); color: var(--paper); font: 500 11.5px var(--body); letter-spacing: .12em; text-transform: uppercase; cursor: pointer; border-radius: var(--r); transition: opacity .2s, transform .2s, background .2s; white-space: nowrap; }
.btn:hover { opacity: .88; }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn.ghost:hover { border-color: var(--ink); opacity: 1; }
.btn.sm { padding: 7px 12px; font-size: 10.5px; }
.btn.gold { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.danger { background: transparent; color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.link { color: var(--ink); border-bottom: 1px solid var(--line-2); cursor: pointer; background: none; border-top: 0; border-left: 0; border-right: 0; padding: 0; }
.link:hover { border-color: var(--ink); }

label.f { display: flex; flex-direction: column; gap: 6px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.in, label.f input, label.f select, label.f textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line-2); background: var(--paper); border-radius: var(--r); font-size: 14px; letter-spacing: 0; text-transform: none; color: var(--ink); transition: border-color .2s; }
.in:focus, label.f input:focus, label.f select:focus, label.f textarea:focus { outline: none; border-color: var(--ink); }
label.f textarea { min-height: 110px; resize: vertical; line-height: 1.6; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span2 { grid-column: span 2; } .span3 { grid-column: span 3; } .spanall { grid-column: 1 / -1; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 99px; font-size: 12px; cursor: pointer; user-select: none; background: var(--paper); transition: all .2s; text-transform: none; letter-spacing: 0; color: var(--ink); }
.chip.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; text-transform: none; letter-spacing: 0; color: var(--ink); }

/* ── Tarjetas, KPIs ───────────────────────────────────────────────────── */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 26px; }
.card.flush { padding: 0; }
.card-h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 20px; }
.card-h h3 { font-size: 21px; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); background: var(--paper); border-radius: var(--r); }
.kpi { padding: 24px 26px; border-left: 1px solid var(--line); min-width: 0; }
.kpi:first-child { border-left: 0; }
.kpi { position: relative; }
.kpi::before { content: ""; position: absolute; left: 26px; top: 0; width: 28px; height: 2px; background: var(--accent); }
.kpi .v { font: 300 clamp(26px, 2.4vw, 36px)/1.1 var(--display); letter-spacing: -.01em; margin: 10px 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .s { font-size: 12px; color: var(--muted); }
.cols { display: grid; gap: 24px; }
.c-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.c-1-1 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mt { margin-top: 24px; } .mt2 { margin-top: 40px; } .muted { color: var(--muted); } .small { font-size: 12px; } .right { text-align: right; } .nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }

/* ── Hero con foto B/N ────────────────────────────────────────────────── */
.hero { position: relative; overflow: hidden; border-radius: var(--r); min-height: 260px; display: flex; align-items: flex-end; color: #fff; margin-bottom: 28px; }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(.86); transform: scale(1.02); transition: transform 8s var(--ease); }
.hero:hover img { transform: scale(1.06); }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05) 20%, rgba(0,0,0,.72)); }
.hero .in-hero { position: relative; z-index: 1; padding: 34px 38px; width: 100%; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.hero h1 { font-size: clamp(30px, 3.6vw, 52px); }
.hero .kicker { color: rgba(255,255,255,.75); }
.hero .quote { max-width: 360px; font: 300 14px/1.6 var(--display); color: rgba(255,255,255,.82); letter-spacing: .02em; }

/* ── Tablas ───────────────────────────────────────────────────────────── */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font: 500 10.5px var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: 14px 16px; border-bottom: 1px solid var(--line-2); white-space: nowrap; background: var(--paper); position: sticky; top: 0; }
.tbl td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr.click { cursor: pointer; transition: background .15s; }
.tbl tr.click:hover td { background: color-mix(in srgb, var(--stone) 70%, var(--paper)); }
.tbl .r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl td.small { white-space: nowrap; }
.tbl td.wrap { white-space: normal; }
.sticky-prev { position: sticky; top: 84px; }
.tbl tfoot td { font-weight: 500; border-top: 1px solid var(--ink); border-bottom: 0; }
.who-cell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.who-cell b { font-weight: 500; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-cell small { color: var(--muted); font-size: 12px; }
.av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--stone-2); font: 500 12px var(--display); letter-spacing: .05em; flex: none; color: var(--ink); }
.av.lg { width: 64px; height: 64px; font-size: 20px; }

/* ── Estados ──────────────────────────────────────────────────────────── */
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; font: 500 10.5px var(--body); letter-spacing: .08em; text-transform: uppercase; border: 1px solid var(--line-2); border-radius: 99px; white-space: nowrap; color: var(--ink-2); }
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }
.tag.ok::before { background: var(--ok); } .tag.warn::before { background: var(--warn); } .tag.bad::before { background: var(--bad); } .tag.ink::before { background: var(--ink); } .tag.gold::before { background: var(--accent); }
.tag.plain::before { display: none; }
.score { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-variant-numeric: tabular-nums; }
.score i { display: block; width: 36px; height: 3px; background: var(--stone-2); position: relative; }
.score i::after { content: ""; position: absolute; inset: 0; width: var(--w); background: var(--ink); }

/* ── Progreso / contador ──────────────────────────────────────────────── */
.bar { height: 4px; background: var(--stone-2); position: relative; overflow: hidden; border-radius: 2px; }
.bar > span { position: absolute; left: 0; top: 0; bottom: 0; background: var(--viz-1); width: 0; transition: width 1.2s var(--ease); border-radius: 2px; }
.bar > span.paid { background: var(--viz-2); top: auto; height: 50%; }
.bar.thick { height: 10px; }
.meter { display: grid; grid-template-columns: 220px 1fr; gap: 40px; align-items: center; }
.ring { position: relative; width: 220px; height: 220px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.ring .c b { font: 300 46px/1 var(--display); }
.ring .c span { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-top: 8px; }
.counter-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.counter-grid > div { padding: 18px 0; border-bottom: 1px solid var(--line); }
.counter-grid > div:nth-child(odd) { padding-right: 20px; border-right: 1px solid var(--line); }
.counter-grid > div:nth-child(even) { padding-left: 24px; }
.counter-grid b { display: block; font: 300 28px/1.15 var(--display); margin-top: 6px; font-variant-numeric: tabular-nums; }
.legend { display: flex; gap: 18px; font-size: 12px; color: var(--muted); margin-top: 14px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; margin-right: 6px; vertical-align: -1px; }

/* ── Tarjetas de operación ────────────────────────────────────────────── */
.ops { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 22px; }
.op { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; cursor: pointer; transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.op:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.op .ph { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--stone-2); }
.op .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.op:hover .ph img { transform: scale(1.05); }
.op .ph .tag { position: absolute; top: 14px; left: 14px; background: rgba(14,14,14,.6); color: #fff; border-color: transparent; backdrop-filter: blur(6px); }
.op .ph .tag::before { background: #fff; }
.op .ph .code { position: absolute; top: 16px; right: 16px; font: 500 10.5px var(--body); letter-spacing: .16em; color: rgba(255,255,255,.85); }
.op .bd { padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.op h3 { font-size: 22px; }
.op .meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.op .meta b { display: block; font: 400 17px var(--display); }
.op .meta span { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* ── Pestañas ─────────────────────────────────────────────────────────── */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line-2); margin: 0 0 28px; overflow-x: auto; scrollbar-width: none; }
.tabs button { background: none; border: 0; padding: 14px 18px; font: 500 11.5px var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); cursor: pointer; border-bottom: 1px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button:hover { color: var(--ink); }
.tabs button.on { color: var(--ink); border-bottom-color: var(--ink); }
.tabs button .n { margin-left: 6px; color: var(--faint); }

/* ── Kanban de captación ──────────────────────────────────────────────── */
.kanban { display: grid; grid-template-columns: repeat(7, minmax(220px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 12px; align-items: start; }
.kcol { background: color-mix(in srgb, var(--stone-2) 55%, transparent); border-radius: var(--r); padding: 12px; min-height: 380px; transition: background .2s; }
.kcol.drop { background: var(--stone-3); }
.kcol h4 { display: flex; justify-content: space-between; font: 500 10.5px var(--body); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); padding: 6px 6px 4px; }
.kcol .sum { font-size: 12px; color: var(--muted); padding: 0 6px 12px; font-variant-numeric: tabular-nums; }
.kcard { background: var(--paper); border: 1px solid var(--line); padding: 14px; margin-bottom: 10px; border-radius: var(--r); cursor: grab; transition: box-shadow .2s, transform .2s; }
.kcard:hover { box-shadow: var(--shadow); }
.kcard.drag { opacity: .4; }
.kcard b { font-weight: 500; display: block; margin-bottom: 4px; }
.kcard .row { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); margin-top: 8px; }

/* ── Timeline / feed ──────────────────────────────────────────────────── */
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: grid; grid-template-columns: 30px 1fr auto; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: start; }
.feed li:last-child { border-bottom: 0; }
.feed .dot { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; color: var(--muted); }
.feed .dot .ico { width: 14px; height: 14px; }
.feed b { font-weight: 500; }
.feed p { margin: 4px 0 0; color: var(--muted); font-size: 13px; white-space: pre-line; }
.feed time { font-size: 11.5px; color: var(--faint); white-space: nowrap; }
.task { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.task:last-child { border-bottom: 0; }
.task input { margin-top: 4px; accent-color: var(--ink); width: 15px; height: 15px; }
.task .due { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; }
.task .due.late { color: var(--bad); }

.steps { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: relative; margin: 10px 0 6px; }
.steps::before { content: ""; position: absolute; left: 6px; right: 6px; top: 6px; height: 1px; background: var(--line-2); }
.steps .st { position: relative; padding-top: 24px; padding-right: 10px; }
.steps .st::before { content: ""; position: absolute; top: 0; left: 0; width: 13px; height: 13px; border-radius: 50%; border: 1px solid var(--ink); background: var(--paper); }
.steps .st.done::before { background: var(--ink); }
.steps .st.now::before { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 22%, transparent); }
.steps .st b { display: block; font-weight: 500; font-size: 13px; }
.steps .st-edit { cursor: pointer; }
.steps .st-edit:hover b { text-decoration: underline; text-underline-offset: 3px; }
.x[disabled] { opacity: .25; cursor: default; }
.steps .st span { font-size: 12px; color: var(--muted); }

/* ── Gráficas ─────────────────────────────────────────────────────────── */
.chart { position: relative; }
.chart svg { width: 100%; height: 220px; display: block; overflow: visible; }
.chart .gl { stroke: var(--line); stroke-width: 1; }
.chart .ax { fill: var(--muted); font: 400 10.5px var(--body); }
.chart .b { fill: var(--viz-1); transition: opacity .2s; }
.chart .b.zero { fill: var(--stone-3); }
.chart .hit { fill: transparent; cursor: default; }
.chart .hit:hover + .b, .chart g:hover .b { opacity: .72; }
.tip { position: fixed; z-index: 100; pointer-events: none; background: var(--ink); color: var(--paper); padding: 8px 12px; font-size: 12px; border-radius: var(--r); opacity: 0; transition: opacity .12s; white-space: nowrap; }
.tip.on { opacity: 1; }
.hbars { display: flex; flex-direction: column; gap: 14px; }
.hbars .row { display: grid; grid-template-columns: 150px 1fr 96px; gap: 14px; align-items: center; font-size: 13px; }
.hbars .row .bar { height: 6px; }
.funnel { display: flex; flex-direction: column; gap: 8px; }
.funnel .row { display: grid; grid-template-columns: 120px 1fr 40px; gap: 14px; align-items: center; font-size: 13px; }
.funnel .row div.fb { height: 22px; background: var(--viz-1); opacity: var(--o); min-width: 2px; border-radius: 1px; transition: width 1s var(--ease); }

/* ── Modal, toast, paleta de comandos ─────────────────────────────────── */
.overlay { position: fixed; inset: 0; background: rgba(8,8,8,.45); backdrop-filter: blur(4px); z-index: 80; display: flex; align-items: flex-start; justify-content: center; padding: 4vh 16px; overflow-y: auto; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--paper); width: 100%; max-width: 760px; border-radius: var(--r); box-shadow: 0 40px 80px -30px rgba(0,0,0,.5); animation: rise .3s var(--ease); }
.modal.sm { max-width: 480px; } .modal.lg { max-width: 1040px; }
.modal-h { display: flex; justify-content: space-between; align-items: center; padding: 24px 30px; border-bottom: 1px solid var(--line); }
.modal-h h3 { font-size: 24px; }
.modal-b { padding: 26px 30px; }
.modal-f { display: flex; justify-content: flex-end; gap: 10px; padding: 18px 30px; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--stone) 50%, var(--paper)); flex: none; }
.modal { display: flex; flex-direction: column; max-height: calc(100vh - 8vh); }
.modal-h { flex: none; }
.modal-b { overflow-y: auto; min-height: 0; flex: 1 1 auto; }
.x { background: none; border: 0; cursor: pointer; padding: 6px; color: var(--muted); }
.toasts { position: fixed; right: 24px; bottom: 24px; z-index: 120; display: flex; flex-direction: column; gap: 10px; }
.toast { background: var(--ink); color: var(--paper); padding: 14px 20px; border-radius: var(--r); font-size: 13px; box-shadow: var(--shadow); animation: rise .3s var(--ease); max-width: 420px; }
.toast.err { background: var(--bad); color: #fff; }
.palette { max-width: 640px; }
.palette input { width: 100%; border: 0; padding: 22px 26px; font: 300 22px var(--display); background: transparent; outline: none; border-bottom: 1px solid var(--line); }
.palette .res { max-height: 420px; overflow-y: auto; padding: 8px; }
.palette .res a { display: flex; align-items: center; gap: 14px; padding: 11px 16px; border-radius: var(--r); }
.palette .res a.sel, .palette .res a:hover { background: var(--stone); }
.palette .res .kicker { padding: 12px 16px 6px; display: block; }

/* ── Ficha de inversor ────────────────────────────────────────────────── */
.profile { display: grid; grid-template-columns: 340px 1fr; gap: 28px; align-items: start; }
.facts { display: flex; flex-direction: column; }
.facts > div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.facts > div span:first-child { color: var(--muted); }
.facts > div span:last-child { text-align: right; min-width: 0; overflow-wrap: anywhere; }
.empty { padding: 48px 24px; text-align: center; color: var(--muted); border: 1px dashed var(--line-2); border-radius: var(--r); }
.empty h4 { font-size: 20px; color: var(--ink); margin-bottom: 8px; }

/* ── Galería ──────────────────────────────────────────────────────────── */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.gallery .g { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border: 2px solid transparent; cursor: pointer; border-radius: var(--r); background: var(--stone-2); }
.gallery .g img { width: 100%; height: 100%; object-fit: cover; }
.gallery .g.cover { border-color: var(--accent); }
.gallery .g.on { border-color: var(--ink); }
.gallery .g .badge { position: absolute; left: 6px; bottom: 6px; font: 500 9.5px var(--body); letter-spacing: .12em; text-transform: uppercase; background: var(--accent); color: #fff; padding: 2px 6px; }
.gallery .g .rm { position: absolute; right: 5px; top: 5px; background: rgba(14,14,14,.72); color: #fff; border: 0; width: 26px; height: 26px; cursor: pointer; border-radius: 50%; display: grid; place-items: center; padding: 0; transition: background .2s; }
.gallery .g .rm:hover { background: var(--bad); }
.gallery .g .rm .ico { width: 13px; height: 13px; }
.pdf-frame { width: 100%; height: 78vh; border: 1px solid var(--line); background: var(--stone-2); border-radius: var(--r); }
.drop-zone { border: 1px dashed var(--line-2); padding: 26px; text-align: center; color: var(--muted); border-radius: var(--r); cursor: pointer; transition: all .2s; }
.drop-zone:hover, .drop-zone.over { border-color: var(--ink); color: var(--ink); background: var(--paper); }

.quote-band { position: relative; overflow: hidden; border-radius: var(--r); padding: 40px; color: #fff; min-height: 180px; display: flex; align-items: center; }
.quote-band img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) brightness(.45); }
.quote-band p { position: relative; font: 300 22px/1.45 var(--display); max-width: 640px; margin: 0; }
.quote-band small { display: block; margin-top: 14px; font: 500 10.5px var(--body); letter-spacing: .2em; text-transform: uppercase; color: rgba(255,255,255,.7); }

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 1200px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi:nth-child(3) { border-left: 0; }
  .kpi:nth-child(n+3) { border-top: 1px solid var(--line); }
  .c-2-1, .profile { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; width: 270px; transform: translateX(-100%); transition: transform .3s var(--ease); }
  .side.open { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.4); }
  .menu-btn { display: grid; }
  .top { padding: 12px 16px; }
  .search-btn { min-width: 0; }
  .search-btn span:not(.s-ico), .search-btn kbd { display: none; }
  .view { padding: 24px 16px 64px; }
  .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .c-1-1 { grid-template-columns: minmax(0, 1fr); }
  .meter { grid-template-columns: 1fr; justify-items: center; }
  .hero .in-hero { padding: 24px; }
  .hbars .row { grid-template-columns: 110px 1fr 80px; }
}
@media (max-width: 560px) {
  .kpis { grid-template-columns: minmax(0, 1fr); }
  .kpi { border-left: 0 !important; border-top: 1px solid var(--line); }
  .kpi:first-child { border-top: 0; }
  .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); }
  .span2, .span3 { grid-column: auto; }
  .ops { grid-template-columns: minmax(0, 1fr); }
  .counter-grid { grid-template-columns: minmax(0, 1fr); }
  .counter-grid > div:nth-child(odd) { border-right: 0; padding-right: 0; }
  .counter-grid > div:nth-child(even) { padding-left: 0; }
}
@media print { .side, .top, .actions { display: none !important; } .shell { display: block; } body { background: #fff; } }
