/* ASSAP-BI · sistema visual — Brand book ASSAP, Manual de marca V.06 (2026)
   Solo colores oficiales y sus tintes (100/80/50/30/15 %), ver skill assap-brand-book.
   Azul 281 #00205B · Naranja 151 #FF8200 · Gris CG8 #888B8D · Noche 2766 #141B4D
   Verde azulado 326 #00B3AA («con ASSAP») · Morado 266 #753BBD (solo IA) · Sora + Manrope.
   Reglas: naranja y verde azulado nunca como texto sobre blanco; botón naranja con texto noche;
   gris no como texto bajo 24 px; mínimo 14 px; sin rojo (no está en la paleta). */
:root {
  --bg: linear-gradient(160deg, #FFFFFF 0%, #F2F4F7 60%, #D9DEE6 140%);
  --bg-solid: #F2F4F7;          /* lt2 del tema de marca */
  --card: rgba(255,255,255,.92);
  --card-solid: #FFFFFF;
  --border: #EDEEEE;            /* gris 15 %: borde de tarjetas */
  --border-strong: #B2BCCE;     /* azul 30 % */
  --shadow: 0 10px 30px rgba(0,32,91,.08);
  --ink: #141B4D;               /* texto principal (azul noche) */
  --muted: #334D7C;             /* texto secundario (azul 80 %) */
  --soft: #F2F4F7;
  --accent: #00205B;            /* azul 281 */
  --accent-hover: #141B4D;
  --accent-soft: #D9DEE6;       /* azul 15 % */
  --orange: #FF8200;            /* naranja 151: rellenos, íconos, subrayados y un llamado a la acción */
  --orange-soft: #FFECD9;       /* naranja 15 % */
  --orange-ink: #141B4D;        /* texto sobre naranja: azul noche */
  --teal: #00B3AA;              /* verde azulado 326 (no como texto sobre blanco) */
  --teal-soft: #D9F4F2;         /* verde azulado 15 % */
  --gray: #888B8D;              /* gris CG8: puntos, divisores, «lo manual» */
  --gray-soft: #EDEEEE;
  --ai: #753BBD;                /* morado 266: solo asistente IA */
  --ai-soft: #EAE2F5;           /* morado 15 % */
  --night: #141B4D;
  --rail: #141B4D;
  --rail-ink: #D9DEE6;          /* azul 15 % (texto claro sobre azul) */
  --rail-muted: #B2BCCE;        /* azul 30 % */
  /* Estados (sin rojo): el texto va en azul noche; el color lo llevan el fondo y la marca. */
  --pos: #141B4D;
  --pos-mark: #00B3AA;
  --pos-soft: #D9F4F2;
  --neg: #141B4D;
  --neg-mark: #FF8200;
  --neg-soft: #FFECD9;
  --hero: linear-gradient(135deg, #00205B 0%, #141B4D 100%);
  --overlay: rgba(20,27,77,.55);
  --accent-ink: #FFFFFF;        /* texto sobre --accent */
  --row-hover: rgba(0,32,91,.03);
  --board: rgba(255,255,255,.45);
  --focus-ring: rgba(0,32,91,.12);
  --rail-shadow: 0 18px 40px rgba(20,27,77,.3);
  --heat: #00205B;              /* mapa de calor: un solo tono */
  --radius: 24px;
  --font: 'Manrope', 'Segoe UI', system-ui, sans-serif;
  --display: 'Sora', 'Manrope', 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { background: var(--bg-solid); }
h1:focus { outline: none; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); background-attachment: fixed; min-height: 100vh; display: flow-root; }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.3px; margin: 0; }
h1 { font-size: 30px; }
h2 { font-size: 18px; font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

/* ── Estructura de aplicación ── */
.shell { display: flex; flex-wrap: wrap; gap: 16px; padding: 16px; align-items: flex-start; min-height: 100vh; }
.rail { flex: 0 0 220px; background: var(--rail); color: var(--rail-ink); border-radius: 28px; padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 16px; box-shadow: var(--rail-shadow); }
.rail .brand { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; padding: 10px 8px 18px; color: #fff; }
.rail .brand-logo { width: 180px; }
/* Antetítulo (manual V.06): Manrope ExtraBold 14 px, mayúsculas, espaciado 16 %. Naranja solo sobre azul/noche. */
/* Antetítulo con punto naranja: texto azul en fondo claro, naranja en fondo azul/noche. */
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font); font-size: 14px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.eyebrow::before, .rail .section::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); flex: 0 0 auto; }
.hero .eyebrow { color: var(--orange); }
/* Palabra destacada sobre fondo claro: el naranja va como subrayado, nunca como texto. */
.hl { color: var(--accent); text-decoration: underline; text-decoration-color: var(--orange); text-decoration-thickness: .14em; text-underline-offset: .12em; text-decoration-skip-ink: none; }
/* Logo oficial (wwwroot/brand): submarca mínimo 180 px de ancho; bajo eso, isotipo (mínimo 24 px). Reserva 1 x. */
.brand-logo { display: block; width: 190px; height: auto; }
.brand-logo.lg { width: 230px; }
.logo-iso { display: block; width: 48px; height: 48px; }
.rail a, .rail .soon { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 12px; border-radius: 12px; color: var(--rail-ink); text-decoration: none; font-size: 14px; }
.rail a:hover { background: rgba(255,255,255,.07); color: #fff; }
.rail a.active { background: var(--card-solid); color: var(--accent); font-weight: 700; box-shadow: inset 3px 0 0 var(--orange); }
.rail .section { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--orange); padding: 14px 12px 4px; }
.rail .soon { opacity: .55; cursor: default; justify-content: space-between; }
.rail .soon span.tag { font-size: 14px; border: 1px solid rgba(217,222,230,.35); border-radius: 99px; padding: 1px 7px; }
.rail .spacer { flex: 1 1 auto; min-height: 16px; }
.content { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }

.topbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 10px 14px 10px 18px; border-radius: 20px; background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow); backdrop-filter: blur(14px); }
.topbar .grow { flex: 1 1 40px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--orange); color: var(--night); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.pill-live { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 14px; font-weight: 600; }
.pill-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--teal); }

@media (max-width: 860px) {
  .rail { flex: 1 1 100%; position: static; flex-direction: row; flex-wrap: wrap; }
  .rail .brand { flex: 1 1 100%; }
  .rail .section, .rail .spacer { display: none; }
}

/* ── Componentes ── */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); backdrop-filter: blur(14px); padding: 20px; }
.card.flush { padding: 0; overflow: hidden; }
.hero { background: var(--hero); color: #fff; border-radius: 28px; padding: 28px; box-shadow: 0 20px 40px rgba(0,32,91,.2); }
.hero .muted { color: rgba(255,255,255,.82); }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.row .grow { flex: 1 1 auto; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.page-head > div:first-child { flex: 1 1 300px; }
.kpi { font-family: var(--display); font-size: 30px; font-weight: 700; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--card-solid); color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn:hover { filter: brightness(.96); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-hover); filter: none; }
/* Llamado a la acción: uno solo por vista. Texto noche, nunca blanco. */
.btn.cta { background: var(--orange); border-color: var(--orange); color: var(--night); font-weight: 700; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--accent); padding: 0 8px; }
.btn.danger { color: var(--neg); border-color: var(--neg-mark); }
.btn.sm { min-height: 34px; padding: 0 14px; font-size: 14px; border-radius: 999px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 14px; font-weight: 600; background: var(--soft); color: var(--muted); white-space: nowrap; }
.badge.ok { background: var(--accent-soft); color: var(--accent); }
.badge.warn { background: var(--orange-soft); color: var(--orange-ink); }
.badge.bad { background: var(--neg-soft); color: var(--neg); box-shadow: inset 0 0 0 1px var(--neg-mark); }
.badge.pos { background: var(--pos-soft); color: var(--pos); }

.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th { text-align: left; font-size: 14px; font-weight: 700; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.data td { padding: 11px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.data tr:hover td { background: var(--row-hover); }
table.data td.num, table.data th.num { text-align: right; }

.tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 14px; background: var(--soft); width: fit-content; }
.tabs button { border: 0; background: transparent; padding: 8px 14px; border-radius: 10px; font: inherit; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; min-height: 36px; }
.tabs button.on { background: var(--card-solid); color: var(--ink); box-shadow: 0 1px 4px rgba(0,32,91,.1); }

/* ── Formularios ── */
.form { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
.field.full { grid-column: 1 / -1; }
.field input, .field select, .field textarea, .input { min-height: 42px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--card-solid); font: inherit; font-size: 14px; font-weight: 400; color: var(--ink); }
.field textarea { padding: 10px 12px; min-height: 90px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; cursor: pointer; padding: 6px 10px; border-radius: 10px; background: var(--soft); }
.check input { width: 17px; height: 17px; accent-color: var(--accent); }
.validation-message, .err { color: var(--neg); font-size: 14px; font-weight: 600; }
.validation-message::before, .err::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--neg-mark); margin-right: 6px; vertical-align: middle; }
.ok-note { color: var(--pos); font-weight: 600; }
.ok-note::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--pos-mark); margin-right: 6px; vertical-align: middle; }
.alert { padding: 12px 16px; border-radius: 14px; font-size: 14px; }
.alert.ok { background: var(--pos-soft); color: var(--pos); box-shadow: inset 4px 0 0 var(--pos-mark); }
.alert.bad { background: var(--neg-soft); color: var(--neg); box-shadow: inset 4px 0 0 var(--neg-mark); }
.alert.info { background: var(--orange-soft); color: var(--orange-ink); }

.dialog-backdrop { position: fixed; inset: 0; background: var(--overlay); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 50; }
.dialog { width: 100%; max-width: 560px; max-height: 90vh; overflow: auto; background: var(--card-solid); border-radius: 24px; padding: 24px; display: flex; flex-direction: column; gap: 16px; }

/* ── Tarjetas de módulo ── */
.module-card { display: flex; flex-direction: column; gap: 10px; padding: 20px; border-radius: 24px; background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow); text-decoration: none; color: var(--ink); transition: transform .18s ease; }
.module-card:hover { transform: translateY(-3px); color: var(--ink); }
.module-card .name { font-family: var(--display); font-weight: 600; font-size: 18px; }

