/* Buenovia CRM — layout: fixed petrol sidebar + paper workspace; dense, scannable tables. */
/* BV Marketing Clínico — navy sidebar with the official gradient, white clinical workspace, thin lines.
   Brand: navy #001F4D, clinical blue #003B8E, digital blue #1268D6, light blue #DCEBFF. Titles Playfair Display, text Montserrat. */
:root {
  --bg: #F4F7FA;
  --surface: #FFFFFF;
  --surface-2: #F7F9FC;
  --line: #E3E9F0;
  --line-strong: #D9E1EA;
  --fg: #1F2933;
  --muted: #6B7280;
  --ink: #001F4D;
  --ink-2: #003B8E;
  --ink-fg: #FFFFFF;
  --ink-muted: #A9C4EA;
  --primary: #003B8E;
  --primary-fg: #FFFFFF;
  --primary-soft: #DCEBFF;
  --accent: #1268D6;
  --brand-gradient: linear-gradient(135deg, #001F4D 0%, #003B8E 55%, #1268D6 100%);
  --danger: #B42318;
  --danger-soft: #FDECEA;
  --ok: #18794E;
  --ok-soft: #E3F5EC;
  --warn: #9A6200;
  --warn-soft: #FFF4DB;
  --google: #1268D6;
  --meta: #0A66C2;
  --shadow: 0 1px 2px rgba(0, 31, 77, .06), 0 10px 28px rgba(0, 31, 77, .10);
  --radius: 10px;
  --font: "Montserrat", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --display: "Playfair Display", Georgia, "Times New Roman", serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --st-nuevo: #DCEBFF;        --st-nuevo-fg: #003B8E;
  --st-contactado: #EEF1F5;   --st-contactado-fg: #4B5563;
  --st-seguimiento: #EDEBFB;  --st-seguimiento-fg: #4F3FB0;
  --st-sin_respuesta: #F3F0EA;--st-sin_respuesta-fg: #765C2E;
  --st-cita_agendada: #FFF4DB;--st-cita_agendada-fg: #8A5A00;
  --st-cita_realizada: #E0F2F7;--st-cita_realizada-fg: #0E6177;
  --st-propuesta: #E3ECFB;    --st-propuesta-fg: #1D4ED8;
  --st-cerrado: #E3F5EC;      --st-cerrado-fg: #18794E;
  --st-perdido: #FDECEA;      --st-perdido-fg: #B42318;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #07111F; --surface: #0D1A2E; --surface-2: #112038; --line: #1C2E4A; --line-strong: #26395A;
    --fg: #E6EDF7; --muted: #94A3B8; --ink: #000C1F; --ink-2: #001F4D; --ink-fg: #FFFFFF; --ink-muted: #8FB0DE;
    --primary: #5B9BFF; --primary-fg: #001F4D; --primary-soft: #12305E; --accent: #7AB0FF;
    --brand-gradient: linear-gradient(135deg, #000C1F 0%, #001F4D 55%, #003B8E 100%);
    --danger: #F59A90; --danger-soft: #3A1A18; --ok: #6FD3A0; --ok-soft: #12301F; --warn: #F2C063; --warn-soft: #33270F;
    --google: #7AB0FF; --meta: #6AA9F0; --shadow: 0 1px 2px rgba(0,0,0,.35), 0 12px 32px rgba(0,0,0,.45);
    --st-nuevo: #12305E; --st-nuevo-fg: #A9C9FF; --st-contactado: #1B2638; --st-contactado-fg: #B8C2D0;
    --st-seguimiento: #241F45; --st-seguimiento-fg: #C1B6F5; --st-sin_respuesta: #2B2416; --st-sin_respuesta-fg: #D9C08E;
    --st-cita_agendada: #33270F; --st-cita_agendada-fg: #F2C063; --st-cita_realizada: #0F2E37; --st-cita_realizada-fg: #86D0E2;
    --st-propuesta: #16294F; --st-propuesta-fg: #A3BCF5; --st-cerrado: #12301F; --st-cerrado-fg: #7FDCA8;
    --st-perdido: #3A1A18; --st-perdido-fg: #F59A90;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg); font: 14px/1.45 var(--font);
  -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--primary); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
h1 { font-family: var(--display); font-size: 26px; font-weight: 600; letter-spacing: -0.005em; }
h2 { font-family: var(--display); font-size: 18px; font-weight: 600; letter-spacing: 0; }
h3 { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: var(--mono); font-size: 12px; word-break: break-all; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }

/* ---------- login ---------- */
.login {
  min-height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
}
.login-side {
  background: var(--brand-gradient); color: var(--ink-fg); padding: 48px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
}
.login-side .brand { font-size: 18px; }
.login-side blockquote { margin: 0; font-family: var(--display); font-size: 34px; line-height: 1.2; font-weight: 500; max-width: 16ch; }
.login-side blockquote span { color: #9CC3FF; font-style: italic; }
.login-side .biglogo { width: 120px; height: auto; }
.login-card .mlogo { display: none; width: 72px; height: auto; }
@media (max-width: 820px) { .login-card .mlogo { display: block; } }
.login-side .steps { display: grid; gap: 10px; color: var(--ink-muted); font-size: 13px; }
.login-side .steps b { color: var(--ink-fg); font-weight: 600; }
.login-main { display: grid; place-items: center; padding: 32px 16px; }
.login-card { width: 100%; max-width: 360px; display: grid; gap: 18px; }
.login-card form { display: grid; gap: 14px; }
@media (max-width: 820px) { .login { grid-template-columns: 1fr; } .login-side { display: none; } }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100%; }
.side {
  background: var(--brand-gradient); color: var(--ink-fg); padding: 20px 14px; display: flex; flex-direction: column; gap: 22px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 600; font-size: 16px; line-height: 1.15; }
.brand img { width: 40px; height: auto; }
.brand small { font-family: var(--font); display: block; font-weight: 500; color: var(--ink-muted); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
.side select {
  width: 100%; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); color: var(--ink-fg);
  border-radius: 8px; padding: 8px 10px;
}
.side select option { color: #1F2933; }
.side label.lbl { color: var(--ink-muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; display: block; margin-bottom: 6px; }
.nav { display: grid; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--ink-muted); text-decoration: none; font-weight: 550;
}
.nav a:hover { background: rgba(255,255,255,.06); color: var(--ink-fg); }
.nav a.active { background: rgba(255,255,255,.1); color: var(--ink-fg); }
.nav a.active::before { content: ""; width: 3px; height: 16px; background: #9CC3FF; border-radius: 2px; margin-left: -4px; }
.nav svg { width: 17px; height: 17px; flex: none; }
.side .foot { margin-top: auto; display: grid; gap: 8px; font-size: 12px; color: var(--ink-muted); }
.side .foot button { background: none; border: 0; color: var(--ink-muted); text-align: left; padding: 0; cursor: pointer; }
.side .foot button:hover { color: var(--ink-fg); }
.lang { display: inline-flex; border: 1px solid rgba(255,255,255,.14); border-radius: 6px; overflow: hidden; width: max-content; }
.lang button { padding: 3px 9px !important; }
.lang button.on { background: rgba(255,255,255,.12); color: var(--ink-fg); }

.main { padding: 22px 28px 48px; min-width: 0; display: grid; gap: 18px; align-content: start; }
.topbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: space-between; }
.topbar .title { display: grid; gap: 2px; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.mobilebar { display: none; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .mobilebar {
    display: flex; position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--brand-gradient); color: var(--ink-fg);
    padding: 10px 16px; align-items: center; gap: 10px; justify-content: space-between;
  }
  .mobilebar .brand img { width: 30px; }
  .mobilebar select { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); color: var(--ink-fg); border-radius: 8px; padding: 6px 8px; max-width: 46vw; }
  .mobilebar select option { color: #1F2933; }
  .tabbar {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
    background: var(--surface); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
  }
  .tabbar a { display: grid; justify-items: center; gap: 2px; font-size: 11px; color: var(--muted); text-decoration: none; padding: 4px; }
  .tabbar a.active { color: var(--primary); font-weight: 650; }
  .tabbar svg { width: 20px; height: 20px; }
  .main { padding: 16px 16px 96px; }
}
@media (min-width: 901px) { .tabbar { display: none; } }

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--fg);
  padding: 7px 12px; border-radius: 8px; cursor: pointer; font-weight: 600; white-space: nowrap; text-decoration: none; min-height: 34px;
}
.btn:hover { border-color: var(--primary); }
.btn.primary { background: var(--brand-gradient); border-color: transparent; color: #FFFFFF; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { padding: 4px 9px; min-height: 28px; font-size: 12.5px; }
.btn svg { width: 15px; height: 15px; }
.btn[disabled] { opacity: .5; cursor: default; }
.input, select.input, textarea.input {
  width: 100%; border: 1px solid var(--line-strong); background: var(--surface); border-radius: 8px; padding: 7px 10px; min-height: 34px;
}
textarea.input { min-height: 74px; resize: vertical; }
.input:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px var(--primary-soft); }
.field { display: grid; gap: 5px; min-width: 0; }
.field > span { font-size: 12px; color: var(--muted); font-weight: 550; }
.field .hint { font-size: 11.5px; color: var(--muted); }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 640px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.search { position: relative; }
.search input { padding-left: 32px; width: 220px; }
.search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--muted); }
@media (max-width: 640px) { .search, .search input { width: 100%; } .toolbar > * { flex: 1 1 auto; } }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.switch input { width: 16px; height: 16px; accent-color: var(--primary); }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; background: var(--surface); }
.seg button { border: 0; background: none; padding: 6px 11px; cursor: pointer; color: var(--muted); font-weight: 550; }
.seg button.on { background: var(--primary-soft); color: var(--primary); }

