/* Visor de Oportunidades — Agencia WebSEO · RedVitalia */
:root {
  color-scheme: light;
  --font: 'Plus Jakarta Sans Variable', 'Plus Jakarta Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --paper: #f2f5f7;
  --surface: #ffffff;
  --surface-2: #f7f9fa;
  --surface-3: #edf1f4;
  --line: #e2e8ed;
  --line-2: #cfd8df;
  --ink: #10273a;
  --ink-2: #3f5569;
  --ink-3: #6a7d8f;
  --ink-4: #97a5b2;
  --petrol: #14788c;
  --petrol-ink: #0f6070;
  --petrol-hover: #10687a;
  --petrol-50: #e8f3f5;
  --petrol-100: #d0e7ec;
  --navy: #10273a;
  --navy-2: #1e3a50;
  --brand-orange: #e2852b;
  --focus: #14788c;
  /* estados (fijos, distintos de los colores de origen; siempre con icono y texto) */
  --st-pend: #f2a90f; --st-pend-bg: #fdf3dc; --st-pend-ink: #7a5300;
  --st-ok: #0ca30c; --st-ok-bg: #e5f4e5; --st-ok-ink: #0a6a0a;
  --st-no: #ec835a; --st-no-bg: #fdece5; --st-no-ink: #9c3f19;
  --st-desc: #8794a1; --st-desc-bg: #edf0f3; --st-desc-ink: #4f5c69;
  --danger: #c63a36; --danger-bg: #fbe9e8;
  /* orígenes (paleta validada para daltonismo) */
  --ch-google_ads: #2a78d6;
  --ch-meta_ads: #eb6834;
  --ch-google_organic: #1baf7a;
  --ch-google_business: #eda100;
  --ch-social: #e87ba4;
  --ch-otros: #6250d6;
  --ch-direct: #a2adb8;
  --ch-unknown: #5d6a77;
  --ch-resto: #a2adb8;
  --r-xs: 6px; --r-sm: 9px; --r-md: 12px; --r-lg: 18px; --r-xl: 24px;
  --shadow-overlay: 0 24px 60px -12px rgba(16, 39, 58, .28), 0 2px 8px rgba(16, 39, 58, .08);
  --shadow-pop: 0 10px 30px -8px rgba(16, 39, 58, .22);
  --sidebar: 256px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --paper: #0d1720; --surface: #15202b; --surface-2: #19252f; --surface-3: #1f2c37;
    --line: #26343f; --line-2: #34444f;
    --ink: #eef3f6; --ink-2: #c3ced7; --ink-3: #93a3b0; --ink-4: #687986;
    --petrol: #3aa7bb; --petrol-ink: #7fd0de; --petrol-hover: #4bb5c8; --petrol-50: #12313a; --petrol-100: #17414c;
    --st-pend-bg: #3a2e10; --st-pend-ink: #f7cf72; --st-ok-bg: #12321a; --st-ok-ink: #7ed67e;
    --st-no-bg: #3a2218; --st-no-ink: #f3ab8c; --st-desc-bg: #232f39; --st-desc-ink: #b5c0ca;
    --danger: #ec6b66; --danger-bg: #3a1c1b;
    --ch-google_ads: #3987e5; --ch-meta_ads: #d95926; --ch-google_organic: #199e70; --ch-google_business: #c98500;
    --ch-social: #d55181; --ch-otros: #9085e9; --ch-direct: #5f6d79; --ch-unknown: #8b98a5; --ch-resto: #5f6d79;
    --shadow-overlay: 0 24px 60px -12px rgba(0, 0, 0, .6);
    --shadow-pop: 0 10px 30px -8px rgba(0, 0, 0, .5);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0d1720; --surface: #15202b; --surface-2: #19252f; --surface-3: #1f2c37;
  --line: #26343f; --line-2: #34444f;
  --ink: #eef3f6; --ink-2: #c3ced7; --ink-3: #93a3b0; --ink-4: #687986;
  --petrol: #3aa7bb; --petrol-ink: #7fd0de; --petrol-hover: #4bb5c8; --petrol-50: #12313a; --petrol-100: #17414c;
  --st-pend-bg: #3a2e10; --st-pend-ink: #f7cf72; --st-ok-bg: #12321a; --st-ok-ink: #7ed67e;
  --st-no-bg: #3a2218; --st-no-ink: #f3ab8c; --st-desc-bg: #232f39; --st-desc-ink: #b5c0ca;
  --danger: #ec6b66; --danger-bg: #3a1c1b;
  --ch-google_ads: #3987e5; --ch-meta_ads: #d95926; --ch-google_organic: #199e70; --ch-google_business: #c98500;
  --ch-social: #d55181; --ch-otros: #9085e9; --ch-direct: #5f6d79; --ch-unknown: #8b98a5; --ch-resto: #5f6d79;
  --shadow-overlay: 0 24px 60px -12px rgba(0, 0, 0, .6);
  --shadow-pop: 0 10px 30px -8px rgba(0, 0, 0, .5);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font); font-size: 15px; line-height: 1.5; font-feature-settings: 'tnum' 0;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -0.015em; }
