/* =====================================================================
   WINOPTIMA — Component library  v2  |  Premium Dark Glassmorphism
   ===================================================================== */

/* ─────────────────────────────── Buttons ─────────────────────────────── */
.btn,
.btn-tiny,
.btn-ghost,
.btn-danger,
.btn-accent {
  font: inherit;
  cursor: pointer;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-muted);
  padding: 8px 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .1px;
  white-space: nowrap;
  transition:
    background var(--dur) var(--ease),
    border-color var(--dur) var(--ease),
    color var(--dur) var(--ease),
    transform var(--dur-fast) var(--ease),
    box-shadow var(--dur) var(--ease);
}
.btn:hover { background: var(--bg-elevated); border-color: var(--border-strong); color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn[disabled],
.btn-accent[disabled],
.btn-danger[disabled] { opacity: .46; cursor: not-allowed; pointer-events: none; }

.btn-tiny {
  font-size: 11.5px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
}
.btn-tiny.accent {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #0f0f0f;
  border-color: transparent;
  font-weight: 700;
  box-shadow: 0 2px 10px var(--accent-glow);
}
.btn-tiny.accent:hover {
  filter: brightness(1.1);
  box-shadow: 0 4px 18px var(--accent-glow);
  transform: translateY(-1px);
}

.btn-ghost { background: transparent; border-color: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--bg-hover); border-color: var(--border); color: var(--text); }

/* Accent — gradient + glow + micro-lift */
.btn-accent {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #0f0f0f;
  border-color: transparent;
  font-weight: 700;
  box-shadow: 0 4px 20px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,.20);
}
.btn-accent:hover:not([disabled]) {
  filter: brightness(1.08);
  box-shadow: 0 6px 28px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,.22);
  transform: translateY(-1px);
  color: #0f0f0f;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  border-color: transparent;
}
.btn-accent:active:not([disabled]) { transform: translateY(0); filter: brightness(.96); }

.btn-danger {
  background: rgba(255,82,82,.09);
  border-color: rgba(255,82,82,.28);
  color: var(--danger);
}
.btn-danger:hover:not([disabled]) {
  background: rgba(255,82,82,.17);
  border-color: rgba(255,82,82,.48);
  color: var(--danger);
}

/* ─────────────────────────────── Cards ─────────────────────────────── */
.card {
  background:
    linear-gradient(180deg, rgba(255,255,255,.015) 0%, transparent 50%),
    var(--bg-surface);
  border: 1px solid var(--border);
  /* Top-edge reflection simulates real glass */
  box-shadow:
    var(--shadow-sm),
    inset 0 1px 0 rgba(255,255,255,.08),
    inset 0 -1px 0 rgba(0,0,0,.15);
  border-radius: var(--radius-lg);
  padding: 18px;
  position: relative;
  transition:
    transform var(--dur) var(--ease),
    border-color var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease);
}
.card.acrylic { background: var(--bg-surface); }
.card.hoverable:hover {
  border-color: rgba(245,245,245,.18);
  transform: translateY(-2px);
  box-shadow:
    var(--shadow),
    0 0 0 1px rgba(245,245,245,.12),
    0 12px 36px rgba(245,245,245,.06),
    inset 0 1px 0 rgba(255,255,255,.12);
}
.card-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .1px;
  margin: 0 0 4px 0;
  color: var(--text);
}
.card-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0 0 12px 0;
}

/* ─────────────────────────────── Badges ─────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  font-size: 10.5px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
}
.badge.accent  { background: var(--accent-soft); color: var(--accent); border-color: rgba(245,245,245,.22); }
.badge.good    { background: rgba(50,212,116,.09); color: var(--good); border-color: rgba(50,212,116,.24); }
.badge.warn    { background: rgba(245,166,35,.09); color: var(--warn); border-color: rgba(245,166,35,.24); }
.badge.danger  { background: rgba(255,82,82,.10);  color: var(--danger); border-color: rgba(255,82,82,.26); }
/* Premium badge — animated shimmer */
.badge.premium {
  background: linear-gradient(120deg, rgba(245,201,72,.16) 0%, rgba(255,122,89,.12) 100%);
  color: #f5c948;
  border-color: rgba(245,201,72,.36);
  position: relative;
  isolation: isolate;
}
/* Brillo en una capa aparte que solo cambia opacity (sin repintar en cada fotograma) */
.badge.premium::after {
  content: '';
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  background: rgba(245,201,72,.10);
  box-shadow: 0 0 6px rgba(245,201,72,.35);
  opacity: 0;
  pointer-events: none;
  animation: premium-shimmer 3.2s ease-in-out infinite;
}
@keyframes premium-shimmer {
  0%, 100% { opacity: 0; }
  50%       { opacity: 1; }
}

/* ─────────────────────────────── Stat ring ─────────────────────────────── */
.ring {
  --size: 110px;
  --stroke: 9px;
  --pct: 0;
  --color: var(--accent);
  width: var(--size); height: var(--size);
  position: relative;
  display: inline-block;
}
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .ring-bg {
  fill: none;
  stroke: var(--bg-inset, rgba(0,0,0,.25));
  stroke-width: var(--stroke);
}
.ring .ring-fg {
  fill: none;
  stroke: var(--color);
  stroke-width: var(--stroke);
  stroke-linecap: round;
  stroke-dasharray: 283;
  stroke-dashoffset: calc(283 - 283 * (var(--pct) / 100));
  transition: stroke-dashoffset var(--dur-slow) var(--ease), stroke var(--dur) var(--ease);
  filter: drop-shadow(0 0 8px var(--color));
}
.ring-text {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  pointer-events: none;
}
.ring-text .ring-value { font-size: 22px; font-weight: 700; }
.ring-text .ring-label { font-size: 10.5px; color: var(--text-muted); letter-spacing: .7px; text-transform: uppercase; }

