/* Panel con barra lateral (docs/design-reference.md → «Panel web con barra lateral»), con la paleta de la app
   (Ui.kt): grafito #141516 en la barra y #1C1D1E en el contenido, tinta #EDEDEB, acento menta #BCD3C6 y ámbar
   #E3B977 (administración); botones en píldora, tarjetas grafito de 20 px, foco con anillo y movimiento suave
   (se desactiva con prefers-reduced-motion). */
:root {
  --bg: #1c1d1e; --side: #141516; --surface: #242526; --surface-2: #2c2d2e; --surface-3: #343637; --line: #2f3132; --line-2: #3d4042;
  --side-w: 260px; --main-pt: 32px; --menta-dark: #26302b; --ambar-dark: #2f2a22;
  --text: #ededeb; --muted: #a4a8a9; --dim: #8c9091; --ink-dark: #181a1b;
  --menta: #bcd3c6; --ambar: #e3b977; --coral: #f0a48f; --cielo: #8ec5ec; --lavanda: #b9a8ec; --grafito: #8b929a;
  --danger: #e8968c; --radius: 20px; --pill: 999px;
  --ring: 0 0 0 3px var(--bg), 0 0 0 5px var(--text);
  --shadow: 0 18px 40px -18px rgba(0, 0, 0, .7);
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: var(--menta); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: none; box-shadow: var(--ring); }
h1:focus, h1:focus-visible { box-shadow: none; }
h1 { font-size: 30px; line-height: 1.15; margin: 0 0 6px; letter-spacing: -.02em; font-weight: 600; }
h2 { font-size: 18px; margin: 0 0 12px; letter-spacing: -.01em; font-weight: 600; }
p { margin: 8px 0; }
::selection { background: rgba(188, 211, 198, .35); }
.muted { color: var(--muted); }
.center { text-align: center; }
.small { font-size: 14px; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

main { position: relative; z-index: 1; max-width: 1080px; margin: 0 auto; padding: var(--main-pt) 32px 72px; }
.narrow { max-width: 440px; margin: 4vh auto 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card + .card, .stack > * + * { margin-top: 18px; }
.stack { max-width: 680px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }

label { display: block; font-size: 14px; color: var(--muted); margin: 14px 0 6px; font-weight: 550; }
input[type=text], input[type=email], input[type=password], select {
  width: 100%; padding: 12px 18px; border-radius: var(--pill); border: 1px solid #343738; background: #222425; color: var(--text); font: inherit; transition: border-color .2s, box-shadow .2s, background .2s;
}
select { border-radius: 14px; }
input:hover, select:hover { border-color: var(--line-2); }
input:focus, select:focus { border-color: var(--text); outline: none; background: #2a2c2d; box-shadow: 0 0 0 3px rgba(237, 237, 235, .12); }
input[readonly] { color: var(--muted); background: transparent; }
.code-input { font: 600 28px/1.2 ui-monospace, "Cascadia Mono", monospace; letter-spacing: .16em; text-align: center; text-transform: uppercase; padding: 16px 18px; border-radius: 20px !important; }

button, .button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 0; border-radius: var(--pill); padding: 12px 22px; font-family: inherit; font-size: 15px; font-weight: 600; line-height: 1.2; cursor: pointer; text-decoration: none; transition: filter .15s, background .2s, transform .15s var(--ease), box-shadow .2s, border-color .2s, color .2s; }
button:hover, .button:hover { filter: brightness(1.1); text-decoration: none; }
button:active:not(:disabled), .button:active { transform: scale(.97); }
button:disabled { opacity: .5; cursor: default; filter: none; }
.primary { background: var(--text); color: var(--ink-dark); box-shadow: 0 8px 22px -12px rgba(237, 237, 235, .5); }
.secondary { background: #333435; color: var(--text); border: 1px solid transparent; }
.secondary:hover { background: #3c3e3f; filter: none; }
.ghost { background: transparent; color: var(--muted); border: 1px solid var(--line-2); }
.ghost:hover { color: var(--text); background: rgba(255, 255, 255, .05); filter: none; }
.danger { background: transparent; color: var(--danger); border: 1px solid #5a3a38; }
.danger:hover { background: rgba(232, 150, 140, .08); filter: none; }
button.small, .button.small { padding: 7px 14px; font-size: 14px; }
.block { width: 100%; margin-top: 18px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row.end { justify-content: flex-end; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; margin: 20px 0 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.google { background: #f3f0e8; color: #1f1f1f; width: 100%; margin-top: 18px; }
.google svg { flex: none; }
.error { color: var(--danger); min-height: 1.5em; margin: 12px 0 0; font-size: 15px; }
.note { font-size: 14px; color: var(--muted); margin-top: 18px; }

/* Perfiles */
.profiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px; }
.profile { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 22px 12px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); font: inherit; cursor: pointer; transition: transform .15s, border-color .15s; }
.profile:hover { transform: translateY(-2px); border-color: #50555b; filter: none; }
.profile .name { font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile.add { color: var(--muted); border-style: dashed; background: transparent; }
.profiles.pick { margin: 14px 0 6px; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 12px; }
.profiles.pick .profile { padding: 16px 10px 14px; }
.profiles.pick .profile[aria-checked="true"] { border-color: var(--menta); box-shadow: 0 0 0 1px var(--menta); }
.avatar { width: 84px; height: 84px; border-radius: 26px; display: grid; place-items: center; font: 700 36px/1 system-ui, sans-serif; color: #15181a; }
.avatar.sm { width: 40px; height: 40px; border-radius: 12px; font-size: 18px; }
.avatar.add { background: var(--surface-2); color: var(--muted); font-weight: 400; font-size: 42px; }
.menta { background: #94d9b4; } .ambar { background: #ead188; } .coral { background: #f0a48f; }
.cielo { background: #8ec5ec; } .lavanda { background: #b9a8ec; } .grafito { background: #8b929a; }
.badge { display: inline-block; font-size: 12px; font-weight: 650; padding: 2px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.badge.kids { color: #2a2410; background: var(--ambar); border-color: transparent; }
.badge.ok { color: #102018; background: var(--menta); border-color: transparent; }
.badge.off { color: var(--danger); border-color: #5a3a3a; background: transparent; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { width: 44px; height: 44px; border-radius: 14px; border: 2px solid transparent; padding: 0; }
.swatch[aria-checked="true"] { box-shadow: var(--ring); }
.switch { display: flex; align-items: center; gap: 12px; margin-top: 18px; color: var(--text); font-size: 15px; cursor: pointer; }
.switch input { width: 20px; height: 20px; accent-color: var(--menta); }

/* Listas y tablas */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.list li:first-child { border-top: 0; }
.list .grow { flex: 1; min-width: 180px; }
.list .meta { font-size: 13px; color: var(--muted); }
.tabs { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.tabs button { background: var(--surface); color: var(--muted); border: 1px solid var(--line); }
.tabs button[aria-selected="true"] { background: var(--surface-2); color: var(--text); border-color: #555a60; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 650; padding: 0 10px 10px; }
.table td { padding: 12px 10px; border-top: 1px solid var(--line); vertical-align: middle; }
.table select { width: auto; padding: 6px 10px; border-radius: 9px; }
.table .who b { display: block; font-weight: 600; }
.table .who span { font-size: 13px; color: var(--muted); }
.table-wrap { overflow-x: auto; margin: 0 -10px; }
.linkbox { display: flex; gap: 8px; margin-top: 14px; }
.linkbox input { font: 13px ui-monospace, monospace; }
.audit { font-size: 14px; }
.audit time { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

dialog { background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 20px; padding: 26px; width: min(440px, calc(100vw - 32px)); }
dialog::backdrop { background: rgba(10, 11, 12, .72); backdrop-filter: blur(3px); }
dialog .row.end { margin-top: 24px; }

#toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); background: #f3f0e8; color: #1b1d1f; padding: 12px 18px; border-radius: 12px; font-weight: 600; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); z-index: 20; max-width: calc(100vw - 32px); }
.done { text-align: center; }
.done .check { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 14px; background: var(--menta); color: #102018; font-size: 34px; font-weight: 700; }

@media (max-width: 640px) {
  main { padding-top: 24px; }
  h1 { font-size: 24px; }
  .card { padding: 20px; }
  .avatar { width: 72px; height: 72px; font-size: 30px; border-radius: 22px; }
  .profiles { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .table .hide-sm { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
#invite-result:not(:empty) { margin-top: 26px; }

/* ---- 0017: fotos, perfil, biblioteca, dispositivos y administración ---- */
.avatar { position: relative; overflow: hidden; flex: none; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar.xl { width: 132px; height: 132px; border-radius: 40px; font-size: 56px; }
a.profile { text-decoration: none; }
.back { display: inline-block; color: var(--muted); font-size: 15px; margin-bottom: 10px; }
.tip { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-top: 28px; }
.tip h2 { margin-bottom: 4px; }
.section-title { margin: 30px 0 12px; }
.profile-head { display: flex; gap: 28px; align-items: flex-start; flex-wrap: wrap; }
.profile-head form { max-width: 460px; }
.profile-head form .error { margin-top: 8px; }
.profile-head form > .primary { margin-top: 18px; }
.delete-profile { margin: 18px 0 0 12px; }
.photo-edit { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.center-row { justify-content: center; }
.tabs .count { margin-left: 8px; font-size: 12px; padding: 1px 7px; border-radius: 999px; background: var(--bg); color: var(--muted); }
.media-list li { align-items: center; }
.poster { position: relative; width: 54px; height: 80px; border-radius: 10px; overflow: hidden; flex: none; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); font-weight: 700; font-size: 20px; }
.poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bar { height: 4px; border-radius: 4px; background: var(--surface-2); margin-top: 8px; max-width: 280px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--menta); border-radius: 4px; }
.empty { text-align: center; padding: 26px 12px; }
.empty b { font-size: 17px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 22px; }
.stat { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); text-align: left; font: inherit; cursor: default; }
button.stat, a.stat { cursor: pointer; }
button.stat:hover, a.stat:hover { border-color: #50555b; text-decoration: none; filter: none; }
.stat b { font-size: 30px; line-height: 1.1; font-weight: 700; }
.stat span { font-weight: 600; font-size: 15px; }
.stat small { color: var(--muted); font-size: 13px; }
.ok-text { color: var(--menta); } .warn-text { color: var(--ambar); }
.panel-head { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 8px; }
.search { max-width: 380px; flex: 1; min-width: 200px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: #222425; color: var(--text); font: inherit; }
.search:focus { border-color: var(--menta); outline: none; }
.tags { margin-top: 6px; gap: 8px; }
.device-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; font-size: 22px; flex: none; }
.stale { color: var(--ambar); }
.device-ask { display: flex; align-items: center; gap: 14px; }
.device-ask h1 { margin: 0; }
dialog.wide { width: min(720px, calc(100vw - 32px)); }
.user-dialog h3 { font-size: 15px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 22px 0 8px; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 10px 14px; align-items: center; margin-top: 18px; font-size: 15px; }
.kv > span:nth-child(odd) { color: var(--muted); }
.kv select { width: auto; padding: 6px 10px; border-radius: 9px; }
.mini-profiles { display: flex; gap: 14px; flex-wrap: wrap; }
.mini-profiles > div { display: flex; align-items: center; gap: 8px; background: var(--surface-2); border-radius: 12px; padding: 6px 12px 6px 6px; }
.actions { margin-top: 22px; }
.invite-grid { display: grid; grid-template-columns: 1fr 200px; gap: 0 14px; max-width: 640px; }
.list li.device, .list li.user-row { align-items: center; }
@media (max-width: 640px) {
  .profile-head { flex-direction: column; align-items: stretch; }
  .photo-edit { align-self: center; }
  .avatar.xl { width: 112px; height: 112px; font-size: 46px; border-radius: 34px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat b { font-size: 24px; }
  .invite-grid { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv > span:nth-child(odd) { margin-top: 10px; font-size: 13px; }
  .list li.device > .row, .list li.user-row > button { width: 100%; justify-content: flex-end; }
}
.kv > * { justify-self: start; }

/* ---- 0020: reportes de reproducción ---- */
textarea { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: #222425; color: var(--text); font: inherit; resize: vertical; }
textarea:focus { border-color: var(--menta); outline: none; box-shadow: 0 0 0 3px rgba(188, 211, 198, .18); }
.badge.warn { color: #2a2410; background: var(--coral); border-color: transparent; }
.filters { display: flex; gap: 14px; flex-wrap: wrap; align-items: end; margin-bottom: 12px; }
label.inline { display: flex; flex-direction: column; gap: 4px; margin: 0; }
label.inline select { width: auto; min-width: 160px; padding: 8px 12px; border-radius: 10px; }
.chips { margin: 4px 0 10px; gap: 8px; }
.chip { background: var(--surface-2); color: var(--text); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 550; gap: 8px; }
.chip b { color: var(--ambar); }
.chip.on { border-color: var(--menta); box-shadow: 0 0 0 1px var(--menta); }
.reports .title { display: block; margin-top: 6px; }
.reply { margin: 6px 0 0; padding: 8px 12px; border-left: 3px solid var(--menta); background: var(--surface-2); border-radius: 0 10px 10px 0; font-size: 14px; }
.report-dialog .cause { margin-top: 16px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.report-dialog .cause p { margin: 4px 0 0; }
.report-dialog .kv { margin-top: 8px; font-size: 14px; }
.report-dialog .kv > span:nth-child(even) { word-break: break-word; }
.table.compact { font-size: 13px; margin-top: 12px; }
.table.compact td { padding: 8px 10px; }
.recheck:not(:empty) { margin-top: 8px; }

/* Correo (decisión 0022) */
.tabs.sub { margin-top: -4px; }
.tabs.sub button { padding: 6px 14px; font-size: 14px; }
.mail-preview iframe { width: 100%; height: 560px; border: 1px solid var(--line); border-radius: 12px; background: #eef0f1; margin-top: 14px; }
.mail-text { white-space: pre-wrap; word-break: break-word; font: 14px/1.6 ui-monospace, monospace; background: #222425; border: 1px solid var(--line); border-radius: 12px; padding: 14px; max-height: 420px; overflow: auto; margin-top: 18px; }
.table .mono, .table.dns td { font: 12px/1.5 ui-monospace, monospace; white-space: pre-wrap; word-break: break-all; }
.list li.unread .title { color: var(--menta); }
.meta.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row.downloads { flex-wrap: wrap; gap: 10px; }

/* ---- Espacio de administración separado (acceso propio, menú lateral, Resumen) ---- */
.admin-card { padding: 22px 24px; }

.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.card-head h2 { margin: 0; }
.more { font-size: 14px; font-weight: 600; }
.list.compact li { padding: 11px 0; gap: 12px; flex-wrap: nowrap; }
.list.compact .grow { min-width: 0; }
.list.compact .title, .list.compact .grow > b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attention { flex-wrap: nowrap !important; }
.attention > .icon { width: 22px; height: 22px; }
.attention.warn > .icon { color: var(--ambar); }
.attention.info > .icon { color: var(--cielo); }
.all-good { display: flex; align-items: center; gap: 14px; padding: 6px 0 2px; }
.all-good > .icon { width: 40px; height: 40px; padding: 9px; border-radius: 50%; background: var(--menta); color: #102018; stroke-width: 2.4; }
.all-good p { margin: 2px 0 0; }
.state-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--grafito); }
.state-dot.ok { background: var(--menta); box-shadow: 0 0 0 4px rgba(188, 211, 198, .14); }
.state-dot.warn { background: var(--ambar); box-shadow: 0 0 0 4px rgba(227, 185, 119, .14); }
.state-dot.off { background: var(--danger); box-shadow: 0 0 0 4px rgba(237, 158, 158, .14); }
a.stat { color: var(--text); }
.stat { transition: border-color .15s, transform .15s; }
a.stat:hover { transform: translateY(-1px); }
.chip[aria-pressed] { cursor: pointer; }
.panel-head .meta { font-size: 13px; color: var(--muted); }
.admin-card > .chips { margin: 8px 0 4px; }
.day + .day { margin-top: 18px; }
.day-title { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 4px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.day-title::first-letter { text-transform: uppercase; }
.audit time { min-width: 56px; }

@media (max-width: 640px) {
  .attention { flex-wrap: wrap !important; }
  .attention > button { margin-left: 34px; }
  .list.compact li { flex-wrap: wrap; }
}

/* Administración → Correo: resumen, automatizaciones y audiencia (decisión 0026) */
.mail-health { display: flex; gap: 14px; align-items: center; padding: 16px 18px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); margin-bottom: 8px; }
.mail-health > .icon { width: 24px; height: 24px; flex: none; }
.mail-health.ok > .icon { color: var(--menta); }
.mail-health.warn { border-color: #6b5a2a; }
.mail-health.warn > .icon { color: var(--ambar); }
.mail-health p { margin: 2px 0 0; }
.mail-h { margin: 24px 0 10px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); }
.mail-h-row { margin: 14px 0 0; }
.mail-h-row .mail-h { margin: 10px 0; }
.auto-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; margin: 14px 0; }
.auto-card { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.auto-card.on { border-color: rgba(188, 211, 198, .45); }
.auto-card > p { margin: 4px 0 0; }
.auto-card .kv { grid-template-columns: 76px 1fr; gap: 6px 12px; margin-top: 10px; font-size: 14px; }
.auto-card .actions { margin-top: auto; padding-top: 14px; }
.auto-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.auto-head b { font-size: 17px; }
.toggle { position: relative; display: inline-flex; flex: none; margin: 2px 0 0; cursor: pointer; }
.toggle input { position: absolute; inset: 0; opacity: 0; margin: 0; width: 100%; height: 100%; cursor: pointer; }
.toggle-ui { position: relative; width: 46px; height: 26px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); transition: background .15s; }
.toggle-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--muted); transition: transform .15s, background .15s; }
.toggle input:checked + .toggle-ui { background: var(--menta); border-color: transparent; }
.toggle input:checked + .toggle-ui::after { transform: translateX(20px); background: #102018; }
.toggle input:focus-visible + .toggle-ui { box-shadow: var(--ring); }
.toggle input:disabled + .toggle-ui { opacity: .5; }
.switch.compact { margin: 0; font-size: 14px; white-space: nowrap; }
dialog.xwide { width: min(1140px, calc(100vw - 32px)); }
.auto-editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 28px; align-items: start; }
.auto-editor textarea { min-height: 150px; }
.auto-side { position: sticky; top: 0; }
.auto-side .mail-preview iframe { height: 760px; margin-top: 6px; }
.auto-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.auto-fields label { margin-top: 10px; }
.preview-subject { margin: 0; }
.note.tight { margin-top: 6px; }
.tight-top { margin-top: 2px; }
.block-list { list-style: none; padding: 0; margin: 0 0 6px; }
.block-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); }
.block-list li:first-child { border-top: none; }
.block-list .switch { margin: 0; }
.row.nowrap { flex-wrap: nowrap; gap: 6px; }
.icon-btn { min-width: 36px; padding: 4px 8px; }
.filters { justify-content: flex-start; align-items: flex-end; gap: 12px; margin-bottom: 12px; }
.filters .search { min-width: 200px; }
@media (max-width: 900px) {
  .auto-editor { grid-template-columns: 1fr; }
  .auto-side { position: static; }
  .auto-side .mail-preview iframe { height: 560px; }
}
@media (max-width: 640px) {
  .auto-grid { grid-template-columns: 1fr; }
  .auto-fields { grid-template-columns: 1fr; }
}
.mail-stats, .stats.mail-stats { grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); }
.mail-health > .grow { flex: 1; min-width: 0; }

/* ==== Web con el aspecto de la app (11 nov 2026): muro de carteles, banner, carátulas y movimiento ==== */

/* Movimiento común: la pantalla entra con un deslizamiento corto y sus grupos, escalonados. */
@keyframes view-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }
@keyframes kenburns { from { transform: scale(1.09) translate3d(1.2%, 0, 0); } to { transform: scale(1) translate3d(0, 0, 0); } }
@keyframes fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes wall-up { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(0, -50%, 0); } }
@keyframes wall-down { from { transform: translate3d(0, -50%, 0); } to { transform: translate3d(0, 0, 0); } }
@keyframes breathe { 0%, 100% { opacity: .55; transform: scale(.96); } 50% { opacity: 1; transform: scale(1); } }
@keyframes flash { 0% { border-color: var(--menta); box-shadow: 0 0 0 4px rgba(188, 211, 198, .18); } 100% { border-color: var(--line); box-shadow: 0 0 0 0 rgba(188, 211, 198, 0); } }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 16px) scale(.97); } to { opacity: 1; transform: translate(-50%, 0); } }

.view-in { animation: view-in .5s var(--ease) both; }
.animate .stagger > * { animation: rise .55s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms + 90ms); }
.animate .stats > *, .animate .auto-grid > *, .animate .command > * { animation: rise .5s var(--ease) both; }
.animate .stats > :nth-child(2), .animate .command > :nth-child(2), .animate .auto-grid > :nth-child(2) { animation-delay: 50ms; }
.animate .stats > :nth-child(3), .animate .command > :nth-child(3), .animate .auto-grid > :nth-child(3) { animation-delay: 100ms; }
.animate .stats > :nth-child(4), .animate .command > :nth-child(4), .animate .auto-grid > :nth-child(4) { animation-delay: 150ms; }
.animate .stats > :nth-child(n+5), .animate .command > :nth-child(n+5), .animate .auto-grid > :nth-child(n+5) { animation-delay: 200ms; }
img.fade { opacity: 0; transition: opacity .7s ease; }
img.fade.loaded { opacity: 1; }
.skeleton { background: linear-gradient(100deg, var(--surface) 30%, #26292a 50%, var(--surface) 70%) var(--surface); background-size: 300% 100%; animation: shimmer 1.8s ease-in-out infinite; }

/* Arranque: la marca respira mientras llega la sesión (como TivyxLoader en la app). */
.boot { display: grid; place-items: center; min-height: 60vh; }
.boot .loader-mark { width: 72px; height: auto; animation: breathe 1.6s ease-in-out infinite; }

/* Tarjetas, diálogos y aviso */
.card { transition: border-color .25s, box-shadow .25s; scroll-margin-top: calc(var(--top-h, 64px) + 18px); }
.card.flash { animation: flash 1.4s ease-out; }
.card-title { display: flex; align-items: center; gap: 12px; }
.card-title-icon { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-2); color: var(--menta); flex: none; }
.card-title > .icon { color: var(--menta); }
dialog { border-radius: 24px; box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .85); }
dialog[open] { animation: pop .3s var(--ease); }
dialog[open]::backdrop { animation: fade .3s ease; }
#toast { border-radius: var(--pill); padding: 12px 22px; background: var(--text); color: var(--ink-dark); }
#toast:not([hidden]) { animation: toast-in .4s var(--ease); }
.empty { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 40px 12px; }
.empty-icon { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); margin-bottom: 10px; }
.empty-icon .icon { width: 26px; height: 26px; }
.device-icon { color: var(--text); }
.device-icon .icon { width: 22px; height: 22px; }
.back { display: inline-flex; align-items: center; gap: 4px; transition: color .2s, transform .2s var(--ease); }
.back:hover { color: var(--text); text-decoration: none; transform: translateX(-2px); }
.tabs.pills { gap: 8px; }
.tabs.pills button { background: var(--surface); border: 1px solid var(--line); color: var(--muted); }
.tabs.pills button:hover { color: var(--text); filter: none; background: var(--surface-2); }
.tabs.pills button[aria-selected="true"] { background: var(--text); color: var(--ink-dark); border-color: transparent; }
.tabs.pills button[aria-selected="true"] .count { background: rgba(24, 26, 27, .14); color: var(--ink-dark); }
.tab-panel.swap { animation: view-in .35s var(--ease); }
.panel-tools { margin-bottom: 14px; }
.switch input { accent-color: var(--menta); }

/* ---- Acceso: muro de carteles detrás de una tarjeta de cristal ---- */
#ambient { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; opacity: 0; visibility: hidden; transition: opacity 1.2s ease, visibility 0s 1.2s; }
body.with-ambient #ambient { opacity: 1; visibility: visible; transition: opacity 1.2s ease; }
#ambient::before { content: ""; position: absolute; inset: 0; z-index: 1;
  background: radial-gradient(ellipse 60% 55% at 50% 48%, rgba(20, 21, 22, .5), rgba(20, 21, 22, .93) 75%), linear-gradient(180deg, rgba(20, 21, 22, .7), rgba(20, 21, 22, .1) 35%, rgba(20, 21, 22, .1) 65%, var(--bg)); }
#ambient::after { content: ""; position: absolute; inset: 0; z-index: 1; background: radial-gradient(ellipse 50% 40% at 50% 100%, rgba(188, 211, 198, .1), transparent); }
.wall { position: absolute; inset: -18% -8%; display: grid; grid-template-columns: repeat(7, 1fr); gap: 18px; transform: rotate(-9deg) scale(1.08); opacity: .62; }
.wall .col { overflow: hidden; }
.wall .strip { display: flex; flex-direction: column; gap: 18px; padding-bottom: 18px; animation: wall-down var(--d, 80s) linear infinite; will-change: transform; }
.wall .col.up .strip { animation-name: wall-up; }
.wall img { display: block; width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 16px; background: var(--surface); }
body.with-ambient main { min-height: calc(100vh - var(--top-h, 64px)); }
body.with-ambient .narrow { margin-top: 7vh; }
.auth-card { position: relative; padding: 34px 32px 30px; border-radius: 26px; background: rgba(30, 32, 33, .74); border-color: rgba(255, 255, 255, .08);
  backdrop-filter: blur(22px) saturate(1.2); -webkit-backdrop-filter: blur(22px) saturate(1.2); box-shadow: 0 40px 100px -40px rgba(0, 0, 0, .9); }
.auth-brand { display: flex; justify-content: center; margin: -6px 0 18px; }
.auth-brand .mark { width: 54px; height: auto; filter: drop-shadow(0 8px 24px rgba(188, 211, 198, .25)); }
.auth-card h1 { text-align: center; }
.auth-card > p.muted:first-of-type, .auth-card > div > p.muted:first-of-type { text-align: center; }
.auth-card .done h1 { text-align: center; }
.narrow > .note { text-shadow: 0 1px 8px rgba(0, 0, 0, .6); }

.avatar.add .icon { width: 34px; height: 34px; }

.art-initial { position: absolute; inset: 0; display: grid; place-items: center; font-size: 34px; font-weight: 800; color: var(--line-2); }

/* Conectar una TV y descargas */
.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 40px; }
.duo > .card { margin: 0; }
.feature { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; overflow: hidden; position: relative; }
.feature:hover { border-color: var(--line-2); }
.feature h2 { margin: 0 0 4px; }
.feature p { margin: 0; }
.feature > .row { margin-top: auto; }
.feature-icon { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; }
.feature-icon .icon { width: 24px; height: 24px; }
.menta-tint { background: rgba(188, 211, 198, .12); color: var(--menta); }
.ambar-tint { background: rgba(227, 185, 119, .12); color: var(--ambar); }
.feature::after { content: ""; position: absolute; width: 220px; height: 220px; right: -90px; top: -110px; border-radius: 50%; background: radial-gradient(circle, rgba(188, 211, 198, .08), transparent 70%); pointer-events: none; }

/* ---- Perfil: banner con el fondo de lo último que ve ---- */
.profile-hero { position: relative; margin: calc(-1 * (var(--top-h, 0px) + var(--main-pt))) calc(50% - var(--page-w, 100vw) / 2) 0; width: var(--page-w, 100vw); min-height: 340px; overflow: hidden; display: flex; align-items: flex-end; isolation: isolate;
  --tint: #8b929a; background: radial-gradient(ellipse 70% 90% at 20% 0%, color-mix(in srgb, var(--tint) 26%, transparent), transparent 70%), var(--bg); }
.tint-menta { --tint: #94d9b4; } .tint-ambar { --tint: #ead188; } .tint-coral { --tint: #f0a48f; }
.tint-cielo { --tint: #8ec5ec; } .tint-lavanda { --tint: #b9a8ec; } .tint-grafito { --tint: #8b929a; }
.profile-hero-art { position: absolute; inset: 0; z-index: -1; }
.profile-hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; filter: blur(2px) saturate(1.1); transform: scale(1.04); }
.profile-hero-art img.loaded { animation: kenburns 18s ease-out both; }
.profile-hero-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20, 21, 22, .95), rgba(20, 21, 22, .7) 45%, rgba(20, 21, 22, .45)), linear-gradient(0deg, var(--bg), transparent 55%), linear-gradient(180deg, rgba(20, 21, 22, .7), transparent 30%); }
.profile-hero-inner { width: 100%; max-width: 1120px; margin: 0 auto; padding: calc(var(--top-h, 64px) + 40px) 16px 30px; display: flex; gap: 32px; align-items: flex-end; flex-wrap: wrap; }
.profile-hero .photo-edit { gap: 12px; }
.profile-hero .avatar.xl { box-shadow: 0 0 0 4px var(--bg), 0 0 0 5px rgba(255, 255, 255, .12), 0 30px 60px -24px rgba(0, 0, 0, .9); animation: pop .6s var(--ease) both; }
.profile-hero .photo-edit .ghost { background: rgba(20, 21, 22, .5); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.profile-hero-text { flex: 1; min-width: 240px; display: flex; flex-direction: column; gap: 10px; padding-bottom: 6px; }
.profile-hero-text h1 { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: clamp(32px, 4vw, 46px); margin: 0; letter-spacing: -.03em; }
.profile-hero-text h1 .badge { font-size: 13px; letter-spacing: 0; }
.profile-hero-text .back { margin: 0; }
.stats-row { gap: 8px; }
.chip-stat { display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px; border-radius: var(--pill); background: rgba(38, 40, 42, .7); border: 1px solid rgba(255, 255, 255, .07); color: var(--muted); font-size: 14px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.chip-stat b { color: var(--text); font-size: 15px; }
.chip-stat .icon { width: 16px; height: 16px; color: var(--menta); }
.edit-card { margin-top: 22px; max-width: 640px; }
.edit-card:not([hidden]) { animation: pop .35s var(--ease); }
.edit-card form > .primary { margin-top: 18px; }
.profile-page .section-title { margin-top: 34px; }

/* Rejilla de carátulas: carteles 2:3 y «Seguir viendo» 16:9 con arte de título y progreso */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 22px 16px; }
.tiles.wide { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.tile { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.tile-art { position: relative; aspect-ratio: 2 / 3; border-radius: 14px; overflow: hidden; background: linear-gradient(160deg, var(--surface-2), var(--surface)); box-shadow: 0 14px 30px -18px rgba(0, 0, 0, .85); transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.tile.wide .tile-art { aspect-ratio: 16 / 9; }
.tile-art > img:not(.tile-logo) { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease), opacity .7s ease; }
.tile.wide .tile-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(10, 11, 12, .78), transparent 55%); pointer-events: none; }
.tile-logo { position: absolute; left: 14px; bottom: 18px; z-index: 1; max-width: 55%; max-height: 38%; object-fit: contain; object-position: left bottom; filter: drop-shadow(0 3px 10px rgba(0, 0, 0, .7)); }
.tile:hover .tile-art, .tile:focus-within .tile-art { transform: translateY(-4px); box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px rgba(237, 237, 235, .55), 0 26px 40px -20px rgba(0, 0, 0, .9); }
.tile:hover .tile-art > img:not(.tile-logo) { transform: scale(1.05); }
.tile-bar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; height: 4px; background: rgba(237, 237, 235, .22); }
.tile-bar span { display: block; height: 100%; background: var(--menta); border-radius: 0 3px 3px 0; transform-origin: left; }
.animate .tile-bar span { animation: fill .9s var(--ease) .4s both; }
.tile-flag { position: absolute; top: 8px; left: 8px; z-index: 2; display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px 3px 7px; border-radius: var(--pill); background: rgba(20, 21, 22, .8); color: var(--menta); font-size: 12px; font-weight: 700; }
.tile-flag .icon { width: 14px; height: 14px; stroke-width: 2.4; }
.tile-remove { position: absolute; top: 8px; right: 8px; z-index: 3; width: 34px; height: 34px; padding: 0; border-radius: 50%; background: rgba(20, 21, 22, .78); color: var(--text); border: 1px solid rgba(255, 255, 255, .12); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transform: scale(.85); transition: opacity .2s, transform .2s var(--ease), background .2s; }
.tile-remove .icon { width: 16px; height: 16px; stroke-width: 2.2; }
.tile:hover .tile-remove, .tile:focus-within .tile-remove { opacity: 1; transform: none; }
.tile-remove:hover { background: var(--danger); color: var(--ink-dark); filter: none; }
@media (hover: none) { .tile-remove { opacity: 1; transform: none; } }
.tile-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tile-text b { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-text .meta { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.avatar.lg { width: 64px; height: 64px; border-radius: 20px; font-size: 28px; margin-bottom: 10px; }

@media (max-width: 900px) {
  .duo { grid-template-columns: 1fr; }
}

/* ---- Descargar: dispositivo, botón y guía de instalación ---- */
.platform-links { flex-wrap: wrap; gap: 8px; }
.platforms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.platform { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "icon text" "icon meta"; align-items: center; justify-items: start; gap: 2px 14px; padding: 18px; text-align: left; font-weight: 400;
  background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); }
.platform:hover { filter: none; border-color: var(--line-2); background: var(--surface-2); }
.platform[aria-checked="true"] { border-color: var(--menta); box-shadow: 0 0 0 1px var(--menta); background: var(--surface-2); }
.platform:focus-visible { box-shadow: var(--ring); }
.platform-logo { grid-area: icon; width: 92px; height: 60px; border-radius: 16px; display: grid; place-items: center; background: var(--bg); border: 1px solid var(--line); transition: transform .3s var(--ease), border-color .3s; }
.platform-logo img { display: block; height: 34px; width: auto; max-width: 64px; object-fit: contain; }
.platform:hover .platform-logo, .platform[aria-checked="true"] .platform-logo { transform: scale(1.04); border-color: var(--line-2); }
.platform-logo.large { width: 124px; height: 80px; border-radius: 20px; }
.platform-logo.large img { height: 46px; max-width: 88px; }
.platform-logo.mini { width: auto; height: auto; background: none; border: 0; border-radius: 0; }
.platform-logo.mini { display: inline-flex; }
.platform-logo.mini img { height: 16px; max-width: 34px; }
.platform-text { grid-area: text; display: flex; flex-direction: column; min-width: 0; }
.platform-text b { font-size: 17px; }
.platform-text .muted { line-height: 1.35; }
.platform-meta { grid-area: meta; margin-top: 6px; font-size: 13px; color: var(--dim); }
.platform .badge { position: absolute; top: 12px; right: 12px; }
.install { padding: 28px; }
.install-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.install-title { flex: 1; min-width: 180px; display: flex; flex-direction: column; }
.install-title h2 { margin: 0; font-size: 22px; }
.install-intro { margin: 18px 0 0; font-size: 17px; }
.button.disabled { opacity: .55; cursor: default; filter: none; }
.install-ways { gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.install-ways .badge { margin-left: 8px; font-size: 11px; padding: 1px 7px; }
.install-ways .secondary .badge { background: var(--surface-3); color: var(--muted); }
.install-way-note { margin: 12px 0 0; }
:is(div, details).more .steps-title { margin-top: 0; }
.install-open { margin: 18px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.steps-title { margin: 26px 0 14px; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: flex; flex-direction: column; }
.steps li { counter-increment: step; position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 16px; padding-bottom: 20px; }
.steps li::before { content: counter(step); width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--text); color: var(--ink-dark); font-weight: 700; font-size: 15px; position: relative; z-index: 1; }
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 17px; top: 38px; bottom: 2px; width: 2px; background: var(--line); }
.steps li.optional::before { background: var(--surface-3); color: var(--muted); }
.steps li:last-child { padding-bottom: 0; }
.steps .step-title { display: inline-block; font-size: 16px; margin: 6px 10px 0 0; }
.steps p { margin: 4px 0 0; }
.steps .badge { vertical-align: 1px; }
.crumb { display: inline; }
.crumb b { font-weight: 650; color: var(--text); white-space: nowrap; }
.crumb .sep { margin: 0 6px; color: var(--dim); }
/* En el teléfono, «Opciones para desarrolladores» no cabe en una línea de la guía: que pueda partirse. */
@media (max-width: 600px) { .crumb b { white-space: normal; } }
code { font: 600 .92em ui-monospace, "Cascadia Mono", Consolas, monospace; padding: 1px 7px; border-radius: 7px; background: var(--surface-3); color: var(--text); overflow-wrap: anywhere; }
:is(div, details).more { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 16px; }
:is(div, details).more summary { cursor: pointer; font-weight: 650; color: var(--menta); width: max-content; max-width: 100%; border-radius: 8px; }
:is(div, details).more summary:focus-visible { box-shadow: var(--ring); }
:is(div, details).more ul { margin: 12px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; color: var(--muted); }
:is(div, details).more li b { color: var(--text); }
.downloads-page .duo { margin-top: 18px; }
.trademarks { margin: 28px 0 0; font-size: 12px; line-height: 1.5; color: var(--dim); max-width: 760px; }
@media (max-width: 900px) {
  .platforms { grid-template-columns: 1fr; gap: 10px; }
  .platform { padding: 14px 16px; }
  .platform-logo { width: 80px; height: 52px; border-radius: 14px; }
}

/* ---- Teléfonos ---- */
@media (max-width: 640px) {
  h1 { font-size: 26px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
  .tiles.wide { grid-template-columns: 1fr; }
  .profile-hero { min-height: 0; }
  .profile-hero-inner { gap: 18px; padding-bottom: 22px; }
  .wall { grid-template-columns: repeat(4, 1fr); gap: 12px; inset: -12% -20%; }
  .wall .col:nth-child(n+5) { display: none; }
  .wall .strip { gap: 12px; padding-bottom: 12px; }
  .auth-card { padding: 28px 22px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  img.fade { opacity: 1; }
}

/* ==== Guía de bienvenida (/cuenta/bienvenida): portada, índice con avance, apartados que aparecen al llegar,
   maquetas de la TV, el móvil y el mando. Los bucles solo corren mientras se ven ([data-live].playing). ==== */
.guide { --sy: 0; --progress: 0; }
@keyframes g-slide { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-50%, 0, 0); } }
@keyframes g-word { from { opacity: 0; transform: translateY(.45em) rotate(2deg); filter: blur(10px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes g-shine { from { background-position: 0% 50%; } to { background-position: 200% 50%; } }
@keyframes g-ribbons { from { opacity: 0; transform: scaleX(.15) rotate(-8deg); } to { opacity: 1; transform: none; } }
@keyframes g-bar { from { transform: scaleY(0); } to { transform: none; } }
@keyframes g-dot { 0% { transform: scale(0); } 70% { transform: scale(1.5); } 100% { transform: none; } }
@keyframes g-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes g-aura { 0%, 100% { opacity: .55; transform: scale(1); } 50% { opacity: 1; transform: scale(1.08); } }
@keyframes g-cue { 0% { transform: translateY(0); opacity: 0; } 30% { opacity: 1; } 80% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }
@keyframes g-pulse { 0% { box-shadow: 0 0 0 0 rgba(239, 107, 91, .7); } 100% { box-shadow: 0 0 0 8px rgba(239, 107, 91, 0); } }
@keyframes g-eq { from { height: 18%; } to { height: 100%; } }
@keyframes g-air { from { transform: scaleX(.25); } to { transform: scaleX(.85); } }
@keyframes g-sheen { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@keyframes g-ring { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(1.9); opacity: 0; } }
@keyframes g-blink { 0% { opacity: 1; box-shadow: 0 0 14px 3px var(--menta); } 100% { opacity: .35; box-shadow: 0 0 6px var(--menta); } }
@keyframes g-phone { 0%, 10% { opacity: 0; transform: translateY(16%) rotate(-6deg); } 22%, 84% { opacity: 1; transform: none; } 94%, 100% { opacity: 0; transform: translateY(16%) rotate(-6deg); } }
@keyframes g-scan { 0%, 24% { top: 22%; opacity: 0; } 27% { top: 22%; opacity: 1; } 37% { top: 72%; } 47% { top: 22%; opacity: 1; } 50%, 100% { top: 22%; opacity: 0; } }
@keyframes g-ok { 0%, 50% { opacity: 0; } 54%, 88% { opacity: 1; } 94%, 100% { opacity: 0; } }
@keyframes g-check { 0%, 52% { transform: scale(.3); } 58% { transform: scale(1.12); } 62%, 100% { transform: none; } }
@keyframes g-code { 0%, 60% { opacity: 1; transform: none; } 66%, 90% { opacity: 0; transform: scale(.94); } 97%, 100% { opacity: 1; transform: none; } }
@keyframes g-done { 0%, 62% { opacity: 0; transform: scale(1.05); } 68%, 90% { opacity: 1; transform: none; } 96%, 100% { opacity: 0; transform: scale(1.05); } }
@keyframes g-glow { 0%, 24% { box-shadow: 0 0 0 0 rgba(188, 211, 198, 0); } 34% { box-shadow: 0 0 0 1.2cqw rgba(188, 211, 198, .35); } 48%, 100% { box-shadow: 0 0 0 0 rgba(188, 211, 198, 0); } }
.guide [data-live]:not(.playing), .guide [data-live]:not(.playing) * { animation-play-state: paused !important; }
/* Aparición al llegar a cada bloque (la activa startGuide). */
.reveal-on [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0ms); }
.reveal-on [data-reveal].in { opacity: 1; transform: none; }

/* Marca que se dibuja: cintas que se abren, barras que crecen y el punto */
.g-mark { display: block; height: auto; overflow: visible; }
.g-mark .ribbons, .g-mark rect, .g-mark circle { transform-box: fill-box; }
.g-mark .ribbons, .g-mark circle { transform-origin: center; }
.g-mark rect { transform-origin: 50% 100%; }
.g-hero .g-mark .ribbons, .g-end.in .g-mark .ribbons { animation: g-ribbons 1.1s var(--ease) .35s both; }
.g-hero .g-mark rect, .g-end.in .g-mark rect { animation: g-bar .7s var(--ease) .1s both; }
.g-hero .g-mark rect:last-of-type, .g-end.in .g-mark rect:last-of-type { animation-delay: .22s; }
.g-hero .g-mark circle, .g-end.in .g-mark circle { animation: g-dot .6s var(--ease) 1.05s both; }
.g-mark.big { width: 96px; filter: drop-shadow(0 14px 40px rgba(188, 211, 198, .35)); animation: g-float 6s ease-in-out 2s infinite; }
.g-mark.end { width: 76px; filter: drop-shadow(0 12px 30px rgba(188, 211, 198, .3)); }

/* Portada a sangre */
.g-hero { position: relative; margin: calc(-1 * (var(--top-h, 0px) + var(--main-pt))) calc(50% - var(--page-w, 100vw) / 2) 0; width: var(--page-w, 100vw); min-height: max(600px, 100svh); display: grid; place-items: center; overflow: hidden; isolation: isolate; text-align: center; }
.g-hero-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.g-wall { position: absolute; inset: -35% -25%; display: flex; flex-direction: column; justify-content: center; gap: 18px; opacity: 0; transition: opacity 1.8s ease;
  transform: translate3d(0, calc(var(--sy) * .28px), 0) perspective(1200px) rotateX(26deg) rotateZ(-10deg); transform-origin: 50% 40%; }
.g-wall.ready { opacity: .58; }
.g-wall-track { display: flex; gap: 18px; width: max-content; animation: g-slide var(--d, 100s) linear infinite; will-change: transform; }
.g-wall-row.rev .g-wall-track { animation-direction: reverse; }
.g-wall img { display: block; width: clamp(96px, 11vw, 150px); aspect-ratio: 2 / 3; object-fit: cover; border-radius: 14px; background: var(--surface); }
.g-hero-shade { position: absolute; inset: 0; background: radial-gradient(ellipse 52% 48% at 50% 48%, rgba(20, 21, 22, .5), rgba(20, 21, 22, .95) 82%), linear-gradient(180deg, rgba(20, 21, 22, .8), transparent 28%, transparent 72%, var(--bg)); }
.g-hero-shade::after { content: ""; position: absolute; left: 50%; top: 42%; width: min(720px, 120vw); aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; background: radial-gradient(circle, rgba(188, 211, 198, .16), rgba(227, 185, 119, .05) 45%, transparent 68%); animation: g-aura 9s ease-in-out infinite; }
.g-hero-inner { position: relative; max-width: 780px; padding: calc(var(--top-h, 64px) + 48px) 16px 130px; display: flex; flex-direction: column; align-items: center; gap: 16px;
  transform: translate3d(0, calc(var(--sy) * -.14px), 0); opacity: calc(1 - var(--sy) / 650); }
.g-hello { margin-top: 10px; padding: 6px 14px; border-radius: var(--pill); background: rgba(188, 211, 198, .12); border: 1px solid rgba(188, 211, 198, .22); color: var(--menta); font-weight: 650; font-size: 15px; animation: rise .7s var(--ease) .4s both; }
.g-title { margin: 0; font-size: clamp(38px, 7.2vw, 80px); line-height: 1.02; letter-spacing: -.04em; font-weight: 800; text-wrap: balance; }
.g-word { display: inline-block; animation: g-word .9s var(--ease) both; animation-delay: calc(var(--i, 0) * 75ms + 550ms); }
.g-word.accent { background: linear-gradient(90deg, var(--menta), var(--ambar), var(--menta)) 0 50% / 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: g-word .9s var(--ease) both, g-shine 7s linear infinite; animation-delay: calc(var(--i, 0) * 75ms + 550ms), 1.6s; }
.g-hero-lead { max-width: 600px; margin: 4px 0 0; font-size: clamp(17px, 1.9vw, 20px); color: #c9cccb; text-wrap: pretty; animation: rise .8s var(--ease) 1.05s both; }
.g-hero-actions { justify-content: center; margin-top: 12px; animation: rise .8s var(--ease) 1.2s both; }
.g-hero-actions .primary .icon { transition: transform .25s var(--ease); }
.g-hero-actions .primary:hover .icon { transform: translateX(3px); }
.g-cue { position: absolute; left: 50%; bottom: 84px; translate: -50% 0; width: 28px; height: 44px; padding: 0; border-radius: 16px; background: transparent; border: 2px solid rgba(237, 237, 235, .35); animation: fade 1s ease 1.8s both; }
.g-cue:hover { border-color: var(--text); filter: none; }
.g-cue-dot { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--text); animation: g-cue 2s ease-in-out infinite; }

/* Índice fijo bajo la barra, con el avance de la lectura */
.g-chapters { position: sticky; top: calc(var(--top-h, 64px) + 8px); z-index: 9; display: flex; justify-content: center; margin: -64px 0 0; pointer-events: none; }
.g-chapters-inner { pointer-events: auto; position: relative; display: flex; gap: 2px; max-width: 100%; padding: 5px; border-radius: var(--pill); overflow-x: auto; scrollbar-width: none;
  background: rgba(30, 32, 33, .62); border: 1px solid rgba(255, 255, 255, .08); backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2); transition: background .3s, box-shadow .3s; }
.g-chapters::before { content: ""; position: absolute; z-index: -1; left: calc(50% - var(--page-w, 100vw) / 2); width: var(--page-w, 100vw); top: -10px; bottom: -22px; pointer-events: none;
  background: linear-gradient(180deg, rgba(20, 21, 22, .96), rgba(20, 21, 22, .78) 55%, rgba(20, 21, 22, 0)); opacity: 0; transition: opacity .3s; }
.g-chapters.shown::before { opacity: 1; }
.g-chapters.shown .g-chapters-inner { background: rgba(28, 29, 30, .9); box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .9); }
.g-chapters-inner::-webkit-scrollbar { display: none; }
.g-chapters a { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 7px; border-radius: var(--pill); color: var(--muted); font-weight: 600; font-size: 14px; white-space: nowrap; transition: color .2s, background .25s var(--ease); }
.g-chapters a:hover { color: var(--text); text-decoration: none; background: rgba(255, 255, 255, .06); }
.g-chapters .n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--surface-2); color: var(--muted); transition: background .3s, color .3s; }
.g-chapters a[aria-current] { color: var(--text); background: rgba(255, 255, 255, .1); }
.g-chapters a[aria-current] .n { background: var(--menta); color: #102018; }
.g-progress { position: absolute; left: 22px; right: 22px; bottom: 1px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--menta), var(--ambar)); transform-origin: left; transform: scaleX(var(--progress)); pointer-events: none; }

/* Apartados */
.g-section { padding-top: clamp(80px, 12vh, 140px); scroll-margin-top: calc(var(--top-h, 64px) + 44px); }
.g-head { max-width: 740px; margin-bottom: 38px; }
.g-eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--menta); }
.g-eyebrow.small { font-size: 12px; }
.g-num { color: var(--dim); letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.g-head h2 { margin: 12px 0 14px; font-size: clamp(30px, 4.4vw, 48px); line-height: 1.06; letter-spacing: -.035em; font-weight: 800; text-wrap: balance; }
.g-lead { margin: 0; max-width: 660px; font-size: clamp(16px, 1.7vw, 19px); color: var(--muted); text-wrap: pretty; }
.g-icon { width: 44px; height: 44px; flex: none; border-radius: 14px; display: grid; place-items: center; }
.g-icon .icon { width: 22px; height: 22px; }
.g-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.g-points.two { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.g-points.two .g-point { padding: 22px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); }
.g-point { display: flex; gap: 16px; align-items: flex-start; }
.g-point b { display: block; margin-bottom: 2px; font-size: 17px; }
.g-point p { margin: 0; }
.g-split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.g-split.reverse > .g-visual { order: 2; }
.g-text > .row { margin-top: 28px; }
.g-aside { display: flex; gap: 12px; align-items: flex-start; margin: 26px 0 0; color: var(--muted); font-size: 15px; }
.g-aside > .icon { color: var(--menta); margin-top: 3px; }
.g-aside code, .g-numbered code { font: 600 14px ui-monospace, "Cascadia Mono", monospace; color: var(--text); background: var(--surface-2); padding: 1px 7px; border-radius: 6px; }

/* 1. Qué es: tres tarjetas con su miniatura animada */
.g-kinds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.g-kind { display: flex; flex-direction: column; overflow: hidden; border-radius: 24px; background: linear-gradient(180deg, var(--surface), #191a1b); border: 1px solid var(--line); }
.g-kind:hover { border-color: var(--line-2); }
.g-kind-visual { position: relative; height: 230px; display: grid; place-items: center; overflow: hidden; background: radial-gradient(ellipse 80% 70% at 50% 100%, rgba(188, 211, 198, .1), transparent 70%); }
.g-kind.live .g-kind-visual { background: radial-gradient(ellipse 80% 70% at 50% 100%, rgba(227, 185, 119, .1), transparent 70%); }
.g-kind-text { padding: 20px 22px 24px; }
.g-kind h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; font-size: 20px; }
.g-kind h3 .icon { width: 20px; height: 20px; color: var(--menta); }
.g-kind p { margin: 0; }
.g-fan { position: relative; width: 220px; height: 190px; }
.g-poster { position: absolute; left: 50%; bottom: -14px; width: 108px; aspect-ratio: 2 / 3; translate: -50% 0; border-radius: 12px; overflow: hidden; background: linear-gradient(160deg, var(--surface-3), var(--surface-2)); box-shadow: 0 22px 40px -16px rgba(0, 0, 0, .95); transform-origin: 50% 130%; transition: transform 1s var(--ease); }
.g-poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.g-poster.p1 { z-index: 1; }
.g-kind.in .p0 { transform: rotate(-15deg) translateX(-20px); }
.g-kind.in .p1 { transform: translateY(-16px); }
.g-kind.in .p2 { transform: rotate(15deg) translateX(20px); }
.g-kind.in:hover .p0 { transform: rotate(-22deg) translateX(-34px); }
.g-kind.in:hover .p1 { transform: translateY(-26px) scale(1.04); }
.g-kind.in:hover .p2 { transform: rotate(22deg) translateX(34px); }
.g-episodes { width: min(270px, 86%); display: flex; flex-direction: column; gap: 8px; }
.g-series-art { position: relative; height: 62px; border-radius: 12px; overflow: hidden; background: linear-gradient(120deg, var(--surface-3), var(--surface-2)); }
.g-series-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.g-season { display: flex; gap: 6px; }
.g-season .chip { padding: 2px 10px; border-radius: var(--pill); background: var(--surface-2); color: var(--muted); font-size: 11px; font-weight: 700; }
.g-season .chip.on { background: var(--text); color: var(--ink-dark); }
.g-ep { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 10px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); font-size: 12px; transition: transform .4s var(--ease); }
.g-ep.now { border-color: rgba(188, 211, 198, .7); box-shadow: 0 0 0 1px rgba(188, 211, 198, .3); }
.g-kind:hover .g-ep.now { transform: scale(1.03); }
.g-ep-n { width: 20px; font-weight: 700; color: var(--muted); }
.g-ep-lines { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.g-ep-lines > span:first-child { width: 72%; height: 6px; border-radius: 3px; background: var(--surface-3); }
.g-ep-bar { height: 3px; border-radius: 2px; overflow: hidden; background: var(--surface-3); }
.g-ep-bar span { display: block; height: 100%; background: var(--menta); transform-origin: left; transform: scaleX(0); transition: transform 1.4s var(--ease) .5s; }
.g-kind.in .g-ep-bar span { transform: scaleX(var(--share, 0)); }
.g-ep .icon { width: 14px; height: 14px; color: var(--menta); }
.g-live { width: min(270px, 86%); }
.g-live-screen { position: relative; aspect-ratio: 16 / 9; padding: 12px; display: flex; align-items: flex-end; justify-content: flex-end; overflow: hidden; border-radius: 14px; background: linear-gradient(135deg, #2b3b35, #1c2322 50%, #3a3022); }
.g-live-screen::before { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .08) 50%, transparent 70%); animation: g-sheen 4.5s ease-in-out infinite; }
.g-onair { position: absolute; top: 10px; left: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: var(--pill); background: rgba(20, 21, 22, .78); font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.g-onair-dot { width: 7px; height: 7px; border-radius: 50%; background: #ef6b5b; animation: g-pulse 1.4s ease-out infinite; }
.g-eq { position: relative; display: flex; gap: 3px; align-items: flex-end; height: 30px; }
.g-eq span { width: 5px; height: 40%; border-radius: 2px; background: var(--menta); animation: g-eq .9s ease-in-out infinite alternate; }
.g-eq span:nth-child(2) { animation-delay: -.3s; animation-duration: .7s; }
.g-eq span:nth-child(3) { animation-delay: -.6s; animation-duration: 1.1s; }
.g-eq span:nth-child(4) { animation-delay: -.2s; animation-duration: .8s; }
.g-eq span:nth-child(5) { animation-delay: -.5s; }
.g-live-info { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; margin-top: 10px; font-size: 12px; color: var(--muted); }
.g-live-now { color: var(--text); font-weight: 700; }
.g-live-bar { height: 4px; border-radius: 2px; overflow: hidden; background: var(--surface-3); }
.g-live-bar span { display: block; width: 100%; height: 100%; background: var(--ambar); transform-origin: left; animation: g-air 14s linear infinite alternate; }

/* 2. Perfiles: maqueta de TV (todo en cqw para que escale con su ancho) */
.g-tv { position: relative; container-type: inline-size; padding: 2.2%; border-radius: 22px; background: linear-gradient(180deg, #2c2e30, #1a1b1c);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06), 0 50px 90px -40px rgba(0, 0, 0, .95), 0 0 140px -30px rgba(188, 211, 198, .18); }
.g-tv-foot { position: absolute; left: 50%; bottom: -18px; width: 24%; height: 18px; translate: -50% 0; border-radius: 0 0 12px 12px; background: linear-gradient(180deg, #202223, #151617); z-index: -1; }
.g-screen { position: relative; aspect-ratio: 16 / 9; display: grid; place-items: center; overflow: hidden; border-radius: 1.6cqw; background: radial-gradient(ellipse 90% 80% at 50% 0%, #22302a, var(--bg) 72%); }
.g-screen-glow { position: absolute; inset: 0; background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, .04) 50%, transparent 60%); pointer-events: none; }
.g-who { display: flex; flex-direction: column; align-items: center; gap: 3cqw; }
.g-who > b, .g-pair-code > b, .g-pair-done > b { font-size: 3.8cqw; letter-spacing: -.02em; }
.g-who-mark svg { display: block; width: 6.5cqw; height: auto; }
.g-picks { display: flex; gap: 2.8cqw; align-items: flex-start; }
.g-pick { display: flex; flex-direction: column; align-items: center; gap: 1.2cqw; }
.g-pick .avatar { width: 11.5cqw; height: 11.5cqw; border-radius: 3.4cqw; font-size: 5cqw; transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.g-pick .avatar.add { background: transparent; border: .35cqw dashed var(--line-2); color: var(--muted); }
.g-pick .avatar.add .icon { width: 4.6cqw; height: 4.6cqw; }
.g-pick-name { max-width: 13cqw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 2cqw; color: var(--muted); transition: color .4s; }
.g-pick .badge { font-size: 1.5cqw; padding: .2cqw 1cqw; }
.g-pick.focused .avatar { transform: scale(1.12); box-shadow: 0 0 0 .6cqw var(--bg), 0 0 0 1.1cqw var(--text), 0 3cqw 5cqw -2cqw rgba(0, 0, 0, .9); }
.g-pick.focused .g-pick-name { color: var(--text); }

/* 3. Instalar: tres pasos unidos por una línea que se llena */
.g-steps-wrap { position: relative; }
.g-steps { position: relative; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.g-steps-line { position: absolute; top: 34px; left: 16.6%; right: 16.6%; height: 2px; background: var(--line); }
.g-steps-line span { display: block; width: 100%; height: 100%; background: linear-gradient(90deg, var(--menta), var(--ambar)); transform-origin: left; transform: scaleX(0); transition: transform 1.6s var(--ease) .3s; }
.g-steps-wrap.in .g-steps-line span { transform: none; }
.g-step { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: calc(var(--i, 0) * 380ms + 200ms); }
.g-steps-wrap.in .g-step { opacity: 1; transform: none; }
.g-step-badge { position: relative; width: 68px; height: 68px; display: grid; place-items: center; border-radius: 22px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--menta); box-shadow: 0 0 0 8px var(--bg); }
.g-step-badge .icon { width: 28px; height: 28px; }
.g-step-n { position: absolute; top: -8px; right: -8px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--text); color: var(--ink-dark); font-size: 12px; font-weight: 800; }
.g-step b { margin-top: 8px; font-size: 18px; }
.g-step p { margin: 0; max-width: 290px; }
.g-devices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 48px; }
.g-device { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 20px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); color: var(--text); }
.g-device:hover { text-decoration: none; border-color: var(--line-2); background: var(--surface-2); }
.g-device.mine { border-color: var(--menta); box-shadow: 0 0 0 1px var(--menta); }
.g-device .badge { position: absolute; top: 16px; right: 16px; }
.g-device-text { display: flex; flex-direction: column; }
.g-device-text b { font-size: 17px; }
.g-device-go { margin-top: auto; padding-top: 4px; display: inline-flex; align-items: center; gap: 6px; color: var(--menta); font-weight: 650; font-size: 14px; }
.g-device-go .icon { width: 16px; height: 16px; transition: transform .25s var(--ease); }
.g-device:hover .g-device-go .icon, .g-device:focus-visible .g-device-go .icon { transform: translateX(4px); }

/* 4. Conectar la TV: la TV con el QR, el móvil que lo escanea y la TV que entra (bucle de 9 s) */
.g-pair { position: relative; padding: 0 16% 12% 0; }
.g-pair-code, .g-pair-done { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2.2cqw; }
.g-pair-code { animation: g-code 9s var(--ease) infinite; }
.g-pair-done { opacity: 0; animation: g-done 9s var(--ease) infinite; }
.g-pair-done .g-pick .avatar { width: 12cqw; height: 12cqw; }
.g-pair-done .g-pick:first-child .avatar { box-shadow: 0 0 0 .6cqw var(--bg), 0 0 0 1.1cqw var(--text); transform: scale(1.1); }
.g-qr-box { background: #f3f0e8; padding: 1.3cqw; border-radius: 1.6cqw; }
.g-pair-code .g-qr-box { animation: g-glow 9s ease-out infinite; }
.g-qr { display: block; fill: #141516; }
.g-qr .qr-hole { fill: #f3f0e8; }
.g-pair-code .g-qr { width: 19cqw; height: 19cqw; }
.g-pair-code code { font: 700 2.8cqw/1 ui-monospace, "Cascadia Mono", monospace; letter-spacing: .2em; color: var(--text); }
.g-phone { position: absolute; right: 0; bottom: 0; width: 30%; aspect-ratio: 9 / 18.5; container-type: inline-size; padding: 1.1%; border-radius: 17% / 8.3%; background: #0d0e0f; border: 1px solid #3a3d3f;
  box-shadow: inset 0 0 0 4px #181a1b, 0 30px 60px -20px rgba(0, 0, 0, .95); animation: g-phone 9s var(--ease) infinite; }
.g-phone-screen { position: relative; height: 100%; overflow: hidden; border-radius: 11cqw; background: #1b1d1e; }
.g-phone-cam { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(circle at 50% 40%, #2d3032, #111213); }
.g-phone-cam .g-qr-box { padding: 4cqw; border-radius: 5cqw; transform: rotate(-4deg); }
.g-phone-cam .g-qr { width: 52cqw; height: 52cqw; }
.g-corners { position: absolute; inset: 24% 10%; border-radius: 8cqw; box-shadow: 0 0 0 100cqw rgba(0, 0, 0, .32); outline: 2px solid rgba(188, 211, 198, .8); outline-offset: -2px; }
.g-scanline { position: absolute; left: 14%; right: 14%; top: 22%; height: 2px; border-radius: 2px; background: var(--menta); box-shadow: 0 0 14px 3px rgba(188, 211, 198, .7); opacity: 0; animation: g-scan 9s ease-in-out infinite; }
.g-phone-ok { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4cqw; padding: 10cqw; text-align: center; background: #1b1d1e; opacity: 0; animation: g-ok 9s var(--ease) infinite; }
.g-phone-check { width: 30cqw; height: 30cqw; display: grid; place-items: center; border-radius: 50%; background: var(--menta); color: #102018; animation: g-check 9s var(--ease) infinite; }
.g-phone-check .icon { width: 16cqw; height: 16cqw; stroke-width: 2.6; }
.g-phone-ok b { font-size: 9cqw; line-height: 1.15; }
.g-phone-ok span:last-child { font-size: 7cqw; color: var(--muted); line-height: 1.3; }
.g-numbered { list-style: none; counter-reset: g; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 20px; }
.g-numbered li { counter-increment: g; position: relative; padding-left: 52px; }
.g-numbered li::before { content: counter(g); position: absolute; left: 0; top: -2px; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--menta); font-weight: 800; }
.g-numbered b { font-size: 17px; }
.g-numbered p { margin: 2px 0 0; }

/* 5. Qué tiene: rejilla con luz que sigue al puntero */
.g-bento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.g-feature { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 10px; padding: 24px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); isolation: isolate; }
.g-feature.wide { grid-column: span 2; }
.g-feature.wide:last-child { grid-column: 1 / -1; }
.g-feature::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 0%), rgba(188, 211, 198, .11), transparent 45%); opacity: 0; transition: opacity .4s; }
.g-feature:hover::before { opacity: 1; }
.g-feature:hover { border-color: var(--line-2); }
.g-feature h3 { margin: 6px 0 0; font-size: 18px; }
.g-feature p { margin: 0; }
.g-feature .g-icon { transition: transform .4s var(--ease); }
.g-feature:hover .g-icon { transform: rotate(-6deg) scale(1.08); }
.g-art-progress { display: flex; flex-direction: column; gap: 8px; margin-top: auto; padding-top: 10px; max-width: 420px; }
.g-art-progress > span { height: 6px; border-radius: 3px; overflow: hidden; background: var(--surface-3); }
.g-art-progress > span > span { display: block; height: 100%; border-radius: 3px; background: var(--menta); transform-origin: left; transform: scaleX(0); transition: transform 1.6s var(--ease) .4s; }
.g-art-progress > span:nth-child(2) > span { transition-delay: .55s; }
.g-art-progress > span:nth-child(3) > span { transition-delay: .7s; }
.g-feature.in .g-art-progress > span > span { transform: scaleX(var(--share, 0)); }
.g-art-voice { position: absolute; top: 24px; right: 24px; width: 44px; height: 44px; }
.g-art-voice span { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(188, 211, 198, .6); animation: g-ring 2.4s ease-out infinite; }
.g-art-voice span:nth-child(2) { animation-delay: .8s; }
.g-art-voice span:nth-child(3) { animation-delay: 1.6s; }
.g-art-versions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: auto; padding-top: 10px; font-size: 14px; font-weight: 650; }
.g-art-versions .old { padding: 6px 12px; border-radius: var(--pill); background: var(--surface-2); color: var(--dim); text-decoration: line-through; }
.g-art-versions > .icon { color: var(--muted); }
.g-art-versions .new { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px 6px 10px; border-radius: var(--pill); background: var(--menta); color: #102018; transform: scale(.8); opacity: 0; transition: transform .6s var(--ease) .6s, opacity .6s .6s; }
.g-art-versions .new .icon { width: 16px; height: 16px; stroke-width: 2.4; }
.g-feature.in .g-art-versions .new { transform: none; opacity: 1; }

/* 6. El mando */
.g-modes { justify-content: center; margin: 0 0 28px; }
.g-remote-wrap { display: grid; grid-template-columns: auto minmax(0, 440px); gap: clamp(32px, 7vw, 96px); justify-content: center; align-items: center; }
.g-remote-stage { display: grid; place-items: center; padding: 16px; }
.g-remote { position: relative; width: 196px; padding: 34px 22px 26px; display: flex; flex-direction: column; align-items: center; gap: 22px; border-radius: 70px 70px 80px 80px / 54px 54px 64px 64px;
  background: linear-gradient(180deg, #2f3133, #1b1c1d 72%); border: 1px solid rgba(255, 255, 255, .07); transform: rotate(-4deg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 50px 80px -30px rgba(0, 0, 0, .95), 0 0 140px -40px rgba(188, 211, 198, .28); }
.g-remote-led { position: absolute; top: 15px; width: 6px; height: 6px; border-radius: 50%; background: var(--menta); opacity: .35; }
.g-remote.blink .g-remote-led { animation: g-blink .5s ease-out both; }
.g-key { padding: 0; color: var(--muted); background: #3a3c3e; border: 1px solid rgba(255, 255, 255, .06); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 3px 0 #111; opacity: .4; transition: background .25s, color .25s, box-shadow .25s, opacity .3s, transform .12s; }
.g-key:hover { filter: none; opacity: .75; }
.g-key.lit, .g-key.lit:hover { opacity: 1; color: var(--text); background: #46494b; }
.g-key.selected, .g-key.selected:hover { background: var(--text); color: var(--ink-dark); box-shadow: 0 0 0 3px #1b1c1d, 0 0 0 5px var(--menta), 0 0 26px rgba(188, 211, 198, .5); }
.g-key:active:not(:disabled) { transform: translateY(2px); }
.g-key:focus-visible { box-shadow: 0 0 0 3px #1b1c1d, 0 0 0 5px var(--text); }
.g-key.round { width: 50px; height: 50px; border-radius: 50%; }
.g-key .icon { width: 20px; height: 20px; }
.g-dpad { position: relative; width: 152px; height: 152px; border-radius: 50%; background: #262829; box-shadow: inset 0 2px 8px rgba(0, 0, 0, .65), 0 1px 0 rgba(255, 255, 255, .06); }
.g-key.arrow, .g-key.arrow.lit, .g-key.arrow.lit:hover { position: absolute; width: 46px; height: 46px; border-radius: 14px; background: transparent; border: 0; box-shadow: none; }
.g-key.arrow.selected, .g-key.arrow.selected:hover { background: rgba(237, 237, 235, .14); color: var(--text); box-shadow: 0 0 0 2px var(--menta), 0 0 20px rgba(188, 211, 198, .35); }
.g-key.arrow.up { top: 3px; left: 53px; }
.g-key.arrow.up .icon { transform: rotate(-90deg); }
.g-key.arrow.down { bottom: 3px; left: 53px; }
.g-key.arrow.down .icon { transform: rotate(90deg); }
.g-key.arrow.left { left: 3px; top: 53px; }
.g-key.arrow.left .icon { transform: rotate(180deg); }
.g-key.arrow.right { right: 3px; top: 53px; }
.g-key.ok { position: absolute; inset: 46px; border-radius: 50%; font-size: 15px; font-weight: 800; }
.g-remote-row { display: flex; gap: 14px; }
.g-playpause { display: inline-flex; }
.g-playpause .icon { width: 15px; height: 15px; }
.g-remote-brand svg { display: block; width: 32px; height: auto; opacity: .45; }
.g-explain { min-height: 190px; padding: 30px; border-radius: 26px; background: var(--surface); border: 1px solid var(--line); }
.g-explain-in { animation: view-in .4s var(--ease) both; }
.g-explain h3 { margin: 10px 0 8px; font-size: 26px; letter-spacing: -.02em; }
.g-explain p { margin: 0; font-size: 17px; }

/* Cierre */
.g-end { margin-top: clamp(90px, 13vh, 150px); padding: 64px 24px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; overflow: hidden; border-radius: 32px; border: 1px solid var(--line);
  background: radial-gradient(ellipse 70% 90% at 50% 0%, rgba(188, 211, 198, .14), transparent 70%), radial-gradient(ellipse 50% 60% at 80% 100%, rgba(227, 185, 119, .08), transparent 70%), var(--surface); }
.g-end h2 { margin: 14px 0 0; font-size: clamp(30px, 4.2vw, 46px); letter-spacing: -.035em; font-weight: 800; }
.g-end p { max-width: 560px; margin: 0; font-size: 17px; }
.g-end-actions { justify-content: center; margin-top: 16px; }

/* Tarjeta de la guía en Perfiles */
.guide-card { position: relative; display: flex; align-items: center; gap: 18px; margin-top: 40px; padding: 20px 24px; overflow: hidden; color: var(--text);
  background: linear-gradient(100deg, rgba(188, 211, 198, .1), rgba(227, 185, 119, .05) 60%, transparent), var(--surface); }
.guide-card:hover { text-decoration: none; border-color: var(--line-2); }
.guide-card + .duo { margin-top: 18px; }
.guide-card-mark { width: 54px; height: 54px; flex: none; display: grid; place-items: center; border-radius: 17px; background: var(--bg); border: 1px solid var(--line); }
.guide-card-mark svg { width: 30px; height: auto; transition: transform .5s var(--ease); }
.guide-card:hover .guide-card-mark svg { transform: rotate(-8deg) scale(1.1); }
.guide-card-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.guide-card-text b { font-size: 17px; }
.guide-card-go { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--surface-2); transition: transform .3s var(--ease), background .3s, color .3s; }
.guide-card:hover .guide-card-go, .guide-card:focus-visible .guide-card-go { transform: translateX(4px); background: var(--text); color: var(--ink-dark); }

/* Tabletas */
@media (max-width: 900px) {
  .g-kinds { grid-template-columns: 1fr; }
  .g-kind { flex-direction: row; align-items: stretch; }
  .g-kind-visual { width: 46%; flex: none; height: auto; min-height: 210px; }
  .g-kind-text { align-self: center; }
  .g-split, .g-split.reverse { grid-template-columns: 1fr; }
  .g-split.reverse > .g-visual { order: 0; }
  .g-visual { max-width: 620px; width: 100%; margin: 0 auto; }
  .g-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-feature.wide:last-child { grid-column: auto; }
  .g-remote-wrap { grid-template-columns: 1fr; justify-items: center; gap: 20px; }
  .g-explain { width: 100%; max-width: 560px; min-height: 160px; }
}
/* Teléfonos */
@media (max-width: 640px) {
  .g-hero { min-height: max(560px, 92svh); }
  .g-hero-inner { padding-bottom: 120px; gap: 14px; }
  .g-mark.big { width: 74px; }
  .g-hero-actions { flex-direction: column; align-self: stretch; }
  .g-hero-actions > * { width: 100%; }
  .g-cue { bottom: 56px; }
  .g-wall img { width: 92px; }
  .g-chapters { margin-top: -48px; }
  /* Sobre la portada estaría encima del dock: solo aparece al quedar pegado bajo la barra. */
  .g-chapters:not(.shown) .g-chapters-inner { opacity: 0; transform: translateY(-8px); pointer-events: none; }
  .g-chapters-inner { transition: background .3s, box-shadow .3s, opacity .3s, transform .3s var(--ease); }
  .g-chapters a { padding: 6px 7px; }
  .g-chapters a .l { display: none; }
  .g-chapters a[aria-current] { padding-right: 13px; }
  .g-chapters a[aria-current] .l { display: inline; }
  .g-section { padding-top: 76px; }
  .g-head { margin-bottom: 28px; }
  .g-kind { flex-direction: column; }
  .g-kind-visual { width: auto; min-height: 0; height: 200px; }
  .g-points.two { grid-template-columns: 1fr; }
  .g-steps { grid-template-columns: 1fr; gap: 22px; }
  .g-steps-line { top: 34px; bottom: 34px; left: 33px; right: auto; width: 2px; height: auto; }
  .g-steps-line span { transform-origin: top; transform: scaleY(0); }
  .g-step { display: grid; grid-template-columns: 68px minmax(0, 1fr); column-gap: 18px; row-gap: 2px; align-items: start; text-align: left; }
  .g-step-badge { grid-row: span 2; }
  .g-step b { margin-top: 10px; }
  .g-devices { grid-template-columns: 1fr; margin-top: 36px; }
  .g-pair { padding: 0 12% 18% 0; }
  .g-bento { grid-template-columns: 1fr; }
  .g-feature.wide, .g-feature.wide:last-child { grid-column: auto; }
  .g-remote { transform: rotate(-3deg) scale(.92); }
  .g-explain { padding: 22px; }
  .g-explain h3 { font-size: 22px; }
  .g-end { padding: 48px 20px; border-radius: 26px; }
  .g-end-actions { flex-direction: column; align-self: stretch; }
  .g-end-actions > * { width: 100%; }
  .guide-card { padding: 16px; gap: 14px; }
  .guide-card-mark { width: 46px; height: 46px; border-radius: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal-on [data-reveal], .g-step { opacity: 1 !important; transform: none !important; }
  .g-steps-line span { transform: none !important; }
  .g-wall { transform: perspective(1200px) rotateX(26deg) rotateZ(-10deg); }
  .g-art-versions .new { transform: none; opacity: 1; }
}

/* TV Premium (decisión 0038) */
.badge.tv.premium { color: #2a2410; background: var(--ambar); border-color: transparent; }
.badge.tv.standard { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.danger-text { color: var(--coral, #e8998d); }
.row.between { justify-content: space-between; }
.note.first { margin-top: 0; margin-bottom: 14px; }
/* Planes (decisión 0042) */
.badge.plan { color: var(--text); }
.badge.plan.premium { color: #2a2410; background: var(--ambar); border-color: transparent; }
.badge.plan.standard { color: var(--menta); }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.plan-card { display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; background: var(--surface-2); text-align: left; color: var(--text); font: inherit; }
.plan-card.premium { border-top: 3px solid var(--ambar); }
.plan-card.standard { border-top: 3px solid var(--menta); }
.plan-card.basic { border-top: 3px solid var(--line-2); }
.plan-card p { margin: 0; }
.plan-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.plan-top h3 { margin: 0; font-size: 18px; }
.plan-services { list-style: none; margin: 4px 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.plan-services li { display: flex; align-items: center; gap: 8px; }
.plan-services li.off { color: var(--muted); }
.plan-services .tick { width: 20px; height: 20px; border-radius: 999px; display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; background: var(--surface-3); color: var(--muted); }
.plan-services li.on .tick { background: rgba(188, 211, 198, .16); color: var(--menta); }
.plan-actions { margin-top: auto; padding-top: 6px; gap: 8px; flex-wrap: wrap; }
.plan-new { align-items: center; justify-content: center; border-style: dashed; cursor: pointer; min-height: 180px; background: transparent; }
.plan-new:hover, .plan-new:focus-visible { border-color: var(--menta); }
.plan-plus { font-size: 30px; line-height: 1; color: var(--menta); }
.plan-form fieldset { border: 0; padding: 0; margin: 18px 0 0; }
.plan-form legend { font-weight: 600; margin-bottom: 4px; }
.plan-services-pick { display: flex; flex-wrap: wrap; gap: 0 22px; }
.plan-services-pick .switch { margin-top: 8px; }
.plan-tv { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.plan-tv legend { grid-column: 1 / -1; }
.radio-card { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.radio-card:has(input:checked) { border-color: var(--menta); box-shadow: 0 0 0 1px var(--menta); }
.radio-card input { margin-top: 3px; accent-color: var(--menta); }
.radio-card span { display: flex; flex-direction: column; gap: 2px; }
.plan-special { margin-top: 18px; }
.plan-special h3 { margin: 0; }
.plan-special .search { width: 100%; margin: 8px 0; }
.channel-pick { list-style: none; margin: 0; padding: 0; max-height: 280px; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; }
.channel-pick > li { border-top: 1px solid var(--line); }
.channel-pick > li:first-child { border-top: 0; }
.channel-pick > li.muted { padding: 12px 14px; }
.channel-row { display: flex; align-items: center; gap: 12px; padding: 8px 14px; cursor: pointer; }
.channel-row:hover { background: var(--surface-2); }
.channel-row input { width: 18px; height: 18px; accent-color: var(--menta); flex: none; }
.channel-row img, .channel-row .logo-ph { width: 44px; height: 28px; object-fit: contain; flex: none; border-radius: 6px; }
.channel-row .logo-ph { display: grid; place-items: center; background: var(--surface-3); color: var(--muted); font-weight: 700; font-size: 13px; }
.channel-row.gone b { color: var(--muted); text-decoration: line-through; }
.tv-user-head select { width: auto; max-width: 100%; padding: 7px 12px; border-radius: 10px; font-size: 14px; }
.tv-about { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-bottom: 4px; }
.tv-block { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; background: var(--surface-2); }
.tv-block b { display: block; margin-bottom: 4px; }
.tv-block.premium b { color: var(--ambar); }
.tv-block.standard b { color: var(--menta); }
.tv-block p { margin: 0; }
.list.tv-access > li.tv-user { display: block; }
.tv-user-head { align-items: center; gap: 14px; flex-wrap: nowrap; }
.tv-user-head .grow { min-width: 0; }
.tv-user-head .grow .meta { overflow-wrap: anywhere; }
.tv-user-head .switch { flex: none; }
.list.tv-devices { margin: 10px 0 0 58px; }
.list.tv-devices li { padding: 10px 0; gap: 12px; }
.list.tv-devices .device-icon { width: 36px; height: 36px; border-radius: 10px; }
.list.tv-devices select { width: auto; max-width: 100%; padding: 7px 12px; border-radius: 10px; font-size: 14px; }
.tv-none { margin: 8px 0 0 58px; }
.muted-row { opacity: .6; }
@media (max-width: 640px) {
  .list.tv-devices, .tv-none { margin-left: 0; }
  .list.tv-devices select { flex: 1 1 100%; }
}
.admin-stack > * + * { margin-top: 18px; }
p.label { font-size: 14px; color: var(--muted); margin: 14px 0 6px; font-weight: 550; }
/* Planes con precio, cuentas y solicitudes (decisión 0055): Administración → Planes y Cuenta → Plan. */
.badge.plan.basic { color: var(--muted); }
.row.tight { gap: 6px; align-items: center; }
.plan-card-price { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text); }
.plan-top .plan-card-price { font-size: 14px; color: var(--muted); white-space: nowrap; }
.plan-members { display: flex; gap: 8px; align-items: flex-start; margin: 0; font-size: 13px; color: var(--muted); }
.plan-members .icon { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.plan-requests { border-color: var(--line-2); }
.plan-requests .section-head .badge { margin-left: 8px; }
.list > li.plan-request { align-items: center; gap: 14px; }
.plan-request .row.tight { margin-top: 6px; }
.plan-head-fields { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.plan-head-fields .grow { flex: 1 1 220px; min-width: 0; }
.plan-price-field { flex: 0 1 170px; }
.plan-price-field input { font-variant-numeric: tabular-nums; }
.member-pick { max-height: 240px; }
.member-pick .channel-row .badge { flex: none; }
.plan-mine { position: relative; overflow: hidden; display: grid; gap: 10px; padding: 22px 24px; }
.plan-mine::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--menta); }
.plan-mine.premium::before { background: var(--ambar); }
.plan-mine.basic::before { background: var(--line-2); }
.plan-mine p { margin: 0; }
.plan-name { margin: 2px 0 0; font-size: 28px; letter-spacing: -.02em; }
.plan-price { display: flex; align-items: baseline; gap: 6px; font-variant-numeric: tabular-nums; }
.plan-price b { font-size: 30px; line-height: 1; letter-spacing: -.02em; }
.plan-status { display: flex; gap: 12px; align-items: center; padding: 14px 18px; border: 1px solid var(--line-2); border-radius: 16px; background: var(--surface); }
.plan-status .grow { display: grid; gap: 2px; min-width: 0; }
.plan-status.pending { border-color: rgba(232, 199, 120, .45); }
@media (max-width: 640px) {
  .plan-status { flex-wrap: wrap; }
  .list > li.plan-request { flex-wrap: wrap; }
}

/* ---- Administración ampliada (decisión 0040): menú por grupos, servidor, registros, VPN, alertas y métricas ---- */
/* Series de las gráficas: verde y ámbar saturados, validados para daltonismo sobre el grafito (dataviz). */
:root { --series-1: #3fa57a; --series-2: #c4821f; --warn: #e3b977; --bad: #f0a48f; }
.admin-stack > * { margin: 0; }
.admin-stack > * + * { margin-top: 18px; }
.admin-stack .duo { margin-top: 18px; }
.admin-group + .admin-group { margin-top: 14px; }
.admin-group-title { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--dim); margin: 0 0 4px 12px; font-weight: 700; }
.segmented { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: var(--pill); background: var(--surface); border: 1px solid var(--line); }
.segmented button { padding: 6px 14px; font-size: 14px; font-weight: 600; background: transparent; color: var(--muted); }
.segmented button:hover { color: var(--text); filter: none; }
.segmented button.on { background: var(--surface-3); color: var(--text); }
h3.sub { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 22px 0 8px; }

/* Gráficas */
.chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.admin-stack .chart-grid > .card { margin: 0; }
.chart-card .card-head { align-items: flex-start; }
.chart-card .card-head p { margin: 2px 0 0; }
.chart-card .figure { font-size: 22px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.chart-box { margin-top: 10px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.key { display: inline-block; width: 14px; height: 2px; border-radius: 2px; background: currentColor; flex: none; }
.key.box { height: 10px; width: 10px; border-radius: 3px; }
.key.s1 { color: var(--series-1); } .key.s2 { color: var(--series-2); }
.plot { position: relative; border-radius: 10px; touch-action: pan-y; }
.plot svg { display: block; overflow: visible; }
.plot:focus-visible { box-shadow: var(--ring); }
svg.chart .grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 4; }
svg.chart .base { stroke: var(--line-2); stroke-width: 1; }
svg.chart .axis { fill: var(--dim); font-size: 11px; font-family: inherit; font-variant-numeric: tabular-nums; }
svg.chart .line, svg.spark .line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
svg .line.s1, svg .dot.s1 { stroke: var(--series-1); } svg .line.s2, svg .dot.s2 { stroke: var(--series-2); }
svg.chart .area.s1 { fill: var(--series-1); opacity: .14; } svg.chart .area.s2 { fill: var(--series-2); opacity: .14; }
svg.chart .colbar { stroke: none; } svg.chart .colbar.s1 { fill: var(--series-1); } svg.chart .colbar.s2 { fill: var(--series-2); }
svg.chart .colbar.on { filter: brightness(1.25); }
svg.chart .dot { fill: var(--surface); stroke-width: 2; }
svg.chart .cross { stroke: var(--muted); stroke-width: 1; }
.chart-tip { position: absolute; z-index: 2; pointer-events: none; min-width: 120px; padding: 8px 10px; border-radius: 10px; background: var(--surface-3); border: 1px solid var(--line-2); box-shadow: var(--shadow); font-size: 13px; }
.tip-head { display: block; font-weight: 600; color: var(--muted); font-size: 12px; margin-bottom: 4px; white-space: nowrap; }
.tip-row { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.tip-row strong { font-variant-numeric: tabular-nums; }
.tip-row span { color: var(--muted); }
.data-table { margin-top: 8px; font-size: 13px; }
.data-table summary { cursor: pointer; color: var(--dim); width: max-content; border-radius: 6px; }
.data-table summary:hover { color: var(--text); }
.table-wrap { overflow-x: auto; }
.data-table .table-wrap { max-height: 340px; }
.data-table table, .grid-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.data-table th, .data-table td { text-align: left; padding: 4px 10px 4px 0; border-bottom: 1px solid var(--line); }
.data-table th { color: var(--muted); font-weight: 600; }
.grid-table th, .grid-table td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 14px; }
.grid-table th { color: var(--muted); font-weight: 600; font-size: 13px; white-space: nowrap; }
.grid-table tr:last-child td { border-bottom: 0; }
.grid-table .num { text-align: right; white-space: nowrap; }
.grid-table .meta { font-size: 12px; color: var(--muted); }
.grid-table .bar-cell { width: 30%; vertical-align: middle; }
.th-sort { padding: 0; background: none; color: inherit; font: inherit; font-weight: 600; border-radius: 4px; }
.th-sort.on { color: var(--text); }
.th-sort.on::after { content: ' ↓'; }
.track { position: relative; display: block; height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.track.small { height: 4px; margin-top: 5px; min-width: 70px; }
.track .fill { position: absolute; inset: 0 auto 0 0; border-radius: 3px; background: var(--series-1); }
.fill.s1, .fill.ok { background: var(--series-1); } .fill.s2 { background: var(--series-2); }
.fill.warn { background: var(--warn); } .fill.bad { background: var(--bad); } .fill.muted, .fill.idle { background: var(--grafito); }
svg.spark { width: 120px; height: 30px; display: block; }

/* Medidores */
.meters { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-top: 14px; }
.meter { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); min-width: 0; }
.meter-head { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); font-weight: 600; }
.meter-icon { display: inline-flex; }
.meter-icon .icon { width: 16px; height: 16px; }
.meter-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meter-state { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.meter.ok .meter-state { color: var(--menta); } .meter.warn .meter-state { color: var(--ambar); } .meter.bad .meter-state { color: var(--coral); }
.meter.idle .meter-state { visibility: hidden; }
.meter.idle .track { visibility: hidden; }
/* El título recibe el foco al cambiar de sección (lectores de pantalla): sin anillo. */
body.admin-mode h1:focus-visible { box-shadow: none; }
.meter.bad { border-color: rgba(240, 164, 143, .45); }
.meter-value { font-size: 24px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.meter small { font-size: 12px; color: var(--muted); }

/* Resumen y servidor */
.server-card .chart-box { margin-top: 16px; }
.svc-group { margin-top: 12px; }
.svc-group-title { display: block; font-size: 12px; color: var(--dim); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; margin-bottom: 6px; }
.svc-dots { display: flex; flex-wrap: wrap; gap: 6px; }
.svc-dot { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px; border-radius: var(--pill); background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; }
.svc-dot .state-dot { width: 8px; height: 8px; box-shadow: none; }
.host-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.host-head h2 { margin: 0; font-size: 22px; }
.host-head p { margin: 4px 0 0; }
.host-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.host-meta .meta { font-size: 12px; color: var(--muted); }

/* Servicios */
.list li.svc-row { align-items: flex-start; flex-wrap: nowrap; }
.svc-row > .state-dot { margin-top: 7px; }
.svc-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.svc-facts { margin-top: 2px; }
.svc-actions { flex: none; }
.caps { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cap { font-size: 12px; padding: 2px 8px; border-radius: var(--pill); border: 1px solid var(--line); color: var(--muted); }
.cap.ok { color: var(--menta); border-color: rgba(188, 211, 198, .35); }
.cap.off { color: var(--coral); border-color: rgba(240, 164, 143, .45); }

/* Registros */
.logs-filters { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.logs-filters .row { gap: 10px; }
.logs-filters select, .logs-filters input[type=date] { width: auto; padding: 9px 12px; border-radius: 12px; border: 1px solid #343738; background: #222425; color: var(--text); font: inherit; }
.logs-filters .chips { margin: 2px 0; }
.chip.lvl-error.on { border-color: var(--coral); box-shadow: 0 0 0 1px var(--coral); }
.chip.lvl-warn.on { border-color: var(--ambar); box-shadow: 0 0 0 1px var(--ambar); }
.logview { height: min(62vh, 640px); overflow: auto; padding: 10px 0; border-radius: 12px; background: #0f1011; border: 1px solid var(--line); font: 12.5px/1.55 ui-monospace, "Cascadia Mono", "SF Mono", Menlo, monospace; }
.logview > p { padding: 0 14px; }
.log-line { display: grid; grid-template-columns: 64px 128px 66px minmax(0, 1fr); gap: 10px; padding: 1px 14px; }
.log-line:hover { background: rgba(255, 255, 255, .04); }
.log-line time { color: var(--dim); }
.log-svc { color: var(--cielo); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-lvl { font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--dim); padding-top: 1px; }
.log-text { white-space: pre-wrap; word-break: break-word; color: #d9dcdd; }
.log-line.lvl-error { background: rgba(240, 164, 143, .07); } .log-line.lvl-error .log-lvl, .log-line.lvl-error .log-text { color: var(--coral); }
.log-line.lvl-warn .log-lvl { color: var(--ambar); } .log-line.lvl-debug .log-text { color: var(--dim); }
.logs-foot { justify-content: space-between; margin-top: 10px; }
.logs-foot .meta { font-size: 13px; color: var(--muted); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--grafito); }
.live-dot.on { background: var(--coral); box-shadow: 0 0 0 4px rgba(240, 164, 143, .18); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* VPN */
.vpn-ip { display: flex; align-items: center; gap: 14px; margin: 14px 0 6px; }
.vpn-ip .state-dot { width: 12px; height: 12px; }
.vpn-ip .ip { font-size: 26px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.vpn-history { margin-top: 14px; }
.vpn-history summary { cursor: pointer; color: var(--muted); font-size: 14px; }
.vpn-card .row.end { margin-top: 16px; }
.vpn-form .note { margin: 2px 0 6px; font-size: 13px; }
/* Búsqueda con IA (decisión 0059). */
.ai-form .note { margin: 2px 0 6px; font-size: 13px; }
.ai-form input, .ai-form select { width: 100%; }
.ai-form .speech-player { width: 100%; margin-top: 10px; }
.ai-form .row.end { margin-top: 14px; }
.vpn-form .segmented { margin-top: 2px; }
/* Red y VPN (decisión 0080): mapa de red con ficha al lado, rutas, túneles y configurador */
.net-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 16px; align-items: start; }
.admin-stack .net-layout > .card { margin: 0; }
.net-map-card { padding: 14px 16px 12px; }
svg.net-map { width: 100%; height: auto; display: block; }
.net-link { fill: none; stroke-width: 2; }
.net-link.vpn { stroke: var(--cielo); opacity: .8; }
.net-link.thick { stroke-width: 3; }
.net-link.vpn.thick { stroke: var(--menta); opacity: 1; }
.net-link.direct { stroke: var(--ambar); stroke-dasharray: 5 5; }
.net-link.tunnel { stroke: var(--lavanda); stroke-width: 2.5; }
.net-link.bad { stroke: var(--coral); stroke-dasharray: 4 4; }
.net-link.quiet { stroke: var(--line-2); }
.net-node { cursor: pointer; outline: none; }
.net-node rect { fill: var(--surface-2); stroke: var(--line-2); stroke-width: 1.2; transition: stroke .15s, fill .15s; }
.net-node:hover rect { stroke: var(--muted); }
.net-node:focus-visible rect, .net-node.on rect { stroke: var(--text); stroke-width: 2; }
.net-node.server rect { fill: var(--surface); stroke: var(--text); stroke-width: 1.5; }
.net-node.vpn rect { fill: var(--menta-dark); stroke: var(--menta); }
.net-node.direct rect { fill: var(--ambar-dark); stroke: #5a4a30; }
.net-node.tunnel rect { stroke: var(--lavanda); }
.net-node.bad rect { fill: #33262a; stroke: var(--coral); }
.net-node .nt { fill: var(--text); font-size: 15px; font-weight: 600; }
.net-node.vpn .nt { fill: var(--menta); }
.net-node.direct .nt { fill: var(--ambar); }
.net-node.bad .nt { fill: var(--coral); }
.net-node .ns { fill: var(--muted); font-size: 12.5px; }
svg.net-map .nb { fill: var(--dim); font-size: 12px; font-weight: 700; }
svg.net-map .nl { fill: var(--menta); font-size: 12px; }
.net-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 6px; }
.net-legend span { display: inline-flex; align-items: center; gap: 6px; }
.net-legend .lg { width: 18px; height: 0; border-top: 2px solid var(--cielo); display: inline-block; }
.net-legend .lg.direct { border-top: 2px dashed var(--ambar); } .net-legend .lg.tunnel { border-top-color: var(--lavanda); } .net-legend .lg.bad { border-top: 2px dashed var(--coral); }
.net-drawer { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 16px; min-width: 0; }
.net-drawer > * { margin: 0; }
.net-drawer .row { justify-content: space-between; }
.net-title { font-size: 20px; margin: 0; }
.net-drawer .spark { width: 100%; height: 44px; }
.net-change { display: flex; flex-direction: column; gap: 6px; }
.net-checks { list-style: none; margin: 0; padding: 0; display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.net-checks li { display: inline-flex; align-items: center; gap: 8px; }
.net-checks li.bad { color: var(--danger); }
.net-table tr.net-bad td { background: rgba(240, 164, 143, .05); }
.net-table td .badge { white-space: nowrap; }
.net-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 6px; }
.net-form-grid .eyebrow { margin: 10px 0 0; }
.net-opts > label:first-child { margin-top: 14px; }
.net-opt { display: flex !important; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 14px; margin: 8px 0 0 !important; cursor: pointer; color: var(--text) !important; }
.net-opt input { margin-top: 3px; accent-color: var(--ambar); }
.net-opt b { display: block; font-size: 14px; }
.net-opt small { display: block; color: var(--muted); font-size: 13px; font-weight: 400; }
.vpn-form input[type=date] { width: 100%; padding: 11px 16px; border-radius: var(--pill); border: 1px solid #343738; background: #222425; color: var(--text); font: inherit; }
@media (max-width: 1100px) { .net-layout { grid-template-columns: 1fr; } .net-drawer { position: static; } }
@media (max-width: 760px) { .net-form-grid { grid-template-columns: 1fr; gap: 0; } }


/* Alertas */
.notice-card { border-color: rgba(227, 185, 119, .45); }
.checkline { align-items: flex-start; }
.checkline > span, .radio > span { display: flex; flex-direction: column; }
.checkline small, .radio small { font-size: 13px; }
.radio-group { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.radio { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; color: var(--text); font-size: 15px; margin: 0; font-weight: 500; }
.radio input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--menta); }
.list.rules li { flex-wrap: nowrap; align-items: flex-start; }
.list.rules .switch { margin-top: 2px; }
.rule-params { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; font-size: 13px; color: var(--muted); }
.param { white-space: nowrap; }
.num-input { width: 68px; padding: 6px 10px; border-radius: 10px; border: 1px solid #343738; background: #222425; color: var(--text); font: inherit; text-align: right; }
.num-input:focus { border-color: var(--text); outline: none; }
.sticky-actions { position: sticky; bottom: 12px; z-index: 3; padding: 12px 16px; border-radius: var(--pill); background: rgba(30, 32, 33, .92); border: 1px solid var(--line); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.sticky-actions .error { margin: 0 auto 0 8px; min-height: 0; }
.card label.inline { margin-top: 16px; }
.card label.inline select { margin-top: 4px; }

/* Métricas */
.top-list { list-style: none; margin: 0; padding: 0; }
.top-list li { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-top: 1px solid var(--line); }
.top-list li:first-child { border-top: 0; }
.top-list .grow { flex: 1; min-width: 0; }
.rank { width: 22px; text-align: right; color: var(--dim); font-weight: 700; font-variant-numeric: tabular-nums; }
.mini-poster { width: 38px; height: 57px; border-radius: 6px; object-fit: cover; background: var(--surface-3); flex: none; }
.empty-poster { display: inline-block; }
.top-figs { display: flex; flex-direction: column; align-items: flex-end; min-width: 64px; }
.top-figs b { font-variant-numeric: tabular-nums; }
.top-figs .meta { font-size: 12px; color: var(--muted); }
.barlist { list-style: none; margin: 0; padding: 0; }
.barlist li { display: grid; grid-template-columns: minmax(110px, 38%) 1fr auto; align-items: center; gap: 12px; padding: 7px 0; }
.bl-label { display: flex; flex-direction: column; min-width: 0; }
.bl-label b { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bl-label b::first-letter { text-transform: uppercase; }
.bl-label .meta { font-size: 12px; color: var(--muted); }
.bl-value { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 14px; min-width: 40px; text-align: right; }
.link-button { padding: 0; background: none; color: var(--text); font-weight: 650; font-size: 14px; border-radius: 4px; }
.link-button:hover { color: var(--menta); filter: none; }

@media (max-width: 900px) {
  .chart-grid { grid-template-columns: 1fr; }
  .admin-group { display: contents; }
  .admin-group-title { display: none; }
  .host-meta { align-items: flex-start; }
}
@media (max-width: 640px) {
  .log-line { grid-template-columns: 58px minmax(0, 1fr); gap: 2px 8px; }
  .log-lvl { display: none; }
  .log-text { grid-column: 1 / -1; }
  .list li.svc-row { flex-wrap: wrap; }
  .svc-actions { width: 100%; justify-content: flex-end; }
  .list.rules li { flex-wrap: wrap; }
  .rule-params { width: 100%; flex-direction: row; justify-content: flex-end; }
  .barlist li { grid-template-columns: minmax(90px, 40%) 1fr auto; }
  .sticky-actions { border-radius: 18px; }
  .grid-table th, .grid-table td { padding-right: 8px; }
  .meters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .meter-head { flex-wrap: wrap; row-gap: 2px; }
  .meter-state { order: 3; flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) { .live-dot.on { animation: none; } }
.admin-stack > p.meta, .admin-stack .card > p.meta { font-size: 13px; color: var(--muted); }

/* ==== Panel con barra lateral (13 nov 2026): barra lateral, Inicio, Cuenta y ajustes, buscador y Resumen ==== */

/* Barra lateral: fija a la izquierda en el escritorio (se puede ocultar) y menú desplegable en pantallas estrechas. */
body.has-side { padding-left: var(--side-w); }
body.has-side.side-collapsed { padding-left: 0; }
.side { position: fixed; z-index: 20; top: 0; bottom: 0; left: 0; width: var(--side-w); display: flex; flex-direction: column; gap: 2px; padding: 12px 12px 14px; background: var(--side); border-right: 1px solid rgba(255, 255, 255, .04); overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
body.side-collapsed .side { display: none; }
.side-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 48px; padding: 0 2px 0 8px; margin-bottom: 10px; }
.side-brand { display: flex; align-items: center; gap: 10px; color: var(--text); border-radius: 10px; padding: 4px 2px; }
.side-brand:hover { text-decoration: none; }
.side-brand .mark { width: 30px; height: auto; flex: none; }
.side-name { font-size: 18px; font-weight: 650; letter-spacing: -.01em; }
.side-tag { font-size: 11px; font-weight: 650; color: var(--ambar); border: 1px solid rgba(227, 185, 119, .45); border-radius: var(--pill); padding: 1px 8px; }
.icon-button { width: 36px; height: 36px; padding: 0; border-radius: 10px; background: transparent; color: var(--muted); flex: none; }
.icon-button:hover { background: var(--surface); color: var(--text); filter: none; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-link { display: flex; align-items: center; gap: 11px; min-height: 38px; padding: 0 10px; border-radius: 12px; color: #d4d6d4; font-size: 14.5px; font-weight: 500; transition: background .15s, color .15s; }
.side-link:hover { background: var(--surface); color: var(--text); text-decoration: none; }
.side-link[aria-current="page"] { background: var(--menta-dark); color: var(--text); }
.side-link[aria-current="page"] .icon { color: var(--menta); }
body.admin-mode .side-link[aria-current="page"] { background: var(--ambar-dark); }
body.admin-mode .side-link[aria-current="page"] .icon { color: var(--ambar); }
.side-link > .icon { color: var(--muted); }
.side-link[href="/cuenta/admin"] > .icon { color: var(--ambar); }
.side-link .label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-link .count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--pill); display: inline-grid; place-items: center; font-size: 11px; font-weight: 650; background: var(--surface-2); color: var(--muted); }
.side-link .count.hot { background: var(--ambar); color: #2a2410; }
.side-group + .side-group { margin-top: 12px; }
.side-group-title { margin: 0 10px 4px; font-size: 12px; font-weight: 550; color: var(--dim); }
/* Administración: grupos plegables (decisión 0081). Mismo aspecto que el título de siempre, con su flecha. */
.admin-menu .side-group + .side-group { margin-top: 6px; }
button.side-group-title { display: flex; align-items: center; gap: 6px; width: 100%; height: 30px; margin: 0; padding: 0 10px; border-radius: 10px; background: transparent; color: var(--dim); font-size: 12px; font-weight: 550; line-height: 1; text-align: left; justify-content: flex-start; }
button.side-group-title:hover { background: var(--surface); color: var(--muted); filter: none; }
button.side-group-title .grow { flex: 1; }
button.side-group-title > .icon { width: 14px; height: 14px; transition: transform .2s var(--ease); }
button.side-group-title[aria-expanded="false"] > .icon { transform: rotate(-90deg); }
.group-count .count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--pill); display: inline-grid; place-items: center; font-size: 11px; font-weight: 650; background: var(--surface-2); color: var(--muted); }
.group-count .count.hot { background: var(--ambar); color: #2a2410; }
.side-group-items { display: flex; flex-direction: column; gap: 2px; margin-top: 2px; }
.side-account .who > span { display: flex; align-items: center; gap: 6px; }
.state-dot.small { width: 7px; height: 7px; box-shadow: none; }
.side-sep { height: 1px; background: rgba(255, 255, 255, .07); margin: 12px 8px; flex: none; }
.side-fill { flex: 1; min-height: 16px; }
.side-foot { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.side-account { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .07); color: var(--text); }
.side-account:hover { background: var(--surface); text-decoration: none; }
.side-account[aria-current="page"] { border-color: rgba(188, 211, 198, .4); background: var(--menta-dark); }
.side-account .who { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.side-account .who b { font-size: 14px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-account .who span { font-size: 12px; color: var(--muted); }
.side-account .avatar, .mbar-account .avatar { width: 34px; height: 34px; font-size: 14px; }

/* Avatares redondos (cuenta, Inicio, buscador) */
.avatar.round { border-radius: 50%; }
.avatar.xs { width: 22px; height: 22px; font-size: 11px; }
.avatar.xl-round { width: 80px; height: 80px; font-size: 32px; }

/* Barra fina de arriba: en pantallas estrechas o con la barra lateral oculta */
.mbar { display: none; position: sticky; top: 0; z-index: 15; align-items: center; justify-content: space-between; gap: 10px; min-height: 56px; padding: 6px 10px; padding-top: max(6px, env(safe-area-inset-top));
  background: rgba(20, 21, 22, .94); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
body.side-collapsed .mbar { display: flex; }
body.admin-mode .mbar { border-bottom-color: rgba(227, 185, 119, .28); }
.mbar .brand { display: flex; align-items: center; color: var(--text); padding: 6px 4px; border-radius: 10px; }
.mbar .brand .logo { display: block; height: 20px; width: auto; }
.mbar .icon-button { width: 44px; height: 44px; color: var(--text); }
.mbar .icon-button .icon { width: 22px; height: 22px; }
.mbar-account { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; }
.scrim { position: fixed; inset: 0; z-index: 19; background: rgba(8, 9, 10, .6); }
@media (max-width: 900px) {
  :root { --main-pt: 24px; }
  body.has-side, body.has-side.side-collapsed { padding-left: 0; }
  .mbar { display: flex; }
  .side, body.side-collapsed .side { display: flex; width: min(300px, 86vw); transform: translateX(-102%); transition: transform .28s var(--ease), visibility 0s .28s; visibility: hidden; box-shadow: 24px 0 60px -20px rgba(0, 0, 0, .8); }
  body.menu-open .side { transform: none; visibility: visible; transition: transform .28s var(--ease); }
  main { padding-left: 16px; padding-right: 16px; }
}

/* Cabecera de página, buscador y elementos comunes */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 20px; flex-wrap: wrap; margin-bottom: 32px; }
.page-head h1 { font-size: 32px; margin: 2px 0 0; }
.page-head .intro { margin: 6px 0 0; max-width: 620px; font-size: 15px; }
.page-head > .row { gap: 10px; }
.eyebrow-soft { font-size: 13px; color: var(--muted); }
.sec-label { margin: 0 0 14px; font-size: 13px; font-weight: 550; color: var(--muted); letter-spacing: .01em; }
.search-field { justify-content: flex-start; gap: 10px; height: 40px; width: 300px; max-width: 100%; padding: 0 8px 0 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); color: #9b9e9e; font-size: 14px; font-weight: 400; }
.search-field:hover { border-color: var(--line-2); filter: none; }
.search-field .grow { flex: 1; text-align: left; }
.search-field .icon { width: 16px; height: 16px; }
kbd { font: 11px/1.4 inherit; font-family: inherit; color: var(--muted); border: 1px solid var(--line-2); border-radius: 6px; padding: 1px 6px; }
.button.accent { background: var(--menta); color: #141516; }
.button.accent:hover { filter: brightness(1.06); }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.block-head .sec-label { margin: 0; }
.status-line { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; }
.status-line .state-dot { width: 8px; height: 8px; box-shadow: none; }

/* Inicio */
.home { display: flex; flex-direction: column; gap: 36px; }
.home > .page-head { margin-bottom: 0; }
.who-row { display: flex; flex-wrap: wrap; gap: 14px 18px; }
.who { display: flex; flex-direction: column; align-items: center; gap: 9px; min-width: 92px; padding: 6px; border-radius: 16px; background: transparent; border: 0; color: #d4d6d4; font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; }
.who:hover, .who:focus-visible { text-decoration: none; filter: none; color: var(--text); box-shadow: none; }
.who .avatar { width: 76px; height: 76px; font-size: 28px; transition: box-shadow .2s, transform .2s var(--ease); }
.who:hover .avatar, .who:focus-visible .avatar { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--menta); transform: translateY(-2px); }
.who .badge { font-size: 11px; padding: 1px 8px; }
.who .meta { font-size: 12px; color: var(--dim); }
.who.add .avatar { background: transparent; border: 1.5px dashed var(--line-2); color: var(--muted); }
.who.add .avatar .icon { width: 26px; height: 26px; }
.home-split { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.home-split > .grow { flex: 2 1 440px; min-width: 0; }
.home-side { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.home-panel { margin: 0 !important; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.home-panel.inline { flex-direction: row; align-items: center; }
.home-panel .sec-label { margin: 0; }
.home-panel .block-head { margin: 0; }
.home-panel .button.block { margin-top: 4px; }
.cont-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.cont { display: flex; flex-direction: column; gap: 10px; min-width: 0; color: var(--text); }
.cont:hover { text-decoration: none; }
.cont-art { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: var(--surface); transition: box-shadow .25s, transform .25s var(--ease); }
.cont-art > img:not(.tile-logo) { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cont-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(10, 11, 12, .75), transparent 55%); pointer-events: none; }
.cont:hover .cont-art, .cont:focus-visible .cont-art { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--menta); transform: translateY(-2px); }
.cont:focus-visible { box-shadow: none; }
.cont-art .tile-bar { z-index: 2; }
.cont-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cont-text b { font-size: 15px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cont-text .meta { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.skeleton.line { display: block; height: 12px; width: 60%; border-radius: 6px; }
.soft-empty { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; padding: 20px; margin: 0 !important; }
.soft-empty > .icon { width: 26px; height: 26px; color: var(--menta); }
.soft-empty p { margin: 2px 0 0; }
.mini-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.mini-list li { display: flex; align-items: center; gap: 12px; }
.mini-list .grow { min-width: 0; display: flex; flex-direction: column; }
.mini-list b { font-size: 14px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-list .meta { font-size: 12px; color: var(--muted); }
.mini-list .device-icon { width: 36px; height: 36px; border-radius: 10px; color: var(--menta); }
.mini-list .device-icon .icon { width: 18px; height: 18px; }
.shortcuts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.shortcut { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border-radius: 16px; border: 1px solid var(--line); color: var(--text); }
.shortcut:hover { background: var(--surface); text-decoration: none; }
.shortcut-icon { color: var(--menta); padding-top: 1px; }
.shortcut .grow { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.shortcut b { font-size: 14.5px; font-weight: 550; }
.shortcut .meta { font-size: 13px; color: var(--muted); }
@media (max-width: 640px) {
  .cont-grid { grid-template-columns: 1fr; }
  .page-head h1 { font-size: 28px; }
  .page-head > .row, .search-field { width: 100%; }
  .who-row { gap: 10px; }
  .who { min-width: 76px; }
  .who .avatar { width: 64px; height: 64px; font-size: 24px; }
}

/* Cuenta y ajustes */
.account { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 26px; }
.account-hero { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; padding: 24px; border-radius: 24px; background: var(--menta-dark); border: 1px solid rgba(188, 211, 198, .18); }
.account-hero .grow { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 2px; }
.account-hero h1 { font-size: 26px; margin: 2px 0 0; overflow-wrap: anywhere; }
.account-hero .eyebrow-soft { color: #b9c9c0; }
.account-hero .who-mail { color: #c9d6cf; font-size: 14px; overflow-wrap: anywhere; }
.account-hero .tags { margin-top: 8px; gap: 8px; }
.account-hero .ghost { border-color: rgba(188, 211, 198, .4); color: var(--text); }
.seg-tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: var(--pill); background: var(--surface); border: 1px solid var(--line); align-self: flex-start; max-width: 100%; }
.seg-tabs a { display: inline-flex; align-items: center; min-height: 38px; padding: 0 16px; border-radius: var(--pill); color: #bfc2c1; font-size: 14px; font-weight: 500; }
.seg-tabs a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.seg-tabs a[aria-current="page"] { background: var(--menta); color: #141516; font-weight: 600; }
.set-stack { display: flex; flex-direction: column; gap: 26px; }
.set-stack > * + * { margin-top: 0; }
.set-group .sec-label { margin-bottom: 10px; }
.set-card { padding: 4px 20px; }
.set-card > .muted.small { margin: 14px 0 0; }
.set-row { display: flex; align-items: center; gap: 16px; min-height: 64px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.set-row:last-child { border-bottom: 0; }
.set-row .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.set-row .grow b { font-size: 14.5px; font-weight: 550; overflow-wrap: anywhere; }
.set-row .meta { font-size: 13px; color: var(--muted); }
.set-icon { width: 36px; height: 36px; border-radius: 10px; background: var(--surface-2); color: var(--menta); display: grid; place-items: center; flex: none; }
.set-end { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.set-foot { padding: 12px 0 14px; border-top: 1px solid var(--line); }
.set-card .list li:first-child { border-top: 0; }
.set-card .empty { padding: 28px 12px; }
@media (max-width: 640px) {
  .account-hero { padding: 20px; }
  .account-hero .avatar.xl-round { width: 64px; height: 64px; font-size: 26px; }
  .seg-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; align-self: stretch; }
  .seg-tabs a { flex: none; }
  .set-row { flex-wrap: wrap; }
  .set-end { width: 100%; justify-content: flex-start; padding-left: 52px; }
  .set-row:not(:has(.set-icon)) .set-end { padding-left: 0; }
}

/* Buscador (Ctrl K) */
dialog.palette { width: min(620px, calc(100vw - 32px)); padding: 0; margin-top: 12vh; overflow: hidden; }
.palette-box { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); color: var(--muted); }
.palette-box input, .palette-box input:focus, .palette-box input:hover { flex: 1; min-width: 0; padding: 4px 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; font-size: 17px; color: var(--text); }
.palette-box input::-webkit-search-cancel-button { display: none; }
.palette-list { list-style: none; margin: 0; padding: 8px; max-height: min(52vh, 440px); overflow-y: auto; }
.palette-list li { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 12px; cursor: pointer; font-size: 15px; }
.palette-list li[aria-selected="true"] { background: var(--surface-2); }
.palette-list .meta { font-size: 13px; color: var(--muted); }
.palette-list .avatar.xs { width: 32px; height: 32px; font-size: 13px; }
.palette-icon { width: 32px; height: 32px; border-radius: 10px; background: var(--surface-2); color: var(--menta); display: grid; place-items: center; flex: none; }
.palette-list li[aria-selected="true"] .palette-icon { background: var(--surface-3); }
.palette-empty { color: var(--muted); cursor: default !important; padding: 18px 12px !important; }

/* Administración: mismo esqueleto, acento ámbar; Resumen con lo que requiere atención en tarjetas */
body.admin-mode main { max-width: 1180px; }
body.admin-mode :focus-visible { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--ambar); }
.admin-main { min-width: 0; }
.admin-card { padding: 22px 24px; }
.card.all-good { margin: 0; }
@media (hover: none), (max-width: 640px) { .search-field kbd { display: none; } }
.profile-hero .avatar.xl { border-radius: 50%; }
/* ---------- Administración → Avisos (decisión 0041) ---------- */
/* Vista previa de la tarjeta de la app: mismas medidas relativas y colores que NoticeCard.kt. */
.app-notice { --tone: #3a3d40; --tone-ink: var(--text); --tone-text: var(--muted); box-sizing: border-box; display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 20px;
  background: rgba(28, 29, 30, .98); border: 1px solid rgba(255, 255, 255, .1); box-shadow: 0 18px 48px rgba(0, 0, 0, .55); font-family: Roboto, system-ui, sans-serif; color: var(--text); }
.app-notice.tv { width: 100%; max-width: 360px; }
.app-notice.mobile { width: 100%; max-width: 300px; border-radius: 22px; }
.app-notice.tone-info { --tone: #bcd3c6; --tone-ink: #141516; --tone-text: #bcd3c6; }
.app-notice.tone-success { --tone: #bcd3c6; --tone-ink: #141516; --tone-text: #bcd3c6; }
.app-notice.tone-warning { --tone: #e3b977; --tone-ink: #141516; --tone-text: #e3b977; }
.app-notice.tone-critical { --tone: #e8a598; --tone-ink: #141516; --tone-text: #e8a598; }
.app-notice-head { display: flex; gap: 12px; align-items: flex-start; }
.app-notice-icon { flex: none; width: 40px; height: 40px; border-radius: 20px; background: var(--tone); color: var(--tone-ink); display: flex; align-items: center; justify-content: center; }
.app-notice-icon .icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.app-notice-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.app-notice-label { font-size: 11px; font-weight: 700; letter-spacing: .1em; color: var(--tone-text); text-transform: uppercase; overflow-wrap: anywhere; }
.app-notice-text b { font-size: 16px; font-weight: 500; line-height: 1.3; }
.app-notice-body { font-size: 13px; color: #b5b8b4; line-height: 1.4; }
.app-notice-close { flex: none; color: #9ea19d; font-size: 20px; line-height: 1; margin: -2px 2px 0 0; }
.app-notice-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.app-notice-actions .btn { display: inline-flex; align-items: center; height: 36px; padding: 0 16px; border-radius: 18px; background: #2a2c2e; color: var(--text); font-size: 13px; font-weight: 500; }
.app-notice-actions .btn.primary { background: var(--text); color: #141516; }
.app-notice.tv .app-notice-actions .btn.primary { box-shadow: 0 0 0 3px #141516, 0 0 0 5px var(--text); }
.app-notice.mobile .app-notice-actions .btn { flex: 1; justify-content: center; height: 40px; }
.app-notice-note { font-size: 12px; color: var(--dim); margin-left: 4px; }
.notice-sample { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: flex-start; justify-content: space-between; padding: 16px; margin: 12px 0; border-radius: 16px; background: var(--surface-2); }
.notice-sample h3 { margin: 0; }
.rule-icon { flex: none; width: 34px; height: 34px; border-radius: 17px; display: flex; align-items: center; justify-content: center; background: var(--surface-3); color: var(--text); }
.rule-icon .icon { width: 18px; height: 18px; }
.rule-icon.tone-info, .rule-icon.tone-success { background: var(--menta); color: var(--ink-dark); }
.rule-icon.tone-warning { background: var(--ambar); color: var(--ink-dark); }
.rule-icon.tone-critical { background: #e8a598; color: var(--ink-dark); }
.chips-inline { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; }
.chip-check { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--pill); background: var(--surface-2); border: 1px solid var(--line); color: var(--text); cursor: pointer; }
.chip-check input { width: 15px; height: 15px; margin: 0; accent-color: var(--menta); }
.rule-params .switch.checkline { margin: 0; font-size: 13px; }
.notice-list li { flex-wrap: nowrap; }
.notice-list li .grow { min-width: 0; }
.notice-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 300px); gap: 24px; align-items: start; }
.notice-fields { display: flex; flex-direction: column; }
.notice-fields textarea { width: 100%; }
.notice-fields .counter { align-self: flex-end; font-size: 12px; margin-top: 2px; }
.notice-fields select, .notice-fields .row select { max-width: 100%; }
.notice-fields .row.wrap { margin-top: 6px; }
.notice-fields .row.wrap input[type=url], .notice-fields .row.wrap input[type=text] { flex: 1 1 180px; width: auto; margin: 0; }
.duo-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.duo-fields input { width: 100%; }
details.more { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); }
details.more summary { cursor: pointer; color: var(--muted); font-size: 14px; font-weight: 600; }
.user-picks { margin-top: 10px; }
.user-pick-list { max-height: 180px; overflow: auto; padding-right: 6px; }
.user-pick-list .switch { margin: 6px 0; font-size: 14px; }
.notice-preview-col { position: sticky; top: 0; display: flex; flex-direction: column; gap: 10px; }
.notice-previews { display: flex; flex-direction: column; gap: 16px; }
.notice-previews figure { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.notice-pair { display: flex; flex-direction: column; gap: 10px; }
.notice-pair > div { display: flex; flex-direction: column; gap: 4px; }
dialog.wide:has(.notice-form) { width: min(920px, calc(100vw - 32px)); }
@media (max-width: 760px) {
  .notice-form { grid-template-columns: 1fr; }
  .notice-preview-col { position: static; }
  .notice-list li { flex-wrap: wrap; }
  .duo-fields { grid-template-columns: 1fr; }
}
.rule-params select { width: auto; margin: 0; padding: 6px 30px 6px 12px; }
.rule-params .param { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.notice-fields select { width: 100%; }
.notice-fields .row.wrap select { width: auto; flex: 1 1 160px; margin: 0; }
.notice-fields input[type=url], .notice-fields input[type=datetime-local] { width: 100%; padding: 12px 18px; border-radius: var(--pill); border: 1px solid #343738; background: #222425; color: var(--text); font: inherit; color-scheme: dark; }
/* PIN del perfil (decisión 0045), dentro de la edición del perfil. */
.pin-edit { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.pin-edit .card-title { font-size: 1rem; }
.pin-edit input { max-width: 160px; letter-spacing: .4em; font-variant-numeric: tabular-nums; }
.pin-edit form { display: grid; gap: 8px; justify-items: start; }

/* ---------- Suscripciones familiares y accesos (decisión 0066) ---------- */
.linkish { background: none; border: 0; padding: 0; color: var(--menta); font: inherit; font-weight: inherit; cursor: pointer; border-radius: 4px; }
.linkish:hover { text-decoration: underline; filter: none; }
.list li.sub-row, .list li.member-row { align-items: center; }
.list li.muted-row { opacity: .62; }
.num-input { width: 84px !important; padding: 8px 12px !important; border-radius: 12px !important; }
input[type=number] { width: 100%; padding: 12px 18px; border-radius: var(--pill); border: 1px solid #343738; background: #222425; color: var(--text); font: inherit; }
.device .meta .icon { width: 14px; height: 14px; vertical-align: -2px; }
.who.other .meta, .who .meta { font-size: 12px; }
.who.seats { opacity: .75; }
.who.seats:hover { opacity: 1; }
.access-list li.access-row { flex-wrap: nowrap; align-items: flex-start; gap: 12px; padding: 12px 0; }
.access-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--surface-2); color: var(--menta); flex: none; }
.access-icon.bad { color: var(--coral); background: rgba(240, 164, 143, .12); }
.access-row .grow { min-width: 0; }
.access-row .grow > .meta { overflow-wrap: anywhere; }
.access-end { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; text-align: right; }
.acc-filters select { width: auto; padding: 6px 12px; border-radius: 999px; font-size: 13px; }
.acc-map-wrap { margin-top: 4px; }
.acc-map { height: 420px; border-radius: 16px; overflow: hidden; background: #0e0f10; border: 1px solid var(--line); }
.acc-map.small { height: 240px; }
.acc-map-note { margin-top: 8px; }
.acc-map-error { padding: 18px; }
.acc-map .leaflet-container, .acc-map.leaflet-container { background: #0e0f10; font: 13px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.acc-map .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.9) contrast(.88) saturate(.6); }
.acc-map path.acc-dot { fill: var(--menta); fill-opacity: .55; stroke: var(--menta); stroke-opacity: .95; }
.acc-map path.acc-dot.bad { fill: var(--coral); stroke: var(--coral); }
.acc-map .leaflet-popup-content-wrapper, .acc-map .leaflet-popup-tip { background: var(--surface-2); color: var(--text); box-shadow: var(--shadow); }
.acc-map .leaflet-popup-content { margin: 12px 14px; }
.acc-map .leaflet-control-attribution { background: rgba(20, 21, 22, .78); color: var(--dim); }
.acc-map .leaflet-control-attribution a { color: var(--muted); }
.acc-map .leaflet-bar a { background: var(--surface-2); color: var(--text); border-bottom-color: var(--line-2); }
.acc-map .leaflet-bar a:hover { background: var(--surface-3); }
.acc-pop b { display: block; margin-bottom: 4px; }
.acc-pop div { color: var(--muted); }
.acc-pop .acc-ips { overflow-wrap: anywhere; }
.geo-test { margin-top: 18px; }
.family-tags { margin: 6px 0 18px; }
.family-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.family-card { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 20px 14px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.family-card.you { border-color: var(--menta); }
.family-card .avatar { margin-bottom: 6px; }
.family-card .meta { overflow-wrap: anywhere; font-size: 13px; color: var(--muted); }
@media (max-width: 640px) {
  .acc-map { height: 320px; }
  .access-list li.access-row { flex-wrap: wrap; }
  .access-end { flex-direction: row; align-items: center; }
}

/* Proveedores (decisión 0075) */
.prov-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.prov-head .row { flex-wrap: wrap; justify-content: flex-end; }
.prov-flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 0; overflow: hidden; }
.prov-step { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; min-width: 0; }
.prov-step + .prov-step { border-left: 1px solid var(--line); }
.prov-step .k { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--dim); font-weight: 700; }
.prov-step .meta { font-size: 13px; color: var(--muted); }
.prov-group { margin-top: 26px; }
.prov-group .section-head { margin-bottom: 12px; }
.prov-group .section-head p { margin: 2px 0 0; }
.prov-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.admin-stack .prov-grid > .card { margin: 0; }
.prov-card { display: flex; flex-direction: column; gap: 10px; }
.prov-card.off { background: #212223; }
.prov-card.off .prov-stats, .prov-card.off > .muted { opacity: .6; }
.prov-card .card-head { align-items: flex-start; }
.prov-card h3 { margin: 0 0 4px; font-size: 17px; }
.prov-card p { margin: 0; }
.prov-card .row.end { margin-top: auto; padding-top: 4px; }
.prov-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.prov-tag { font-size: 12px; color: var(--muted); border: 1px solid var(--line-2); padding: 1px 8px; border-radius: 999px; }
.prov-tag.vpn { color: var(--cielo); border-color: #2c4253; }
.prov-tag.warn { color: var(--ambar); border-color: #4a3d28; }
.prov-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; background: var(--bg); border-radius: 14px; padding: 10px 12px; }
.prov-stat b { display: block; font-size: 16px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prov-stat span { font-size: 11px; color: var(--dim); }
.prov-stat.hl b { color: var(--menta); }
.prov-result:empty { display: none; }
.prov-checks { margin-top: 6px; }
.prov-form { max-width: 520px; }
.prov-secret { gap: 8px; }
.prov-secret input { flex: 1; min-width: 0; }
.prov-indexes { display: flex; flex-direction: column; gap: 10px; }
.prov-index { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.prov-index .grow { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
@media (max-width: 860px) {
  .prov-flow { grid-template-columns: 1fr 1fr; }
  .prov-step:nth-child(3) { border-left: 0; }
  .prov-step:nth-child(n+3) { border-top: 1px solid var(--line); }
  .prov-grid { grid-template-columns: 1fr; }
}
.prov-index input { padding: 8px 14px; font-size: 14px; }

/* Proveedores, variante A: lista y detalle (decisión 0076) */
.pv-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.pv-tabs { display: flex; gap: 22px; }
.pv-tabs button { padding: 10px 2px; font-weight: 650; color: var(--muted); background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; display: flex; gap: 8px; align-items: center; border-radius: 0; }
.pv-tabs button:hover { color: var(--text); filter: none; }
.pv-tabs button.on { color: var(--text); border-bottom-color: var(--menta); }
.pv-tabs .count { font-size: 12px; color: var(--dim); font-weight: 600; }
.pv-head > .primary { margin-bottom: 8px; }
.pv-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pv-bar .row { flex-wrap: wrap; justify-content: flex-end; }
.pv-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.pv-kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pv-kpi .k { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--dim); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-kpi b { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-kpi .meta { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.pv-kpi.alert { border-color: #5a4a2c; background: linear-gradient(180deg, #2b2720, var(--surface)); }
.pv-kpi.alert b { color: var(--ambar); }
.pv-layout { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 16px; align-items: start; }
.pv-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; display: flex; flex-direction: column; position: sticky; top: 16px; }
.pv-group { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--dim); font-weight: 700; padding: 12px 10px 6px; }
.pv-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; width: 100%; text-align: left; padding: 10px; border-radius: 14px; background: none; border: 0; color: var(--text); font-weight: 400; }
.pv-item:hover { background: var(--surface-2); filter: none; }
.pv-item.on { background: var(--surface-3); }
.pv-item.off .pv-name b { color: var(--muted); }
.pv-name { display: flex; flex-direction: column; min-width: 0; }
.pv-name b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-name span { font-size: 12px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-key { display: flex; flex-direction: column; align-items: flex-end; font-size: 12px; color: var(--muted); white-space: nowrap; }
.pv-spark { width: 64px; height: 22px; display: block; }
.pv-spark path { fill: none; stroke: var(--menta); stroke-width: 1.6; }
.pv-spark.off path { stroke: #55595b; }
.pv-add { grid-template-columns: auto 1fr; color: var(--muted); margin-top: 6px; }
.pv-detail { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.admin-stack .pv-layout > .card { margin: 0; }
.pv-dhead { display: flex; gap: 14px; align-items: flex-start; }
.pv-dhead h2 { font-size: 22px; margin: 0 0 4px; }
.pv-dhead .row { gap: 8px; flex-wrap: wrap; }
.pv-logo { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-weight: 700; background: var(--surface-3); flex: none; }
.pv-detail > p { margin: 0; }
.pv-callout { font-size: 14px; padding: 10px 14px; border-radius: 12px; background: var(--surface-2); color: var(--muted); }
.pv-callout.warn { background: #2f2a22; color: var(--ambar); }
.warn-text { color: var(--ambar); }
.pv-chartbox { background: var(--bg); border-radius: 14px; padding: 12px 14px; }
.pv-chart { width: 100%; height: 124px; display: block; }
.pv-chart rect.q { fill: #3a4a42; }
.pv-chart rect.d { fill: var(--menta); }
.pv-chart text { fill: var(--dim); font-size: 11px; }
.pv-legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); }
.pv-legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; background: #3a4a42; }
.pv-legend .d::before { background: var(--menta); }
.pv-form { display: flex; flex-direction: column; gap: 0; border-top: 1px solid var(--line); padding-top: 12px; }
.pv-field { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 10px 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.pv-field.wide { align-items: start; }
.pv-field > label { margin: 0; }
.pv-field .note { margin: 4px 0 0; }
.pv-form .row.end { margin-top: 12px; }
.pv-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 16px 0; }
.pv-type { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; background: var(--bg); border: 1px solid var(--line); border-radius: 16px; padding: 14px; color: var(--text); font-weight: 400; }
.pv-type b { font-size: 15px; }
.pv-type:hover:not(:disabled) { border-color: var(--menta); filter: none; }
.pv-type:disabled { opacity: .7; cursor: default; }
.pv-addform { max-width: 520px; }
@media (max-width: 900px) {
  .pv-summary { grid-template-columns: 1fr 1fr; }
  .pv-layout { grid-template-columns: 1fr; }
  .pv-list { position: static; }
  .pv-field { grid-template-columns: 1fr; gap: 4px; }
  .pv-gallery { grid-template-columns: 1fr; }
}

/* Cartera de Monero (decisión 0077) */
.wallet-figure { margin: 6px 0 0; font-variant-numeric: tabular-nums; line-height: 1.1; overflow-wrap: anywhere; }
.wallet-figure b { font-size: 40px; font-weight: 700; letter-spacing: -.01em; }
.wallet-figure span { font-size: 18px; color: var(--muted); font-weight: 600; }
.mono-line { font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; word-break: break-all; }
.wallet-copy { display: flex; align-items: center; gap: 12px; margin: 14px 0 6px; padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; }
.wallet-copy .mono-line { flex: 1; min-width: 0; }
.wallet-copy button { flex: none; }
.wallet-amount { flex-wrap: nowrap; gap: 8px; align-items: stretch; }
.wallet-amount input { flex: 1; min-width: 0; }
.wallet-amount select { flex: none; width: 6.5em; }
.wallet-copy button + button { margin-left: -4px; }
.wallet-row-actions { white-space: nowrap; }
.wallet-row-actions button + button { margin-left: 6px; }
/* El QR va siempre en negro sobre blanco, con su margen: así lo leen las cámaras también con el tema oscuro. */
.wallet-qr { width: min(300px, 100%); aspect-ratio: 1; margin: 18px auto 4px; padding: 6px; background: #fff; border-radius: 16px; display: grid; place-items: center; }
.wallet-qr svg { width: 100%; height: 100%; display: block; }
.wallet-qr p { color: #333; text-align: center; padding: 0 12px; }
.wallet-scan { position: relative; width: min(420px, 100%); aspect-ratio: 4 / 3; margin: 14px auto 4px; border-radius: 16px; overflow: hidden; background: #000; border: 1px solid var(--line); }
.wallet-scan-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.wallet-scan::after { content: ''; position: absolute; inset: 18%; border: 2px solid rgba(255, 255, 255, .7); border-radius: 14px; pointer-events: none; }
.wallet-progress { height: 8px; margin: 12px 0 4px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.wallet-progress-bar { display: block; height: 100%; background: var(--menta); border-radius: inherit; }
.wallet-form .row { flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.wallet-form select { max-width: 100%; }
.wallet-form label { display: block; margin-top: 16px; }
.wallet-form label.check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.wallet-form label.check input { width: auto; }
.wallet-form .kv { grid-template-columns: 150px 1fr; }
.wallet-form .kv > * { min-width: 0; }
.mono-area, .wallet-form textarea { font: 13px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.seed-grid { list-style: decimal inside; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 18px 0 6px; padding: 0; }
.seed-grid li { padding: 8px 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; font: 14px/1.3 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--text); overflow-wrap: anywhere; }
.seed-grid li::marker { color: var(--dim); font-size: 12px; }
.grid-table td.mono, button.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
@media (max-width: 640px) {
  .wallet-figure b { font-size: 30px; }
  .seed-grid { grid-template-columns: repeat(2, 1fr); }
  .wallet-copy { flex-direction: column; align-items: stretch; }
  .wallet-copy button + button { margin-left: 0; }
  .wallet-form .kv { grid-template-columns: 1fr; }
}
/* Copias de seguridad (decisión 0078) */
.bk-steps { list-style: none; margin: 16px 0 4px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; color: var(--muted); }
.bk-steps li { display: inline-flex; align-items: center; gap: 8px; }
.bk-steps .dot { width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--grafito); }
.bk-steps li.done { color: var(--text); } .bk-steps li.done .dot { background: var(--menta); border-color: var(--menta); }
.bk-steps li.now { color: var(--text); font-weight: 600; } .bk-steps li.now .dot { border-color: var(--ambar); background: var(--ambar); animation: bk-pulse 1.4s ease-in-out infinite; }
@keyframes bk-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .bk-steps li.now .dot { animation: none; } }
.bk-progress { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; margin-top: 12px; }
.backup-run .row.end, .bk-login .row { margin-top: 16px; }
.bk-login { margin-top: 14px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-2, #222425); }
.bk-login p { margin: 0; } .bk-login .row { flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.bk-warnings { margin-top: 12px; font-size: 14px; } .bk-warnings summary { cursor: pointer; color: var(--ambar); }
.bk-warnings ul { margin: 8px 0 0; padding-left: 18px; color: var(--muted); } .bk-warnings li { margin: 4px 0; word-break: break-word; }
.bk-table td { vertical-align: top; } .bk-table .mono, .bk-warnings .mono { font: 12px/1.5 ui-monospace, monospace; word-break: break-all; }
.bk-table .badge + .badge { margin-left: 6px; }
.bk-actions { white-space: nowrap; text-align: right; } .bk-actions button + button { margin-left: 6px; }
.bk-check { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; } .bk-check .icon { width: 16px; height: 16px; }
.bk-check.ok { color: var(--menta); } .bk-check.bad { color: var(--coral); max-width: 260px; }
.bk-code { margin: 12px 0; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #1b1d1e; font: 13px/1.6 ui-monospace, monospace; overflow-x: auto; white-space: pre; }
.bk-form .bk-when, .bk-form .bk-retention { display: flex; flex-wrap: wrap; gap: 14px 22px; margin-top: 12px; }
.bk-form .bk-sets { display: grid; gap: 12px; margin-top: 8px; }
.bk-form input[type="time"] { width: auto; }
@media (max-width: 640px) { .bk-actions { white-space: normal; } .bk-actions button + button { margin: 6px 0 0; } }
.bk-form .switch input { flex: none; }
/* Túneles gestionados (decisión 0080, fase 3) */
.net-code { background: #161718; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; font: 12.5px/1.6 ui-monospace, "Cascadia Mono", monospace; color: #cfd3d2; white-space: pre; overflow: auto; max-height: 260px; margin: 6px 0 10px; }
/* Importar un .conf de WireGuard (decisión 0080) */
.vpn-form textarea.net-conf { width: 100%; padding: 12px 14px; border-radius: 14px; border: 1px solid #343738; background: #222425; color: var(--text); font: 12.5px/1.5 ui-monospace, "Cascadia Mono", monospace; resize: vertical; }
.vpn-form input[type=file] { width: 100%; padding: 10px 0; color: var(--muted); font: inherit; }
.net-conf-preview { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; padding: 10px 14px; border-radius: 14px; background: var(--menta-dark); color: var(--menta); }
.net-conf-preview .meta { color: var(--muted); font-size: 13px; }
.net-conf-preview.bad { background: #3a2826; color: var(--danger); }
.vpn-form .segmented { margin: 6px 0 4px; }
/* Rutas por dominio (decisión 0080) */
.net-route-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 16px; }
.admin-stack .net-route-groups > .card { margin: 0; }
.net-routes li { align-items: flex-start; flex-wrap: wrap; }
.net-routes li > .grow { flex: 1 1 0; min-width: 0; }
.net-routes li > .net-test { flex-basis: 100%; margin-top: 2px; }
.net-route .row { gap: 8px; }
.net-route.bad b { color: var(--coral); }
.net-route .meta + .meta { margin-top: 2px; }
@media (max-width: 560px) { .net-route-groups { grid-template-columns: 1fr; } .net-routes li { flex-wrap: wrap; } }
/* Red y VPN en pantallas estrechas */
.net-map-list { display: none; flex-direction: column; }
@media (max-width: 640px) {
  svg.net-map, .net-legend { display: none; }
  .net-map-list { display: flex; }
  .net-map-card { padding: 8px; }
  .pv-tabs { overflow-x: auto; scrollbar-width: none; }
  .pv-tabs button { white-space: nowrap; }
  .pv-kpi .k, .pv-kpi b { white-space: normal; overflow: visible; }
}
/* Varias VPN, pruebas de salida (decisión 0080) */
.net-route-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.net-test { display: flex; align-items: flex-start; gap: 8px; margin-top: 6px; padding: 6px 10px; border-radius: 10px; background: var(--surface-2); font-size: 13px; color: var(--muted); width: 100%; box-sizing: border-box; }
.net-test .state-dot { flex: none; margin-top: 5px; }
.net-test-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.net-test.ok { background: var(--menta-dark); color: var(--menta); }
.net-test.bad { background: #3a2826; color: var(--danger); }
.pv-bar > .pv-callout { flex: 1; min-width: 260px; margin: 0; }

/* ——— Administración: cabecera fina, pestañas, Resumen «centro de mando» y Bandeja (decisión 0081) ——— */
.admin-top { position: sticky; top: var(--top-h, 0px); z-index: 6; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 20px;
  margin: calc(-1 * var(--main-pt)) 0 22px; padding: 14px 0; background: var(--bg); border-bottom: 1px solid rgba(255, 255, 255, .06); }
.admin-top .crumbs { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--muted); font-size: 14px; }
.admin-top .crumbs a { color: var(--muted); }
.admin-top .crumbs a:hover { color: var(--text); }
.admin-top .crumbs .icon { width: 14px; height: 14px; color: var(--dim); }
.admin-top .crumbs h1 { margin: 0; font-size: 17px; font-weight: 650; letter-spacing: -.01em; color: var(--text); white-space: nowrap; }
.admin-top-end { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.admin-top-end .search-field { min-width: 250px; }
.admin-top-end button .icon { width: 16px; height: 16px; }
.admin-tabs { display: flex; gap: 24px; margin: -8px 0 22px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.admin-tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 2px 2px 12px; margin-bottom: -1px; color: var(--muted); font-size: 14.5px; font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; }
.admin-tabs a:hover { color: var(--text); text-decoration: none; }
.admin-tabs a[aria-current="page"] { color: var(--text); border-bottom-color: var(--ambar); }
.admin-tabs .count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--pill); display: inline-grid; place-items: center; font-size: 11px; font-weight: 650; background: var(--surface-2); color: var(--muted); }
.admin-tabs .count.hot { background: var(--ambar); color: #2a2410; }
button.amber { background: var(--ambar); color: #2a2410; }
button.amber:hover { filter: brightness(1.06); }

.command { display: flex; flex-direction: column; gap: 16px; }
.command > * { margin: 0; }
.pulse { display: flex; align-items: center; gap: 18px 28px; flex-wrap: wrap; padding: 20px 24px; border-radius: var(--radius); border: 1px solid var(--line);
  background: radial-gradient(ellipse 60% 140% at 0% 0%, rgba(188, 211, 198, .13), transparent 70%), var(--surface); }
.pulse.warn { background: radial-gradient(ellipse 60% 140% at 0% 0%, rgba(227, 185, 119, .15), transparent 70%), var(--surface); }
.pulse.bad { background: radial-gradient(ellipse 60% 140% at 0% 0%, rgba(232, 150, 140, .16), transparent 70%), var(--surface); }
.pulse-state { display: flex; align-items: center; gap: 16px; flex: 1 1 320px; min-width: 0; }
.pulse-state .state-dot { width: 12px; height: 12px; }
.pulse.ok .pulse-state .state-dot { animation: pulse-ok 2.4s infinite; }
@keyframes pulse-ok { 0% { box-shadow: 0 0 0 0 rgba(188, 211, 198, .45); } 70%, 100% { box-shadow: 0 0 0 10px rgba(188, 211, 198, 0); } }
.pulse h2 { margin: 0; font-size: 25px; letter-spacing: -.02em; }
.pulse .meta { margin: 3px 0 0; font-size: 14px; color: var(--muted); }
.mini-meters { display: flex; gap: 20px; flex-wrap: wrap; color: inherit; border-radius: 12px; }
.mini-meters:hover { text-decoration: none; }
.mini-meter { width: 110px; }
.mini-lab { display: flex; justify-content: space-between; gap: 6px; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; white-space: nowrap; }
.mini-lab b { color: var(--text); font-weight: 600; }
.command-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.command-grid > * { margin: 0; }
.command-side { display: flex; flex-direction: column; gap: 16px; }
.command-side > .card { margin: 0; }
.command .card-head h2 { display: flex; align-items: center; gap: 8px; font-size: 17px; }
.command .card-head h2 .count { min-width: 22px; height: 20px; padding: 0 7px; border-radius: var(--pill); display: inline-grid; place-items: center; font-size: 11.5px; font-weight: 650; background: var(--surface-3); color: var(--muted); }
.command .card-head h2 .count.hot { background: var(--ambar); color: #2a2410; }
.command .more { display: inline-flex; align-items: center; gap: 2px; font-size: 13.5px; }
.command .more .icon { width: 15px; height: 15px; }

.inbox-list { list-style: none; margin: 0; padding: 0; }
.inbox-row { display: flex; align-items: center; gap: 14px; padding: 11px 0; border-top: 1px solid rgba(255, 255, 255, .05); }
.inbox-row:first-child { border-top: 0; }
.inbox-row .grow { flex: 1; min-width: 0; }
.inbox-row .grow b { display: block; font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-row .meta { display: block; font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-tag { flex: none; width: 104px; height: 24px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: var(--pill); font-size: 12px; font-weight: 650; background: var(--surface-3); color: var(--muted); }
.inbox-tag .icon { width: 13px; height: 13px; }
.inbox-tag.alert, .inbox-tag.security { background: #3a2422; color: var(--danger); }
.inbox-tag.alert.warn, .inbox-tag.plan { background: var(--ambar-dark); color: var(--ambar); }
.inbox-tag.report { background: #35281f; color: var(--coral); }
.inbox-tag.mail { background: #1f2a33; color: var(--cielo); }
.inbox-tag.invite { background: #28243a; color: var(--lavanda); }
.inbox-acts { display: flex; gap: 6px; flex: none; }
.inbox-acts button { padding: 6px 13px; font-size: 13px; }
.admin-stack > .admin-stack > .chips { margin: 0; }
.admin-stack .chip .count { font-size: 11.5px; color: var(--muted); font-weight: 650; }
.admin-stack .chip.on .count { color: var(--text); }
.inbox-card { padding: 8px 22px; }
.inbox-card .all-good { padding: 16px 0; }
.command .inbox-card { padding: 18px 22px 10px; }

.src-list { display: flex; flex-direction: column; }
.src-row { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-top: 1px solid rgba(255, 255, 255, .05); color: var(--text); border-radius: 8px; }
.src-row:first-child { border-top: 0; }
.src-row:hover { text-decoration: none; background: rgba(255, 255, 255, .03); }
.src-row > .icon { width: 17px; height: 17px; color: var(--muted); }
.src-row b { flex: 1; min-width: 0; font-weight: 600; font-size: 14px; }
.src-row .meta { font-size: 13px; color: var(--muted); white-space: nowrap; }
.src-row .state-dot { width: 8px; height: 8px; box-shadow: none; }

.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.figure-tile { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px 10px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); color: var(--text); transition: border-color .15s; }
.figure-tile:hover { text-decoration: none; border-color: var(--line-2); }
.figure-tile > .meta { font-size: 13px; color: var(--muted); }
.figure-tile > b { font-size: 26px; font-weight: 650; letter-spacing: -.02em; line-height: 1.2; }
.figure-tile > b small { margin-left: 7px; font-size: 13px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.figure-tile svg.spark { display: block; width: 100%; height: 26px; margin-top: 6px; }
.figure-tile .spark-gap { display: block; height: 26px; margin-top: 6px; }
@media (prefers-reduced-motion: reduce) { .pulse.ok .pulse-state .state-dot { animation: none; } }
@media (max-width: 900px) { .command-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .admin-top { position: static; margin-top: 0; padding-top: 10px; }
  .admin-top-end { width: 100%; }
  .admin-top-end .search-field { min-width: 0; flex: 1 1 100%; }
  .pulse { padding: 18px; }
  .pulse h2 { font-size: 21px; }
  .inbox-row { flex-wrap: wrap; gap: 8px 12px; }
  .inbox-tag { width: auto; padding: 0 10px; }
  .inbox-row .grow { flex: 1 1 100%; }
  .inbox-row .grow b, .inbox-row .meta { white-space: normal; }
  .mini-meters { width: 100%; }
  .mini-meter { width: calc(50% - 10px); }
}

/* ---------- Las tres carteras (decisión 0087): Bitcoin entrante → Monero → Bitcoin saliente ---------- */
.role-in { --role: var(--ambar); }
.role-xmr { --role: var(--lavanda); }
.role-out { --role: var(--menta); }
.wallet-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 650; padding: 3px 10px; border-radius: var(--pill); color: var(--role); border: 1px solid color-mix(in srgb, var(--role) 45%, transparent); background: color-mix(in srgb, var(--role) 12%, transparent); }
.wallet-chip svg { width: 14px; height: 14px; }
.wallet-flow { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; align-items: stretch; }
.wallet-step { display: flex; flex-direction: column; gap: 6px; margin: 0; border-top: 3px solid var(--role); background: linear-gradient(180deg, color-mix(in srgb, var(--role) 7%, var(--surface)) 0, var(--surface) 120px); }
.wallet-step h2 { margin: 6px 0 0; }
.wallet-step .wallet-figure b { font-size: 30px; }
.wallet-step .row.end { margin-top: auto; padding-top: 8px; flex-wrap: wrap; }
.wallet-flow-hop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; max-width: 96px; color: var(--dim); font-size: 12px; font-weight: 600; text-align: center; }
.wallet-flow-hop svg { width: 22px; height: 22px; }
.wallet-total .wallet-figure b { font-size: 34px; }
.wallet-howto { margin: 4px 0 12px; padding-left: 22px; color: var(--muted); line-height: 1.55; }
.wallet-howto li { margin: 4px 0; }
.wallet-howto b { color: var(--text); font-weight: 650; }
.wallet-avoid { margin: 4px 0 10px; padding-left: 20px; color: var(--muted); line-height: 1.55; }
.wallet-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.wallet-strip-step { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--pill); color: var(--muted); font-weight: 600; font-size: 14px; border: 1px solid transparent; }
.wallet-strip-step svg { width: 15px; height: 15px; color: var(--role); }
.wallet-strip-step:hover { color: var(--text); text-decoration: none; background: var(--surface-2); }
.wallet-strip-step[aria-current="page"] { color: var(--ink-dark); background: var(--role); }
.wallet-strip-step[aria-current="page"] svg { color: var(--ink-dark); }
.wallet-strip-hop { display: inline-flex; color: var(--dim); }
.wallet-strip-hop svg { width: 16px; height: 16px; }
.wallet-strip-all { margin-left: auto; font-size: 13px; color: var(--muted); }
@media (max-width: 1100px) {
  .wallet-flow { grid-template-columns: minmax(0, 1fr); }
  .wallet-flow-hop { flex-direction: row; max-width: none; padding: 2px 0; }
  .wallet-flow-hop svg { transform: rotate(90deg); }
}
@media (max-width: 640px) {
  .wallet-strip-all { margin-left: 0; width: 100%; }
  .wallet-strip-hop svg { transform: rotate(90deg); }
}

/* ---------- Cambios con Trocador (decisión 0088) ---------- */
a.wallet-flow-hop { color: var(--dim); text-decoration: none; border-radius: 14px; padding: 6px 4px; }
a.wallet-flow-hop:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.wallet-flow-go { font-size: 11px; font-weight: 700; color: var(--menta); }
.wallet-strip-links { margin-left: auto; display: inline-flex; gap: 14px; font-size: 13px; }
.wallet-strip-links a { color: var(--muted); }
.swap-starts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.swap-start { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 18px 20px; text-align: left; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--text); font-weight: 400; }
.swap-start:hover:not(:disabled) { border-color: #50555b; filter: none; transform: translateY(-1px); }
.swap-start:disabled, .swap-start.off { opacity: .55; cursor: default; }
.swap-start.off:hover { transform: none; border-color: var(--line); }
.swap-start > .row { margin-top: 4px; gap: 8px; }
.swap-steps { margin: 0 0 6px; padding-left: 20px; display: grid; gap: 10px; }
.swap-steps li { color: var(--dim); }
.swap-steps li b { color: var(--text); font-weight: 600; }
.swap-steps .wallet-copy { margin-top: 6px; }
.swap-steps .meta { display: block; margin-top: 6px; }
.wallet-form .grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.wallet-form .grid2 > div { min-width: 0; }
@media (max-width: 640px) { .wallet-form .grid2 { grid-template-columns: minmax(0, 1fr); } }
.swap-start b { font-size: 17px; font-weight: 650; }
.swap-start-coins, .swap-pair { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.swap-start-coins svg, .swap-pair > svg { width: 16px; height: 16px; color: var(--dim); }
.swap-direct { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
@media (max-width: 640px) { .swap-starts { grid-template-columns: minmax(0, 1fr); } .wallet-strip-links { margin-left: 0; width: 100%; } }