/* ---------- cards / panels ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.panel > header { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.panel > .body { padding: 16px; display: grid; gap: 14px; }
.panel.flat > .body { padding: 0; }

/* ---------- stage chips ---------- */
.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); padding: 5px 10px; border-radius: 999px;
  cursor: pointer; white-space: nowrap; font-size: 12.5px; font-weight: 550; color: var(--muted);
}
.chip b { font-weight: 650; color: var(--fg); }
.chip.on { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; }

.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.st { background: var(--st-bg); color: var(--st-fg); }
select.st-select {
  appearance: none; -webkit-appearance: none; border: 0; border-radius: 999px; padding: 4px 26px 4px 10px; font-size: 12.5px; font-weight: 650; cursor: pointer;
  background: var(--st-bg) 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' stroke='%23889' fill='none' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 9px center;
  color: var(--st-fg); max-width: 100%;
}
select.st-select option { background: var(--surface); color: var(--fg); }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; padding: 1px 7px; border-radius: 5px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.badge.google { color: var(--google); border-color: color-mix(in srgb, var(--google) 35%, transparent); }
.badge.meta { color: var(--meta); border-color: color-mix(in srgb, var(--meta) 35%, transparent); }
.badge.wa { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.sync { display: inline-flex; gap: 4px; }
.sync i { font-style: normal; font-size: 10.5px; font-weight: 700; width: 20px; height: 20px; border-radius: 6px; display: inline-grid; place-items: center; border: 1px solid var(--line); color: var(--muted); }
.sync i.sent { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.sync i.pending, .sync i.feed { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.sync i.error { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.status { font-size: 12px; font-weight: 650; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.status.sent { background: var(--ok-soft); color: var(--ok); }
.status.pending, .status.feed { background: var(--warn-soft); color: var(--warn); }
.status.error { background: var(--danger-soft); color: var(--danger); }
.status.skipped { background: var(--surface-2); color: var(--muted); }

/* ---------- table ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
table.data { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
table.data th {
  text-align: left; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted);
  padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); position: sticky; top: 0; white-space: nowrap;
}
table.data td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr { cursor: pointer; }
table.data tbody tr:hover td { background: var(--surface-2); }
table.data td.num, table.data th.num { text-align: right; }
.cell-name { display: grid; gap: 1px; min-width: 150px; }
.cell-name b { font-weight: 620; }
.cell-name .sub { font-size: 12px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.inline { border: 1px solid transparent; background: transparent; border-radius: 6px; padding: 4px 6px; width: 100%; min-width: 0; }
.inline:hover { border-color: var(--line-strong); background: var(--surface); }
.inline:focus { border-color: var(--primary); background: var(--surface); outline: none; }
input.inline.money { width: 96px; text-align: right; }
input.inline.date { width: 172px; }
select.inline { width: auto; min-width: 70px; }
.empty { padding: 48px 16px; text-align: center; color: var(--muted); display: grid; gap: 8px; justify-items: center; }
.empty b { color: var(--fg); font-size: 15px; }

/* mobile cards */
.cards { display: none; gap: 10px; }
@media (max-width: 760px) {
  .leads-table { display: none; }
  .cards { display: grid; }
}
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: grid; gap: 8px; }
.card .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.card .meta { display: flex; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--muted); align-items: center; }

/* ---------- KPIs / summary ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 4px; }
.kpi .label { font-size: 12px; color: var(--muted); font-weight: 600; }
.kpi .value { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.kpi .label { text-transform: uppercase; letter-spacing: .06em; font-size: 11px; }
.kpi .foot { font-size: 12px; color: var(--muted); }
.kpi.hero { background: var(--brand-gradient); color: var(--ink-fg); border-color: transparent; }
.kpi.hero .label, .kpi.hero .foot { color: var(--ink-muted); }
.kpi.hero .value { color: #FFFFFF; }
.funnel { display: grid; gap: 10px; }
.funnel .step { display: grid; grid-template-columns: 120px minmax(0, 1fr) 40px 48px; gap: 10px; align-items: center; }
.funnel .bar { height: 22px; background: var(--surface-2); border-radius: 6px; overflow: hidden; position: relative; }
.funnel .bar span { display: block; height: 100%; background: var(--brand-gradient); border-radius: 6px; min-width: 2px; }
.funnel .bar em { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-style: normal; font-weight: 650; font-size: 12.5px; color: var(--fg); mix-blend-mode: normal; }
.funnel .rate { font-size: 12px; color: var(--muted); text-align: right; }
.two { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 14px; }
@media (max-width: 1100px) { .two { grid-template-columns: 1fr; } }
.roas-good { color: var(--ok); font-weight: 650; }
.roas-bad { color: var(--danger); font-weight: 650; }
.spend-grid input { width: 110px; text-align: right; }

/* ---------- drawer ---------- */
.overlay { position: fixed; inset: 0; background: rgba(10, 22, 25, .38); z-index: 50; animation: fade .15s ease; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100%); background: var(--bg); z-index: 51; display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  box-shadow: var(--shadow); animation: slide .18s ease;
}
.drawer > header { padding: 16px 20px calc(14px); padding-top: calc(16px + env(safe-area-inset-top, 0px)); background: var(--surface); border-bottom: 1px solid var(--line); display: grid; gap: 10px; }
.drawer > .content { overflow-y: auto; padding: 16px 20px; display: grid; gap: 16px; align-content: start; }
.drawer > footer { padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px)); background: var(--surface); border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; }
.drawer .close { position: absolute; right: 14px; top: calc(14px + env(safe-area-inset-top, 0px)); }
.quick { display: flex; gap: 6px; flex-wrap: wrap; }
.quick .btn { flex: 1 1 auto; justify-content: center; }
.kv { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 6px 12px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.timeline { display: grid; gap: 10px; font-size: 12.5px; }
.timeline .ev { display: grid; grid-template-columns: 12px minmax(0, 1fr); gap: 10px; }
.timeline .ev::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); margin-top: 5px; }
.convrow { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.convrow:last-child { border-bottom: 0; }
.note { font-size: 12.5px; padding: 10px 12px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); }
.note.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.note.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; display: grid; place-items: center; z-index: 60; padding: 16px; }
.modal .box { background: var(--surface); border-radius: 14px; width: min(420px, 100%); padding: 20px; display: grid; gap: 14px; box-shadow: var(--shadow); animation: pop .15s ease; }
.modal .actions { display: flex; justify-content: flex-end; gap: 8px; }