/* ─────────────────────────────── Bars ─────────────────────────────── */
.bar {
  height: 6px;
  width: 100%;
  background: var(--bg-inset, rgba(0,0,0,.28));
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.bar > .bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--neon));
  border-radius: 999px;
  width: 0%;
  transition: width var(--dur-slow) var(--ease);
  box-shadow: 0 0 6px var(--accent-glow);
}
.bar.warn  > .bar-fill { background: linear-gradient(90deg, #c88010, var(--warn)); box-shadow: none; }
.bar.danger> .bar-fill { background: linear-gradient(90deg, #cc2020, var(--danger)); box-shadow: none; }

/* ─────────────────────────────── Inputs ─────────────────────────────── */
.input {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 9px 12px;
  font: inherit;
  outline: none;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  width: 100%;
}
.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.input.mono { font-family: var(--font-mono); letter-spacing: 1px; }

/* ─────────────────────────────── Switches ─────────────────────────────── */
.switch {
  --w: 44px; --h: 24px;
  width: var(--w); height: var(--h);
  background: var(--bg-elevated);
  border: 1.5px solid var(--border-strong);
  border-radius: 999px;
  position: relative;
  cursor: pointer;
  transition:
    background var(--dur) var(--ease),
    border-color var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease);
  display: inline-block;
  flex-shrink: 0;
}
.switch::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: calc(var(--h) - 8px); height: calc(var(--h) - 8px);
  background: var(--text-dim);
  border-radius: 50%;
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease);
  box-shadow: 0 1px 3px rgba(0,0,0,.35);
}
.switch.on {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}
.switch.on::after {
  transform: translateX(calc(var(--w) - var(--h)));
  background: #fff;
}

/* ─────────────────────────────── Card PRO (ui/proCard.js) ─────────────────────────────── */
.pc-modal { position: relative; width: min(640px, calc(100vw - 32px)); max-width: none; }
.pc-x {
  position: absolute; top: 14px; right: 14px; width: 30px; height: 30px;
  display: grid; place-items: center; border: 0; border-radius: 8px;
  background: transparent; color: var(--text-dim); cursor: pointer;
}
.pc-x:hover { background: var(--bg-hover); color: var(--text); }
.pc-kick {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700;
  color: #d4d4d8; background: rgba(212,212,216,.12); border: 1px solid rgba(212,212,216,.35);
  border-radius: 6px; padding: 2px 8px;
}
.pc-modal .pc-title { margin: 12px 0 6px; font-size: 19px; }
.pc-modal .pc-body { margin: 0; font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.pc-modal .pc-body-2 { margin-top: 4px; }
.pc-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 20px 0; }
.pc-plan { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: rgba(255,255,255,.02); }
.pc-plan.is-rec { border-color: rgba(212,212,216,.5); }
.pc-plan img { display: block; width: 100%; height: 96px; object-fit: cover; }
.pc-plan-body { padding: 12px 14px 14px; }
.pc-plan-k { font-size: 10.5px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--text-dim); }
.pc-plan-n { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 3px 0 8px; font-size: 14.5px; font-weight: 600; }
.pc-tag { font-size: 10.5px; font-weight: 600; color: #d4d4d8; background: rgba(212,212,216,.12); border-radius: 5px; padding: 1px 6px; }
.pc-plan ul { margin: 0; padding: 0; list-style: none; font-size: 12px; color: var(--text-muted); }
.pc-plan li { display: flex; align-items: flex-start; gap: 6px; margin-top: 4px; }
.pc-plan li svg { flex: none; margin-top: 2px; color: #34d399; }
.pc-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.pc-btn {
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 16px; border-radius: 10px;
  background: var(--bg-surface); color: var(--text); border: 1px solid var(--border-strong);
  transition: background .15s ease;
}
.pc-btn:hover { background: var(--bg-hover); }
.pc-btn-primary { background: #f5f5f5; border-color: #f5f5f5; color: #fff; }
.pc-btn-primary:hover { background: #e5e5e5; }
.pc-link {
  margin-left: auto; font: inherit; font-size: 12.5px; cursor: pointer;
  background: none; border: 0; padding: 4px 0; color: #e5e5e5;
}
.pc-link:hover { text-decoration: underline; }
.pc-modal .pc-foot { margin: 14px 0 0; font-size: 11.5px; color: var(--text-dim); }
@media (max-width: 560px) { .pc-plans { grid-template-columns: 1fr; } .pc-link { margin-left: 0; } }

/* ─────────────────────────────── Chips ─────────────────────────────── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  transition: all var(--dur) var(--ease);
}
.chip:hover { background: var(--bg-surface-2); color: var(--text); border-color: var(--border-strong); }
.chip.active {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: rgba(245,245,245,.24);
  box-shadow: 0 0 0 1px rgba(245,245,245,.10);
}

/* ─────────────────────────────── Toast ─────────────────────────────── */
.toast-stack {
  position: fixed;
  right: 20px;
  bottom: 88px; /* por encima del botón flotante del chat (24px + 52px) */
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 9999;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  min-width: 290px;
  max-width: 400px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 13px 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,.07);
  animation: toast-in var(--dur) var(--ease);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
}
.toast .t-icon { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; }
.toast .t-title { font-weight: 700; font-size: 13px; margin-bottom: 2px; }
.toast .t-body { font-size: 12.5px; color: var(--text-muted); white-space: pre-wrap; }
.toast.success { border-left: 3px solid var(--good);   }
.toast.warn    { border-left: 3px solid var(--warn);   }
.toast.error   { border-left: 3px solid var(--danger); }
.toast.info    { border-left: 3px solid var(--info);   }
.toast.success .t-icon { color: var(--good); }
.toast.warn    .t-icon { color: var(--warn); }
.toast.error   .t-icon { color: var(--danger); }
.toast.info    .t-icon { color: var(--info); }
.toast.leaving { animation: toast-out var(--dur) var(--ease) forwards; }

@keyframes toast-in {
  from { opacity: 0; transform: translateX(24px) scale(.95); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes toast-out {
  from { opacity: 1; transform: translateX(0) scale(1); }
  to   { opacity: 0; transform: translateX(24px) scale(.95); }
}

/* ── Notificaciones del administrador: campana, desplegable y tarjeta ── */
.tb-bell { position: relative; }
.tb-btn.tb-bell svg { width: 16px; height: 16px; }
.tb-bell.is-open { background: rgba(200,200,205,.10); color: var(--text); }
.tb-bell.has-unread { color: var(--text); }
.tb-bell-badge {
  position: absolute; top: 6px; left: 24px;
  min-width: 15px; height: 15px; padding: 0 4px; box-sizing: border-box;
  border-radius: 999px; background: var(--accent); color: #1a1204;
  font-size: 9.5px; font-weight: 800; line-height: 15px; text-align: center;
  box-shadow: 0 0 0 2px var(--bg-base);
}
.tb-bell-badge[hidden] { display: none; }

.an-panel {
  position: fixed; top: 44px; right: 12px; z-index: 9000;
  width: 360px; max-width: calc(100vw - 24px); max-height: min(480px, 70vh);
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--bg-elevated); border: 1px solid var(--border-strong); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,.07);
  backdrop-filter: blur(24px) saturate(160%); -webkit-backdrop-filter: blur(24px) saturate(160%);
  animation: an-panel-in var(--dur) var(--ease);
}
@keyframes an-panel-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.an-head { padding: 14px 16px 10px; font-size: 13.5px; font-weight: 700; border-bottom: 1px solid var(--divider); }
.an-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; }
.an-item { position: relative; padding: 12px 16px 12px 20px; border-bottom: 1px solid var(--divider); }
.an-item:last-child { border-bottom: 0; }
.an-item.is-new { background: var(--accent-soft); }
.an-item.is-new::before {
  content: ''; position: absolute; left: 8px; top: 18px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}
.an-item-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.an-item-top b { font-size: 13px; font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.an-item-top time { flex-shrink: 0; font-size: 11px; color: var(--text-dim); }
.an-item p { margin: 4px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--text-muted); white-space: pre-wrap; overflow-wrap: anywhere; }
.an-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 34px 16px; color: var(--text-dim); font-size: 12.5px; }
.an-empty svg { width: 26px; height: 26px; opacity: .6; }

.toast.an-toast { position: relative; cursor: pointer; border-left: 3px solid var(--accent); padding-right: 38px; }
.toast.an-toast .t-icon { color: var(--accent); }
.toast.an-toast .t-kicker { font-size: 11px; font-weight: 600; color: var(--text-dim); margin-bottom: 2px; }
.toast.an-toast .t-body { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.an-x {
  position: absolute; top: 10px; right: 10px; width: 22px; height: 22px;
  display: grid; place-items: center; border: 0; border-radius: 6px;
  background: transparent; color: var(--text-dim); cursor: pointer;
}
.an-poll { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.an-poll-btn {
  font: inherit; font-size: 12px; font-weight: 600; color: var(--text); cursor: pointer;
  padding: 5px 12px; border-radius: 999px;
  background: var(--accent-soft); border: 1px solid var(--accent);
  transition: background var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.an-poll-btn:hover:not(:disabled) { background: var(--accent); color: #1a1204; }
.an-poll-btn:active:not(:disabled) { transform: scale(.97); }
.an-poll-btn:disabled { opacity: .55; cursor: default; }
.an-poll-btn.is-busy { opacity: 1; }
.an-poll-msg { flex-basis: 100%; font-size: 11.5px; color: var(--text-dim); }
.an-poll-msg.is-error { color: var(--danger); }
.an-poll.is-done .an-poll-msg { color: var(--good); font-weight: 600; }
.an-x svg { width: 10px; height: 10px; }
.an-x:hover { background: var(--bg-hover); color: var(--text); }

/* ─────────────────────────────── Modal ─────────────────────────────── */
.modal-root[hidden] { display: none; }
.modal-root {
  position: fixed; inset: 0;
  display: grid; place-items: center;
  background: var(--bg-overlay);
  z-index: 9000;
  animation: modal-fade var(--dur) var(--ease);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
@keyframes modal-fade { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 26px;
  min-width: 360px;
  max-width: 540px;
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,.08);
  animation: modal-pop var(--dur) var(--ease);
}
@keyframes modal-pop {
  from { transform: translateY(10px) scale(.97); opacity: 0; }
  to   { transform: none; opacity: 1; }
}
.modal h3 { margin: 0 0 8px 0; font-size: 17px; font-weight: 700; }
.modal p  { margin: 0 0 18px 0; color: var(--text-muted); font-size: 13.5px; }
.modal .modal-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* ─────────────────────────────── Misc ─────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--bg-surface) 0%, var(--bg-elevated) 50%, var(--bg-surface) 100%);
  background-size: 200% 100%;
  animation: sk 1.8s linear infinite;
  border-radius: var(--radius);
}
@keyframes sk { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.empty {
  text-align: center;
  padding: 48px;
  color: var(--text-muted);
}

.kbd {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  box-shadow: 0 2px 0 var(--border);
}

/* ─────────────────────────── Premium — badges y pill ─────────────────── */

/* Badge PRO en items del sidebar */
.badge-pro {
  margin-left: auto;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .5px;
  padding: 2px 6px;
  border-radius: 4px;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #1a0a00;
  text-transform: uppercase;
  flex-shrink: 0;
  pointer-events: none;
  line-height: 1.4;
}

/* Indicador de plan en el footer del sidebar */
.plan-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 500;
  padding: 7px 10px;
  border-radius: var(--radius);
  margin-bottom: 6px;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.plan-indicator--free {
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
}
.plan-indicator--premium {
  color: #4ade80;
  background: rgba(74,222,128,.07);
  border: 1px solid rgba(74,222,128,.18);
  font-weight: 600;
}
.plan-upgrade-link {
  margin-left: auto;
  font-size: 10.5px;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
}
.plan-upgrade-link:hover { text-decoration: underline; }

/* ─────────────────────────── Premium Gate (páginas bloqueadas) ─────────── */

.prem-gate {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 460px;
  gap: 14px;
  text-align: center;
  padding: 48px 32px;
}
.prem-gate-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(245,158,11,.12), rgba(217,119,6,.06));
  border: 1px solid rgba(245,158,11,.22);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f59e0b;
  margin-bottom: 6px;
}
.prem-gate-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}
.prem-gate-sub {
  font-size: 13.5px;
  color: var(--text-muted);
  max-width: 360px;
  line-height: 1.65;
  margin: 0;
}
.prem-gate-btn {
  margin-top: 10px;
  padding: 10px 30px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #1a0a00;
  font: inherit;
  font-weight: 700;
  font-size: 13.5px;
  border: none;
  cursor: pointer;
  transition: filter var(--dur) var(--ease), transform var(--dur-fast) var(--ease),
              box-shadow var(--dur) var(--ease);
  box-shadow: 0 4px 16px rgba(245,158,11,.25);
}
.prem-gate-btn:hover  { filter: brightness(1.1); transform: translateY(-1px); box-shadow: 0 6px 22px rgba(245,158,11,.35); }
.prem-gate-btn:active { transform: translateY(0); }

