/* Portal de cuenta de Owlo (/cuenta/, W-120). Traslado de «Portal - Alta», «Portal - Gestión» y la sección 05 del sistema
   de diseño (Claude Design) a clases: la CSP no admite estilos en línea. Tokens de la web pública (public/assets/site.css).
   Móvil primero; solo propiedades lógicas (árabe en RTL). */

@font-face { font-family: "Montserrat"; font-weight: 500; font-style: normal; font-display: swap; src: url("/fonts/montserrat-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 600; font-style: normal; font-display: swap; src: url("/fonts/montserrat-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 700 800; font-style: normal; font-display: swap; src: url("/fonts/montserrat-latin-800-normal.woff2") format("woff2"); }

:root {
  color-scheme: dark;
  --ox-charcoal-950: #121418;
  --ox-charcoal-900: #171A1F;
  --ox-charcoal-850: #1B1F25;
  --ox-charcoal-800: #21252C;
  --ox-charcoal-700: #2B3038;
  --ox-charcoal-600: #343B46;
  --ox-ink: #0F1216;
  --ox-silver-300: #C4CAD3;
  --ox-silver-500: #9AA3B0;
  --ox-chrome-300: #98DFF9;
  --ox-chrome-500: #1FA6E8;
  --ox-hero-bg: linear-gradient(100deg, #2B3038 0%, #343B46 45%, #56647A 100%);
  --ox-line: rgba(196, 202, 211, 0.12);
  --ox-border: rgba(196, 202, 211, 0.14);
  --ox-border-strong: rgba(196, 202, 211, 0.22);
  /* W-194 (auditoría 15-10: WEB-12): borde de los campos a ≥3:1 con su fondo y con el de la página (WCAG 1.4.11);
     el de antes (--ox-border-strong) quedaba en 1,9:1. El mismo en public/assets/site.css */
  --ox-field-border: #737D8B;
  --ox-error: #F59A9A;
  --ox-warn: #F2CF86;
  --ox-ok: #7FE0A8;
  --ox-info: #98DFF9;
  --ox-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --gutter: 20px;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--ox-charcoal-900); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--ox-charcoal-900); color: #FFFFFF;
  font-family: Montserrat, "Helvetica Neue", Helvetica, Arial, sans-serif; font-weight: 500; font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
[hidden] { display: none !important; }
img { max-width: 100%; }
a { color: var(--ox-chrome-300); text-decoration: none; }
a:hover { color: #FFFFFF; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; }
:focus-visible { outline: 2px solid var(--ox-chrome-500); outline-offset: 3px; }
h1, h2, h3 { margin: 0; font-weight: 800; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Estructura ─────────────────────────────────────────────── */
.logo { display: block; height: 28px; width: auto; align-self: flex-start; }
/* W-194 (WEB-13): el logo lleva a la portada y «Ayuda» a soporte, en el idioma del portal */
.logo-link { display: inline-flex; align-items: center; min-height: 44px; align-self: flex-start; }
.help-link { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; font-weight: 600; }
.topbar, .brand-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.topbar { padding: 8px var(--gutter) 0; }
/* WEB-12: el foco pasa al h1 de cada pantalla nueva (tabindex=-1), sin marco: no es un control */
h1[tabindex="-1"]:focus { outline: none; }
.page { padding: 0 var(--gutter) 40px; max-width: 520px; margin: 0 auto; }
.stack { display: flex; flex-direction: column; gap: 20px; }
.stack-sm { display: flex; flex-direction: column; gap: 12px; }
/* Contenedores de avisos y errores vacíos: sin hueco doble en la pila */
.stack > div:empty, .stack-sm > div:empty, .ox-field > div:empty { display: none; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.row-end { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; }
.screen { padding-top: 28px; }
.screen-title { font-size: 28px; line-height: 1.15; letter-spacing: -0.01em; }
/* W-153: subtítulo de una parte de una pantalla (Tu cuenta › Diagnóstico) */
.section-title { font-size: 17px; font-weight: 600; margin-top: 8px; }
.screen-sub { margin-top: 8px; color: var(--ox-silver-300); }
.muted { color: var(--ox-silver-500); }
.small { font-size: 13px; }
.strong { color: #FFFFFF; font-weight: 600; }
.back-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 600; font-size: 14px; }
.back-link::before { content: "←"; }
[dir="rtl"] .back-link::before { content: "→"; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--ox-silver-500); font-size: 13px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--ox-line); }
.rule { height: 1px; background: var(--ox-line); border: 0; margin: 0; }
.code-text { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: 0.08em; }

/* ── Indicador de pasos (.ox-steps) ─────────────────────────── */
.ox-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 22px var(--gutter) 0; max-width: 520px; margin: 0 auto; }
.ox-steps li { display: flex; flex-direction: column; gap: 8px; font-size: 12px; color: var(--ox-silver-500); min-width: 0; }
.ox-steps li::before { content: ""; height: 4px; border-radius: 2px; background: rgba(196, 202, 211, 0.18); }
.ox-steps li.is-done, .ox-steps li[aria-current="step"] { color: #FFFFFF; }
.ox-steps li.is-done::before, .ox-steps li[aria-current="step"]::before { background: var(--ox-chrome-500); }
.ox-steps li.is-done { color: var(--ox-chrome-300); }
.ox-steps li[aria-current="step"] { font-weight: 600; }
.step-num::after { content: " · "; }
.ox-steps li.is-done .step-num { display: none; }
.ox-steps li.is-done .step-label::before { content: "✓ "; }

/* ── Botones ────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 10px 24px;
  border: 0; border-radius: 999px; font-weight: 700; font-size: 15px; text-align: center; line-height: 1.25;
  transition: box-shadow 200ms var(--ox-ease), background 200ms var(--ox-ease), opacity 200ms;
}
.btn-block { width: 100%; }
.btn-lg { min-height: 56px; font-size: 16px; font-weight: 800; }
.btn-sm { min-height: 44px; padding: 8px 18px; font-size: 14px; }
.btn-primary, a.btn-primary:hover { background: #FFFFFF; color: var(--ox-ink); font-weight: 800; }
.btn-primary:hover:not(:disabled), .btn-primary:focus-visible { box-shadow: 0 0 0 3px var(--ox-charcoal-900), 0 0 0 6px var(--ox-chrome-500); outline: none; }
.btn-secondary, a.btn-secondary:hover { background: var(--ox-charcoal-700); color: #FFFFFF; }
.btn-secondary:hover:not(:disabled) { background: var(--ox-charcoal-600); }
.btn-danger, a.btn-danger:hover { background: var(--ox-error); color: var(--ox-ink); font-weight: 800; }
.btn-danger:hover:not(:disabled), .btn-danger:focus-visible { box-shadow: 0 0 0 3px var(--ox-charcoal-900), 0 0 0 6px var(--ox-error); outline: none; }
.btn-ghost { background: transparent; color: var(--ox-silver-300); }
.btn-ghost:hover:not(:disabled) { color: #FFFFFF; }
.btn:disabled { background: var(--ox-charcoal-700); color: var(--ox-silver-500); box-shadow: none; opacity: 0.75; }
.btn-social { background: var(--ox-charcoal-800); color: #FFFFFF; box-shadow: inset 0 0 0 1px var(--ox-border-strong); font-weight: 600; }
.btn-social:hover:not(:disabled) { background: var(--ox-charcoal-700); }
.btn-social .g-logo { width: 26px; height: 26px; padding: 4px; border-radius: 50%; background: #FFFFFF; flex: none; }
.link-btn {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0; border: 0; background: none;
  color: var(--ox-chrome-300); font-weight: 600; text-align: start;
}
.link-btn:hover { color: #FFFFFF; }
.link-btn.danger { color: var(--ox-error); }
.link-btn.plain { color: var(--ox-silver-300); font-weight: 500; }
.spinner {
  width: 20px; height: 20px; border-radius: 50%; border: 3px solid rgba(15, 18, 22, 0.25); border-top-color: var(--ox-ink);
  animation: spin 800ms linear infinite; flex: none;
}
.spinner.light { border-color: rgba(196, 202, 211, 0.25); border-top-color: #FFFFFF; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner, .live-dot::after { animation: none; } }

/* ── Campos (.ox-field) ─────────────────────────────────────── */
.ox-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ox-field label, .field-label { font-size: 14px; font-weight: 600; color: var(--ox-silver-300); }
.input, .select, .textarea {
  width: 100%; min-height: 52px; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--ox-field-border);
  background: var(--ox-charcoal-800); color: #FFFFFF; font: inherit; font-size: 16px; outline: none;
  transition: border-color 150ms, box-shadow 150ms;
}
.textarea { min-height: 116px; resize: vertical; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 14px; line-height: 1.6; }
.input::placeholder, .textarea::placeholder { color: var(--ox-silver-500); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--ox-chrome-500); box-shadow: 0 0 0 1px var(--ox-chrome-500); }
.input:disabled, .textarea:disabled, .select:disabled { opacity: 0.55; }
.input[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--ox-error); box-shadow: 0 0 0 1px var(--ox-error); }
.select { appearance: none; padding-inline-end: 44px; background-image: linear-gradient(45deg, transparent 50%, var(--ox-silver-300) 50%), linear-gradient(135deg, var(--ox-silver-300) 50%, transparent 50%); background-position: calc(100% - 22px) 50%, calc(100% - 17px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
[dir="rtl"] .select { background-position: 17px 50%, 22px 50%; }
.input-code { text-align: center; font-size: 24px; letter-spacing: 0.2em; text-transform: uppercase; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.input-wrap { position: relative; }
.input-wrap .input { padding-inline-end: 96px; }
.input-action {
  position: absolute; inset-block: 0; inset-inline-end: 0; min-width: 44px; padding: 0 16px; border: 0; background: none;
  color: var(--ox-chrome-300); font-weight: 600; font-size: 14px;
}
.paste-wrap { position: relative; }
.paste-wrap .textarea { padding-block-end: 64px; }
.paste-wrap .paste-btn { position: absolute; inset-inline-end: 8px; inset-block-end: 8px; }
.field-hint { font-size: 13px; color: var(--ox-silver-500); }
.field-error { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: var(--ox-error); }
.field-error::before { content: "!"; flex: none; display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; margin-top: 1px; border-radius: 50%; background: var(--ox-error); color: var(--ox-ink); font-size: 12px; font-weight: 800; }
.field-ok { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: var(--ox-ok); }
.field-ok::before { content: "✓"; flex: none; display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; margin-top: 1px; border-radius: 50%; background: var(--ox-ok); color: var(--ox-ink); font-size: 11px; font-weight: 800; }
.field-warn { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: var(--ox-warn); }
.field-warn::before { content: "i"; flex: none; display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; margin-top: 1px; border-radius: 50%; background: var(--ox-warn); color: var(--ox-ink); font-size: 12px; font-weight: 800; }
.pair > .field-warn, .pair > .field-ok { grid-column: 1 / -1; }
.suggest-chip {
  align-self: flex-start; min-height: 44px; padding: 8px 16px; border: 0; border-radius: 999px; background: rgba(31, 166, 232, 0.16);
  color: var(--ox-chrome-300); font-weight: 600; text-align: start;
}
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pair > .field-error { grid-column: 1 / -1; }
@media (max-width: 340px) { .pair { grid-template-columns: minmax(0, 1fr); } }
.choice {
  display: flex; flex-direction: column; gap: 4px; width: 100%; padding: 16px; border-radius: 16px; text-align: start;
  border: 1px solid var(--ox-field-border); background: var(--ox-charcoal-800);
}
.choice[aria-pressed="true"] { border-color: var(--ox-chrome-500); box-shadow: 0 0 0 1px var(--ox-chrome-500); }
.choice-title { font-weight: 700; color: #FFFFFF; }
.choice-text { font-size: 13px; color: var(--ox-silver-500); overflow-wrap: anywhere; }
.advanced { border-top: 1px solid var(--ox-line); }
.advanced summary { display: flex; justify-content: space-between; align-items: center; min-height: 52px; color: var(--ox-silver-300); cursor: pointer; list-style: none; }
.advanced summary::-webkit-details-marker { display: none; }
.advanced summary::after { content: "+"; color: var(--ox-chrome-500); font-size: 20px; }
.advanced[open] summary::after { content: "−"; }
.advanced > .stack-sm { padding-bottom: 8px; }

/* ── Interruptor (.ox-switch) y fichas de elección (.chips) ─── */
.ox-switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 52px; cursor: pointer; }
.ox-switch input { appearance: none; flex: none; width: 48px; height: 28px; margin: 0; border-radius: 999px; background: var(--ox-charcoal-600); position: relative; cursor: pointer; transition: background 200ms; }
.ox-switch input::after { content: ""; position: absolute; inset-block-start: 3px; inset-inline-start: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--ox-silver-300); transition: inset-inline-start 200ms var(--ox-ease), background 200ms; }
.ox-switch input:checked { background: var(--ox-chrome-500); }
.ox-switch input:checked::after { inset-inline-start: 23px; background: #FFFFFF; }
.ox-switch input:disabled { opacity: 0.5; }
.switch-text { display: flex; flex-direction: column; gap: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 8px 16px; border: 0; border-radius: 999px; background: var(--ox-charcoal-800); color: var(--ox-silver-300); font-weight: 600; }
.chip[aria-pressed="true"] { background: #FFFFFF; color: var(--ox-ink); font-weight: 800; }

/* ── Avisos (.ox-notice) ────────────────────────────────────── */
.ox-notice { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: 16px; background: rgba(152, 223, 249, 0.10); }
.ox-notice-icon { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; margin-top: 1px; border-radius: 50%; background: var(--ox-info); color: var(--ox-ink); font-size: 13px; font-weight: 800; }
.ox-notice-body { display: flex; flex-direction: column; gap: 10px; min-width: 0; flex: 1; }
.ox-notice-title { font-weight: 700; }
.ox-notice-text { color: #FFFFFF; overflow-wrap: anywhere; }
.ox-notice-title + .ox-notice-text { color: var(--ox-silver-300); margin-top: -6px; }
.ox-notice .row { gap: 8px; }
.ox-notice--error { background: rgba(245, 154, 154, 0.10); }
.ox-notice--error .ox-notice-icon { background: var(--ox-error); }
.ox-notice--warn { background: rgba(242, 207, 134, 0.10); }
.ox-notice--warn .ox-notice-icon { background: var(--ox-warn); }
.ox-notice--ok { background: rgba(127, 224, 168, 0.10); }
.ox-notice--ok .ox-notice-icon { background: var(--ox-ok); }
.ox-notice--plain { background: var(--ox-charcoal-800); }
.ok-line { display: flex; align-items: center; gap: 12px; color: var(--ox-ok); font-weight: 600; min-height: 44px; }
.ok-line::before { content: "✓"; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: rgba(127, 224, 168, 0.18); font-size: 13px; }

/* Correo por confirmar (B1), retomar (B9) */
.banner { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; background: rgba(31, 166, 232, 0.12); }
.banner-text { flex: 1; min-width: 0; font-size: 14px; overflow-wrap: anywhere; }
.banner-text b { font-weight: 700; }
.banner .btn { flex: none; }
.live-dot { position: relative; flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--ox-chrome-300); box-shadow: 0 0 0 3px rgba(152, 223, 249, 0.25); }
.live-dot::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid var(--ox-chrome-300); animation: pulse 1.6s var(--ox-ease) infinite; }
@keyframes pulse { from { transform: scale(0.8); opacity: 0.9; } to { transform: scale(1.8); opacity: 0; } }
.waiting { display: flex; align-items: center; gap: 10px; color: var(--ox-chrome-300); font-size: 14px; }
.resume { padding: 16px; border-radius: 16px; background: rgba(31, 166, 232, 0.12); display: flex; flex-direction: column; gap: 6px; }
.resume-title { font-weight: 700; }
.resume-line { display: flex; gap: 8px; color: var(--ox-silver-300); overflow-wrap: anywhere; }
.resume-line.done::before { content: "✓"; color: var(--ox-ok); }
.resume-line.next::before { content: "→"; }
[dir="rtl"] .resume-line.next::before { content: "←"; }

/* ── Tarjetas ───────────────────────────────────────────────── */
.card { padding: 16px; border-radius: 18px; background: var(--ox-charcoal-800); border: 1px solid var(--ox-border); }
.card-hero { background: var(--ox-hero-bg); border: 0; }
.tv-context { display: flex; align-items: center; gap: 16px; padding: 16px; border-radius: 18px; background: var(--ox-hero-bg); }
.tv-icon { flex: none; width: 48px; height: 32px; border-radius: 6px; background: #0E1013; box-shadow: 0 0 0 1px rgba(152, 223, 249, 0.22); position: relative; }
.tv-icon::after { content: ""; position: absolute; inset-inline: 30%; bottom: -4px; height: 3px; border-radius: 0 0 2px 2px; background: var(--ox-charcoal-600); }
.tv-context-label { font-size: 13px; color: var(--ox-silver-300); }
.tv-context-code { font-size: 22px; font-weight: 800; letter-spacing: 0.1em; }
.tv-context-hint { font-size: 13px; color: var(--ox-silver-300); }
.demo-card { display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: 20px; background: var(--ox-hero-bg); }
.demo-title { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; }
.demo-title img { width: 22px; height: 22px; }
.demo-card .btn { align-self: flex-start; background: rgba(15, 18, 22, 0.5); }
.demo-card .btn:hover:not(:disabled) { background: rgba(15, 18, 22, 0.7); }

/* Tarjeta de estado de una lista (.ox-status-card) y etiqueta (.ox-pill) */
.ox-status-card { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 18px; background: var(--ox-charcoal-800); border: 1px solid var(--ox-border); }
.ox-status-card.is-error { border-color: rgba(245, 154, 154, 0.45); }
.ox-status-card.is-warn { border-color: rgba(242, 207, 134, 0.4); }
.status-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.status-name { font-weight: 800; font-size: 17px; min-width: 0; overflow-wrap: anywhere; }
.status-meta { color: var(--ox-silver-300); font-size: 14px; overflow-wrap: anywhere; }
.status-reason { color: var(--ox-error); font-size: 14px; }
.status-warn { color: var(--ox-warn); font-size: 14px; }
.status-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 10px; border-top: 1px solid var(--ox-line); }
.ox-pill { flex: none; display: inline-flex; align-items: center; min-height: 26px; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; background: rgba(196, 202, 211, 0.12); color: var(--ox-silver-300); white-space: nowrap; }
.ox-pill--ok { background: rgba(127, 224, 168, 0.14); color: var(--ox-ok); }
.ox-pill--error { background: rgba(245, 154, 154, 0.14); color: var(--ox-error); }
.ox-pill--warn { background: rgba(242, 207, 134, 0.14); color: var(--ox-warn); }
.ox-pill--info { background: rgba(152, 223, 249, 0.14); color: var(--ox-info); }

/* Filas de lista (televisores, perfiles, resumen) */
.list-card { border-radius: 18px; background: var(--ox-charcoal-800); border: 1px solid var(--ox-border); overflow: hidden; }
.list-row { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 12px 16px; color: #FFFFFF; width: 100%; border: 0; background: none; text-align: start; }
.list-row + .list-row { border-top: 1px solid var(--ox-line); }
a.list-row:hover, button.list-row:hover { background: rgba(196, 202, 211, 0.05); color: #FFFFFF; }
a.list-row::after, button.list-row.nav::after { content: "›"; margin-inline-start: auto; color: var(--ox-silver-500); font-size: 20px; }
[dir="rtl"] a.list-row::after, [dir="rtl"] button.list-row.nav::after { content: "‹"; }
.list-row-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.list-row-title { font-weight: 600; font-size: 16px; overflow-wrap: anywhere; }
.list-row-sub { font-size: 13px; color: var(--ox-silver-500); overflow-wrap: anywhere; }
.list-row-sub.warn { color: var(--ox-warn); }
.list-row .dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--ox-error); }
.avatar { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: #56647A; font-weight: 800; color: #FFFFFF; }
.avatar-lg { width: 52px; height: 52px; font-size: 20px; }
.tag-owner { color: var(--ox-chrome-300); font-size: 13px; font-weight: 600; }
.empty-card { padding: 18px; border-radius: 18px; border: 1px dashed var(--ox-border-strong); display: flex; flex-direction: column; gap: 10px; }
.empty-card .btn { align-self: flex-start; }
.skeleton { display: flex; flex-direction: column; gap: 10px; padding: 18px 16px; }
.skeleton span { display: block; height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--ox-charcoal-700), var(--ox-charcoal-600), var(--ox-charcoal-700)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.skeleton span:first-child { width: 60%; height: 14px; }
.skeleton span:last-child { width: 35%; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Pantallas de resultado: icono grande */
.big-icon { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 50%; font-size: 30px; font-weight: 800; }
.big-icon.ok { background: rgba(127, 224, 168, 0.16); color: var(--ox-ok); }
.big-icon.done { background: #FFFFFF; color: var(--ox-ink); box-shadow: 0 0 40px rgba(31, 166, 232, 0.35); }
.ring-icon { width: 64px; height: 64px; position: relative; left: 2.7px; /* círculo centrado, no el play (W-267) */ filter: drop-shadow(0 0 24px rgba(31, 166, 232, 0.45)); }
.done-screen { position: relative; }
.done-screen::before { content: ""; position: absolute; inset: -40px -20px auto; height: 260px; background: radial-gradient(ellipse at 70% 0%, rgba(86, 100, 122, 0.45), transparent 70%); pointer-events: none; }
.done-screen > * { position: relative; }
.lead { font-size: 17px; line-height: 1.55; }

/* Vinculando (D1) */
.linking { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 72px 0 24px; text-align: center; }
.tv-frame { width: min(220px, 70%); aspect-ratio: 16 / 10; border-radius: 10px; padding: 6px; background: #0A0B0D; box-shadow: 0 0 0 1px rgba(152, 223, 249, 0.22), 0 0 80px rgba(31, 166, 232, 0.28); }
.tv-screen { width: 100%; height: 100%; border-radius: 6px; background: radial-gradient(ellipse at 30% 20%, #343B46 0%, var(--ox-charcoal-800) 60%, #1A1D23 100%); display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 4px; }
.tv-screen img { width: 40px; height: 40px; }
.tv-screen-label { font-size: 12px; color: var(--ox-silver-300); }
.tv-screen-code { font-size: 22px; font-weight: 800; letter-spacing: 0.1em; }
.linking-status { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 18px; }

/* ── Diálogo de confirmación (.ox-confirm) ───────────────────── */
.ox-confirm {
  width: 100%; max-width: 100%; margin: auto 0 0; padding: 12px 20px 24px; border: 0; border-radius: 22px 22px 0 0;
  background: var(--ox-charcoal-700); color: #FFFFFF;
}
.ox-confirm::backdrop { background: rgba(10, 11, 13, 0.7); }
.ox-confirm::before { content: ""; display: block; width: 40px; height: 4px; margin: 0 auto 16px; border-radius: 2px; background: rgba(196, 202, 211, 0.4); }
.ox-confirm h2 { font-size: 21px; overflow-wrap: anywhere; }
.ox-confirm p { margin-top: 8px; color: var(--ox-silver-300); }
.confirm-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.confirm-actions .btn { width: 100%; }
.ox-confirm .btn-secondary { background: var(--ox-charcoal-600); }

/* ── Panel de cuenta ────────────────────────────────────────── */
.manage-nav { display: none; }
.manage-head { display: flex; flex-direction: column; gap: 6px; }
.signed-in { font-size: 13px; color: var(--ox-silver-500); overflow-wrap: anywhere; }
.signed-in b { color: #FFFFFF; font-weight: 500; }
.alerts { display: flex; flex-direction: column; gap: 12px; }
.sum-grid { display: flex; flex-direction: column; border-radius: 18px; background: var(--ox-charcoal-800); border: 1px solid var(--ox-border); overflow: hidden; }
.sum-card { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 12px 16px; color: #FFFFFF; }
.sum-card + .sum-card { border-top: 1px solid var(--ox-line); }
.sum-card:hover { background: rgba(196, 202, 211, 0.05); color: #FFFFFF; }
.sum-card::after { content: "›"; color: var(--ox-silver-500); font-size: 20px; }
[dir="rtl"] .sum-card::after { content: "‹"; }
.sum-main { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.sum-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sum-title { font-weight: 600; font-size: 16px; }
.sum-sub { font-size: 13px; color: var(--ox-silver-500); overflow-wrap: anywhere; }
.sum-sub.warn { color: var(--ox-warn); }
.sum-more, .sum-body { display: none; }
.split { display: flex; flex-direction: column; gap: 20px; }
.split.is-editing > .split-list { display: none; }
.split:not(.is-editing) > .split-editor { display: none; }
.editor-head { display: flex; align-items: center; gap: 14px; }
.editor-head h1 { font-size: 26px; overflow-wrap: anywhere; }
.pin-card { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 18px; background: var(--ox-charcoal-800); }

/* ── Escritorio ─────────────────────────────────────────────── */
@media (min-width: 900px) {
  :root { --gutter: 40px; }
  .screen-title { font-size: 34px; }

  /* Alta: panel de cuero a la izquierda (televisor, pasos, lista de prueba) y el formulario a la derecha */
  .alta { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; }
  .alta-aside {
    display: flex; flex-direction: column; justify-content: space-between; gap: 32px; padding: 36px 56px 48px;
    /* W-299: degradado azul de la marca que entra desde el borde izquierdo (derecho en RTL) y llena el panel */
    background:
      linear-gradient(90deg, rgba(31, 166, 232, 0.34) 0%, rgba(31, 132, 232, 0.16) 30%, rgba(31, 132, 232, 0.05) 60%, transparent 85%),
      linear-gradient(100deg, var(--ox-charcoal-850) 0%, #2B3038 55%, #3B4553 100%);
  }
  [dir="rtl"] .alta-aside {
    background:
      linear-gradient(270deg, rgba(31, 166, 232, 0.34) 0%, rgba(31, 132, 232, 0.16) 30%, rgba(31, 132, 232, 0.05) 60%, transparent 85%),
      linear-gradient(260deg, var(--ox-charcoal-850) 0%, #2B3038 55%, #3B4553 100%);
  }
  .alta-aside-body { display: flex; flex-direction: column; gap: 28px; }
  /* Televisor dibujado (nítido a cualquier tamaño) con el anillo pequeño, titular y entradilla */
  .aside-hero { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 18px; max-width: 440px; }
  .aside-hero[hidden] { display: none; }
  .aside-hero-tv { margin-bottom: 28px; }
  .aside-hero-tv .tv-frame { position: relative; width: min(100%, 400px); padding: 8px; border-radius: 14px; }
  .aside-hero-tv .tv-frame::after { content: ""; position: absolute; left: 50%; bottom: -18px; width: 34%; height: 6px; transform: translateX(-50%); border-radius: 0 0 6px 6px; background: #0A0B0D; box-shadow: 0 0 0 1px rgba(152, 223, 249, 0.14); }
  .aside-hero-tv .tv-screen { border-radius: 8px; background: radial-gradient(ellipse at 50% 45%, rgba(31, 166, 232, 0.28) 0%, rgba(31, 132, 232, 0.08) 38%, transparent 70%), radial-gradient(ellipse at 30% 20%, #343B46 0%, var(--ox-charcoal-800) 60%, #1A1D23 100%); }
  .aside-hero-tv .tv-screen img { width: 88px; height: 88px; filter: drop-shadow(0 0 18px rgba(31, 166, 232, 0.5)); }
  .aside-hero-title { margin: 0; font-size: clamp(34px, 3vw, 46px); line-height: 1.1; font-weight: 800; letter-spacing: -0.015em; }
  .aside-hero-lead { margin: 0; color: var(--ox-silver-300); font-size: 17px; line-height: 1.5; }
  .alta-main { display: flex; flex-direction: column; justify-content: center; padding: 48px 56px; }
  .alta-main .topbar, .alta-main .ox-steps { display: none; }
  .alta-main .page { width: 100%; max-width: 440px; padding: 0; }
  .aside-tv .tv-frame { width: 340px; }
  .aside-tv-text { display: flex; flex-direction: column; gap: 6px; }
  .aside-tv-code { font-size: 30px; font-weight: 800; letter-spacing: 0.1em; }
  .steps-vertical { display: flex; flex-direction: column; gap: 18px; }
  .steps-vertical li { position: relative; display: flex; align-items: flex-start; gap: 14px; color: var(--ox-silver-300); }
  /* Línea que une los círculos */
  .steps-vertical li:not(:last-child)::before { content: ""; position: absolute; top: 32px; bottom: -14px; inset-inline-start: 13.5px; width: 1px; background: rgba(196, 202, 211, 0.2); }
  .steps-vertical .step-text { display: flex; flex-direction: column; gap: 2px; padding-top: 3px; }
  .steps-vertical .step-sub { color: var(--ox-silver-500); font-size: 14px; font-weight: 400; }
  .steps-vertical .n { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; border: 1px solid rgba(196, 202, 211, 0.4); font-size: 13px; font-weight: 800; }
  .steps-vertical li[aria-current="step"] { color: #FFFFFF; font-weight: 700; }
  .steps-vertical li[aria-current="step"] .n { background: #FFFFFF; color: var(--ox-ink); border-color: #FFFFFF; }
  .steps-vertical li.is-done { color: var(--ox-chrome-300); }
  .steps-vertical li.is-done .n { background: rgba(31, 166, 232, 0.2); border-color: transparent; color: var(--ox-chrome-300); font-size: 0; }
  .steps-vertical li.is-done .n::after { content: "✓"; font-size: 13px; }
  .steps-vertical .code-text { color: var(--ox-silver-500); font-weight: 500; }
  #auth-tv { display: none; }

  /* Panel: barra lateral y tarjetas */
  .manage { display: grid; grid-template-columns: 272px minmax(0, 1fr); min-height: 100vh; }
  .manage-nav { display: flex; flex-direction: column; gap: 6px; padding: 32px 20px; background: var(--ox-charcoal-950); }
  .manage-nav .logo { margin: 0 12px 28px; }
  .nav-link { display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: 0 14px; border-radius: 12px; color: var(--ox-silver-300); }
  .nav-link:hover { color: #FFFFFF; background: rgba(196, 202, 211, 0.05); }
  .nav-link[aria-current="page"] { background: var(--ox-charcoal-800); color: #FFFFFF; font-weight: 600; }
  .nav-link .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ox-error); }
  .nav-foot { margin-top: auto; padding: 0 14px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--ox-silver-500); }
  .nav-foot b { color: #FFFFFF; font-weight: 500; overflow-wrap: anywhere; }
  .manage-main .topbar { display: none; }
  .manage-main .page { max-width: 960px; margin: 0; padding: 0 48px 48px; }
  .manage-main .back-to-summary, .manage-head .signed-in { display: none; }
  .head-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
  .sum-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; background: none; border: 0; border-radius: 0; overflow: visible; }
  .sum-card { flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 12px; padding: 22px; border-radius: 18px; background: var(--ox-charcoal-800); border: 1px solid var(--ox-border); }
  .sum-card + .sum-card { border-top: 1px solid var(--ox-border); }
  .sum-card::after { display: none; }
  .sum-title { font-weight: 800; font-size: 17px; }
  .sum-main { flex: none; }
  .sum-more { display: inline; color: var(--ox-chrome-300); font-weight: 600; font-size: 14px; }
  .sum-sub { display: none; }
  .sum-body { display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
  .sum-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .sum-line .muted { text-align: end; }
  .sum-people { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .sum-person { display: flex; align-items: center; gap: 10px; min-width: 0; }
  .sum-person .avatar { width: 36px; height: 36px; }
  .split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
  .split.is-editing > .split-list, .split:not(.is-editing) > .split-editor { display: flex; }
  .split-editor { padding: 24px; border-radius: 20px; background: var(--ox-charcoal-850); border: 1px solid var(--ox-border); }
  .split-editor .back-link { display: none; }
  .split:not(.is-editing) > .split-editor { display: none; }
  .ox-confirm { width: 460px; max-width: calc(100% - 32px); margin: auto; padding: 24px 28px; border-radius: 22px; }
  .ox-confirm::before { display: none; }
  .confirm-actions { flex-direction: row-reverse; justify-content: flex-start; }
  .confirm-actions .btn { width: auto; }
}
@media (max-width: 899px) {
  .alta-aside, .desktop-only { display: none !important; }
}
@media (min-width: 900px) {
  .mobile-only { display: none !important; }
}

/* WEB-1: enlaces legales del alta y pie del portal */
.legal-note { line-height: 1.5; }
.legal-note a { color: var(--ox-silver-300); text-decoration: underline; }
.portal-footer { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; padding: 24px 16px 32px; font-size: 13px; }
.portal-footer a { color: var(--ox-silver-500); text-decoration: none; }
.lang-pick { display: inline-flex; align-items: center; gap: 8px; color: var(--ox-silver-500); flex-basis: 100%; justify-content: center; }
.select-sm { width: auto; min-height: 44px; padding-block: 8px; font-size: 14px; }
.portal-footer a:hover { color: #FFFFFF; text-decoration: underline; }

/* ── W-195: verificación en dos pasos (QR, clave, códigos de recuperación) ───────────────────────────── */
.qr-box { width: 232px; max-width: 100%; padding: 12px; border-radius: 16px; background: #fff; align-self: center; }
.qr-box svg { display: block; width: 100%; height: auto; }
.secret-code, .recovery-codes, .code-input { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.secret-code { font-size: 17px; letter-spacing: 0.06em; overflow-wrap: anywhere; user-select: all; direction: ltr; text-align: start; }
.code-input { letter-spacing: 0.12em; direction: ltr; }
.recovery-codes { columns: 2; column-gap: 24px; padding-inline-start: 28px; font-size: 16px; line-height: 1.9; direction: ltr; }
@media (max-width: 380px) { .recovery-codes { columns: 1; } }

/* W-277: ayuda plegable de «Añade tu lista» */
.playlist-help { border: 1px solid var(--ox-border); border-radius: 14px; padding: 12px 16px; background: var(--ox-charcoal-850); }
.playlist-help summary { cursor: pointer; font-weight: 600; color: var(--ox-blue-300, #6CC6F2); }
.playlist-help[open] summary { margin-bottom: 10px; }
.playlist-example { border: 1px solid var(--ox-border); border-radius: 10px; padding: 10px 14px; background: var(--ox-charcoal-900, #171A1F); display: grid; gap: 8px; direction: ltr; text-align: left; }
.playlist-example p { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; overflow-wrap: anywhere; }
.playlist-example .ex-label { color: var(--ox-silver-500); }
.playlist-example .ex-value { font-weight: 600; }
.playlist-example .ex-field { font-size: 12px; font-weight: 700; color: #98DFF9; background: rgba(31, 166, 232, 0.2); border-radius: 6px; padding: 2px 8px; }
.playlist-example hr { border: 0; border-top: 1px solid var(--ox-border); margin: 2px 0; }

/* ══ W-345: rediseño (design/design_handoff_owlo_rediseno, «Owlo Portal» y «Owlo Sistema») ═══════════════════════
   El mismo sistema que la web: tinta, cromado, píldoras blancas, foco 3 px + 5 px #98DFF9. Las pantallas, sus ids y
   sus estados no cambian; solo la maquetación. Solo se anima transform y opacity. */
:root {
  --ox-ink: #0F1216;
  --ox-error: #FF9C8F;
  --ox-warn: #F6D488;
  --ox-ok: #7FE3B4;
  --ow-focus: 0 0 0 3px var(--ow-focus-gap, #171A1F), 0 0 0 5px #98DFF9;
  --ow-leather: linear-gradient(100deg, #2B3038 0%, #343B46 45%, #56647A 100%);
  --ow-ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
}
:lang(ar) body { font-family: "Geeza Pro", "Noto Naskh Arabic", "Segoe UI", Tahoma, sans-serif; }
:lang(hi) body { font-family: "Kohinoor Devanagari", "Noto Sans Devanagari", "Nirmala UI", sans-serif; }
:lang(zh) body { font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif; }
:lang(ja) body { font-family: "Hiragino Sans", "Yu Gothic UI", Meiryo, "Noto Sans JP", sans-serif; }
:lang(ko) body { font-family: "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif; }
:focus-visible { outline: 2px solid #98DFF9; }
.screen-title { letter-spacing: -0.02em; }

/* Botones: el color cambia sin transición; al pulsar, scale(.97) en 120 ms */
.btn { transition: transform 120ms ease-out; }
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn-primary:hover:not(:disabled) { background: #E9EDF2; box-shadow: none; }
.btn:focus-visible, .btn-primary:focus-visible, .btn-danger:focus-visible { outline: none; box-shadow: var(--ow-focus); }
.btn-secondary, a.btn-secondary:hover { background: rgba(196, 202, 211, 0.12); box-shadow: inset 0 0 0 1px rgba(196, 202, 211, 0.28); }
.btn-secondary:hover:not(:disabled) { background: rgba(196, 202, 211, 0.2); }

/* Campos: fondo de tinta, radio 12, foco cromado */
.input, .select, .textarea { border-radius: 12px; background-color: #0F1115; transition: none; }
.input:focus, .select:focus, .textarea:focus { border-color: #98DFF9; box-shadow: 0 0 0 3px rgba(152, 223, 249, 0.35); }
.choice { border-radius: 14px; background: #0F1115; }

/* Tarjetas y avisos del sistema */
.card, .list-card, .ox-status-card, .sum-grid { border-radius: 20px; background: #1B1F25; border-color: rgba(196, 202, 211, 0.12); }
.demo-card { position: relative; overflow: hidden; border-radius: 20px; background: var(--ow-leather); }
.tv-context { background: var(--ow-leather); }

/* Indicador de pasos del móvil */
.ox-steps li::before { background: rgba(196, 202, 211, 0.18); }

/* Diálogo: velo en 200 ms; hoja que sube 24 px en el móvil y escala .96 → 1 en el escritorio */
.ox-confirm[open] { animation: oxSheet 280ms var(--ow-ease-expo); }
.ox-confirm[open]::backdrop { animation: oxVeil 200ms linear; }
@keyframes oxSheet { from { transform: translateY(24px); opacity: 0; } }
@keyframes oxVeil { from { opacity: 0; } }
.confirm-actions .btn-secondary { background: rgba(196, 202, 211, 0.12); }

/* Panel en el móvil: logo y «Cerrar sesión» arriba, pestañas con desplazamiento horizontal, resumen en tarjetas */
.manage-main .topbar { display: none; }
.manage-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 12px; padding: 8px var(--gutter) 0; background: #121418; position: sticky; top: 0; z-index: 10; }
.manage-nav .nav-foot { display: flex; }
.manage-nav .nav-foot > span, .manage-nav .nav-foot > b { display: none; }
.nav-tabs { order: 3; flex: 1 0 100%; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin: 4px calc(-1 * var(--gutter)) 0; padding: 4px var(--gutter) 10px; }
.nav-tabs::-webkit-scrollbar { display: none; }
.nav-tabs .nav-link { flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 999px; color: #C4CAD3; font-size: 14px; white-space: nowrap; }
.nav-tabs .nav-link[aria-current="page"] { background: rgba(196, 202, 211, 0.12); color: #FFFFFF; font-weight: 700; }
.nav-tabs .nav-link .dot { width: 8px; height: 8px; margin-inline-start: 6px; border-radius: 50%; background: var(--ox-error); }
.sum-grid { display: flex; flex-direction: column; gap: 16px; background: none; border: 0; border-radius: 0; overflow: visible; }
.sum-card { flex-direction: column; align-items: stretch; gap: 12px; padding: 20px; border-radius: 20px; background: #1B1F25; border: 1px solid rgba(196, 202, 211, 0.12); }
.sum-card + .sum-card { border-top: 1px solid rgba(196, 202, 211, 0.12); }
.sum-card::after { display: none; }
.sum-head { width: 100%; }
.sum-title { font-weight: 800; font-size: 17px; }
.sum-main { flex: none; }
.sum-more { display: inline; color: var(--ox-chrome-300); font-weight: 600; font-size: 14px; }
.sum-sub { display: none; }
.sum-body { display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.sum-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sum-people { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.sum-person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sum-person .avatar { width: 36px; height: 36px; }

@media (min-width: 900px) {
  /* Alta: el cuero, fijo a la izquierda; el formulario (con el logo, «Ayuda» y el pie) a la derecha, como antes */
  .alta { display: block; min-height: 0; margin-inline-start: 50%; }
  .alta-aside {
    position: fixed; top: 0; bottom: 0; inset-inline-start: 0; width: 50%; overflow: auto; justify-content: center;
    padding: 48px 64px; background: linear-gradient(260deg, #2B3038 0%, #343B46 45%, #56647A 100%);
  }
  [dir="rtl"] .alta-aside { background: linear-gradient(100deg, #2B3038 0%, #343B46 45%, #56647A 100%); }
  .alta-aside::before { content: ""; position: absolute; inset: 0; background: url("/brand/leather-dark.webp"); background-size: 300px; opacity: 0.4; mix-blend-mode: multiply; pointer-events: none; }
  .alta-aside::after { content: ""; position: absolute; left: 50%; top: 38%; width: 900px; height: 900px; margin: -450px 0 0 -450px; border-radius: 50%; background: radial-gradient(closest-side, rgba(31, 166, 232, 0.22), rgba(31, 166, 232, 0) 100%); pointer-events: none; }
  .alta-aside > * { position: relative; z-index: 1; }
  .alta-aside .brand-row { display: none; }
  .alta-aside-body { display: contents; }
  .aside-tv { order: -1; }
  .aside-tv-text { display: none !important; }
  .aside-hero { flex: none; }
  .aside-hero-tv { margin-bottom: 20px; }
  .aside-tv .tv-frame, .aside-hero-tv .tv-frame { position: relative; width: min(100%, 420px); padding: 8px; border-radius: 16px; background: #0B0D10; box-shadow: 0 0 0 1px rgba(152, 223, 249, 0.3), 0 40px 80px rgba(0, 0, 0, 0.5), 0 0 120px rgba(31, 166, 232, 0.25); }
  .aside-tv .tv-screen-label { font-size: 12px; font-weight: 800; letter-spacing: 0.2em; text-transform: uppercase; color: #9AA3B0; }
  .aside-tv .tv-screen-code { font-size: 40px; letter-spacing: 0.12em; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
  .steps-vertical { gap: 6px; max-width: 440px; }
  .steps-vertical li { padding: 12px 14px; border-radius: 14px; }
  .steps-vertical li:not(:last-child)::before { display: none; }
  .steps-vertical li[aria-current="step"] { background: rgba(15, 17, 21, 0.45); box-shadow: inset 0 0 0 1px rgba(196, 202, 211, 0.16); }
  .steps-vertical li.is-done .n { background: #1FA6E8; color: #FFFFFF; border-color: #1FA6E8; }
  .alta-main { min-height: 100vh; justify-content: flex-start; padding: 24px 56px 40px; }
  .alta-main .topbar { display: flex; width: 100%; max-width: 440px; margin: 0 auto; padding: 0; }
  .alta-main .page { margin: 0 auto; }
  #alta:not([hidden]) ~ .portal-footer { margin-inline-start: 50%; }

  /* Panel: barra lateral fija y el pie en la columna de la derecha */
  .manage { display: block; padding-inline-start: 272px; }
  .manage-nav { position: fixed; top: 0; bottom: 0; inset-inline-start: 0; width: 272px; flex-direction: column; flex-wrap: nowrap; align-items: stretch; justify-content: flex-start; gap: 6px; padding: 32px 20px; overflow-y: auto; z-index: 5; }
  .manage-nav .nav-foot { display: flex; }
  .manage-nav .nav-foot > span, .manage-nav .nav-foot > b { display: block; }
  .nav-tabs { order: 0; flex: none; flex-direction: column; overflow: visible; margin: 0; padding: 0; }
  .nav-tabs .nav-link { display: flex; justify-content: space-between; border-radius: 12px; font-size: 15px; }
  .nav-tabs .nav-link[aria-current="page"] { background: #21252C; font-weight: 600; }
  .manage-main .page { padding-top: 8px; }
  #manage:not([hidden]) ~ .portal-footer { margin-inline-start: 272px; }
  .sum-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .ox-confirm[open] { animation-name: oxPop; animation-duration: 200ms; }
  @keyframes oxPop { from { transform: scale(0.96); opacity: 0; } }
}
@media (prefers-reduced-motion: reduce) {
  .ox-confirm[open], .ox-confirm[open]::backdrop { animation: none; }
  .btn:active:not(:disabled) { transform: none; }
}
/* Resumen: «Cerrar sesión» ya está arriba; «Vincular un televisor», blanco y bajo el título también en el móvil */
.manage-head .signed-in, .manage-head .sign-out { display: none !important; }
@media (max-width: 899px) {
  .head-row { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
  .head-row .link-tv-btn.desktop-only { display: inline-flex !important; }
  #m-summary > .link-tv-btn.mobile-only { display: none !important; }
}