h1 { font-size: 26px; font-weight: 700; }
h2 { font-size: 18px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 700; }
p { margin: 0; }
a { color: var(--petrol-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.xs { font-size: 12px; }
.strong { font-weight: 700; }
.nowrap { white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ───────────── Estructura ───────────── */
.shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); }
.side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--surface);
  border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 18px 14px 14px;
}
.side-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; }
.lockup { display: flex; flex-direction: column; gap: 8px; }
.lockup img.webseo { height: 17px; width: auto; }
.lockup img.rv { height: 34px; width: auto; }
.lockup-row { display: flex; align-items: center; gap: 12px; }
.lockup-row img.webseo { height: 16px; width: auto; max-width: none; }
.lockup-row img.rv { height: 32px; width: auto; max-width: none; }
.lockup-row .sep { width: 1px; height: 26px; background: var(--line-2); }
.logo-light { display: block; }
.logo-dark { display: none; }
@media (prefers-color-scheme: dark) { :root:where(:not([data-theme="light"])) .logo-light { display: none; } :root:where(:not([data-theme="light"])) .logo-dark { display: block; } }
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: block; }
.side-label { font-size: 12px; color: var(--ink-3); font-weight: 600; padding: 14px 10px 6px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: var(--r-sm);
  color: var(--ink-2); font-weight: 600; font-size: 14px; text-decoration: none; position: relative;
}
.nav a svg { width: 18px; height: 18px; flex: none; color: var(--ink-3); }
.nav a:hover { background: var(--surface-3); color: var(--ink); }
.nav a.on { background: var(--petrol-50); color: var(--petrol-ink); }
.nav a.on svg { color: var(--petrol); }
.nav .count { margin-left: auto; font-size: 12px; font-weight: 700; background: var(--st-pend-bg); color: var(--st-pend-ink); padding: 1px 7px; border-radius: 99px; }
.side-account {
  margin: 8px 2px 4px; padding: 12px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line);
}
.side-account .acc-name { font-weight: 700; font-size: 14px; line-height: 1.3; }
.side-account .acc-meta { font-size: 12px; color: var(--ink-3); margin-top: 2px; display: flex; align-items: center; gap: 6px; }
.side-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.me { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: var(--r-sm); cursor: pointer; background: none; border: 0; text-align: left; width: 100%; }
.me:hover { background: var(--surface-3); }
.me .who { min-width: 0; }
.me .who b { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me .who span { display: block; font-size: 12px; color: var(--ink-3); }
.made-by { display: flex; align-items: center; gap: 10px; padding: 2px 8px; opacity: .85; }
.made-by img.webseo { height: 11px; width: auto; }
.made-by img.rv { height: 22px; width: auto; }
.made-by .sep { width: 1px; height: 16px; background: var(--line-2); }

.main { min-width: 0; display: flex; flex-direction: column; }
.page { width: 100%; max-width: 1240px; margin: 0 auto; padding: 30px 36px 80px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.page-head .lead { color: var(--ink-3); margin-top: 6px; font-size: 14px; max-width: 64ch; }
.head-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.topbar { display: none; }
.tabbar { display: none; }

@media (max-width: 920px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .topbar {
    display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 30; padding: 10px 14px;
    background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: saturate(1.4) blur(12px);
    border-bottom: 1px solid var(--line);
  }
  .topbar .t-title { min-width: 0; flex: 1; }
  .topbar .t-title b { display: block; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar .t-title span { display: block; font-size: 12px; color: var(--ink-3); }
  .topbar img.rv { height: 26px; width: auto; }
  .page { padding: 18px 16px 110px; }
  h1 { font-size: 22px; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: var(--surface); border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar a, .tabbar button {
    display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--ink-3);
    padding: 6px 2px; border-radius: var(--r-sm); text-decoration: none; background: none; border: 0;
  }
  .tabbar svg { width: 21px; height: 21px; }
  .tabbar .on { color: var(--petrol-ink); }
  .tabbar .plus span.ic { width: 38px; height: 30px; border-radius: 10px; background: var(--petrol); color: #fff; display: grid; place-items: center; }
  .tabbar .plus { color: var(--ink-2); }
}

/* ───────────── Controles ───────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px;
  border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  font-weight: 650; font-size: 14px; cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background .15s, border-color .15s, color .15s, transform .1s;
}
.btn:hover { background: var(--surface-3); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 17px; height: 17px; flex: none; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--petrol); border-color: var(--petrol); color: #fff; }
.btn-primary:hover { background: var(--petrol-hover); border-color: var(--petrol-hover); }
:root[data-theme="dark"] .btn-primary { color: #06222a; }
@media (prefers-color-scheme: dark) { :root:where(:not([data-theme="light"])) .btn-primary { color: #06222a; } }
.btn-ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-3); color: var(--ink); }
.btn-danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); }
.btn-danger:hover { background: var(--danger-bg); }
.btn-sm { height: 32px; padding: 0 11px; font-size: 13px; border-radius: 8px; }
.btn-lg { height: 48px; padding: 0 22px; font-size: 15px; border-radius: 11px; }
.btn-block { width: 100%; }
.icon-btn {
  width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: var(--r-sm);
  border: 1px solid transparent; background: transparent; color: var(--ink-2); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-3); color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span, .label { font-size: 13px; font-weight: 650; color: var(--ink-2); }
.field .hint { font-size: 12px; color: var(--ink-3); font-weight: 500; }
.input, .select, .textarea {
  width: 100%; height: 42px; padding: 0 12px; border-radius: var(--r-sm); border: 1px solid var(--line-2);
  background: var(--surface); color: var(--ink); font-size: 15px; transition: border-color .15s, box-shadow .15s;
}
.textarea { height: auto; min-height: 88px; padding: 10px 12px; resize: vertical; line-height: 1.45; }
.select { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5 6 6.5l5-5' stroke='%236a7d8f' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--petrol); box-shadow: 0 0 0 3px color-mix(in srgb, var(--petrol) 22%, transparent); }
.input::placeholder, .textarea::placeholder { color: var(--ink-4); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }
.error-msg { color: var(--danger); font-size: 13px; font-weight: 600; }
.search { position: relative; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--ink-3); pointer-events: none; }
.search .input { padding-left: 38px; }

.seg { display: inline-flex; padding: 3px; background: var(--surface-3); border-radius: 11px; gap: 2px; flex-wrap: wrap; }
.seg button {
  border: 0; background: transparent; padding: 7px 12px; border-radius: 8px; font-size: 13px; font-weight: 650; color: var(--ink-2); cursor: pointer; white-space: nowrap;
}
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(16, 39, 58, .1), 0 0 0 1px var(--line); }
.scroll-x { overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.scroll-x::-webkit-scrollbar { display: none; }

.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; font-size: 14px; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { width: 42px; height: 24px; border-radius: 99px; background: var(--line-2); position: relative; transition: background .2s; flex: none; }
.switch .track::after { content: ''; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s var(--ease); }
.switch input:checked + .track { background: var(--petrol); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ───────────── Etiquetas ───────────── */
.status {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px 0 7px; border-radius: 99px;
  font-size: 12px; font-weight: 700; white-space: nowrap;
}
.status svg { width: 14px; height: 14px; }
.status.pendiente { background: var(--st-pend-bg); color: var(--st-pend-ink); }
.status.pendiente svg { color: var(--st-pend); }
.status.confirmada { background: var(--st-ok-bg); color: var(--st-ok-ink); }
.status.confirmada svg { color: var(--st-ok); }
.status.no_recibida { background: var(--st-no-bg); color: var(--st-no-ink); }
.status.no_recibida svg { color: var(--st-no); }
.status.descartada { background: var(--st-desc-bg); color: var(--st-desc-ink); }
.origin { display: inline-flex; align-items: center; gap: 7px; font-weight: 650; font-size: 13px; color: var(--ink); white-space: nowrap; }
.dot { width: 9px; height: 9px; border-radius: 3px; flex: none; background: var(--c, var(--ink-4)); }
.dot.round { border-radius: 50%; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 6px; background: var(--surface-3); color: var(--ink-2); font-size: 12px; font-weight: 650; white-space: nowrap; }
.pill.warn { background: var(--st-pend-bg); color: var(--st-pend-ink); }
.pill.ok { background: var(--st-ok-bg); color: var(--st-ok-ink); }
.pill.bad { background: var(--danger-bg); color: var(--danger); }
.pill.test { background: var(--petrol-50); color: var(--petrol-ink); }
.brandmark { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 650; color: var(--ink-3); }
.brandmark i { width: 8px; height: 8px; border-radius: 50%; background: var(--b); }
.brandmark.webseo { --b: #1b7ba6; }
.brandmark.redvitalia { --b: #50b450; }

/* ───────────── Bloques ───────────── */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.panel-pad { padding: 22px 24px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px 0; flex-wrap: wrap; }
.panel-head .sub { font-size: 13px; color: var(--ink-3); margin-top: 3px; }
.panel-body { padding: 16px 22px 22px; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 18px; }
@media (max-width: 1080px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }
.divider { height: 1px; background: var(--line); margin: 4px 0; }

/* ───────────── Resumen ───────────── */
.hero {
  display: grid; grid-template-columns: minmax(260px, .9fr) minmax(0, 1.6fr); gap: 0; overflow: hidden;
}
.hero-main { padding: 26px 28px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.hero-num { font-size: 72px; line-height: .95; font-weight: 750; letter-spacing: -0.045em; font-variant-numeric: tabular-nums; }
.hero-cap { font-size: 16px; font-weight: 650; color: var(--ink-2); }
.delta { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; margin-top: 10px; }
.delta svg { width: 15px; height: 15px; }
.delta.up { color: var(--st-ok-ink); }
.delta.down { color: var(--st-no-ink); }
.delta.flat { color: var(--ink-3); }
.hero-mix { padding: 26px 28px; display: flex; flex-direction: column; gap: 16px; }
.mixbar { display: flex; height: 16px; border-radius: 5px; overflow: hidden; gap: 2px; background: var(--surface); }
.mixbar span { background: var(--c); min-width: 3px; }
.mixbar span:first-child { border-radius: 5px 0 0 5px; }
.mixbar span:last-child { border-radius: 0 5px 5px 0; }
.mix-legend { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 22px; }
.mix-legend .li { display: flex; align-items: baseline; gap: 9px; min-width: 0; }
.mix-legend .li .dot { transform: translateY(1px); }
.mix-legend .li .name { font-size: 13px; color: var(--ink-2); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mix-legend .li .n { margin-left: auto; font-weight: 750; font-variant-numeric: tabular-nums; }
.mix-legend .li .p { color: var(--ink-3); font-size: 12px; font-variant-numeric: tabular-nums; width: 38px; text-align: right; }
@media (max-width: 760px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-main { border-right: 0; border-bottom: 1px solid var(--line); padding: 22px; }
  .hero-mix { padding: 22px; }
  .hero-num { font-size: 60px; }
}

.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
.fact { padding: 18px 22px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fact:last-child { border-right: 0; }
.fact .k { font-size: 13px; color: var(--ink-3); font-weight: 600; display: flex; align-items: center; gap: 7px; }
.fact .k svg { width: 16px; height: 16px; }
.fact .v { font-size: 26px; font-weight: 750; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.fact .v small { font-size: 14px; color: var(--ink-3); font-weight: 650; letter-spacing: 0; margin-left: 4px; }
.fact .x { font-size: 12.5px; color: var(--ink-3); }
.fact.alert .v { color: var(--st-pend-ink); }
@media (max-width: 900px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } .fact:nth-child(2) { border-right: 0; } .fact:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }

.chart-box { position: relative; height: 290px; }
.chart-box.sm { height: 230px; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 12px; }
.chart-legend .li { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }

.bars { display: flex; flex-direction: column; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 44px; align-items: center; gap: 12px; font-size: 13.5px; }
.bar-row .lbl { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink-2); min-width: 0; }
.bar-row .lbl span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .track { height: 10px; background: var(--surface-3); border-radius: 4px; overflow: hidden; }
.bar-row .track i { display: block; height: 100%; background: var(--c, var(--petrol)); border-radius: 4px; }
.bar-row .n { text-align: right; font-weight: 750; font-variant-numeric: tabular-nums; }

.note {
  display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); font-size: 13.5px; color: var(--ink-2);
}
.note svg { width: 19px; height: 19px; flex: none; color: var(--ink-3); margin-top: 1px; }
.note.info { background: var(--petrol-50); border-color: var(--petrol-100); color: var(--ink-2); }
.note.info svg { color: var(--petrol); }
.note.warn { background: var(--st-pend-bg); border-color: color-mix(in srgb, var(--st-pend) 30%, transparent); }
.note.warn svg { color: var(--st-pend); }
.note b { color: var(--ink); }

/* ───────────── Listas de oportunidades ───────────── */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .search { flex: 1 1 240px; min-width: 200px; max-width: 360px; }
.toolbar .select { width: auto; min-width: 150px; height: 40px; font-size: 14px; }
.list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.list-head, .opp {
  display: grid; grid-template-columns: 22px minmax(170px, 1.2fr) minmax(220px, 1.6fr) 130px 128px 96px; gap: 14px; align-items: center; padding: 0 18px;
}
.list-head { height: 42px; font-size: 12.5px; color: var(--ink-3); font-weight: 650; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.opp { min-height: 72px; padding-top: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); cursor: pointer; position: relative; transition: background .12s; }
.opp:last-child { border-bottom: 0; }
.opp:hover { background: var(--surface-2); }
.opp.fresh { animation: fresh 2.4s var(--ease); }
@keyframes fresh { 0% { background: var(--petrol-50); } 100% { background: transparent; } }
.kind-ic { width: 22px; height: 22px; display: grid; place-items: center; color: var(--ink-3); }
.kind-ic svg { width: 19px; height: 19px; }
.who { min-width: 0; }
.who .nm { font-weight: 700; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who .ct { font-size: 13px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.route { display: flex; align-items: center; gap: 7px; min-width: 0; font-size: 13px; color: var(--ink-3); flex-wrap: nowrap; overflow: hidden; }
.route .step { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.route .step.org { color: var(--ink); font-weight: 650; flex: none; }
.route .step.pg { max-width: 210px; display: inline-block; }
.route .step:not(.org) { display: inline-block; min-width: 0; }
.route .chev { width: 12px; height: 12px; flex: none; color: var(--ink-4); }
.route-sub { font-size: 12px; color: var(--ink-3); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.when { font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.when small { display: block; color: var(--ink-3); font-size: 12px; }
.quick { display: flex; gap: 4px; justify-content: flex-end; }
.quick .icon-btn { width: 34px; height: 34px; border: 1px solid var(--line); background: var(--surface); }
.quick .icon-btn.yes:hover { background: var(--st-ok-bg); color: var(--st-ok-ink); border-color: transparent; }
.quick .icon-btn.no:hover { background: var(--st-no-bg); color: var(--st-no-ink); border-color: transparent; }
.list-foot { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; font-size: 13px; color: var(--ink-3); border-top: 1px solid var(--line); background: var(--surface-2); }
@media (max-width: 1100px) {
  .list-head { display: none; }
  .opp { grid-template-columns: 22px minmax(0, 1fr) auto; grid-template-areas: 'ic who st' 'ic route route' 'ic when q'; row-gap: 6px; }
  .opp > .kind-ic { grid-area: ic; align-self: start; margin-top: 2px; }
  .opp > .who { grid-area: who; }
  .opp > .route-cell { grid-area: route; }
  .opp > .st-cell { grid-area: st; justify-self: end; align-self: start; }
  .opp > .when { grid-area: when; }
  .opp > .quick { grid-area: q; }
}

/* ───────────── Clientes (agencia) ───────────── */
.clients { display: flex; flex-direction: column; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; align-items: start; }
@media (max-width: 1280px) { .home-grid { grid-template-columns: minmax(0, 1fr); } }
.client {
  display: grid; grid-template-columns: minmax(190px, 1.6fr) 130px minmax(110px, 1fr) 90px 120px 16px; gap: 16px; align-items: center;
  padding: 16px 20px; border-bottom: 1px solid var(--line); cursor: pointer; text-decoration: none; color: inherit;
}
.client:hover { background: var(--surface-2); text-decoration: none; }
.client:last-child { border-bottom: 0; }
.client .c-name { font-weight: 700; font-size: 15px; }
.client .c-sub { display: flex; gap: 10px; align-items: center; margin-top: 3px; flex-wrap: wrap; }
.conn { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 650; color: var(--ink-3); }
.conn i { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-4); }
.conn.ok i { background: var(--st-ok); }
.conn.parada i, .conn.sin_datos i { background: var(--st-pend); }
.conn.sin_web i { background: var(--ink-4); }
.spark { width: 100%; height: 34px; }
.c-num { font-weight: 750; font-size: 18px; font-variant-numeric: tabular-nums; }
.c-num small { display: block; font-size: 12px; font-weight: 600; color: var(--ink-3); }
.client-head { display: grid; grid-template-columns: minmax(190px, 1.6fr) 130px minmax(110px, 1fr) 90px 120px 16px; gap: 16px; padding: 0 20px; height: 40px; align-items: center; font-size: 12.5px; color: var(--ink-3); font-weight: 650; border-bottom: 1px solid var(--line); background: var(--surface-2); }
@media (max-width: 1000px) {
  .client-head { display: none; }
  .client { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'n o' 'sp sp' 'x x'; }
  .client > .c-n { grid-area: n; } .client > .c-o { grid-area: o; text-align: right; } .client > .c-sp { grid-area: sp; }
  .client > .c-p, .client > .c-l, .client > .c-arrow { display: none; }
}
.feed { display: flex; flex-direction: column; }
.feed a { display: grid; grid-template-columns: 9px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.feed a:last-child { border-bottom: 0; }
.feed a:hover .f-nm { text-decoration: underline; }
.feed .f-nm { font-weight: 650; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed .f-acc { font-size: 12px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ───────────── Cajón lateral, ventanas, avisos ───────────── */
.backdrop { position: fixed; inset: 0; background: rgba(9, 22, 33, .42); z-index: 80; animation: fade .18s var(--ease); }
@keyframes fade { from { opacity: 0; } }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); z-index: 90; background: var(--surface);
  box-shadow: var(--shadow-overlay); display: flex; flex-direction: column; animation: slide .26s var(--ease);
}
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
.drawer-head { padding: 18px 22px 16px; border-bottom: 1px solid var(--line); display: flex; gap: 12px; align-items: flex-start; }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px 22px 28px; display: flex; flex-direction: column; gap: 22px; }
.drawer-foot { border-top: 1px solid var(--line); padding: 14px 22px calc(14px + env(safe-area-inset-bottom)); background: var(--surface-2); }
.sec-title { font-size: 12.5px; font-weight: 700; color: var(--ink-3); margin-bottom: 10px; }
.kv { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 8px 14px; font-size: 14px; }
.kv dt { color: var(--ink-3); font-weight: 600; }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.contact-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.say { font-size: 15px; line-height: 1.55; color: var(--ink); }
.timeline { position: relative; display: flex; flex-direction: column; gap: 16px; padding-left: 26px; }
.timeline::before { content: ''; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px; background: var(--line); border-radius: 2px; }
.tl { position: relative; }
.tl .tl-dot { position: absolute; left: -26px; top: 2px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 2px solid var(--line-2); color: var(--ink-3); }
.tl .tl-dot svg { width: 10px; height: 10px; }
.tl.main .tl-dot { border-color: var(--petrol); color: var(--petrol); }
.tl.intent .tl-dot { border-style: dashed; }
.tl .tl-t { font-weight: 650; font-size: 14px; }
.tl .tl-s { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; overflow-wrap: anywhere; }
.fields { border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.fields div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 14px; }
.fields div:last-child { border-bottom: 0; }
.fields div span { color: var(--ink-3); font-weight: 600; font-size: 13px; }
.fields div p { white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 520px) { .fields div, .kv { grid-template-columns: minmax(0, 1fr); gap: 2px; } .kv dt { margin-top: 6px; } }
.decide { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.decide .btn { height: 48px; }
.decide .yes.on, .decide .yes:hover { background: var(--st-ok-bg); border-color: color-mix(in srgb, var(--st-ok) 45%, transparent); color: var(--st-ok-ink); }
.decide .no.on, .decide .no:hover { background: var(--st-no-bg); border-color: color-mix(in srgb, var(--st-no) 45%, transparent); color: var(--st-no-ink); }

.modal-wrap { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; padding: 20px; overflow-y: auto; }
.modal { width: min(560px, 100%); background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--shadow-overlay); animation: pop .22s var(--ease); }
.modal.wide { width: min(760px, 100%); }
@keyframes pop { from { transform: translateY(10px) scale(.985); opacity: 0; } }
.modal-head { padding: 22px 24px 4px; display: flex; gap: 12px; align-items: flex-start; }
.modal-head .sub { color: var(--ink-3); font-size: 14px; margin-top: 4px; }
.modal-body { padding: 18px 24px; display: flex; flex-direction: column; gap: 16px; }
.modal-foot { padding: 14px 24px 22px; display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
@media (max-width: 640px) {
  .modal-wrap { place-items: end stretch; padding: 0; }
  .modal { border-radius: 22px 22px 0 0; width: 100%; max-height: 92vh; overflow-y: auto; padding-bottom: env(safe-area-inset-bottom); }
}

.toasts { position: fixed; z-index: 120; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; max-width: min(380px, calc(100vw - 32px)); }
.toast {
  display: flex; gap: 12px; align-items: flex-start; padding: 13px 15px; border-radius: 14px; background: var(--navy); color: #fff;
  box-shadow: var(--shadow-pop); font-size: 14px; animation: pop .22s var(--ease);
}
:root[data-theme="dark"] .toast { background: #263845; }
.toast svg { width: 19px; height: 19px; flex: none; margin-top: 1px; color: #7fd0de; }
.toast b { display: block; }
.toast .t-act { margin-left: auto; color: #9fe0ea; font-weight: 700; white-space: nowrap; background: none; border: 0; cursor: pointer; padding: 0; }
@media (max-width: 920px) { .toasts { bottom: calc(82px + env(safe-area-inset-bottom)); right: 16px; left: 16px; max-width: none; } }

.empty { text-align: center; padding: 56px 24px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty .e-ic { width: 52px; height: 52px; border-radius: 16px; background: var(--surface-3); display: grid; place-items: center; color: var(--ink-3); margin-bottom: 6px; }
.empty .e-ic svg { width: 26px; height: 26px; }
.empty p { color: var(--ink-3); max-width: 44ch; font-size: 14px; }
.skel { background: linear-gradient(90deg, var(--surface-3), var(--surface-2), var(--surface-3)); background-size: 200% 100%; animation: sk 1.3s linear infinite; border-radius: 8px; }
@keyframes sk { to { background-position: -200% 0; } }

/* ───────────── Código e instalación ───────────── */
.code {
  position: relative; background: var(--navy); color: #d9eef3; border-radius: var(--r-md); padding: 16px 16px 16px 18px;
  font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-size: 13px; line-height: 1.6; overflow-x: auto; white-space: pre-wrap; word-break: break-all;
}
:root[data-theme="dark"] .code { background: #0a131b; }
.code-row { display: flex; gap: 10px; align-items: stretch; }
.code-row .code { flex: 1; }
.steps { counter-reset: st; display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 0; list-style: none; }
.steps li { counter-increment: st; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; font-size: 14px; color: var(--ink-2); }
.steps li::before { content: counter(st); width: 26px; height: 26px; border-radius: 8px; background: var(--petrol-50); color: var(--petrol-ink); font-weight: 750; font-size: 13px; display: grid; place-items: center; }
.steps li b { color: var(--ink); }
.check-line { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.check-line svg { width: 18px; height: 18px; flex: none; }
.check-line.ok svg { color: var(--st-ok); }
.check-line.bad svg { color: var(--danger); }
.check-line.wait svg { color: var(--st-pend); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.tabs button { border: 0; background: none; padding: 10px 12px; font-weight: 650; font-size: 14px; color: var(--ink-3); border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap; }
.tabs button.on { color: var(--ink); border-color: var(--petrol); }

/* ───────────── Configurador del widget ───────────── */
.wz { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 440px); gap: 20px; align-items: start; }
.wz-preview { position: sticky; top: 20px; }
.wz-frame { width: 100%; height: 640px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface-2); overflow: hidden; }
.wz-frame.mobile { width: 390px; max-width: 100%; height: 700px; margin: 0 auto; display: block; border-radius: 30px; border: 8px solid var(--navy); }
@media (max-width: 1100px) { .wz { grid-template-columns: minmax(0, 1fr); } .wz-preview { position: static; } }
.styles-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.style-opt { border: 1.5px solid var(--line); border-radius: var(--r-md); padding: 10px; background: var(--surface); cursor: pointer; text-align: left; display: flex; flex-direction: column; gap: 8px; }
.style-opt.on { border-color: var(--petrol); box-shadow: 0 0 0 3px var(--petrol-50); }
.style-opt .sw { height: 54px; border-radius: 9px; position: relative; overflow: hidden; background: var(--surface-3); }
.style-opt .sw i { position: absolute; right: 8px; bottom: 8px; }
.style-opt b { font-size: 13px; }
.style-opt span { font-size: 11.5px; color: var(--ink-3); line-height: 1.3; }
.color-in { display: flex; gap: 8px; align-items: center; }
.color-in input[type="color"] { width: 42px; height: 42px; padding: 3px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; }
.avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--petrol-50); color: var(--petrol-ink); display: grid; place-items: center; font-weight: 750; flex: none; }
.avatar.sm { width: 32px; height: 32px; font-size: 13px; }

/* ───────────── Entrada (login) ───────────── */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(420px, 520px); }
.auth-art {
  position: relative; overflow: hidden; background: var(--navy); color: #fff; padding: 44px 52px; display: flex; flex-direction: column; justify-content: space-between;
}
.auth-art .lockup-row img.webseo { height: 22px; }
.auth-art .lockup-row img.rv { height: 46px; }
.auth-art .lockup-row .sep { background: rgba(255,255,255,.25); height: 38px; }
.auth-art h2 { font-size: 34px; line-height: 1.12; font-weight: 700; letter-spacing: -0.025em; max-width: 15ch; }
.auth-art .quote { color: #b8cbd8; max-width: 44ch; margin-top: 14px; font-size: 15px; }
.arrivals { position: relative; margin: 28px 0; display: flex; flex-direction: column; gap: 10px; max-width: 470px; }
.arrival {
  display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.09); font-size: 13.5px;
}
.arrival .dot { width: 10px; height: 10px; border-radius: 3px; }
.arrival b { font-weight: 650; }
.arrival span { color: #9fb4c3; font-size: 12.5px; }
.arrival em { font-style: normal; color: #9fe0ea; font-size: 12px; font-weight: 700; }
.auth-form { background: var(--surface); display: flex; flex-direction: column; justify-content: center; padding: 48px 56px; }
.auth-form form { display: flex; flex-direction: column; gap: 16px; width: 100%; max-width: 380px; margin: 0 auto; }
.auth-form h1 { font-size: 28px; }
.auth-form .mobile-logos { display: none; }
@media (max-width: 900px) {
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-art { display: none; }
  .auth-form { padding: 36px 22px; justify-content: flex-start; }
  .auth-form .mobile-logos { display: flex; margin-bottom: 26px; }
}

/* Utilidades */
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 6px; } .mt-2 { margin-top: 12px; } .mt-3 { margin-top: 20px; } .mt-4 { margin-top: 30px; }
.gap-1 { gap: 6px; } .gap-2 { gap: 12px; }
.w-100 { width: 100%; }
.hide-mobile { }
@media (max-width: 920px) { .hide-mobile { display: none !important; } }
.only-mobile { display: none; }
@media (max-width: 920px) { .only-mobile { display: initial; } }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12.5px; color: var(--ink-3); font-weight: 650; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.table tr:last-child td { border-bottom: 0; }
.table td.r, .table th.r { text-align: right; }
.table-wrap { overflow-x: auto; }
kbd { font-family: inherit; font-size: 12px; background: var(--surface-3); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; }
.scroll-x .seg { flex-wrap: nowrap; }
@media (max-width: 920px) { .page-head .head-actions.scroll-x { width: 100%; } }

.table-wrap .table { min-width: 600px; }
.page-head > div:first-child { min-width: 0; flex: 1 1 300px; }
.topbar img.webseo { height: 15px; width: auto; }
@media (min-width: 1001px) and (max-width: 1240px) {
  .client, .client-head { grid-template-columns: minmax(170px, 1.6fr) 120px 84px 110px 16px; }
  .client > .c-sp, .client-head > span:nth-child(3) { display: none; }
}

/* ───────────── Propuestas de diseño del resumen ───────────── */
.dz { display: flex; flex-direction: column; gap: 18px; }
.dz > .page-head { margin-bottom: 6px; }
.dz .dot { flex: none; }

/* A · Recorrido */
.dz-a-hero { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 40px; align-items: center; padding: 6px 2px 10px; }
.dz-a-num .big { font-size: 120px; line-height: .84; font-weight: 800; letter-spacing: -0.06em; font-variant-numeric: tabular-nums; color: var(--ink); }
.dz-a-num .cap { font-size: 19px; font-weight: 650; color: var(--ink-2); margin-top: 14px; }
.dz-a-num .delta { margin-top: 8px; }
.dz-a-tips { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-2); }
.dz-a-tips li { display: flex; gap: 14px; align-items: center; font-size: 16.5px; color: var(--ink-2); line-height: 1.4; padding: 13px 2px; border-bottom: 1px solid var(--line); }
.dz-a-tips .ic { width: 34px; height: 34px; border-radius: 10px; background: var(--petrol-50); color: var(--petrol); display: grid; place-items: center; flex: none; }
.dz-a-tips .ic svg { width: 18px; height: 18px; }
.dz-a-tips b { color: var(--ink); font-weight: 750; }
.dz-panel .panel-body { padding-top: 18px; }
.dz-sankey { position: relative; }
.dz-sk-cols { display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 650; color: var(--ink-3); margin-bottom: 12px; }
.dz-sankey svg { display: block; overflow: visible; }
.dz-sankey path.lk { transition: opacity .15s var(--ease); }
.dz-sk-res { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 14px; font-size: 13px; color: var(--ink-2); }
.dz-sk-res span { display: inline-flex; align-items: center; gap: 6px; }
.dz-sk-res b { color: var(--ink); }
.dz-sk-res em { font-style: normal; color: var(--ink-3); }
.dz-sk-lbl { font-size: 13px; font-weight: 650; fill: var(--ink); paint-order: stroke; stroke: var(--surface); stroke-width: 5px; stroke-linejoin: round; }
.dz-sk-lbl .v { font-weight: 800; }
.dz-sk-lbl .p { font-weight: 600; fill: var(--ink-3); }

/* B · Cabina */
.dz-b-band { position: relative; overflow: hidden; background: #10273a; color: #fff; border-radius: 24px; padding: 26px 30px 0; }
.dz-b-band::before { content: ''; position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(rgba(255,255,255,.07) 1px, transparent 1.2px); background-size: 20px 20px; -webkit-mask-image: linear-gradient(105deg, transparent 35%, #000 100%); mask-image: linear-gradient(105deg, transparent 35%, #000 100%); }
.dz-b-band > * { position: relative; }
.dz-b-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.dz-b-top h1 { color: #fff; }
.dz-b-top .lead { color: rgba(255,255,255,.62); margin-top: 6px; font-size: 14px; }
.dz-b-band .seg { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.1); }
.dz-b-band .seg button { color: rgba(255,255,255,.72); }
.dz-b-band .seg button:hover { color: #fff; }
.dz-b-band .seg button.on { background: #fff; color: #10273a; box-shadow: none; }
.dz-b-main { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 28px; align-items: end; margin-top: 28px; }
.dz-b-num .big { font-size: 104px; font-weight: 800; letter-spacing: -0.06em; line-height: .84; font-variant-numeric: tabular-nums; }
.dz-b-num .cap { color: rgba(255,255,255,.78); font-size: 17px; font-weight: 600; margin-top: 14px; }
.dz-b-band .delta.up { color: #86e3a6; }
.dz-b-band .delta.down { color: #ffb59a; }
.dz-b-band .delta.flat { color: rgba(255,255,255,.6); }
.dz-b-key { display: flex; gap: 16px; margin-top: 24px; font-size: 12.5px; color: rgba(255,255,255,.62); flex-wrap: wrap; }
.dz-b-key .ln { display: inline-block; width: 18px; border-top: 2.5px solid #7fd0de; vertical-align: middle; margin-right: 7px; }
.dz-b-key .ln.dash { border-top: 2px dashed rgba(255,255,255,.45); }
.dz-b-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 24px -30px 0; border-top: 1px solid rgba(255,255,255,.1); }
.dz-b-kpis > div { padding: 16px 30px 20px; display: flex; flex-direction: column; gap: 3px; border-right: 1px solid rgba(255,255,255,.1); min-width: 0; }
.dz-b-kpis > div:last-child { border-right: 0; }
.dz-b-kpis .k { font-size: 12.5px; color: rgba(255,255,255,.6); display: flex; gap: 7px; align-items: center; font-weight: 600; }
.dz-b-kpis .k svg { width: 15px; height: 15px; }
.dz-b-kpis b { font-size: 26px; font-weight: 750; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.dz-b-kpis b small { font-size: 14px; color: rgba(255,255,255,.55); font-weight: 600; letter-spacing: 0; }
.dz-b-kpis .x { font-size: 12.5px; color: rgba(255,255,255,.55); }
.dz-b-kpis a { font-size: 12.5px; color: #7fd0de; font-weight: 650; }
.dz-b-kpis .alert b { color: #f7cf72; }
:root[data-theme="dark"] .dz-b-band { background: #0a1a26; box-shadow: inset 0 0 0 1px var(--line); }
@media (prefers-color-scheme: dark) { :root:where(:not([data-theme="light"])) .dz-b-band { background: #0a1a26; box-shadow: inset 0 0 0 1px var(--line); } }
.dz-b-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.dz-rank { display: flex; flex-direction: column; gap: 20px; padding-top: 20px; }
.row-r .top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.row-r .nm { font-weight: 650; display: flex; align-items: center; gap: 8px; }
.row-r .v { font-weight: 800; font-size: 20px; font-variant-numeric: tabular-nums; }
.row-r .v small { font-size: 12.5px; color: var(--ink-3); font-weight: 650; margin-left: 8px; }
.row-r .track { height: 12px; border-radius: 99px; background: var(--surface-3); margin-top: 8px; overflow: hidden; }
.row-r .track i { display: block; height: 100%; border-radius: 99px; background: var(--c); }
.row-r .meta { display: flex; justify-content: space-between; gap: 4px 12px; font-size: 12.5px; color: var(--ink-3); margin-top: 7px; flex-wrap: wrap; }
.row-r .meta b { color: var(--ink); }
.dz-cards { display: flex; flex-direction: column; padding: 10px 10px 12px; gap: 2px; }
.dz-card:focus-visible { outline: 2px solid var(--focus); }
.dz-card { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; grid-template-areas: 'av who st' 'av org st'; column-gap: 12px; row-gap: 2px; align-items: center; text-align: left; padding: 10px 12px; border-radius: 14px; background: none; border: 0; cursor: pointer; width: 100%; color: inherit; }
.dz-card:hover { background: var(--surface-2); }
.dz-card .av { grid-area: av; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-weight: 750; font-size: 14px; color: var(--ink); background: color-mix(in oklab, var(--c) 20%, var(--surface)); box-shadow: inset 0 0 0 2px var(--c); }
.dz-card .who { grid-area: who; min-width: 0; }
.dz-card .who b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14.5px; }
.dz-card .who span { font-size: 12.5px; color: var(--ink-3); }
.dz-card .org { grid-area: org; font-size: 12.5px; color: var(--ink-2); display: flex; gap: 6px; align-items: center; font-weight: 600; }
.dz-card .st { grid-area: st; }

/* C · Canales */
.dz-c-hero { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); }
.dz-c-left { padding: 28px 30px; border-right: 1px solid var(--line); }
.dz-c-left .big { font-size: 96px; line-height: .84; font-weight: 800; letter-spacing: -0.06em; font-variant-numeric: tabular-nums; }
.dz-c-left .cap { font-size: 17px; font-weight: 650; color: var(--ink-2); margin-top: 14px; }
.dz-c-tips { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-direction: column; gap: 10px; }
.dz-c-tips li { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; color: var(--ink-2); }
.dz-c-tips svg { width: 18px; height: 18px; color: var(--petrol); flex: none; margin-top: 2px; }
.dz-c-tips b { color: var(--ink); }
.dz-c-waffle { padding: 28px 30px; display: flex; flex-direction: column; gap: 16px; justify-content: center; }
.dz-c-waffle .cap2 { font-weight: 700; font-size: 15px; }
.dz-waffle { display: grid; grid-template-columns: repeat(20, minmax(0, 1fr)); gap: 5px; }
.dz-waffle i { aspect-ratio: 1; border-radius: 5px; background: var(--c); }
.dz-c-legend { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 13px; color: var(--ink-2); }
.dz-c-legend span { display: flex; align-items: center; gap: 7px; }
.dz-c-legend .sq { width: 11px; height: 11px; border-radius: 3px; background: var(--c); }
.dz-c-legend b { color: var(--ink); margin-left: 2px; font-variant-numeric: tabular-nums; }
.dz-tiles { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1240px) { .dz-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.dz-tile { position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px 14px 20px; display: flex; flex-direction: column; gap: 6px; }
.dz-tile::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c); }
.dz-tile header { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 650; color: var(--ink-2); }
.dz-tile header .nm { display: flex; align-items: center; gap: 7px; min-width: 0; }
.dz-tile .sh { font-size: 12.5px; color: var(--ink-3); font-weight: 700; white-space: nowrap; }
.dz-tile header .nm { display: block; line-height: 1.3; }
.dz-tile .v small { font-size: 13px; font-weight: 700; color: var(--ink-3); letter-spacing: 0; margin-left: 8px; }
.dz-tile header .nm .dot { display: inline-block; margin-right: 7px; vertical-align: 1px; }
.dz-tile .v { font-size: 38px; font-weight: 800; letter-spacing: -0.035em; line-height: 1; font-variant-numeric: tabular-nums; margin-top: 4px; }
.dz-spark { width: 100%; height: 38px; display: block; }
.dz-tile footer { font-size: 12.5px; color: var(--ink-3); }
.dz-tile footer b { color: var(--ink); }
.dz-heat-grid { display: grid; grid-template-columns: 16px repeat(24, minmax(0, 1fr)); gap: 3px; align-items: center; }
.dz-heat-grid .hh { font-size: 10.5px; color: var(--ink-3); }
.dz-heat-grid .dd { font-size: 11.5px; color: var(--ink-3); font-weight: 650; }
.dz-heat-grid i { aspect-ratio: 1; border-radius: 3px; background: color-mix(in oklab, var(--petrol) var(--a), var(--surface-3)); }
.dz-heat-grid i.zero { background: var(--surface-3); }
.dz-heat-grid i:hover { outline: 2px solid var(--ink); outline-offset: 1px; }
.dz-heat-foot { display: flex; justify-content: space-between; gap: 10px 16px; align-items: center; margin-top: 14px; flex-wrap: wrap; }
.dz-heat-scale { display: flex; align-items: center; gap: 4px; }
.dz-heat-scale span { margin: 0 4px; }
.dz-heat-scale i { width: 12px; height: 12px; border-radius: 3px; background: color-mix(in oklab, var(--petrol) var(--a), var(--surface-3)); }
.dz-timeline { list-style: none; margin: 0; padding: 14px 22px 16px; }
.dz-timeline li { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; padding: 8px 0 12px 24px; cursor: pointer; }
.dz-timeline li::before { content: ''; position: absolute; left: 4px; top: 0; bottom: 0; width: 2px; background: var(--line); }
.dz-timeline li:first-child::before { top: 14px; }
.dz-timeline li:last-child::before { bottom: auto; height: 14px; }
.dz-timeline li::after { content: ''; position: absolute; left: 0; top: 10px; width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px var(--surface); }
.dz-timeline li:hover .body b { color: var(--petrol-ink); }
.dz-timeline .when { grid-column: 1 / -1; font-size: 12px; color: var(--ink-3); font-weight: 650; }
.dz-timeline .body { min-width: 0; }
.dz-timeline .body b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dz-timeline .body span { font-size: 12.5px; color: var(--ink-3); }

/* Selector de diseño (solo administración, mientras se elige) */
.dz-picker { position: fixed; bottom: 18px; left: calc(50% + var(--sidebar) / 2); transform: translateX(-50%); z-index: 60; display: flex; gap: 2px; align-items: center; padding: 5px; background: var(--ink); color: var(--surface); border-radius: 99px; box-shadow: var(--shadow-pop); font-size: 13px; }
.dz-picker span { padding: 0 8px 0 12px; opacity: .7; font-weight: 600; }
.dz-picker button { border: 0; background: none; color: inherit; padding: 7px 12px; border-radius: 99px; cursor: pointer; font-weight: 650; white-space: nowrap; }
.dz-picker button.on { background: var(--surface); color: var(--ink); }

@media (max-width: 1080px) {
  .dz-b-grid, .dz-b-main, .dz-a-hero, .dz-c-hero { grid-template-columns: minmax(0, 1fr); }
  .dz-a-hero { gap: 22px; }
  .dz-c-left { border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 920px) {
  .dz-picker { left: 50%; bottom: 82px; max-width: calc(100vw - 20px); overflow-x: auto; }
  .dz-picker span { display: none; }
}
@media (max-width: 700px) {
  .dz-a-num .big { font-size: 88px; }
  .dz-a-tips li { font-size: 15px; }
  .dz-b-band { padding: 20px 18px 0; border-radius: 20px; }
  .dz-b-num .big { font-size: 80px; }
  .dz-b-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 20px -18px 0; }
  .dz-b-kpis > div { padding: 14px 18px 16px; }
  .dz-b-kpis > div:nth-child(2) { border-right: 0; }
  .dz-b-kpis > div:nth-child(-n+2) { border-bottom: 1px solid rgba(255,255,255,.1); }
  .dz-b-kpis b { font-size: 22px; }
  .dz-c-left, .dz-c-waffle { padding: 20px; }
  .dz-c-left .big { font-size: 80px; }
  .dz-waffle { grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 4px; }
  .dz-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .dz-tile { padding: 14px 14px 12px 16px; }
  .dz-tile .v { font-size: 30px; }
  .dz-heat-grid { gap: 2px; }
  .dz-heat-grid .hh { font-size: 9px; }
}