/* ─────────────────────────── Página Premium (pm2) ──────────────────────── */
/* Cristal + borde iluminado (mismo lenguaje que el dashboard) con el dorado
   como acento Premium. Estructura, textos y lógica intactos. */
.pm2-wrapper {
  --cl-text:        #f2f2f3;
  --cl-text-muted:  rgba(245,245,247,.78);
  --cl-text-dim:    rgba(245,245,247,.6);
  --cl-accent:      #f5f5f5;
  --cl-accent-line: rgba(245,245,245,.28);
  --pm-gold:   #d4d4d8;
  --pm-gold-2: #e6a321;
  --pm-gold-l: #ffe39a;
  padding: 0;
  animation: pmEnter .55s cubic-bezier(.23,1,.32,1) backwards;
}
@keyframes pmEnter { from { opacity: 0; transform: translateY(12px); } }

/* Cabecera */
.page-header.pm2-hero { flex-direction: row; align-items: center; gap: 16px; padding: 0 24px; }
.pm2-hero-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pm2-hero-ico {
  width: 52px; height: 52px; flex: none;
  display: grid; place-items: center;
  border-radius: 15px;
  color: #1a1200;
  background: linear-gradient(145deg, #ffe08a, var(--pm-gold) 45%, var(--pm-gold-2));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6), inset 0 -3px 6px rgba(150,90,0,.35), 0 10px 26px -12px rgba(212,212,216,.75);
}
.pm2-title {
  background: linear-gradient(90deg, #fff4d1 0%, var(--pm-gold) 45%, #f0a92a 70%, #fff4d1 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: pmShiny 6s linear infinite;
}
@keyframes pmShiny { to { background-position: -200% 0; } }

/* Cards: cristal + borde iluminado fijo */
.pm2-wrapper .card.acrylic {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.055) 0%, rgba(255,255,255,0) 38%),
    linear-gradient(160deg, rgba(29,29,29,.62) 0%, rgba(16,16,16,.54) 60%, rgba(5,5,6,.6) 100%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 18px 44px rgba(0,0,0,.5);
  --pm-line: 59,130,246;
}
.pm2-wrapper .card.acrylic::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: linear-gradient(150deg,
    rgba(var(--pm-line),.95) 0%, rgba(var(--pm-line),.35) 22%,
    rgba(255,255,255,.07) 50%, rgba(var(--pm-line),.2) 80%, rgba(var(--pm-line),.5) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
  z-index: 1;
}
.pm2-wrapper .card.acrylic.pm2-activate-card { --pm-line: 245,192,66; }

.pm2-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 18px;
  padding: 0 24px 32px;
  align-items: start;
}
.pm2-plans-card,
.pm2-activate-card { padding: 22px 24px; }

