/* ---------- Tokens (la marca sobrescribe --brand, --accent y fuentes) ---------- */
:root {
  --brand: #4f46e5;
  --accent: #f59e0b;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-head: var(--font);

  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --border: #e2e5ea;
  --border-strong: #cfd4dc;
  --text: #131720;
  --muted: #586172;
  --faint: #8b93a2;

  --ok: #13703a; --ok-bg: #e6f5ec;
  --warn: #9a5a06; --warn-bg: #fcf1dc;
  --bad: #b42318; --bad-bg: #fdeceb;
  --info: #1d4ed8; --info-bg: #e7eefc;

  --brand-soft: color-mix(in srgb, var(--brand) 11%, var(--surface));
  --brand-line: color-mix(in srgb, var(--brand) 30%, var(--border));
  --brand-ink: color-mix(in srgb, var(--brand) 82%, var(--text));
  --on-brand: #ffffff;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .05);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .14);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0e1116; --surface: #161a21; --surface-2: #1d222b; --border: #2a303b; --border-strong: #3a4250;
  --text: #e8eaee; --muted: #a3abb8; --faint: #747d8c;
  --ok: #4ade80; --ok-bg: #12291c; --warn: #fbbf24; --warn-bg: #2d2412; --bad: #f87171; --bad-bg: #321717; --info: #93b4fd; --info-bg: #162240;
  --brand-ink: color-mix(in srgb, var(--brand) 55%, #ffffff);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1116; --surface: #161a21; --surface-2: #1d222b; --border: #2a303b; --border-strong: #3a4250;
    --text: #e8eaee; --muted: #a3abb8; --faint: #747d8c;
    --ok: #4ade80; --ok-bg: #12291c; --warn: #fbbf24; --warn-bg: #2d2412; --bad: #f87171; --bad-bg: #321717; --info: #93b4fd; --info-bg: #162240;
    --brand-ink: color-mix(in srgb, var(--brand) 55%, #ffffff);
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 14.5px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--font-head); margin: 0; letter-spacing: -.01em; line-height: 1.25; }
h1 { font-size: 22px; font-weight: 700; }
h2 { font-size: 16px; font-weight: 650; }
h3 { font-size: 14px; font-weight: 650; }
p { margin: 0; }
a { color: var(--brand-ink); }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 12.5px; }
.num { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }

/* ---------- Layout ---------- */
.shell { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 16px 12px;
}
.brandmark { display: flex; align-items: center; gap: 11px; padding: 6px 8px 16px; text-decoration: none; color: inherit; }
.logo {
  width: 40px; height: 40px; border-radius: 11px; flex: none; overflow: hidden;
  display: grid; place-items: center; background: var(--brand); color: var(--on-brand);
  font: 700 16px var(--font-head); letter-spacing: .02em;
}
.logo img { width: 100%; height: 100%; object-fit: cover; }
.brandmark .bn { font: 700 15px var(--font-head); line-height: 1.2; }
.brandmark .bt { font-size: 12px; color: var(--muted); line-height: 1.3; }
.nav-group { margin-top: 10px; }
.nav-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); padding: 6px 10px; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px;
  color: var(--muted); text-decoration: none; font-weight: 500;
}
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.active { background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; }
.nav a .count { margin-left: auto; font-size: 11.5px; background: var(--surface-2); color: var(--muted); border-radius: 99px; padding: 0 7px; }
.nav a.active .count { background: var(--surface); }
.nav svg { width: 18px; height: 18px; flex: none; }
.side-foot { margin-top: auto; padding: 12px 6px 0; border-top: 1px solid var(--border); display: grid; gap: 8px; }
.saved { font-size: 12px; color: var(--faint); display: flex; align-items: center; gap: 6px; }
.saved::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }

.main { min-width: 0; }
.top {
  position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 14px; padding: 14px 28px;
}
.top .titles { min-width: 0; flex: 1; }
.top .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.top .actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.menu-btn { display: none; }
.content { padding: 24px 28px 64px; max-width: 1320px; }