/* ── Landing ── */
.landing { max-width: 1180px; margin: 0 auto; padding: 20px 20px 60px; display: flex; flex-direction: column; gap: 64px; }
.landing nav.top { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.landing nav.top .links { display: flex; gap: 18px; flex-wrap: wrap; font-size: 14px; }
.landing nav.top .links a { color: var(--ink); text-decoration: none; }
.landing .hero-l { display: flex; flex-wrap: wrap; gap: 32px; align-items: center; }
.landing .hero-l > div { flex: 1 1 420px; }
.landing h1.big { font-size: clamp(34px, 5vw, 56px); line-height: 1.05; letter-spacing: -1px; }
.landing .lead { font-size: 18px; line-height: 1.55; color: var(--muted); max-width: 560px; }
.landing section h2 { font-size: 30px; margin-bottom: 8px; }
.steps { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); counter-reset: s; }
.steps .card { position: relative; padding-top: 52px; }
.steps .card::before { counter-increment: s; content: counter(s); position: absolute; top: 18px; left: 20px; width: 26px; height: 26px; border-radius: 50%; background: var(--orange); color: var(--night); font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 14px; }
/* Franja de contacto sobre el fondo «Red ASSAP oscura» (manual V.07): el texto va en el 40 % superior libre;
   la red ocupa el 60 % inferior de la imagen y queda bajo el texto gracias al padding inferior proporcional al ancho. */