/* ---------- toasts ---------- */
#toasts { position: fixed; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%); z-index: 80; display: grid; gap: 8px; }
.toast { background: var(--primary); color: var(--ink-fg); padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow); font-weight: 550; animation: pop .15s ease; }
.toast.err { background: var(--danger); color: #fff; }
@media (max-width: 900px) { #toasts { bottom: calc(80px + env(safe-area-inset-bottom, 0px)); } }

/* ---------- settings ---------- */
.settings { display: grid; gap: 16px; max-width: 980px; }
.codebox { position: relative; }
.codebox pre { margin: 0; background: #001F4D; color: var(--ink-fg); border-radius: 8px; padding: 12px 14px; font: 12px/1.5 var(--mono); overflow-x: auto; white-space: pre; }
.codebox .btn { position: absolute; top: 6px; right: 6px; }
.maptable td, .maptable th { padding: 8px 10px; }
.maptable input { min-width: 140px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 9px 12px; cursor: pointer; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button.on { color: var(--primary); border-bottom-color: var(--primary); }

@keyframes slide { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { transform: scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

button.inline { width: auto; font-size: 13px; }
@media (max-width: 640px) { .funnel .step { grid-template-columns: 96px minmax(0, 1fr) 32px 40px; } }
#app { min-height: 100%; }
.login { min-height: 100vh; }
.login-card .lang button { color: var(--muted); background: none; border: 0; }
.login-card .lang button.on { background: var(--primary-soft); color: var(--primary); }