/* ---------- Elementos ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 18px 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px 0; }
.card-head + .card-body { padding-top: 12px; }
.card-body { padding: 16px 20px 18px; }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.stack-sm { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.sticky { position: sticky; top: 84px; }

.btn {
  display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 9px;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  font: 600 13.5px var(--font); cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.btn-primary:hover { background: color-mix(in srgb, var(--brand) 88%, #000); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--text); }
.btn-danger { color: var(--bad); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.icon-btn { width: 30px; padding: 0; justify-content: center; }

.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--surface-2); color: var(--muted); }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.info { background: var(--info-bg); color: var(--info); }
.badge.brand { background: var(--brand-soft); color: var(--brand-ink); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: currentColor; }

/* ---------- Formularios ---------- */
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form .full { grid-column: 1 / -1; }
.f { display: grid; gap: 5px; min-width: 0; }
.f > label, .lbl { font-size: 12.5px; font-weight: 600; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.f .hint { font-size: 12px; color: var(--faint); }
input[type=text], input[type=number], input[type=date], input[type=url], input[type=password], input[type=email], select, textarea {
  width: 100%; min-width: 0; height: 38px; padding: 0 11px; border-radius: 9px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); font: 14px var(--font);
}
textarea { height: auto; min-height: 76px; padding: 9px 11px; resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--brand) 40%, transparent); outline-offset: 0; border-color: var(--brand); }
input::placeholder, textarea::placeholder { color: var(--faint); }
input[type=color] { width: 44px; height: 38px; padding: 3px; border-radius: 9px; border: 1px solid var(--border-strong); background: var(--surface); cursor: pointer; }
.check { display: flex; align-items: flex-start; gap: 9px; cursor: pointer; padding: 6px 0; }
.check input { width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--brand); flex: none; }
.money { position: relative; }
.money span { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--faint); font-size: 13px; pointer-events: none; }
.money input { padding-left: 24px; }

.choice { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.choice label {
  border: 1px solid var(--border-strong); border-radius: 12px; padding: 12px 14px; cursor: pointer; display: grid; gap: 4px; background: var(--surface);
}
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 1px var(--brand) inset; }
.choice strong { font-size: 14px; }
.choice small { color: var(--muted); font-size: 12.5px; line-height: 1.4; }