.landing .contacto-red { background: #141B4D url("/brand/fondos/red-assap-oscura.jpg") center bottom / 100% auto no-repeat;
  color: #fff; border-radius: 28px; padding: 32px 32px calc(34% + 32px); box-shadow: 0 20px 40px rgba(0,32,91,.2); display: flex; flex-direction: column; gap: 14px; }
.landing .contacto-red .eyebrow { color: var(--orange); }
.landing .contacto-red p { color: #D9DEE6; margin: 0; max-width: 60ch; }
.landing .contacto-red .btn.sec-dark { background: transparent; color: #fff; border-color: rgba(217,222,230,.6); }
footer.site { border-top: 1px solid var(--border); padding-top: 20px; font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; }

/* ── Errores de Blazor ── */
#blazor-error-ui { background: var(--orange-soft); color: var(--ink); bottom: 0; box-shadow: 0 -1px 2px rgba(0,32,91,.2); display: none; left: 0; padding: .6rem 1.25rem .7rem; position: fixed; width: 100%; z-index: 1000; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .75rem; top: .5rem; }

.rail .brand small { display: block; font-family: var(--font); font-size: 14px; font-weight: 600; color: var(--rail-muted); margin-top: 8px; }
.actions { display: flex; gap: 4px; flex-wrap: nowrap; justify-content: flex-end; }

/* ── Diseñador de reportes ── */
.designer { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; }
.designer .panel { flex: 1 1 280px; max-width: 320px; min-width: 0; }
.designer .canvas { flex: 999 1 520px; min-width: 0; }
.panel-list { display: flex; flex-direction: column; gap: 6px; }
.panel-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; background: var(--soft); border: 1px solid transparent; font-size: 14px; cursor: pointer; text-align: left; width: 100%; font-family: inherit; color: var(--ink); }
.panel-item.on { border-color: var(--accent); background: var(--accent-soft); }
.palette { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.palette button { min-height: 36px; border-radius: 10px; border: 1px dashed var(--border-strong); background: var(--card-solid); font: inherit; font-size: 14px; cursor: pointer; color: var(--ink); }
.palette button:hover { border-color: var(--accent); }
.board { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px; padding: 14px; border-radius: 20px; background: var(--board); border: 1px dashed var(--border-strong); min-height: 420px; align-content: start; }
.vis { border-radius: 18px; background: var(--card-solid); border: 2px solid var(--border); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; cursor: pointer; min-width: 0; text-align: left; font: inherit; color: var(--ink); }
.vis.on { border-color: var(--accent); box-shadow: 0 0 0 4px var(--focus-ring); }
.vis .vt { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vis .vbody { flex: 1 1 auto; min-height: 0; display: flex; align-items: flex-end; gap: 4px; }
.vis .chips { display: flex; flex-wrap: wrap; gap: 4px; }
.vis .chips span { font-size: 14px; padding: 1px 7px; border-radius: 99px; background: var(--soft); color: var(--muted); white-space: nowrap; }
.vis .chips span.k { background: var(--accent-soft); color: var(--accent); }
.h-S { height: 120px; } .h-M { height: 240px; } .h-L { height: 350px; }
.mock-bar { flex: 1; border-radius: 6px 6px 0 0; background: var(--accent); opacity: .85; }
.mock-row { height: 10px; border-radius: 4px; background: var(--soft); }
textarea.code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 14px; min-height: 260px; padding: 12px; border-radius: 12px; border: 1px solid var(--border-strong); width: 100%; resize: vertical; }
@media (max-width: 860px) { .board { grid-template-columns: repeat(4, minmax(0, 1fr)); } .board .vis { grid-column: span 4 !important; } }

/* ── Visor de reportes (fase 3) ── */
:root {
  /* Paleta categórica solo con colores oficiales y tintes (brand book V.06, decisión del dueño 9-nov-2026).
     Separación validada entre vecinos: daltonismo ΔE 15,7 (meta 8), visión normal ΔE 28,5 (piso 15).
     No cumple la banda de luminosidad de la skill dataviz (azul y noche muy oscuros): se compensa con
     leyenda y tabla siempre visibles. Orden fijo; amarillo solo en la 8.ª categoría; sin morado (solo IA). */
  --series-1: #00205B; --series-2: #FF8200; --series-3: #00B3AA; --series-4: #334D7C;
  --series-5: #FF9B33; --series-6: #141B4D; --series-7: #8090AD; --series-8: #FEDD00;
  --chart-surface: #ffffff; --chart-grid: #EDEEEE; --chart-axis: #C4C5C6; --chart-muted: #334D7C;
}
.viewer { display: flex; flex-direction: column; gap: 16px; }
.viewer-head { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: flex-end; }
.viewer-head .small { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.filter-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; padding: 12px 14px; border-radius: 18px; background: var(--card); border: 1px solid var(--border); }
.field.compact { min-width: 160px; flex: 0 1 220px; font-size: 14px; }
.field.compact select { min-height: 36px; }
.viz-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; }
.viz { padding: 16px 18px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.viz.h-S, .viz.h-M, .viz.h-L { height: auto; }
.viz.h-S { min-height: 110px; } .viz.h-M { min-height: 240px; } .viz.h-L { min-height: 360px; }
.viz-title { font-size: 14px; font-family: var(--font); font-weight: 600; color: var(--ink); }
.kpi-tiles { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; height: 100%; }
.kpi-tile { flex: 1 1 140px; min-width: 0; }
.kpi-tile .kpi { font-size: clamp(22px, 2.4vw, 34px); overflow-wrap: anywhere; }
.chart-svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart-svg .grid { stroke: var(--chart-grid); stroke-width: 1; }
.chart-svg .baseline { stroke: var(--chart-axis); stroke-width: 1; }
/* Etiquetas de ejes y valores: única excepción al mínimo de 14 px (deben caber en el gráfico). */
.axis-label { font-size: 12px; fill: var(--chart-muted); font-family: var(--font); }
.value-label { font-size: 12px; fill: var(--ink); font-family: var(--font); font-weight: 600; }
.donut-total { font-size: 20px; font-weight: 700; fill: var(--ink); font-family: var(--display); }
.chart-svg .mark:hover rect, .chart-svg .mark:hover path, .chart-donut path:hover { opacity: .82; }
.chart-donut { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.chart-donut svg { width: min(200px, 100%); }
.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 14px; color: var(--muted); }
.chart-donut .legend { flex-direction: column; flex: 1 1 140px; }
.legend li { display: flex; align-items: center; gap: 6px; }
.swatch { width: 10px; height: 10px; border-radius: 3px; flex: 0 0 auto; }
.chart-empty { color: var(--muted); font-size: 14px; padding: 24px 0; }
.chart-table { max-height: 340px; overflow: auto; }
@media (max-width: 860px) { .viz-grid { grid-template-columns: 1fr; } .viz { grid-column: span 1 !important; } }

/* Pantalla completa y modo TV: fondo de la marca, letra más grande, sin controles. */
.viewer:fullscreen { background: var(--bg); padding: 28px; overflow: auto; }
.viewer.tv { padding: 24px 28px; min-height: 100vh; }
.viewer.tv .viewer-head h1 { font-size: 34px; }
.viewer.tv .kpi-tile .kpi { font-size: clamp(30px, 3.4vw, 54px); }
.viewer.tv .axis-label, .viewer.tv .value-label { font-size: 13px; }
.viewer.tv .tabs { display: none; }
a.module-card { text-decoration: none; color: inherit; }
.viz.h-S .chart-svg:not(.horizontal) { height: 130px; }
.viz.h-M .chart-svg:not(.horizontal) { height: 230px; }
.viz.h-L .chart-svg:not(.horizontal) { height: 340px; }
.chart-svg { flex: 0 0 auto; }
.multiples { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 18px; }
.multiples .chart-svg:not(.horizontal) { height: 170px !important; }
.multiple-title { display: flex; align-items: center; gap: 6px; font-weight: 600; margin-bottom: 4px; }
.chart-donut { flex-wrap: nowrap; }
.chart-donut svg { flex: 0 0 170px; width: 170px; height: 170px; }
.chart-donut .legend { flex: 1 1 auto; min-width: 0; }
@media (max-width: 480px) { .chart-donut { flex-wrap: wrap; } }
@media (max-width: 860px) {
  .viz { overflow-x: auto; }
  .viz .chart-svg:not(.horizontal) { min-width: 560px; height: auto !important; }
  .multiples .chart-svg:not(.horizontal) { min-width: 0; }
}

/* ── Modo TV (fase 4) ── */
.tv-shell { min-height: 100vh; }
.tv-pair { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.tv-code { font-family: var(--display); font-size: 34px; letter-spacing: 8px; text-transform: uppercase; text-align: center; min-height: 64px; }
.tv-wrap { position: relative; }
.tv-bar { position: fixed; right: 16px; bottom: 14px; display: flex; gap: 10px; align-items: center; padding: 6px 8px 6px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow); font-size: 14px; color: var(--muted); opacity: .35; transition: opacity .2s; }
.tv-bar:hover, .tv-bar:focus-within { opacity: 1; }
.tv-progress { width: 90px; height: 4px; border-radius: 4px; background: var(--soft); overflow: hidden; }
.tv-progress span { display: block; height: 100%; background: var(--accent); animation: tvprog linear forwards; transform-origin: left; }
@keyframes tvprog { from { transform: scaleX(0); } to { transform: scaleX(1); } }
:fullscreen .tv-bar { display: none; }

/* ── Asistente (fase 5) ── */
.chat { display: flex; flex-direction: column; gap: 10px; min-height: 240px; }
.msg { max-width: min(760px, 92%); padding: 10px 14px; border-radius: 16px; font-size: 14px; }
.msg.user { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 4px; }
.msg.bot { align-self: flex-start; background: var(--card-solid); border: 1px solid var(--border); border-left: 3px solid var(--ai); border-bottom-left-radius: 4px; width: min(760px, 92%); }
.msg .kpi { font-size: 28px; }
.confirm { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 8px; padding: 10px 12px; border-radius: 12px; background: var(--ai-soft); font-size: 14px; }
/* Morado 266: exclusivo de inteligencia artificial */
.ai-mark { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: var(--ai); color: #fff; font-size: 14px; font-weight: 700; }
.chat-input { position: sticky; bottom: 12px; background: var(--card); padding: 10px; border-radius: 18px; border: 1px solid var(--border); box-shadow: var(--shadow); }

/* ── Visuales de dos dimensiones y medidor ── */
.heat th[scope="row"] { font-weight: 600; text-align: left; white-space: nowrap; }
.heat-cell { font-variant-numeric: tabular-nums; border: 2px solid var(--card-solid); border-radius: 6px; color: #141B4D; }
.heat-cell.heat-hi { color: #FFFFFF; }
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.kanban-col { display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 16px; background: var(--soft); min-width: 0; }
.kanban-col header { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.kanban-col header strong { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kanban-card { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 12px; background: var(--card-solid); border: 1px solid var(--border); font-size: 14px; }
.kanban-card span { min-width: 0; overflow-wrap: anywhere; color: var(--muted); }
.kanban-card strong { font-variant-numeric: tabular-nums; }
.gauge { display: flex; flex-direction: column; gap: 6px; }
.gauge-svg { width: 100%; max-width: 280px; height: auto; display: block; margin: 0 auto; }

/* ── Mi panel ── */
.pin { border: 0; background: transparent; color: var(--muted); font-size: 18px; line-height: 1; padding: 2px 6px; border-radius: 8px; cursor: pointer; }
.pin:hover, .pin:focus-visible { color: var(--orange); background: var(--soft); }
.panel-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; }
.panel-tile { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.panel-tile .src { font-size: 14px; color: var(--muted); }
.panel-tools { display: flex; gap: 4px; flex-wrap: wrap; }
@media (max-width: 860px) { .panel-grid { grid-template-columns: 1fr; } .panel-tile { grid-column: span 1 !important; } }

/* ── Tabla configurable del visor ── */
.dt { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.dt-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.dt-tools .grow { flex: 1 1 auto; }
.dt-size { min-height: 34px; width: auto; }
.dt-cols { position: relative; }
.dt-cols summary { list-style: none; }
.dt-cols summary::-webkit-details-marker { display: none; }
.dt-pop { position: absolute; z-index: 5; top: calc(100% + 6px); left: 0; display: flex; flex-direction: column; gap: 4px; padding: 10px; border-radius: 14px; background: var(--card-solid); border: 1px solid var(--border); box-shadow: var(--shadow); min-width: 220px; }
.dt-sort { border: 0; background: none; padding: 0; font: inherit; font-weight: 700; color: inherit; cursor: pointer; text-align: inherit; }
.dt-sort:hover { color: var(--accent); }
.dt.compact table.data td, .dt.compact table.data th { padding-top: 5px; padding-bottom: 5px; }
.dt table.data tfoot th, .dt table.data tfoot td { font-weight: 700; border-top: 2px solid var(--border-strong); border-bottom: 0; }
.dt-pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; }

/* ── Tema oscuro «noche» (selector Sistema/Claro/Oscuro; cookie «assap-tema» → <html data-theme>) ── */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: linear-gradient(160deg, #141B4D 0%, #141B4D 55%, #00205B 140%);
  --bg-solid: #141B4D;
  --card: rgba(217,222,230,.07);
  --card-solid: #00205B;          /* azul ASSAP 281: tinte oficial (manual V.07) */
  --border: rgba(217,222,230,.14);
  --border-strong: rgba(217,222,230,.3);
  --shadow: 0 10px 30px rgba(0,0,0,.25);
  --ink: #FFFFFF;
  --muted: #B2BCCE;               /* azul 30 % */
  --soft: rgba(217,222,230,.08);
  --accent: #D9DEE6;              /* en oscuro el acento es claro */
  --accent-hover: #FFFFFF;
  --accent-ink: #141B4D;
  --accent-soft: rgba(217,222,230,.14);
  --orange-soft: rgba(255,130,0,.18);
  --orange-ink: #FFFFFF;
  --teal-soft: rgba(0,179,170,.2);
  --ai-soft: rgba(117,59,189,.3);
  --rail: #00205B;
  --rail-ink: #D9DEE6;
  --rail-muted: #B2BCCE;
  --pos: #FFFFFF; --pos-soft: rgba(0,179,170,.2);
  --neg: #FFFFFF; --neg-soft: rgba(255,130,0,.18);
  --hero: linear-gradient(135deg, #00205B 0%, #141B4D 100%);
  --overlay: rgba(0,0,0,.6);
  --row-hover: rgba(217,222,230,.05);
  --board: rgba(217,222,230,.04);
  --focus-ring: rgba(217,222,230,.18);
  --rail-shadow: 0 18px 40px rgba(0,0,0,.35);
  --heat: #D9DEE6;
  /* Gráficos en oscuro: tintes oficiales por familia (validado 12-nov-2026 contra #00205B: daltonismo ΔE 12,0; normal 19,5; contraste ≥ 3:1). */
  --series-1: #8A8DA6; --series-2: #FF8200; --series-3: #33C2BB; --series-4: #D9DEE6;
  --series-5: #FF9B33; --series-6: #8090AD; --series-7: #80D9D4; --series-8: #FEDD00;
  --chart-surface: #00205B; --chart-grid: rgba(217,222,230,.12); --chart-axis: rgba(217,222,230,.3); --chart-muted: #B2BCCE;
  color-scheme: dark;
} }
:root[data-theme="dark"] {
  --bg: linear-gradient(160deg, #141B4D 0%, #141B4D 55%, #00205B 140%);
  --bg-solid: #141B4D;
  --card: rgba(217,222,230,.07);
  --card-solid: #00205B;          /* azul ASSAP 281: tinte oficial (manual V.07) */
  --border: rgba(217,222,230,.14);
  --border-strong: rgba(217,222,230,.3);
  --shadow: 0 10px 30px rgba(0,0,0,.25);
  --ink: #FFFFFF;
  --muted: #B2BCCE;               /* azul 30 % */
  --soft: rgba(217,222,230,.08);
  --accent: #D9DEE6;              /* en oscuro el acento es claro */
  --accent-hover: #FFFFFF;
  --accent-ink: #141B4D;
  --accent-soft: rgba(217,222,230,.14);
  --orange-soft: rgba(255,130,0,.18);
  --orange-ink: #FFFFFF;
  --teal-soft: rgba(0,179,170,.2);
  --ai-soft: rgba(117,59,189,.3);
  --rail: #00205B;
  --rail-ink: #D9DEE6;
  --rail-muted: #B2BCCE;
  --pos: #FFFFFF; --pos-soft: rgba(0,179,170,.2);
  --neg: #FFFFFF; --neg-soft: rgba(255,130,0,.18);
  --hero: linear-gradient(135deg, #00205B 0%, #141B4D 100%);
  --overlay: rgba(0,0,0,.6);
  --row-hover: rgba(217,222,230,.05);
  --board: rgba(217,222,230,.04);
  --focus-ring: rgba(217,222,230,.18);
  --rail-shadow: 0 18px 40px rgba(0,0,0,.35);
  --heat: #D9DEE6;
  /* Gráficos en oscuro: tintes oficiales por familia (validado 12-nov-2026 contra #00205B: daltonismo ΔE 12,0; normal 19,5; contraste ≥ 3:1). */
  --series-1: #8A8DA6; --series-2: #FF8200; --series-3: #33C2BB; --series-4: #D9DEE6;
  --series-5: #FF9B33; --series-6: #8090AD; --series-7: #80D9D4; --series-8: #FEDD00;
  --chart-surface: #00205B; --chart-grid: rgba(217,222,230,.12); --chart-axis: rgba(217,222,230,.3); --chart-muted: #B2BCCE;
  color-scheme: dark;
}
/* Logos: versión a color en claro, blanca en oscuro */
.only-dark { display: none !important; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .only-dark { display: block !important; } :root:not([data-theme="light"]) .only-light { display: none !important; } }
:root[data-theme="dark"] .only-dark { display: block !important; }
:root[data-theme="dark"] .only-light { display: none !important; }
/* Selector de tema */
.theme-switch { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--soft); }
.theme-switch button { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 14px; font-weight: 600; min-height: 30px; padding: 0 12px; border-radius: 999px; cursor: pointer; }
.theme-switch button[aria-pressed="true"] { background: var(--card-solid); color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.12); }
/* Mapa de calor en oscuro: el valor alto es claro, el texto se invierte desde 47 % */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .heat-cell { color: #FFFFFF; } :root:not([data-theme="light"]) .heat-cell.heat-hi-d { color: #141B4D; } }
:root[data-theme="dark"] .heat-cell { color: #FFFFFF; }
:root[data-theme="dark"] .heat-cell.heat-hi-d { color: #141B4D; }

/* ── Asistente IA flotante del portal (morado: solo IA) ── */
.ai-fab { position: fixed; z-index: 60; right: calc(20px + env(safe-area-inset-right, 0px)); bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  width: 56px; height: 56px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer;
  background: var(--ai); color: #fff; box-shadow: 0 12px 30px rgba(117,59,189,.35); transition: transform .2s ease; }
.ai-fab:hover { transform: translateY(-2px); }
.ai-fab:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.ai-panel { position: fixed; z-index: 59; right: calc(20px + env(safe-area-inset-right, 0px)); bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  width: min(440px, calc(100vw - 40px)); max-height: min(640px, calc(100vh - 120px)); overflow: auto;
  background: var(--card-solid); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.chat.compact { max-height: 360px; overflow: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 600px) { .ai-panel { left: 12px; right: 12px; width: auto; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); } }
@media (prefers-reduced-motion: reduce) { .ai-fab { transition: none; } }

/* ── Menú lateral: hamburguesa, íconos y modo contraído con nombre flotante (cookie «assap-menu») ── */
.rail-head { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.rail-toggle { display: inline-grid; place-items: center; width: 42px; height: 42px; margin: 0 0 2px 4px; border: 0; border-radius: 12px;
  background: transparent; color: var(--rail-ink); cursor: pointer; }
.rail-toggle:hover { background: rgba(255,255,255,.07); color: #fff; }
.rail-toggle:focus-visible, .rail a:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.rail .brand-iso { display: none; }
.rail .nav-icon { flex: 0 0 20px; }
.rail a { position: relative; }
.rail { transition: flex-basis .25s ease; }

:root[data-menu="compacto"] .rail { flex-basis: 76px; padding-inline: 10px; align-items: center; }
:root[data-menu="compacto"] .rail-head { align-items: center; }
:root[data-menu="compacto"] .rail-toggle { margin: 0 0 2px; }
:root[data-menu="compacto"] .rail .brand { align-items: center; padding: 6px 0 14px; }
:root[data-menu="compacto"] .rail .brand-logo, :root[data-menu="compacto"] .rail .brand small { display: none; }
:root[data-menu="compacto"] .rail .brand-iso { display: block; }
:root[data-menu="compacto"] .rail .section { font-size: 0; letter-spacing: 0; padding: 10px 0 4px; justify-content: center; }
:root[data-menu="compacto"] .rail a { justify-content: center; padding: 0; width: 48px; }
/* El nombre sigue en el HTML para lectores de pantalla, pero no ocupa espacio. */
:root[data-menu="compacto"] .rail a .label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
/* Nombre flotante al pasar el mouse o al llegar con el teclado. */
:root[data-menu="compacto"] .rail a[data-tip]::after {
  content: attr(data-tip); position: absolute; left: calc(100% + 12px); top: 50%; transform: translateY(-50%);
  background: var(--night); color: #fff; font-size: 14px; font-weight: 600; white-space: nowrap; padding: 6px 12px; border-radius: 10px;
  box-shadow: 0 8px 20px rgba(20,27,77,.25); opacity: 0; pointer-events: none; transition: opacity .15s ease; z-index: 40; }
:root[data-menu="compacto"] .rail a[data-tip]:hover::after, :root[data-menu="compacto"] .rail a[data-tip]:focus-visible::after { opacity: 1; }

@media (max-width: 860px) {
  .rail-toggle { display: none; }
  :root[data-menu="compacto"] .rail { flex-basis: 100%; align-items: stretch; }
  :root[data-menu="compacto"] .rail .brand-logo { display: block; }
  :root[data-menu="compacto"] .rail .brand-iso { display: none; }
  :root[data-menu="compacto"] .rail a { width: auto; padding: 0 12px; justify-content: flex-start; }
  :root[data-menu="compacto"] .rail a .label { position: static; width: auto; height: auto; clip: auto; }
  :root[data-menu="compacto"] .rail a[data-tip]::after { display: none; }
}
@media (prefers-reduced-motion: reduce) { .rail, .rail a[data-tip]::after { transition: none; } }

/* Grupos del menú que se abren y cierran al marcar el título (RailGroup + assap.menuGroups). */
.rail details.rail-group { display: flex; flex-direction: column; gap: 4px; }
.rail details.rail-group > summary { list-style: none; cursor: pointer; border-radius: 12px; user-select: none; }
.rail details.rail-group > summary::-webkit-details-marker { display: none; }
.rail details.rail-group > summary::after { content: ""; width: 7px; height: 7px; margin-left: auto; border: solid var(--rail-muted); border-width: 0 2px 2px 0; transform: rotate(-45deg); transition: transform .2s ease; }
.rail details.rail-group[open] > summary::after { transform: rotate(45deg); }
.rail details.rail-group > summary:hover { background: rgba(255,255,255,.07); }
.rail details.rail-group > summary:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
:root[data-menu="compacto"] .rail details.rail-group { align-items: center; }
:root[data-menu="compacto"] .rail details.rail-group > summary { cursor: default; pointer-events: none; }
:root[data-menu="compacto"] .rail details.rail-group > summary::after { display: none; }
@media (max-width: 860px) {
  .rail details.rail-group { flex: 1 1 100%; flex-direction: row; flex-wrap: wrap; }
  .rail details.rail-group > summary.section { display: flex; flex: 1 1 100%; }
  :root[data-menu="compacto"] .rail details.rail-group { align-items: stretch; }
  :root[data-menu="compacto"] .rail details.rail-group > summary { pointer-events: auto; cursor: pointer; }
  :root[data-menu="compacto"] .rail details.rail-group > summary::after { display: block; }
}
@media (prefers-reduced-motion: reduce) { .rail details.rail-group > summary::after { transition: none; } }

/* Consumo y capacidad: los números no se cortan en dos líneas. */
.consumo-tabla td.num, .consumo-tabla th.num { white-space: nowrap; }
.consumo-tabla td:first-child { min-width: 160px; }

/* Modo soporte ASSAP: franja visible en todo el portal (fondo naranja 15 % + marca naranja, texto azul noche; sin rojo). */
.soporte-banner { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 12px 16px; border-radius: 16px; background: var(--orange-soft); box-shadow: inset 4px 0 0 var(--orange); color: var(--ink); }
.soporte-banner .grow { flex: 1 1 320px; min-width: 0; }

/* ── Marca del cliente (backoffice → ficha → Marca, 13-nov-2026) ── */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.marca-logos { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.marca-slot { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--border); border-radius: 18px; min-width: 0; }
.marca-view { height: 96px; border-radius: 14px; border: 1px solid var(--border); background: #FFFFFF; display: grid; place-items: center; padding: 12px; overflow: hidden; }
.marca-view img { max-width: 100%; max-height: 72px; object-fit: contain; }
.marca-view.dark { border-color: transparent; }
.marca-view .placa { background: #FFFFFF; border-radius: 12px; padding: 6px 10px; display: inline-grid; place-items: center; }
.marca-view .placa img { max-height: 56px; }
.marca-slot label.btn { cursor: pointer; }
.marca-candidate { border: 1px solid var(--orange); border-radius: 18px; padding: 16px; background: var(--card-solid); }
.marca-compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.marca-compare figure { margin: 0; display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: 16px; border: 2px solid transparent; }
.marca-compare figure.on { border-color: var(--accent); }
.marca-compare figcaption { font-size: 14px; }
.marca-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 4px; border: 1px solid var(--border); border-radius: 999px; }
.marca-chip input[type=color], .marca-var input[type=color] { width: 34px; height: 34px; padding: 0; border: 1px solid var(--border-strong); border-radius: 50%; background: none; cursor: pointer; }
.marca-themes { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.marca-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; }
.marca-var { display: flex; align-items: center; gap: 8px; font-size: 14px; }
/* Mini portal de vista previa: usa solo las variables calculadas del tema (estilo en línea del contenedor). */
.marca-preview { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px; padding: 10px; border-radius: 18px; background: var(--bg); border: 1px solid var(--border); font-size: 14px; }
.marca-preview .mp-rail { background: var(--rail); color: var(--rail-ink); border-radius: 14px; padding: 10px 8px; display: flex; flex-direction: column; gap: 6px; }
.marca-preview .mp-logo { height: 14px; border-radius: 4px; background: var(--rail-muted); opacity: .6; margin-bottom: 4px; }
.marca-preview .mp-item { padding: 4px 8px; border-radius: 999px; }
.marca-preview .mp-item.on { background: var(--card-solid); color: var(--ink); box-shadow: inset 3px 0 0 var(--orange); }
.marca-preview .mp-body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.marca-preview .mp-card { background: var(--card-solid); color: var(--ink); border-radius: 14px; padding: 10px; display: flex; flex-direction: column; }
.marca-preview .mp-eyebrow { color: var(--muted); font-weight: 700; }
.marca-preview .mp-muted { color: var(--muted); }
.marca-preview .mp-bars { display: flex; align-items: flex-end; gap: 4px; height: 70px; background: var(--chart-surface); border-radius: 12px; padding: 8px; }
.marca-preview .mp-bars i { flex: 1; border-radius: 3px 3px 0 0; }
.marca-preview .mp-btn { background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: 4px 12px; font-weight: 700; }
.marca-preview .mp-cta { background: var(--orange); color: var(--orange-ink); border-radius: 999px; padding: 4px 12px; font-weight: 700; }

/* ── Logo del cliente en el menú y hamburguesa en la barra superior (13-nov-2026) ── */
.topbar .rail-toggle { margin: 0; color: var(--ink); }
.topbar .rail-toggle:hover { background: var(--soft); color: var(--ink); }
.topbar .rail-toggle:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.rail .brand img.client-logo.brand-logo { width: auto; max-width: 180px; max-height: 56px; object-fit: contain; }
.rail .brand .logo-placa { background: #FFFFFF; border-radius: 12px; padding: 6px 10px; display: inline-grid; place-items: center; }
.rail .brand .logo-placa.brand-logo { width: auto; max-width: 196px; }
.rail .brand .logo-placa img { display: block; max-width: 176px; max-height: 44px; width: auto; height: auto; object-fit: contain; }
.rail .brand .brand-iso.logo-placa { padding: 4px; }
.rail .brand .brand-iso.logo-placa img { max-width: 36px; max-height: 36px; }
.rail .brand img.client-logo.brand-iso { width: 40px; height: 40px; object-fit: contain; }
.rail .brand .logo-iniciales { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.16); color: #FFFFFF; font-family: var(--display); font-weight: 700; font-size: 15px; place-items: center; }
/* La miniatura solo va con el menú contraído: la placa y las iniciales no deben mostrarse junto al logo grande (13-nov-2026). */
.rail .brand .brand-iso.logo-placa, .rail .brand .brand-iso.logo-iniciales { display: none; }
:root[data-menu="compacto"] .rail .brand .logo-iniciales, :root[data-menu="compacto"] .rail .brand .brand-iso.logo-placa { display: grid; }
@media (max-width: 860px) { :root[data-menu="compacto"] .rail .brand .brand-iso.logo-placa, :root[data-menu="compacto"] .rail .brand .brand-iso.logo-iniciales { display: none; } }
.rail .powered { color: var(--rail-muted); font-size: 14px; padding: 8px 12px 0; }
:root[data-menu="compacto"] .rail .powered { display: none; }

.cuenta-logo { display: block; max-width: 200px; max-height: 56px; width: auto; height: auto; object-fit: contain; }
.tv-bar .tv-logo { height: 28px; width: auto; max-width: 160px; object-fit: contain; }
.marca-view.dark .muted { color: rgba(255,255,255,.8); }
.cuenta-placa { display: inline-block; align-self: flex-start; }
:root[data-theme="dark"] .cuenta-placa { background: #FFFFFF; border-radius: 12px; padding: 6px 10px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cuenta-placa { background: #FFFFFF; border-radius: 12px; padding: 6px 10px; } }
