/* ═══ Nexo · sistema de diseño v2 — "tal cual los shots" + liquid glass ═══
   CLARO  = blanco + tinta negra: marco de vidrio blanco sobre fondo violeta/azul vivo, tarjetas blancas, botones NEGROS,
            pastilla de navegación negra, verde (sumar/mic/en vivo), rojo (colgar/alerta), azul solo para detalles.
   OSCURO = vidrio negro sobre brasas rojo/violeta/azul, acento violeta (burbuja propia, badges, botones).
   LIQUID GLASS (estilo iOS 26): piezas flotantes translúcidas con desenfoque + saturación, borde especular, brillo interior y sombra suave → clase .liquid */
:root {
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r-xl: 30px; --r-lg: 22px; --r-md: 16px; --r-sm: 12px; --r-pill: 999px;
  --ease: cubic-bezier(.22, 1, .36, 1); --spring: cubic-bezier(.34, 1.56, .64, 1);
  --t-fast: 160ms; --t: 280ms; --t-slow: 480ms;
  --ok: #2fb350; --ok-soft: rgba(47, 179, 80, .14); --warn: #f59e0b; --warn-soft: rgba(245, 158, 11, .16);
  --danger: #ff4b4b; --danger-soft: rgba(255, 75, 75, .13);
  --fb: #1877f2; --ig: #e1306c; --tt: #111; --yt: #ff0033;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
}
:root, :root[data-theme='light'] {
  color-scheme: light;
  --backdrop: radial-gradient(55% 45% at 88% 6%, #ecd2ff 0%, transparent 62%), radial-gradient(50% 60% at 8% 18%, #b199ff 0%, transparent 65%),
    radial-gradient(70% 60% at 92% 100%, #2457ff 0%, transparent 60%), radial-gradient(60% 50% at 0% 100%, #5b3df2 0%, transparent 62%), linear-gradient(135deg, #9370ff, #6d5cfa 45%, #4a6df8);
  --frame: rgba(245, 246, 250, .9); --card: rgba(255, 255, 255, .94); --card-2: rgba(20, 22, 40, .05); --card-3: rgba(20, 22, 40, .09); --line: rgba(20, 22, 40, .08);
  --solid: #ffffff;                                   /* superficie opaca (menús, modales sobre contenido) */
  --text: #0e0f1a; --text-2: #34364a; --muted: #8a8d9c; --on-primary: #fff;
  --primary: #11121c; --primary-2: #2c2e42; --primary-soft: rgba(17, 18, 28, .07); --primary-glow: rgba(17, 18, 28, .25);
  --accent: #2f5bea; --accent-soft: rgba(47, 91, 234, .13); --blue: #2f5bea;
  --bubble-own: #11121c; --bubble-own-text: #fff; --bubble: #ffffff;
  --shadow: 0 8px 26px rgba(30, 30, 70, .07), 0 1px 3px rgba(30, 30, 70, .05); --shadow-lg: 0 28px 70px rgba(30, 20, 110, .22);
  --nav-pill: rgba(14, 15, 30, .78); --nav-pill-text: #9a9db4; --nav-pill-active: #fff; --stage: #0c0d16;
  --rail-active-bg: #11121c; --rail-active-fg: #fff;
  --lg-bg: rgba(255, 255, 255, .5); --lg-border: rgba(255, 255, 255, .75); --lg-blur: blur(22px) saturate(190%) brightness(1.05);
  --lg-hi: inset 0 1px 0 rgba(255, 255, 255, .95), inset 0 -1px 0 rgba(255, 255, 255, .3), inset 1px 0 0 rgba(255, 255, 255, .4), inset -1px 0 0 rgba(255, 255, 255, .4);
  --lg-shadow: 0 12px 40px rgba(20, 20, 70, .16), 0 2px 8px rgba(20, 20, 70, .08);
  --lg-sheen: linear-gradient(135deg, rgba(255, 255, 255, .7) 0%, rgba(255, 255, 255, 0) 38%, rgba(255, 255, 255, 0) 62%, rgba(255, 255, 255, .28) 100%);
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --backdrop: radial-gradient(55% 60% at 0% 0%, #12457a 0%, transparent 60%), radial-gradient(48% 55% at 100% 42%, #6d2be0 0%, transparent 60%),
    radial-gradient(70% 60% at 62% 112%, #b8212d 0%, transparent 60%), radial-gradient(42% 42% at 0% 100%, #7d1522 0%, transparent 62%), #06060b;
  --frame: rgba(11, 10, 16, .7); --card: rgba(255, 255, 255, .05); --card-2: rgba(255, 255, 255, .07); --card-3: rgba(255, 255, 255, .12); --line: rgba(255, 255, 255, .08);
  --solid: #15141c;
  --text: #f3f3f6; --text-2: #c9c8d2; --muted: #8d8c98; --on-primary: #fff;
  --primary: #6c47ff; --primary-2: #8f6bff; --primary-soft: rgba(108, 71, 255, .22); --primary-glow: rgba(108, 71, 255, .45);
  --accent: #8f6bff; --accent-soft: rgba(143, 107, 255, .2); --blue: #4f8cff;
  --bubble-own: #6c47ff; --bubble-own-text: #fff; --bubble: rgba(255, 255, 255, .07);
  --shadow: 0 8px 26px rgba(0, 0, 0, .3); --shadow-lg: 0 30px 80px rgba(0, 0, 0, .6);
  --nav-pill: rgba(24, 22, 32, .62); --nav-pill-text: #8d8c98; --nav-pill-active: #fff; --stage: #050508;
  --rail-active-bg: rgba(255, 255, 255, .1); --rail-active-fg: #fff;
  --lg-bg: rgba(38, 36, 50, .46); --lg-border: rgba(255, 255, 255, .14); --lg-blur: blur(24px) saturate(180%);
  --lg-hi: inset 0 1px 0 rgba(255, 255, 255, .24), inset 0 -1px 0 rgba(255, 255, 255, .05), inset 1px 0 0 rgba(255, 255, 255, .07), inset -1px 0 0 rgba(255, 255, 255, .07);
  --lg-shadow: 0 14px 44px rgba(0, 0, 0, .5), 0 2px 8px rgba(0, 0, 0, .3);
  --lg-sheen: linear-gradient(135deg, rgba(255, 255, 255, .16) 0%, rgba(255, 255, 255, 0) 40%, rgba(255, 255, 255, 0) 65%, rgba(255, 255, 255, .06) 100%);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; }
body { font: 500 14px/1.45 var(--font); color: var(--text); background: var(--backdrop); background-attachment: fixed; overflow: hidden; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.02em; }
h1 { font-size: 26px; } h2 { font-size: 20px; } h3 { font-size: 16px; } h4 { font-size: 14px; }
p { margin: 0; } a { color: var(--accent); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
img, video { display: block; max-width: 100%; }
::selection { background: var(--accent); color: #fff; }
.scroll, .col-list, .col-main, .col-side { scrollbar-width: thin; scrollbar-color: var(--card-3) transparent; }
.muted { color: var(--muted); } .small { font-size: 12px; } .tiny { font-size: 11px; } .bold { font-weight: 700; }
.row { display: flex; align-items: center; gap: 10px; } .col { display: flex; flex-direction: column; gap: 10px; }
.grow { flex: 1; min-width: 0; } .wrap { flex-wrap: wrap; } .between { justify-content: space-between; } .center { justify-content: center; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .hidden { display: none !important; }
.icon { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ── LIQUID GLASS ── pieza flotante translúcida. Necesita estar sobre algo con color (fondo, video, tarjetas). */
.liquid, .glass { position: relative; isolation: isolate; background: var(--lg-bg); border: 1px solid var(--lg-border); box-shadow: var(--lg-hi), var(--lg-shadow);
  backdrop-filter: var(--lg-blur); -webkit-backdrop-filter: var(--lg-blur); }
.liquid::before, .glass::before { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--lg-sheen); pointer-events: none; }
/* Vidrio sobre video/foto (subtítulos, etiquetas de tiles): siempre claro-translúcido con texto blanco. */
.glass { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .28); color: #fff; backdrop-filter: blur(18px) saturate(170%); -webkit-backdrop-filter: blur(18px) saturate(170%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -1px 0 rgba(255, 255, 255, .08), 0 8px 24px rgba(0, 0, 0, .18); }
.glass::before { background: linear-gradient(135deg, rgba(255, 255, 255, .35) 0%, rgba(255, 255, 255, 0) 45%); }

/* ── marco de la app ── */
#app { height: 100dvh; padding: 14px; display: flex; }
.shell { flex: 1; display: flex; min-width: 0; background: var(--frame); backdrop-filter: blur(40px) saturate(170%); -webkit-backdrop-filter: blur(40px) saturate(170%);
  border-radius: var(--r-xl); box-shadow: var(--lg-hi), var(--shadow-lg); border: 1px solid var(--lg-border); overflow: hidden; animation: shell-in var(--t-slow) var(--ease) both; }
.rail { position: relative; z-index: 30; width: 76px; flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 0 16px; border-right: 1px solid var(--line); }
.rail .logo { width: 44px; height: 44px; display: grid; place-items: center; color: var(--text); font-weight: 800; font-size: 24px; letter-spacing: -.04em; margin-bottom: 10px; }
.rail .logo::after { content: '.'; color: var(--accent); }
.rail-btn { position: relative; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); transition: all var(--t) var(--ease); }
.rail-btn:hover { background: var(--card-2); color: var(--text); transform: translateY(-1px); }
.rail-btn.active { background: var(--rail-active-bg); color: var(--rail-active-fg); box-shadow: 0 8px 20px var(--primary-glow); }
:root[data-theme='dark'] .rail-btn.active { box-shadow: var(--lg-hi); }
.rail-btn .badge { position: absolute; top: 2px; right: 2px; }
.rail-btn::after { content: attr(data-tip); position: absolute; left: 58px; padding: 6px 11px; border-radius: 10px; background: #11121c; color: #fff; font-size: 12px; white-space: nowrap;
  opacity: 0; pointer-events: none; transform: translateX(-6px); transition: all var(--t-fast) var(--ease); z-index: 50; }
.rail-btn:hover::after { opacity: 1; transform: none; }
.rail .spacer { flex: 1; }
.main { flex: 1; min-width: 0; min-height: 0; position: relative; display: flex; flex-direction: column; }
#view { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.view { flex: 1; min-height: 0; display: flex; flex-direction: column; animation: view-in 420ms var(--ease) both; }
.view-head { display: flex; align-items: center; gap: 12px; padding: 18px 22px 12px; flex: none; }
.view-head h1 { font-size: 22px; }
.view-body { flex: 1; min-height: 0; overflow: auto; padding: 4px 22px 22px; }
.view-cols { flex: 1; min-height: 0; display: flex; }
.col-list { width: 300px; flex: none; overflow: auto; border-right: 1px solid var(--line); padding: 14px; }
.col-main { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 0; }
.col-side { width: 320px; flex: none; overflow: auto; border-left: 1px solid var(--line); padding: 14px; }

/* ── navegación inferior (móvil): pastilla oscura de liquid glass ── */
.bottom-nav { display: none; position: fixed; left: 50%; bottom: calc(12px + var(--safe-b)); transform: translateX(-50%); z-index: 40; padding: 7px; gap: 2px; border-radius: var(--r-pill); isolation: isolate;
  background: var(--nav-pill); border: 1px solid rgba(255, 255, 255, .14); backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), inset 0 -1px 0 rgba(255, 255, 255, .05), 0 18px 44px rgba(8, 8, 30, .4); }
.bottom-nav::before { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none; background: linear-gradient(135deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 45%); }
.bottom-nav button { position: relative; min-width: 60px; height: 52px; border-radius: var(--r-pill); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--nav-pill-text); font-size: 10px; font-weight: 600; transition: all var(--t) var(--ease); }
.bottom-nav button.active { color: var(--nav-pill-active); background: rgba(255, 255, 255, .14); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25); }
.bottom-nav button:active { transform: scale(.92); }
.bottom-nav .badge { position: absolute; top: 4px; right: 10px; }

/* ── componentes ── */
.card { background: var(--card); border-radius: var(--r-lg); padding: 16px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.card.flat { box-shadow: none; } .card.soft { background: var(--card-2); border-color: transparent; box-shadow: none; }
.card.hover { transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease); cursor: pointer; }
.card.hover:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: var(--r-pill); font-weight: 700; font-size: 13.5px; white-space: nowrap;
  background: var(--card-2); color: var(--text); transition: transform var(--t-fast) var(--ease), background var(--t) var(--ease), box-shadow var(--t) var(--ease), opacity var(--t); }
.btn:hover { background: var(--card-3); } .btn:active { transform: scale(.96); } .btn:disabled { opacity: .5; pointer-events: none; }
.btn.primary { background: var(--primary); color: var(--on-primary); box-shadow: 0 8px 20px var(--primary-glow), inset 0 1px 0 rgba(255, 255, 255, .18); }
.btn.primary:hover { background: var(--primary-2); transform: translateY(-1px); }
.btn.ok { background: var(--ok); color: #fff; box-shadow: 0 8px 18px rgba(47, 179, 80, .3), inset 0 1px 0 rgba(255, 255, 255, .25); } .btn.danger { background: var(--danger); color: #fff; box-shadow: 0 8px 18px rgba(255, 75, 75, .3), inset 0 1px 0 rgba(255, 255, 255, .25); }
.btn.ghost { background: transparent; border: 1px solid var(--line); } .btn.ghost:hover { background: var(--card-2); }
.btn.sm { height: 34px; padding: 0 13px; font-size: 12.5px; } .btn.lg { height: 50px; padding: 0 24px; font-size: 15px; }
.btn.icon { width: 42px; padding: 0; } .btn.icon.sm { width: 34px; } .btn.icon.lg { width: 52px; height: 52px; }
.btn.round { background: var(--card); box-shadow: var(--shadow); border: 1px solid var(--line); }
.btn.glass { background: rgba(255, 255, 255, .16); color: #fff; } .btn.glass:hover { background: rgba(255, 255, 255, .26); }
.btn.on { background: var(--primary-soft); color: var(--text); } .btn.off { background: var(--danger-soft); color: var(--danger); }
.input, .select, .textarea { width: 100%; height: 44px; padding: 0 16px; border-radius: var(--r-md); border: 1.5px solid transparent; background: var(--card-2); outline: none;
  transition: border-color var(--t) var(--ease), background var(--t) var(--ease), box-shadow var(--t) var(--ease); }
.select option { background: var(--solid); color: var(--text); }
.textarea { height: auto; min-height: 96px; padding: 12px 16px; resize: vertical; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); background: var(--card); box-shadow: 0 0 0 4px var(--accent-soft); }
.input::placeholder, .textarea::placeholder { color: var(--muted); text-overflow: ellipsis; }
.input { text-overflow: ellipsis; }
.field { display: flex; flex-direction: column; gap: 6px; } .field > label, .label { font-size: 12px; font-weight: 700; color: var(--text-2); }
.search { position: relative; } .search .icon { position: absolute; left: 14px; top: 12px; color: var(--muted); } .search .input { padding-left: 42px; border-radius: var(--r-pill); }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: var(--r-pill); font-size: 11.5px; font-weight: 700; background: var(--card-2); color: var(--text-2); white-space: nowrap; }
.pill.ok { background: var(--ok-soft); color: #1d8a3c; } .pill.warn { background: var(--warn-soft); color: #b56f00; } .pill.danger { background: var(--danger-soft); color: var(--danger); } .pill.info { background: var(--accent); color: #fff; }
:root[data-theme='dark'] .pill.ok { color: #5fd97d; } :root[data-theme='dark'] .pill.warn { color: #fbbf24; }
.pill .dot, .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; } .dot.live { background: var(--ok); animation: pulse 1.8s infinite; }
.badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 10.5px; font-weight: 800; display: inline-grid; place-items: center; animation: pop var(--t) var(--spring) both; }
.badge.blue { background: var(--accent); } .badge.green { background: var(--ok); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: var(--r-pill); background: var(--card-2); font-weight: 600; font-size: 12.5px; transition: all var(--t) var(--ease); cursor: pointer; border: 1.5px solid transparent; }
.chip:hover { background: var(--card-3); } .chip.active { background: var(--primary); color: var(--on-primary); }
.avatar { --s: 40px; position: relative; width: var(--s); height: var(--s); border-radius: 50%; flex: none; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: calc(var(--s) * .38); background: var(--primary); user-select: none; }
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.avatar.xs { --s: 24px; } .avatar.sm { --s: 32px; } .avatar.lg { --s: 52px; } .avatar.xl { --s: 88px; }
.avatar.online::after, .avatar.offline::after { content: ''; position: absolute; right: 0; bottom: 0; width: 28%; height: 28%; min-width: 9px; min-height: 9px; border-radius: 50%; border: 2.5px solid var(--solid); background: var(--ok); }
.avatar.offline::after { background: var(--muted); }
.avatar.speaking { box-shadow: 0 0 0 3px var(--ok); transition: box-shadow var(--t-fast); }
.avatar-stack { display: flex; } .avatar-stack .avatar { margin-left: -10px; border: 2.5px solid var(--solid); } .avatar-stack .avatar:first-child { margin-left: 0; }
.tabs { display: inline-flex; padding: 5px; gap: 4px; border-radius: var(--r-pill); background: var(--card-2); }
.tab { height: 36px; padding: 0 18px; border-radius: var(--r-pill); font-weight: 700; font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 7px; transition: all var(--t) var(--ease); }
.tab.active { background: var(--solid); color: var(--text); box-shadow: var(--shadow); }
:root[data-theme='dark'] .tab.active { background: rgba(255, 255, 255, .12); box-shadow: var(--lg-hi); }
.list-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-md); cursor: pointer; transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
.list-row:hover { background: var(--card-2); } .list-row.active { background: var(--card-3); } .list-row:active { transform: scale(.985); }
.section-title { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 14px 12px 6px; display: flex; align-items: center; justify-content: space-between; }
.switch { position: relative; width: 46px; height: 28px; border-radius: 14px; background: var(--card-3); transition: background var(--t) var(--ease); flex: none; cursor: pointer; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); transition: transform var(--t) var(--spring); }
.switch.on { background: var(--ok); } .switch.on::after { transform: translateX(18px); }
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 40px 20px; color: var(--muted); }
.empty .orb { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; color: var(--text); position: relative; isolation: isolate; background: var(--lg-bg); border: 1px solid var(--lg-border); box-shadow: var(--lg-hi), var(--lg-shadow); }
.empty .orb::before { content: ''; position: absolute; inset: -30%; z-index: -1; border-radius: 50%; background: conic-gradient(from 0deg, #9370ff, #2457ff, #ecd2ff, #ff6b8b, #9370ff); filter: blur(18px); opacity: .55; animation: spin 9s linear infinite; }
.skeleton { border-radius: var(--r-sm); background: linear-gradient(90deg, var(--card-2) 25%, var(--card-3) 50%, var(--card-2) 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite linear; }
.stagger > * { animation: rise 460ms var(--ease) both; animation-delay: calc(var(--i, 0) * 32ms); }
.platform { width: 22px; height: 22px; border-radius: 7px; display: inline-grid; place-items: center; color: #fff; flex: none; font-size: 11px; font-weight: 800; }
.platform.facebook { background: var(--fb); } .platform.instagram { background: linear-gradient(45deg, #f9ce34, #ee2a7b 50%, #6228d7); } .platform.tiktok { background: #111; box-shadow: -1.5px 0 #25f4ee, 1.5px 0 #fe2c55; } .platform.youtube { background: var(--yt); }

/* ── modal / hoja / toast: liquid glass denso (legible sobre cualquier cosa) ── */
.modal-back { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 18px; background: rgba(8, 8, 24, .38); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); animation: fade var(--t) var(--ease) both; }
.modal { position: relative; isolation: isolate; width: min(520px, 100%); max-height: 88dvh; overflow: auto; border-radius: var(--r-xl); padding: 22px; animation: modal-in 420ms var(--spring) both;
  background: color-mix(in srgb, var(--solid) 86%, transparent); border: 1px solid var(--lg-border); box-shadow: var(--lg-hi), var(--shadow-lg); backdrop-filter: blur(30px) saturate(180%); -webkit-backdrop-filter: blur(30px) saturate(180%); }
.modal.wide { width: min(920px, 100%); } .modal h2 { margin-bottom: 4px; }
.modal-back.closing { animation: fade var(--t-fast) var(--ease) reverse both; } .modal-back.closing .modal { animation: modal-in var(--t-fast) var(--ease) reverse both; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
#toasts { position: fixed; z-index: 200; left: 50%; top: 18px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 10px; pointer-events: none; }
.toast { pointer-events: auto; position: relative; isolation: isolate; min-width: 260px; max-width: 380px; display: flex; gap: 12px; align-items: flex-start; padding: 13px 16px; border-radius: 20px; cursor: pointer;
  background: color-mix(in srgb, var(--solid) 72%, transparent); border: 1px solid var(--lg-border); box-shadow: var(--lg-hi), var(--lg-shadow); backdrop-filter: var(--lg-blur); -webkit-backdrop-filter: var(--lg-blur); animation: toast-in 420ms var(--spring) both; }
.toast.out { animation: toast-in var(--t) var(--ease) reverse both; }
.toast .t-icon { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--primary-soft); color: var(--text); }
.toast.ok .t-icon { background: var(--ok-soft); color: var(--ok); } .toast.error .t-icon, .toast.alert .t-icon { background: var(--danger-soft); color: var(--danger); } .toast.warn .t-icon { background: var(--warn-soft); color: var(--warn); }

/* ── login ── */
.auth-wrap { flex: 1; display: grid; place-items: center; padding: 20px; overflow: auto; }
.auth-card { position: relative; isolation: isolate; width: min(420px, 100%); padding: 32px; border-radius: 34px; background: var(--lg-bg); border: 1px solid var(--lg-border); box-shadow: var(--lg-hi), var(--shadow-lg);
  backdrop-filter: blur(34px) saturate(190%); -webkit-backdrop-filter: blur(34px) saturate(190%); animation: modal-in 600ms var(--spring) both; }
.auth-card::before { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--lg-sheen); pointer-events: none; }
.auth-card .logo-xl { width: 64px; height: 64px; border-radius: 22px; display: grid; place-items: center; color: #fff; font-size: 30px; font-weight: 800; margin-bottom: 18px; background: #11121c; box-shadow: 0 14px 30px rgba(10, 10, 30, .35), inset 0 1px 0 rgba(255, 255, 255, .25); }
:root[data-theme='dark'] .auth-card .logo-xl { background: var(--primary); box-shadow: 0 14px 34px var(--primary-glow), inset 0 1px 0 rgba(255, 255, 255, .3); }
.auth-card .input { background: color-mix(in srgb, var(--solid) 55%, transparent); }

/* ── animaciones ── */
@keyframes shell-in { from { opacity: 0; transform: scale(.985) translateY(10px); } }
@keyframes view-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.985); } }
@keyframes fade { from { opacity: 0; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(26px) scale(.96); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(-26px) scale(.94); } }
@keyframes pop { from { transform: scale(0); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(47, 179, 80, .55); } 70% { box-shadow: 0 0 0 9px rgba(47, 179, 80, 0); } 100% { box-shadow: 0 0 0 0 rgba(47, 179, 80, 0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes wave { 0%, 100% { transform: scaleY(.35); } 50% { transform: scaleY(1); } }
.wave { display: inline-flex; align-items: center; gap: 2.5px; height: 16px; } .wave i { width: 3px; height: 100%; border-radius: 2px; background: currentColor; animation: wave 900ms var(--ease) infinite; }
.wave i:nth-child(2) { animation-delay: -.25s; } .wave i:nth-child(3) { animation-delay: -.5s; } .wave i:nth-child(4) { animation-delay: -.15s; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; } }

/* ── móvil ── */
@media (max-width: 860px) {
  #app { padding: 0; } .shell { border-radius: 0; border: 0; box-shadow: none; } .rail { display: none; } .bottom-nav { display: flex; }
  :root, :root[data-theme='light'] { --frame: rgba(246, 246, 250, .9); } :root[data-theme='dark'] { --frame: rgba(9, 8, 13, .8); }
  .view-head { padding: calc(14px + var(--safe-t)) 16px 10px; } .view-body { padding: 4px 16px calc(96px + var(--safe-b)); }
  .col-list { width: 100%; border: 0; padding-bottom: calc(96px + var(--safe-b)); } .col-side { display: none; }
  .view-cols > .col-main { display: none; } .view-cols.show-main > .col-main { display: flex; } .view-cols.show-main > .col-list { display: none; }
  body.immersive .bottom-nav { transform: translateX(-50%) translateY(140%); }
  .bottom-nav { transition: transform var(--t-slow) var(--ease); }
  #toasts { left: 12px; right: 12px; top: calc(10px + var(--safe-t)); transform: none; align-items: stretch; } .toast { min-width: 0; max-width: none; }
  .modal-back { align-items: end; padding: 0; } .modal, .modal.wide { width: 100%; border-radius: var(--r-xl) var(--r-xl) 0 0; padding-bottom: calc(22px + var(--safe-b)); max-height: 92dvh; }
  @keyframes modal-in { from { transform: translateY(100%); } }
}
@media (min-width: 861px) { .only-mobile { display: none !important; } }
@media (max-width: 860px) { .only-desktop { display: none !important; } }