/* ---------- Tablas editables ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 8px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 6px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table input, .table select { height: 34px; font-size: 13.5px; }
.table-wrap { overflow-x: auto; }
.table.hover tbody tr { cursor: pointer; }
.table.hover tbody tr:hover { background: var(--surface-2); }
.empty { text-align: center; padding: 28px 16px; color: var(--muted); border: 1px dashed var(--border-strong); border-radius: 12px; }

/* ---------- KPIs ---------- */
.kpi { padding: 16px 18px; }
.kpi .k { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.kpi .v { font: 700 26px var(--font-head); margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi .d { font-size: 12px; color: var(--faint); margin-top: 2px; }

/* ---------- Hero de inicio ---------- */
.hero {
  border-radius: 18px; padding: 24px 26px; color: var(--on-brand); position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 60%, var(--accent)));
}
.hero h1 { font-size: 26px; }
.hero p { opacity: .92; max-width: 640px; margin-top: 6px; }
.hero .row { margin-top: 16px; }
.hero .btn { border-color: rgba(255,255,255,.35); background: rgba(255,255,255,.14); color: #fff; }
.hero .btn:hover { background: rgba(255,255,255,.24); }
.hero .btn-primary { background: #fff; color: var(--brand); border-color: #fff; }

.banner { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-radius: 12px; background: var(--info-bg); color: var(--info); font-size: 13.5px; }
.banner.warn { background: var(--warn-bg); color: var(--warn); }
.banner .grow { flex: 1; }

/* ---------- Pipeline ---------- */
.board { display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 6px; }
.col { background: var(--surface-2); border-radius: var(--radius); padding: 10px; min-height: 200px; display: flex; flex-direction: column; gap: 10px; }
.col-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px; }
.col-head h3 { font-size: 13px; }
.col-hint { font-size: 12px; color: var(--faint); padding: 0 6px; margin-top: -6px; }
.ccard { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 13px; cursor: pointer; display: grid; gap: 8px; text-decoration: none; color: inherit; box-shadow: var(--shadow); }
.ccard:hover { border-color: var(--brand-line); }
.ccard .t { font-weight: 650; line-height: 1.3; }
.bar { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.bar.ok > i { background: var(--ok); }
.bar.warn > i { background: var(--warn); }
.bar.bad > i { background: var(--bad); }

/* ---------- Ficha ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); overflow-x: auto; margin-bottom: 18px; scrollbar-width: thin; }
.tabs a { padding: 10px 12px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 13.5px; border-bottom: 2px solid transparent; white-space: nowrap; display: flex; gap: 6px; align-items: center; }
.tabs a:hover { color: var(--text); }
.tabs a.active { color: var(--brand-ink); border-bottom-color: var(--brand); }
.tabs .tdot { width: 7px; height: 7px; border-radius: 50%; background: var(--border-strong); }
.tabs .tdot.ok { background: var(--ok); }
.tabs .tdot.bad { background: var(--warn); }

.gate { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--border); text-decoration: none; color: inherit; }
.gate:last-child { border-bottom: 0; }
.gate .ic { width: 20px; height: 20px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 12px; font-weight: 700; margin-top: 1px; }
.gate .ic.ok { background: var(--ok-bg); color: var(--ok); }
.gate .ic.no { background: var(--bad-bg); color: var(--bad); }
.gate .ic.soft { background: var(--warn-bg); color: var(--warn); }
.gate .gl { font-size: 13.5px; font-weight: 550; }
.gate .gd { font-size: 12px; color: var(--muted); }

.ring { --p: 0; width: 64px; height: 64px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: conic-gradient(var(--brand) calc(var(--p) * 1%), var(--surface-2) 0); }
.ring span { width: 50px; height: 50px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font: 700 14px var(--font-head); }

.pitch { font-size: 16px; line-height: 1.55; padding: 16px 18px; border-radius: 12px; background: var(--brand-soft); border: 1px solid var(--brand-line); }
.pitch em { font-style: normal; font-weight: 700; color: var(--brand-ink); }
.pitch .blank { color: var(--faint); font-weight: 500; border-bottom: 1px dashed var(--faint); }

/* Economía */
.wf { display: grid; gap: 2px; }
.wf .r { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; font-variant-numeric: tabular-nums; }
.wf .r.sub { color: var(--muted); padding-left: 12px; font-size: 13px; }
.wf .r.tot { border-top: 1px solid var(--border); font-weight: 700; padding-top: 10px; }
.wf .r.big { font-size: 18px; }
.neg { color: var(--bad); }
.pos { color: var(--ok); }
.stackbar { display: flex; height: 26px; border-radius: 8px; overflow: hidden; background: var(--surface-2); }
.stackbar i { display: block; height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--muted); margin-top: 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend b { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.scen { display: grid; grid-template-columns: 1fr auto auto; gap: 4px 16px; font-variant-numeric: tabular-nums; font-size: 13.5px; }
.scen .h { font-size: 12px; font-weight: 600; color: var(--muted); }
.scen .rt { text-align: right; }

/* Alertas y listas */
.alerts { display: grid; gap: 8px; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); font-size: 13.5px; text-decoration: none; color: var(--text); }
.alert.bad { background: var(--bad-bg); }
.alert.warn { background: var(--warn-bg); }
.alert.info { background: var(--info-bg); }
.alert .dot { margin-top: 6px; flex: none; }
.alert.bad .dot { color: var(--bad); } .alert.warn .dot { color: var(--warn); } .alert.info .dot { color: var(--info); }
.list { display: grid; }
.li { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); text-decoration: none; color: inherit; }
.li:last-child { border-bottom: 0; }
.li .grow { flex: 1; min-width: 0; }

.funnel { display: grid; gap: 10px; }
.funnel .fr { display: grid; grid-template-columns: 150px 1fr 34px; gap: 10px; align-items: center; font-size: 13.5px; }
.funnel .fb { height: 22px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.funnel .fb i { display: block; height: 100%; background: var(--brand); border-radius: 6px; min-width: 2px; }

/* ---------- Marca ---------- */
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.sw { width: 30px; height: 30px; border-radius: 8px; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--border-strong); cursor: pointer; padding: 0; }
.sw.on { box-shadow: 0 0 0 2px var(--text); }
.logo-drop { display: flex; gap: 14px; align-items: center; }
.logo-drop .logo { width: 64px; height: 64px; border-radius: 16px; font-size: 24px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--border-strong); border-radius: 99px; padding: 6px 12px; font-size: 13px; cursor: pointer; background: var(--surface); }
.chip:has(input:checked) { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.chip input { display: none; }

.preview { border-radius: 16px; overflow: hidden; border: 1px solid var(--border); background: #fff; color: #161a22; font-family: var(--font); }
.pv-nav { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid #eceef2; }
.pv-nav .logo { width: 30px; height: 30px; border-radius: 8px; font-size: 12px; }
.pv-nav b { font-family: var(--font-head); }
.pv-nav .links { margin-left: auto; display: flex; gap: 12px; font-size: 12px; color: #667; }
.pv-hero { padding: 26px 18px; background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 14%, #fff), #fff); }
.pv-hero h2 { font-size: 22px; font-family: var(--font-head); color: #10131a; }
.pv-hero p { color: #4a5262; margin-top: 6px; font-size: 13.5px; }
.pv-btn { display: inline-block; margin-top: 14px; background: var(--brand); color: #fff; padding: 9px 16px; border-radius: 9px; font-weight: 600; font-size: 13px; }
.pv-btn.alt { background: var(--accent); color: #1b1300; }
.pv-prod { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px 16px 18px; }
.pv-card { border: 1px solid #eceef2; border-radius: 12px; overflow: hidden; }
.pv-img { height: 84px; background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--brand) 10%, #fff) 0 10px, color-mix(in srgb, var(--brand) 16%, #fff) 10px 20px); position: relative; }
.pv-tag { position: absolute; top: 8px; left: 8px; background: var(--accent); color: #1b1300; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 6px; }
.pv-card .in { padding: 8px 10px 10px; font-size: 12.5px; }
.pv-card .pr { font-weight: 700; color: var(--brand); margin-top: 2px; }
.ad { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); overflow: hidden; }
.ad-h { display: flex; gap: 9px; align-items: center; padding: 10px 12px; }
.ad-h .logo { width: 32px; height: 32px; border-radius: 50%; font-size: 12px; }
.ad-img { aspect-ratio: 1.6; background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 50%, var(--accent))); color: #fff; display: grid; place-items: center; text-align: center; padding: 16px; font: 700 18px var(--font-head); }
.ad-f { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; background: var(--surface-2); font-size: 12.5px; }

/* ---------- Diálogo ---------- */
dialog { border: 0; border-radius: 16px; padding: 0; width: min(760px, calc(100vw - 32px)); background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); }
dialog::backdrop { background: rgba(10, 14, 20, .45); }
.dlg-h { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.dlg-b { padding: 18px 20px; max-height: 70vh; overflow-y: auto; }
.dlg-f { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--border); }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-size: 13.5px; z-index: 50; box-shadow: var(--shadow-lg); }

.roadmap .phase { display: grid; grid-template-columns: 36px 1fr; gap: 14px; }
.roadmap .pn { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); font-weight: 700; }
.roadmap .pn.done { background: var(--brand); color: var(--on-brand); }

.print-only { display: none; }

/* ---------- Canales, ruta, asistentes ---------- */
.kpi-v { font: 700 26px var(--font-head); }
.best { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset, var(--shadow); }
.warn-t { color: var(--warn); }
.route { display: flex; align-items: stretch; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.route-step { display: grid; gap: 3px; align-content: start; min-width: 140px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.route-step.ret { background: var(--warn-bg); border-style: dashed; }
.route-step .badge { justify-self: start; margin-top: 2px; }
.route-arrow { align-self: center; color: var(--faint); font-size: 18px; flex: none; }
.agents { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.agent-box { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; }
.agent { border-top: 3px solid var(--brand); display: grid; gap: 4px; }

/* ---------- Modo presentación ---------- */
.present { max-width: 1180px; margin: 0 auto; padding: 18px 24px 56px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.present > *, .card-pad { min-width: 0; }
.present-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.present-hero { border-radius: 20px; padding: 34px 32px; color: #fff; display: grid; gap: 10px;
  background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 55%, var(--accent))); }
.present-hero h1 { font-size: 36px; }
.present-hero p { font-size: 17px; max-width: 820px; }
.present-hero .pitch-blank, .present-hero .blank { color: rgba(255,255,255,.75); border-color: rgba(255,255,255,.6); }
.present-hero em { font-style: normal; font-weight: 700; }
.present-h { font-size: 18px; margin: 6px 0 12px; }
.pend-dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--warn); flex: none; }
@media (max-width: 860px) {
  .present { padding: 12px 16px 48px; }
  .present-hero { padding: 24px 20px; }
  .present-hero h1 { font-size: 26px; }
  .agents { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Sesión ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(circle at 20% 10%, var(--brand-soft), transparent 60%), var(--bg); }
.login-card { width: min(400px, 100%); padding: 28px; display: grid; gap: 16px; }
.me { display: flex; gap: 10px; align-items: center; }
.me-av { width: 32px; height: 32px; border-radius: 50%; font-size: 12px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .sticky { position: static; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 30; left: 0; top: 0; width: 270px; transform: translateX(-102%); transition: transform .2s; box-shadow: var(--shadow-lg); }
  .side.open { transform: none; }
  .menu-btn { display: inline-flex; }
  .top { padding: 12px 16px; flex-wrap: wrap; }
  .content { padding: 16px 16px 56px; }
  .grid-2, .grid-3, .form, .form-3, .choice, .form[style] { grid-template-columns: minmax(0, 1fr) !important; }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .board { grid-template-columns: repeat(4, 82vw); }
  .funnel .fr { grid-template-columns: 110px 1fr 28px; }
}

@media print {
  .side, .top, .tabs, .no-print, .gate-panel { display: none !important; }
  .shell, .split { display: block; }
  .content { padding: 0; max-width: none; }
  body { background: #fff; color: #000; }
  .card { box-shadow: none; break-inside: avoid; }
  .print-only { display: block; }
}