.pm2-remote-card {
  grid-column: 1 / -1;
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding: 22px 24px;
}
.pm2-remote-info { flex: 1 1 360px; min-width: 0; }
.pm2-remote-text { margin: 10px 0 12px; font-size: 13px; line-height: 1.55; color: #c3d2e8; }
.pm2-remote-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px 16px; }
.pm2-remote-list li { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: #c3d2e8; }
.pm2-remote-list svg { flex: none; box-sizing: content-box; padding: 4px; border-radius: 50%; }
.pm2-remote-cta { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.pm2-remote-price { font-size: 26px; font-weight: 800; color: #fff; }

.pm2-section-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 700; letter-spacing: .9px; text-transform: uppercase;
  color: var(--cl-text-muted);
  margin-bottom: 18px;
}

/* Comparativa: columna Premium destacada como banda dorada */
.pm2-plans-table { position: relative; display: flex; flex-direction: column; }
.pm2-plans-header,
.pm2-feat-row {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 1fr 104px 104px;
  align-items: center;
}
.pm2-pro-band {
  position: absolute; top: -6px; bottom: -6px; right: 0; width: 104px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(212,212,216,.10), rgba(212,212,216,.03) 70%, rgba(212,212,216,.06));
  box-shadow: inset 0 0 0 1px rgba(212,212,216,.22);
  pointer-events: none;
}
.pm2-plans-header { padding: 4px 0 14px; border-bottom: 1px solid rgba(200,200,205,.10); }
.pm2-col-plan { display: flex; justify-content: center; }
.pm2-plan-label {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10.5px; font-weight: 800; letter-spacing: .9px; text-transform: uppercase;
  padding: 5px 11px; border-radius: 999px;
}
.pm2-plan-label.free {
  color: var(--cl-text-muted);
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(200,200,205,.16);
}
.pm2-plan-label.premium {
  color: #1a1200;
  background: linear-gradient(135deg, #ffd56b, var(--pm-gold) 45%, var(--pm-gold-2));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5);
}
.pm2-feat-row {
  min-height: 40px;
  font-size: 13px;
  color: #c3d2e8;
  border-bottom: 1px solid rgba(200,200,205,.07);
  transition: background .18s ease;
}
.pm2-feat-row:last-child { border-bottom: none; }
.pm2-feat-group {
  position: relative; z-index: 1;
  padding: 16px 10px 6px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .9px; text-transform: uppercase;
  color: var(--cl-text-muted);
}
.pm2-val-text { font-size: 12.5px; font-weight: 800; color: var(--pm-gold); }
.pm2-feat-row .pm2-col-feature { padding: 0 10px; border-radius: 8px; }
.pm2-feat-row:hover .pm2-col-feature { color: var(--cl-text); }
.pm2-feat-row:hover { background: linear-gradient(90deg, rgba(245,245,245,.07), transparent 70%); }
.pm2-check { display: flex; justify-content: center; }
.pm2-check svg { box-sizing: content-box; padding: 4px; border-radius: 50%; }
.pm2-icon-yes { color: #e5e5e5; background: rgba(245,245,245,.12); }
.pm2-feat-row .pm2-check:last-child .pm2-icon-yes {
  color: #1a1200;
  background: linear-gradient(145deg, #ffe08a, var(--pm-gold) 50%, var(--pm-gold-2));
  box-shadow: 0 2px 8px -2px rgba(212,212,216,.6);
}
.pm2-icon-no { color: var(--cl-text-dim); background: rgba(255,255,255,.03); opacity: .7; }

/* Licencia */
.pm2-lic-glow {
  position: absolute; top: -90px; right: -70px; width: 240px; height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212,212,216,.16), transparent 65%);
  pointer-events: none; z-index: -1;
}
.pm2-status-row {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: 12px;
  font-size: 13px; font-weight: 600;
  margin-bottom: 18px;
}
.pm2-status-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.pm2-status-active {
  color: #bbf7d0;
  background: rgba(34,197,94,.08);
  border: 1px solid rgba(34,197,94,.28);
}
.pm2-status-active .pm2-status-dot { background: #22c55e; }
.pm2-status-active .pm2-status-dot::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid #22c55e; animation: pmPing 2s ease-out infinite;
}
@keyframes pmPing { from { transform: scale(1); opacity: .7; } to { transform: scale(2.6); opacity: 0; } }
.pm2-status-free {
  color: var(--cl-text-muted);
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(200,200,205,.14);
}
.pm2-status-free .pm2-status-dot { background: #727272; }

.pm2-input-label { display: block; font-size: 12px; font-weight: 600; color: var(--cl-text-muted); margin-bottom: 8px; }
.pm2-input-row { display: flex; gap: 8px; margin-bottom: 6px; }
.pm2-input-wrap { position: relative; flex: 1; min-width: 0; }
.pm2-input-ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--cl-text-dim); pointer-events: none; transition: color .18s ease; }
.pm2-key-input {
  width: 100%; height: 42px;
  padding: 0 12px 0 36px;
  border-radius: 10px;
  border: 1px solid rgba(200,200,205,.18);
  background: rgba(5,5,6,.6);
  color: var(--cl-text);
  font: inherit; font-size: 13px; font-family: var(--font-mono, monospace); letter-spacing: .4px;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.pm2-key-input::placeholder { color: var(--cl-text-dim); font-family: var(--font); letter-spacing: 0; }
.pm2-key-input:focus { border-color: rgba(212,212,216,.6); background: rgba(5,5,6,.8); box-shadow: 0 0 0 3px rgba(212,212,216,.14); }
.pm2-input-wrap:focus-within .pm2-input-ico { color: var(--pm-gold); }
.pm2-key-error { display: block; margin-top: 6px; font-size: 12px; color: #f87171; }
.pm2-key-error[hidden] { display: none; }

.pm2-buy-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 18px; padding-top: 16px;
  border-top: 1px solid rgba(200,200,205,.10);
  font-size: 12px; color: var(--cl-text-muted);
  white-space: nowrap;
}
.pm2-buy-row a {
  flex: none;
  display: inline-flex; align-items: center;
  padding: 6px 10px; border-radius: 9px;
  color: #e5e5e5; font-weight: 600; text-decoration: none;
  background: rgba(245,245,245,.10);
  border: 1px solid rgba(245,245,245,.30);
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.pm2-buy-row a:hover { color: #fff; background: rgba(245,245,245,.2); border-color: rgba(245,245,245,.55); }

.pm2-btn {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 42px; padding: 0 16px;
  border-radius: 10px;
  font: inherit; font-size: 13px; font-weight: 800; letter-spacing: .2px;
  cursor: pointer; border: 1px solid transparent;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease, filter .2s ease;
}
.pm2-btn:active { transform: translateY(1px); }
.pm2-btn[disabled] { opacity: .6; cursor: not-allowed; pointer-events: none; }
.pm2-btn-activate {
  color: #1a1200;
  background: linear-gradient(135deg, #ffd56b, var(--pm-gold) 45%, var(--pm-gold-2));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 8px 22px -10px rgba(212,212,216,.8);
}
.pm2-btn-activate:hover { filter: brightness(1.06); box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 10px 26px -8px rgba(212,212,216,.9); }
.pm2-btn-activate::after {
  content: ''; position: absolute; top: 0; bottom: 0; left: -60%; width: 45%; z-index: -1;
  background: linear-gradient(105deg, transparent 15%, rgba(255,255,255,.55) 50%, transparent 85%);
}
.pm2-btn-activate:hover::after { animation: pmBtnShine .75s ease 1; }
@keyframes pmBtnShine { to { transform: translateX(380%); } }
.pm2-btn-danger {
  width: 100%;
  color: #fca5a5;
  background: rgba(239,68,68,.06);
  border-color: rgba(239,68,68,.28);
}
.pm2-btn-danger:hover { color: #fff; background: rgba(239,68,68,.16); border-color: rgba(239,68,68,.55); }

.pm2-key-display {
  padding: 12px 14px; margin-bottom: 16px;
  border-radius: 12px;
  background: rgba(5,5,6,.55);
  border: 1px dashed rgba(212,212,216,.3);
}
.pm2-key-label { font-size: 10.5px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--cl-text-dim); margin-bottom: 6px; }
.pm2-key-val code { font-family: var(--font-mono, monospace); font-size: 13px; letter-spacing: .6px; color: var(--pm-gold-l); word-break: break-all; }

.pm2-expiry-row {
  display: flex; flex-direction: column; gap: 8px;
  padding: 14px; margin-bottom: 14px;
  border-radius: 12px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(200,200,205,.12);
}
.pm2-expiry-remaining { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--cl-text); }
.pm2-expiry-remaining svg { color: var(--pm-gold); }
.pm2-expiry-date { font-size: 12px; color: var(--cl-text-muted); }
.pm2-expiry-bar { position: relative; height: 6px; border-radius: 999px; background: rgba(255,255,255,.07); overflow: hidden; }
.pm2-expiry-bar-fill {
  height: 100%; border-radius: inherit;
  background: linear-gradient(90deg, var(--pm-gold-2), var(--pm-gold), var(--pm-gold-l));
  transition: width 600ms var(--ease);
}

/* Se adapta al ancho real disponible (también con el sidebar abierto) */
.pm2-wrapper { container-type: inline-size; }
@container (max-width: 900px) {
  .pm2-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .pm2-wrapper, .pm2-title, .pm2-status-active .pm2-status-dot::after { animation: none; }
  .pm2-btn-activate:hover::after { animation: none; }
}

/* ══════════════════════════════════════════════════════════════════
   SPLASH SCREEN — fondo GhostFibers (mismo que la app) + logo con haz de luz
   ══════════════════════════════════════════════════════════════════ */
@property --sp-beam {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
.splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  /* Respaldo sin WebGL2: mismo tono que el fondo de la app */
  background:
    radial-gradient(ellipse 55% 45% at 50% 45%, rgba(44,70,181,.16), transparent 70%),
    #000000;
  transition: opacity 650ms cubic-bezier(.16,1,.3,1), visibility 650ms;
}
.splash.splash-hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* ── Fondo: el mismo canvas de GhostFibers de la app (#db-bgfx-root), sin
   un segundo contexto WebGL. Mientras arranca, la app queda invisible
   debajo y la splash se vuelve transparente para dejar ver las fibras. ── */
.splash.has-fx { background: transparent; }
.is-booting .layout,
.is-booting .titlebar { opacity: 0; }
.layout,
.titlebar { transition: opacity 650ms cubic-bezier(.16,1,.3,1); }

/* ── Contenido ───────────────────────────────────────────────────── */
.splash-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 650ms cubic-bezier(.16,1,.3,1), filter 650ms cubic-bezier(.16,1,.3,1);
}
/* Salida: el contenido se disuelve hacia la app */
.splash-hide .splash-inner { transform: scale(1.04); filter: blur(6px); }

/* ── Logo: tarjeta de cristal con haz de luz en el borde ─────────── */
.splash-logo {
  position: relative;
  width: 104px;
  height: 104px;
  margin-bottom: 26px;
  border-radius: 28px;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, rgba(18,18,20,.78), rgba(13,13,13,.78));
  border: 1px solid rgba(200,200,205,.14);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.06),
    0 24px 60px -18px rgba(0,0,0,.9),
    0 0 70px -10px rgba(245,245,245,.35);
  backdrop-filter: blur(14px);
  animation: spLogoIn 700ms cubic-bezier(.16,1,.3,1) both;
}
.splash-logo::before {
  content: '';
  position: absolute;
  inset: -1px;
  padding: 1.5px;
  border-radius: inherit;
  background: conic-gradient(from var(--sp-beam),
    transparent 0deg 220deg,
    rgba(92,225,255,0) 220deg,
    rgba(92,225,255,.95) 325deg,
    #ffffff 350deg,
    transparent 360deg);
  filter: drop-shadow(0 0 4px rgba(92,225,255,.8));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  animation: spBeam 2.6s linear infinite;
  pointer-events: none;
}
.splash-logo-svg {
  width: 60px;
  height: 60px;
  filter: drop-shadow(0 6px 18px rgba(61,184,245,.45));
}
@keyframes spBeam { to { --sp-beam: 360deg; } }
@keyframes spLogoIn {
  from { opacity: 0; transform: translateY(10px) scale(.92); }
  to   { opacity: 1; transform: none; }
}

/* ── Nombre: aparece desenfocado y se enfoca ─────────────────────── */
.splash-name {
  display: flex;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 3px;
  margin-bottom: 26px;
  animation: spBlurIn 700ms cubic-bezier(.16,1,.3,1) both 150ms;
}
.splash-name-win    { color: #f3f8ff; }
.splash-name-optima { color: #f5f5f5; }
@keyframes spBlurIn {
  from { opacity: 0; filter: blur(10px); transform: translateY(6px); }
  to   { opacity: 1; filter: blur(0);    transform: none; }
}

/* ── Barra de progreso ───────────────────────────────────────────── */
.splash-bar-wrap {
  position: relative;
  width: 200px;
  height: 2px;
  margin-bottom: 14px;
  border-radius: 2px;
  background: rgba(255,255,255,.07);
  animation: spFadeIn 500ms ease both 300ms;
}
.splash-bar {
  position: relative;
  height: 100%;
  width: 0%;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(212,212,216,.2), #f5f5f5 60%, #5ce1ff);
  transition: width 3000ms cubic-bezier(.25,.46,.45,.94);
}
.splash-bar::after {
  content: '';
  position: absolute;
  right: -2px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d6f4ff;
  box-shadow: 0 0 8px 2px rgba(92,225,255,.85), 0 0 22px 4px rgba(245,245,245,.45);
  transform: translateY(-50%);
}

/* ── Estado: texto con brillo que lo recorre ─────────────────────── */
.splash-status {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .2px;
  color: transparent;
  background: linear-gradient(110deg, rgba(143,164,196,.6) 40%, #f2f2f3 50%, rgba(143,164,196,.6) 60%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
          background-clip: text;
  animation: spFadeIn 500ms ease both 350ms, spShine 2.4s linear infinite 350ms;
}
@keyframes spShine {
  from { background-position: 100% 0; }
  to   { background-position: -150% 0; }
}
@keyframes spFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Versión (pie) ───────────────────────────────────────────────── */
.splash-version {
  position: absolute;
  z-index: 1;
  bottom: 22px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .6px;
  color: rgba(143,164,196,.45);
  animation: spFadeIn 500ms ease both 450ms;
}

@media (prefers-reduced-motion: reduce) {
  .splash-logo, .splash-name, .splash-bar-wrap, .splash-status, .splash-version { animation: none; }
  .splash-logo::before { animation: none; --sp-beam: 200deg; }
  .splash-hide .splash-inner { transform: none; filter: none; }
}

/* ═══════════ Update Banner ═══════════ */
.update-banner {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: none;
  align-items: center;
  gap: 12px;
  background: var(--card-bg, #1a1d24);
  border: 1px solid var(--accent, #00d4aa);
  border-radius: 12px;
  padding: 14px 18px;
  z-index: 99999;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
  animation: updateSlideIn .3s ease;
  max-width: 420px;
}
@keyframes updateSlideIn {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.update-banner-text {
  font-size: 13px;
  color: var(--text, #e8e8e8);
  font-weight: 500;
  flex: 1;
}
.update-banner-bar {
  width: 80px;
  height: 4px;
  background: rgba(255,255,255,.1);
  border-radius: 2px;
  overflow: hidden;
}
.update-banner-fill {
  height: 100%;
  width: 0%;
  background: var(--accent, #00d4aa);
  border-radius: 2px;
  transition: width .3s ease;
}
.update-banner-btn {
  background: var(--accent, #00d4aa);
  color: #000;
  border: none;
  border-radius: 6px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.update-banner-btn:hover { opacity: .85; }
.update-banner-btn:disabled { opacity: .5; cursor: default; }
.update-banner-close {
  background: none;
  border: none;
  color: var(--text-muted, #888);
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.update-banner-close:hover { color: #fff; }

/* =====================================================================
   Premium Polish — Page Transitions & Card Effects
   ===================================================================== */

/* ── Page transition ─────────────────────────────────────────────────── */
.animations-on .view > * {
  animation: pageEnter .35s cubic-bezier(.16,1,.3,1) both;
}
.animations-off .view > * { animation: none; }
@keyframes pageEnter {
  from { opacity: 0; transform: translateY(12px) scale(.995); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Card hover glow effect (all cards) ──────────────────────────────── */
.card {
  transition:
    transform .25s cubic-bezier(.16,1,.3,1),
    border-color .25s,
    box-shadow .35s;
}
.card:hover {
  border-color: rgba(245,245,245,.12);
  box-shadow:
    var(--shadow),
    0 0 0 1px rgba(245,245,245,.08),
    0 8px 30px rgba(0,0,0,.35);
}

/* ── Stat cards entrance animation ───────────────────────────────────── */
.animations-on .db-stat-card {
  animation: statCardPop .5s cubic-bezier(.16,1,.3,1) both;
  transition: transform .2s, box-shadow .3s, border-color .3s;
}
.db-stat-card:nth-child(1) { animation-delay: .05s; }
.db-stat-card:nth-child(2) { animation-delay: .1s; }
.db-stat-card:nth-child(3) { animation-delay: .15s; }
.db-stat-card:nth-child(4) { animation-delay: .2s; }
.db-stat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(245,245,245,.15);
  box-shadow: 0 8px 28px rgba(0,0,0,.4), 0 0 0 1px rgba(245,245,245,.1);
}
@keyframes statCardPop {
  from { opacity: 0; transform: translateY(16px) scale(.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Info grid cards entrance ────────────────────────────────────────── */
.db-info-grid .db-info-card {
  animation: statCardPop .5s cubic-bezier(.16,1,.3,1) both;
}
.db-info-grid .db-info-card:nth-child(1) { animation-delay: .1s; }
.db-info-grid .db-info-card:nth-child(2) { animation-delay: .15s; }
.db-info-grid .db-info-card:nth-child(3) { animation-delay: .2s; }

/* ── Subtle shimmer on hoverable card borders ────────────────────────── */
.card.hoverable::after {
  content: '';
  position: absolute;
  top: -1px; left: 20%; right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245,245,245,.15), transparent);
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
.card.hoverable:hover::after { opacity: 1; }

/* ── Premium badge glow ──────────────────────────────────────────────── */
.badge-pro {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .8px;
  padding: 2px 7px;
  border-radius: 4px;
  background: linear-gradient(135deg, rgba(212,212,216,.2), rgba(255,122,89,.15));
  color: #d4d4d8;
  border: 1px solid rgba(212,212,216,.3);
  text-transform: uppercase;
  position: relative;
}
/* Brillo en una capa aparte que solo cambia opacity (sin repintar en cada fotograma) */
.badge-pro::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  box-shadow: 0 0 8px 1px rgba(212,212,216,.18);
  opacity: 0;
  pointer-events: none;
  animation: badgePulse 5s ease-in-out infinite;
}
@keyframes badgePulse {
  0%, 100% { opacity: 0; }
  50%      { opacity: 1; }
}

/* ── Scrollbar polish ────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 7px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.1);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.18); }

/* ── Smooth number transitions ───────────────────────────────────────── */
.db-sc-value, .db-ring-score, .db-hm-val {
  font-variant-numeric: tabular-nums;
}

/* ── Premium gate blur background ────────────────────────────────────── */
.prem-gate {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 40px;
  text-align: center;
  animation: pageEnter .5s ease both;
}
.prem-gate-icon {
  width: 64px; height: 64px;
  border-radius: 18px;
  background: rgba(245,245,245,.08);
  border: 1px solid rgba(245,245,245,.15);
  display: grid; place-items: center;
  color: var(--accent);
  margin-bottom: 20px;
}
.prem-gate-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 8px;
}
.prem-gate-sub {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 400px;
  line-height: 1.6;
  margin: 0 0 24px;
}
.prem-gate-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #0f0f0f;
  font-weight: 700;
  font-size: 13px;
  padding: 10px 24px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  box-shadow: 0 4px 20px var(--accent-glow);
  transition: transform .2s, box-shadow .2s;
}
.prem-gate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

/* ─────────────────────────── Select (dark theme) ────────────────────── */
select {
  appearance: none;
  -webkit-appearance: none;
  background-color: var(--bg, #0d1117);
  color: var(--text, #e6edf3);
  border: 1px solid var(--border, rgba(255,255,255,.08));
  border-radius: 8px;
  padding: 8px 32px 8px 10px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
select:hover  { border-color: var(--accent, #f5f5f5); }
select:focus  { border-color: var(--accent, #f5f5f5); box-shadow: 0 0 0 2px var(--accent-glow, rgba(245,245,245,.15)); }
select option {
  background: var(--bg-elevated, #1a1a1a);
  color: var(--text, #e6edf3);
  padding: 6px 10px;
}

/* ─────────────── Modo de interfaz (uiModeChooser.js) ─────────────── */
.modal.uimode-modal { max-width: 760px; width: min(760px, calc(100vw - 40px)); }
.uimode-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.uimode-card {
  display: flex; flex-direction: column; gap: 8px; text-align: left;
  padding: 16px; border-radius: var(--radius-lg); cursor: pointer;
  background: var(--bg-inset); border: 1px solid var(--border-strong); color: var(--text);
  font: inherit;
}
.uimode-card:hover { border-color: var(--border-hover); }
.uimode-card.is-selected { border-color: var(--accent); background: var(--accent-soft); }
.uimode-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.uimode-title { font-size: 15px; font-weight: 700; }
.uimode-rec {
  font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px;
  color: #14100a; background: var(--accent); white-space: nowrap;
}
.uimode-desc { font-size: 13px; color: var(--text-muted); }
.uimode-req-title { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim); margin-top: 4px; }
.uimode-req { margin: 0; padding-left: 18px; font-size: 12.5px; color: var(--text-muted); display: grid; gap: 3px; }
.uimode-pc { font-size: 12.5px; color: var(--text-dim); margin-bottom: 6px; }
.uimode-note { font-size: 12.5px; color: var(--text-muted); margin-bottom: 16px; }
@media (max-width: 640px) { .uimode-cards { grid-template-columns: 1fr; } }

/* Etiqueta "LITE" (titlebar y pantalla de carga) */
.lite-badge {
  align-self: center; padding: 3px 9px; border-radius: 999px; cursor: pointer;
  font: 700 10.5px/1.2 var(--font); letter-spacing: .12em;
  color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent);
}
.lite-badge:hover { background: var(--accent); color: #14100a; }
/* En la barra de título va a la derecha, junto a los controles: a la izquierda la tapa la barra lateral */
.titlebar-drag .lite-badge { order: 1; margin-left: auto; margin-right: 10px; }
.titlebar-drag:has(.tb-reboot-pill) .lite-badge { margin-left: 0; }
.perf-lite .splash-name::after {
  content: 'LITE'; align-self: center; margin-left: 10px; padding: 3px 8px; border-radius: 999px;
  font-size: 11px; letter-spacing: .14em; color: #f5f5f5; border: 1px solid #f5f5f5;
}

/* ── Ajustes: opinión / reporte de problemas ── */
.st-wrapper .section.st-card[hidden] { display: none !important; }
.fb-form { display: flex; flex-direction: column; gap: 12px; margin: 4px 0 18px; min-width: min(460px, 80vw); }
.fb-field { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--text-muted); }
.fb-field > span { font-weight: 600; color: var(--text); }
.fb-field select { width: 100%; }
.fb-field textarea.input { resize: vertical; min-height: 110px; max-height: 260px; font-size: 13px; line-height: 1.5; }
.fb-count { align-self: flex-end; font-size: 11px; color: var(--text-muted); opacity: .8; }
.fb-check { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; color: var(--text); cursor: pointer; line-height: 1.4; }
.fb-check input { margin-top: 2px; accent-color: var(--accent); flex-shrink: 0; }
.modal .fb-note { margin: 0; font-size: 11.5px; color: var(--text-muted); line-height: 1.5; }
.modal .modal-actions .btn-accent:disabled { opacity: .5; cursor: not-allowed; }
