/* ============================================================
   ÓRBITA · Sistema de diseño
   ============================================================ */

:root {
  --sidebar-w: 264px;
  --player-h: 92px;
  --topbar-h: 76px;
  --radius-xs: 8px;
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --font: "Inter", "Inter var", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #07080e;
  --bg-soft: #0b0d15;
  --bg-elevated: #10131f;
  --panel: #10131d;
  --panel-2: #151927;
  --panel-3: #1c2133;
  --panel-4: #242a40;
  --line: rgba(255, 255, 255, 0.075);
  --line-strong: rgba(255, 255, 255, 0.15);
  --text: #f2f3f9;
  --text-2: #a7adc4;
  --text-3: #717894;
  --text-inverse: #0a0b12;
  --accent: #8b5cf6;
  --accent-strong: #a78bfa;
  --accent-soft: rgba(139, 92, 246, 0.14);
  --accent-ring: rgba(139, 92, 246, 0.38);
  --cyan: #22d3ee;
  --cyan-soft: rgba(34, 211, 238, 0.12);
  --ok: #34d399;
  --ok-soft: rgba(52, 211, 153, 0.12);
  --warn: #fbbf24;
  --warn-soft: rgba(251, 191, 36, 0.12);
  --danger: #fb7185;
  --danger-soft: rgba(251, 113, 133, 0.13);
  --shadow-sm: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 8px 24px -18px rgba(0, 0, 0, 0.9);
  --shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.85);
  --shadow-pop: 0 30px 80px -24px rgba(0, 0, 0, 0.9);
  --glow: 0 0 0 1px rgba(139, 92, 246, 0.35), 0 18px 50px -18px rgba(139, 92, 246, 0.55);
  --skeleton: linear-gradient(90deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.04));
  --hero-glow: radial-gradient(900px 420px at 12% -10%, rgba(139, 92, 246, 0.35), transparent 62%),
    radial-gradient(700px 420px at 88% 10%, rgba(34, 211, 238, 0.18), transparent 60%),
    linear-gradient(160deg, #171233 0%, #101426 45%, #0c0f1a 100%);
  --scroll-thumb: #262c42;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f4f9;
  --bg-soft: #ffffff;
  --bg-elevated: #ffffff;
  --panel: #ffffff;
  --panel-2: #f7f8fc;
  --panel-3: #eef0f7;
  --panel-4: #e4e7f1;
  --line: rgba(16, 24, 40, 0.085);
  --line-strong: rgba(16, 24, 40, 0.16);
  --text: #111420;
  --text-2: #515a71;
  --text-3: #828aa1;
  --text-inverse: #ffffff;
  --accent: #6d3fe8;
  --accent-strong: #5b2fd6;
  --accent-soft: rgba(109, 63, 232, 0.09);
  --accent-ring: rgba(109, 63, 232, 0.26);
  --cyan: #0891b2;
  --cyan-soft: rgba(8, 145, 178, 0.09);
  --ok: #059669;
  --ok-soft: rgba(5, 150, 105, 0.1);
  --warn: #b45309;
  --warn-soft: rgba(180, 83, 9, 0.1);
  --danger: #e11d48;
  --danger-soft: rgba(225, 29, 72, 0.08);
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05), 0 8px 20px -16px rgba(16, 24, 40, 0.35);
  --shadow: 0 24px 50px -30px rgba(16, 24, 40, 0.35);
  --shadow-pop: 0 30px 70px -24px rgba(16, 24, 40, 0.35);
  --glow: 0 0 0 1px rgba(109, 63, 232, 0.2), 0 18px 44px -20px rgba(109, 63, 232, 0.4);
  --skeleton: linear-gradient(90deg, rgba(16, 24, 40, 0.045), rgba(16, 24, 40, 0.09), rgba(16, 24, 40, 0.045));
  --hero-glow: radial-gradient(900px 420px at 10% -20%, rgba(139, 92, 246, 0.35), transparent 62%),
    radial-gradient(700px 420px at 95% 0%, rgba(34, 211, 238, 0.25), transparent 58%),
    linear-gradient(155deg, #ede9fe 0%, #e8ecfb 48%, #eef6fa 100%);
  --scroll-thumb: #cfd4e3;
}

/* ------------------------------- Reset ------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 15px;
  line-height: 1.5;
  overflow-x: hidden;
}

h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
img { max-width: 100%; display: block; }
svg { flex: none; display: block; }
svg.icon { width: 18px; height: 18px; }
::selection { background: var(--accent); color: #fff; }

:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 2px;
  border-radius: 6px;
}

::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--scroll-thumb); border-radius: 99px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

.hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ------------------------------ Tipografía ------------------------------ */
.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 34px 0 16px;
}
.section-head h2 {
  font-size: 21px;
  letter-spacing: -0.02em;
  font-weight: 750;
}
.section-head p { color: var(--text-3); font-size: 13px; margin-top: 2px; }
.section-head .link {
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 99px;
  transition: 0.2s var(--ease);
}
.section-head .link:hover { color: var(--text); background: var(--panel-3); }

/* ------------------------------ Botones ------------------------------ */
.btn {
  --btn-bg: var(--panel-3);
  --btn-color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 11px;
  background: var(--btn-bg);
  color: var(--btn-color);
  font-weight: 620;
  font-size: 13.5px;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  transition: transform 0.18s var(--ease), background 0.18s var(--ease), box-shadow 0.2s var(--ease), opacity 0.2s;
  white-space: nowrap;
  user-select: none;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.985); }
.btn[disabled] { opacity: 0.5; pointer-events: none; }
.btn svg { width: 17px; height: 17px; }

.btn-primary {
  background: linear-gradient(135deg, #8b5cf6 0%, #7550ee 48%, #5f6ff0 100%);
  color: #fff;
  box-shadow: 0 14px 30px -16px rgba(139, 92, 246, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn-primary:hover { box-shadow: 0 18px 36px -14px rgba(139, 92, 246, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.2); }

.btn-ghost { background: transparent; border-color: var(--line-strong); color: var(--text); }
.btn-ghost:hover { background: var(--panel-3); }

.btn-soft { background: var(--accent-soft); color: var(--accent-strong); }
.btn-soft:hover { background: color-mix(in srgb, var(--accent) 22%, transparent); }

.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-danger:hover { background: color-mix(in srgb, var(--danger) 22%, transparent); }

.btn-sm { padding: 8px 13px; border-radius: 9px; font-size: 13px; }
.btn-lg { padding: 13px 20px; border-radius: 12px; font-size: 14.5px; }
.btn-block { width: 100%; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  color: var(--text-2);
  transition: 0.18s var(--ease);
  border: 1px solid transparent;
}
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn:hover { color: var(--text); background: var(--panel-3); }
.icon-btn[aria-pressed="true"] { color: var(--accent-strong); background: var(--accent-soft); }
.icon-btn:disabled { opacity: 0.45; pointer-events: none; }

.spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
.btn:not(.btn-primary) .spinner { border-color: var(--line-strong); border-top-color: var(--text); }

@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------ Formularios ------------------------------ */
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 15px; }
.field-label { font-size: 12.5px; font-weight: 620; color: var(--text-2); }
.field-hint { font-size: 11.5px; color: var(--text-3); }

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 11px;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}
.input-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
  background: var(--panel);
}
.input-wrap.invalid { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }

.input-icon {
  width: 18px; height: 18px;
  margin-left: 13px;
  color: var(--text-3);
}

.input-wrap input,
.field > input,
.field select,
.input-wrap select {
  width: 100%;
  background: transparent;
  border: 0;
  padding: 12px 13px;
  font-size: 14px;
  color: var(--text);
  outline: none;
  min-width: 0;
}
.input-wrap input::placeholder { color: var(--text-3); }
.input-wrap .input-icon + input { padding-left: 10px; }

.input-reveal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-right: 2px;
  color: var(--text-3);
  border-radius: 9px;
}
.input-reveal:hover { color: var(--text); }
.input-reveal svg { width: 18px; height: 18px; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%);
  background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  border: 1px solid var(--line);
  border-radius: 11px;
  background-color: var(--panel-2);
  padding: 11px 36px 11px 13px;
  cursor: pointer;
}
.field select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }

.checkbox {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
}
.checkbox input { accent-color: var(--accent); width: 16px; height: 16px; }

/* ------------------------------ Badges / chips ------------------------------ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: var(--panel-3);
  color: var(--text-2);
  white-space: nowrap;
}
.badge.superadmin { background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(34, 211, 238, 0.16)); color: var(--accent-strong); border: 1px solid rgba(139, 92, 246, 0.25); }
.badge.admin { background: var(--accent-soft); color: var(--accent-strong); }
.badge.user { background: var(--panel-3); color: var(--text-2); }
.badge.active { background: var(--ok-soft); color: var(--ok); }
.badge.pending { background: var(--warn-soft); color: var(--warn); }
.badge.suspended, .badge.rejected { background: var(--danger-soft); color: var(--danger); }

.chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--panel-3);
  color: var(--text-2);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.nav-badge {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 99px;
  background: var(--warn);
  color: #1a1300;
  font-size: 10.5px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ------------------------------ Alertas ------------------------------ */
.alert {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 11px 13px;
  border-radius: 11px;
  font-size: 12.8px;
  line-height: 1.45;
  border: 1px solid transparent;
  margin-bottom: 14px;
}
.alert svg { width: 17px; height: 17px; margin-top: 1px; }
.alert.error { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 25%, transparent); }
.alert.success { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.alert.info { background: var(--accent-soft); color: var(--accent-strong); border-color: color-mix(in srgb, var(--accent) 22%, transparent); }
.alert.warn { background: var(--warn-soft); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 25%, transparent); }

/* ------------------------------ Avatar ------------------------------ */
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  font-weight: 750;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, #8b5cf6, #22d3ee);
  color: #fff;
  flex: none;
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--line-strong);
  text-transform: uppercase;
  user-select: none;
}
.avatar.lg { width: 76px; height: 76px; font-size: 24px; box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--accent-ring); }

/* ============================================================
   Splash
   ============================================================ */
.boot-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  transition: opacity 0.45s var(--ease), visibility 0.45s;
}
.boot-screen.done { opacity: 0; visibility: hidden; pointer-events: none; }
.boot-logo { animation: boot-float 2.4s ease-in-out infinite; }
.boot-word {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.42em;
  margin-left: 0.42em;
  color: var(--text);
}
.boot-bar { width: 148px; height: 2px; border-radius: 99px; background: var(--panel-3); overflow: hidden; }
.boot-bar span {
  display: block;
  width: 45%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
  border-radius: 99px;
  animation: boot-load 1.15s ease-in-out infinite;
}
@keyframes boot-load {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(330%); }
}
@keyframes boot-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* ============================================================
   Autenticación
   ============================================================ */
.auth-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(430px, 0.94fr);
  background: var(--bg);
}

.auth-theme {
  position: fixed;
  top: 20px;
  right: 22px;
  z-index: 6;
  background: color-mix(in srgb, var(--panel) 70%, transparent);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.auth-visual {
  position: relative;
  overflow: hidden;
  padding: 42px clamp(34px, 5vw, 76px);
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(700px 500px at 18% 8%, rgba(139, 92, 246, 0.32), transparent 60%),
    radial-gradient(600px 480px at 88% 78%, rgba(34, 211, 238, 0.16), transparent 62%),
    radial-gradient(500px 400px at 60% 0%, rgba(236, 72, 153, 0.08), transparent 60%),
    var(--bg-soft);
  border-right: 1px solid var(--line);
  isolation: isolate;
}
.auth-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(ellipse at 40% 40%, #000 20%, transparent 75%);
  z-index: -1;
}
html[data-theme="light"] .auth-visual {
  background:
    radial-gradient(700px 500px at 18% 8%, rgba(139, 92, 246, 0.22), transparent 60%),
    radial-gradient(600px 480px at 88% 78%, rgba(34, 211, 238, 0.2), transparent 62%),
    linear-gradient(160deg, #f6f3ff, #eef4fd 60%, #f2f8fb);
}
html[data-theme="light"] .auth-visual::before { background-image: radial-gradient(rgba(16, 24, 40, 0.07) 1px, transparent 1px); }

.auth-brand { display: flex; align-items: center; gap: 11px; }
.auth-brand span:first-of-type {
  font-weight: 850;
  letter-spacing: 0.3em;
  font-size: 15px;
}
.auth-brand-tag {
  font-size: 9.5px;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-strong);
  background: var(--accent-soft);
  border: 1px solid var(--accent-ring);
  padding: 3px 8px;
  border-radius: 99px;
  margin-left: 4px;
}

.auth-copy { margin-top: clamp(40px, 8vh, 90px); position: relative; z-index: 2; }
.auth-copy .eyebrow { color: var(--accent-strong); }
.auth-copy h1 {
  font-size: clamp(38px, 4.4vw, 62px);
  line-height: 1.02;
  letter-spacing: -0.045em;
  font-weight: 800;
  margin: 14px 0 20px;
}
.auth-copy h1 em {
  font-style: normal;
  background: linear-gradient(100deg, #a78bfa 0%, #818cf8 45%, #22d3ee 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.auth-sub {
  max-width: 430px;
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.65;
}

.auth-orbit-stage {
  position: relative;
  width: min(420px, 60%);
  aspect-ratio: 1;
  margin: clamp(18px, 4vh, 46px) auto 0;
  flex: none;
}
.orbit {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(139, 92, 246, 0.28);
  animation: orbit-spin 34s linear infinite;
}
.orbit-2 { inset: 13%; border-color: rgba(34, 211, 238, 0.24); animation-duration: 24s; animation-direction: reverse; }
.orbit-3 { inset: 27%; border-color: rgba(255, 255, 255, 0.14); animation-duration: 16s; }
html[data-theme="light"] .orbit-3 { border-color: rgba(16, 24, 40, 0.12); }
.orbit-dot {
  position: absolute;
  top: -5px;
  left: 50%;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 18px 4px rgba(139, 92, 246, 0.65);
}
.orbit-dot.dot-2 { background: var(--cyan); box-shadow: 0 0 18px 4px rgba(34, 211, 238, 0.55); width: 7px; height: 7px; top: 50%; left: auto; right: -4px; margin: 0; }
.orbit-core {
  position: absolute;
  inset: 36%;
  border-radius: 50%;
  background: linear-gradient(150deg, rgba(139, 92, 246, 0.22), rgba(34, 211, 238, 0.1));
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 20px 60px -20px rgba(139, 92, 246, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
html[data-theme="light"] .orbit-core { border-color: rgba(255, 255, 255, 0.7); }
.eq { display: flex; align-items: flex-end; gap: 4px; height: 40%; }
.eq i {
  width: 5px;
  height: var(--h);
  border-radius: 99px;
  background: linear-gradient(180deg, #a78bfa, #22d3ee);
  animation: eq-bounce 1.1s ease-in-out infinite alternate;
}
.eq i:nth-child(2n) { animation-delay: -0.4s; }
.eq i:nth-child(3n) { animation-delay: -0.7s; }
.eq i:nth-child(4n) { animation-delay: -0.2s; }
@keyframes eq-bounce { from { height: calc(var(--h) * 0.45); } to { height: var(--h); } }
@keyframes orbit-spin { to { transform: rotate(360deg); } }

.auth-features {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-top: 34px;
  color: var(--text-2);
  font-size: 13.5px;
}
.auth-features li { display: flex; align-items: center; gap: 11px; }
.dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.dot.ok { background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.dot.violet { background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.dot.cyan { background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }

.auth-legal { margin-top: auto; padding-top: 30px; font-size: 11px; color: var(--text-3); letter-spacing: 0.04em; }

.auth-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 56px clamp(24px, 5vw, 64px) 30px;
  background: var(--bg);
  position: relative;
}
.auth-card { width: 100%; max-width: 432px; }

.auth-mobile-brand { display: none; align-items: center; gap: 10px; margin-bottom: 26px; font-weight: 850; letter-spacing: 0.28em; font-size: 14px; }

.auth-tabs {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 28px;
}
.auth-tab {
  position: relative;
  z-index: 2;
  padding: 9px 8px;
  font-size: 13.5px;
  font-weight: 650;
  color: var(--text-3);
  border-radius: 9px;
  transition: color 0.2s var(--ease);
}
.auth-tab.active { color: var(--text); }
.auth-tab-indicator {
  position: absolute;
  z-index: 1;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
  border-radius: 9px;
  background: var(--panel-4);
  box-shadow: 0 4px 14px -6px rgba(0, 0, 0, 0.5);
  transition: transform 0.32s var(--ease);
}
.auth-tabs.register-active .auth-tab-indicator { transform: translateX(100%); }
html[data-theme="light"] .auth-tab-indicator { background: #fff; box-shadow: 0 2px 8px rgba(16, 24, 40, 0.1); }

.auth-heading { margin-bottom: 24px; }
.auth-heading h2 { font-size: 26px; letter-spacing: -0.03em; font-weight: 760; }
.auth-heading p { color: var(--text-3); font-size: 13.5px; margin-top: 6px; }



.pw-meter { display: flex; align-items: center; gap: 10px; margin: -4px 0 18px; }
.pw-bars { display: flex; gap: 4px; }
.pw-bars i { width: 34px; height: 3px; border-radius: 99px; background: var(--panel-4); transition: background 0.25s; }
.pw-meter span { font-size: 11px; color: var(--text-3); }
.pw-meter[data-score="1"] .pw-bars i:nth-child(1) { background: var(--danger); }
.pw-meter[data-score="2"] .pw-bars i:nth-child(-n + 2) { background: var(--warn); }
.pw-meter[data-score="3"] .pw-bars i:nth-child(-n + 3) { background: #a3e635; }
.pw-meter[data-score="4"] .pw-bars i { background: var(--ok); }

.pending-icon {
  width: 62px;
  height: 62px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent-strong);
  margin-bottom: 20px;
  border: 1px solid var(--accent-ring);
  box-shadow: var(--glow);
}
.pending-icon svg { width: 30px; height: 30px; }
#auth-pane-pending h2 { font-size: 25px; letter-spacing: -0.03em; margin-bottom: 8px; }
#auth-pane-pending > p { color: var(--text-2); font-size: 14px; line-height: 1.6; }
.pending-steps { display: flex; flex-direction: column; gap: 12px; margin: 24px 0 26px; }
.pending-steps div { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--text-2); }
.pending-steps span {
  width: 24px; height: 24px; flex: none;
  border-radius: 50%;
  background: var(--panel-3);
  border: 1px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 750; color: var(--text-2);
}

/* ============================================================
   Layout de la app
   ============================================================ */
.app-shell { min-height: 100vh; }

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: var(--player-h);
  width: var(--sidebar-w);
  padding: 22px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: var(--bg-soft);
  border-right: 1px solid var(--line);
  z-index: 30;
  overflow: hidden;
}
html[data-theme="dark"] .sidebar {
  background: linear-gradient(180deg, #0b0d15 0%, #090b12 100%);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 10px 0;
  height: 40px;
  flex: none;
}
.brand-word { font-weight: 850; letter-spacing: 0.24em; font-size: 14px; }

.nav { display: flex; flex-direction: column; gap: 3px; flex: none; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 11px;
  border-radius: 10px;
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 570;
  border: 1px solid transparent;
  transition: 0.16s var(--ease);
  position: relative;
}
.nav-item svg { width: 19px; height: 19px; opacity: 0.85; }
.nav-item:hover { color: var(--text); background: var(--panel-2); }
.nav-item.active {
  color: var(--text);
  background: linear-gradient(90deg, var(--accent-soft), transparent 85%);
  border-color: var(--line);
}
.nav-item.active::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 20%;
  bottom: 20%;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, var(--accent-strong), var(--cyan));
  box-shadow: 0 0 12px var(--accent);
}
.nav-item.active svg { color: var(--accent-strong); opacity: 1; }

.nav-section {
  margin: 16px 11px 6px;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
}

.sidebar-lists {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 2px;
}
.sidebar-lists-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  flex: none;
}
.mini-btn {
  width: 24px; height: 24px;
  border-radius: 7px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-3);
}
.mini-btn:hover { color: var(--text); background: var(--panel-3); }
.mini-btn svg { width: 14px; height: 14px; }

.sidebar-playlist-list { overflow-y: auto; display: flex; flex-direction: column; gap: 1px; padding-right: 2px; margin-right: -4px; }
.sidebar-playlist {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border-radius: 9px;
  font-size: 12.8px;
  color: var(--text-2);
  transition: 0.15s;
  min-width: 0;
}
.sidebar-playlist:hover { background: var(--panel-2); color: var(--text); }
.sidebar-playlist.active { background: var(--panel-3); color: var(--text); }
.sidebar-playlist .sp-cover {
  width: 26px; height: 26px;
  border-radius: 6px;
  flex: none;
  background: linear-gradient(135deg, var(--panel-3), var(--panel-4));
  display: flex; align-items: center; justify-content: center;
  color: var(--text-3);
}
.sidebar-playlist .sp-cover svg { width: 13px; height: 13px; }
.sidebar-playlist span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-empty { padding: 8px 10px; font-size: 12px; color: var(--text-3); line-height: 1.5; }

.sidebar-user { position: relative; flex: none; border-top: 1px solid var(--line); padding-top: 10px; }
.sidebar-user-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 8px;
  border-radius: 11px;
  text-align: left;
  transition: 0.15s;
}
.sidebar-user-btn:hover { background: var(--panel-2); }
.sidebar-user-meta { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.sidebar-user-meta strong { font-size: 12.8px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user-meta small { font-size: 10.5px; color: var(--text-3); text-transform: capitalize; }
.sidebar-user-btn .chev { width: 15px; height: 15px; color: var(--text-3); }

.user-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 6px;
  right: 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 5px;
  box-shadow: var(--shadow-pop);
  z-index: 50;
  animation: menu-in 0.16s var(--ease);
}
.user-menu a,
.user-menu button {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 9px 11px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-2);
  text-align: left;
  transition: 0.14s;
}
.user-menu a:hover,
.user-menu button:hover { background: var(--panel-3); color: var(--text); }
.user-menu button[data-action="logout"] { color: var(--danger); }
@keyframes menu-in { from { opacity: 0; transform: translateY(6px); } }

.sidebar-scrim {
  position: fixed;
  inset: 0;
  background: rgba(4, 5, 10, 0.6);
  backdrop-filter: blur(2px);
  z-index: 25;
}

.main {
  margin-left: var(--sidebar-w);
  padding-bottom: calc(var(--player-h) + 28px);
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 clamp(18px, 3vw, 38px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(18px) saturate(1.3);
  border-bottom: 1px solid var(--line);
}
.menu-btn { display: none; }
.page-heading { min-width: 0; flex: none; }
.page-eyebrow { font-size: 10.5px; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase; color: var(--text-3); }
.page-title { font-size: 19px; font-weight: 760; letter-spacing: -0.025em; margin-top: 1px; }

.searchbar {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1;
  max-width: 460px;
  height: 40px;
  padding: 0 12px;
  border-radius: 11px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text-3);
  transition: 0.18s;
  margin-left: auto;
}
.searchbar:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); background: var(--panel); }
.searchbar svg { width: 17px; height: 17px; }
.searchbar input { flex: 1; min-width: 0; background: none; border: 0; outline: none; font-size: 13px; color: var(--text); }
.searchbar input::-webkit-search-cancel-button { display: none; }
.searchbar input::placeholder { color: var(--text-3); }
.searchbar kbd {
  font-family: inherit;
  font-size: 10px;
  color: var(--text-3);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 2px 5px;
  background: var(--panel);
}

.topbar-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.avatar-top { cursor: pointer; border: 0; }

.view {
  padding: 26px clamp(18px, 3vw, 38px) 40px;
  max-width: 1560px;
  margin: 0 auto;
  outline: none;
  animation: view-in 0.32s var(--ease);
}
@keyframes view-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ============================================================
   Reproductor
   ============================================================ */
.player {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--player-h);
  z-index: 40;
  display: grid;
  grid-template-columns: minmax(200px, 1fr) minmax(320px, 1.55fr) minmax(170px, 1fr);
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  background: color-mix(in srgb, var(--bg-soft) 88%, transparent);
  backdrop-filter: blur(22px) saturate(1.4);
  border-top: 1px solid var(--line);
  box-shadow: 0 -20px 50px -30px rgba(0, 0, 0, 0.6);
}
html[data-theme="dark"] .player {
  background: linear-gradient(180deg, rgba(10, 12, 20, 0.72), rgba(8, 9, 15, 0.94));
  backdrop-filter: blur(26px) saturate(1.6);
}
html[data-theme="light"] .player {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.96));
  backdrop-filter: blur(26px) saturate(1.4);
}

.player-track { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cover-player { width: 56px; height: 56px; border-radius: 10px; flex: none; }
.player-cover-slot {
  width: 56px;
  height: 56px;
  flex: none;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(145deg, var(--panel-3), var(--panel-2));
  border: 1px solid var(--line);
  position: relative;
}
.player-cover-slot .cover { width: 100%; height: 100%; border-radius: 0; aspect-ratio: auto; }
.player-cover-slot .cover-note { width: 42%; height: 42%; opacity: 0.25; }
.player-meta { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.player-meta strong { font-size: 13.2px; font-weight: 640; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-meta span { font-size: 11.8px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-fav { width: 34px; height: 34px; }
.player-fav.active { color: var(--danger); }
.player-fav.active svg { fill: currentColor; }
.player-fav.disabled { opacity: 0.35; }

.player-center { display: flex; flex-direction: column; align-items: center; gap: 7px; min-width: 0; }
.player-controls { display: flex; align-items: center; gap: 4px; }
.control-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  transition: 0.16s;
}
.control-btn svg { width: 18px; height: 18px; }
.control-btn:hover { color: var(--text); background: var(--panel-3); }
.control-btn.subtle { color: var(--text-3); }
.control-btn.subtle[aria-pressed="true"] { color: var(--accent-strong); }
.control-btn.subtle[aria-pressed="true"]::after {
  content: "";
  position: absolute;
  margin-top: 30px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--accent-strong);
}
.repeat-one-badge {
  position: absolute;
  font-size: 8px;
  font-weight: 800;
  margin: 12px 0 0 13px;
  color: var(--accent-strong);
}
.play-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(140deg, #a78bfa, #7c5cff 55%, #6366f1);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 6px;
  transition: 0.18s var(--ease);
  box-shadow: 0 10px 26px -12px rgba(139, 92, 246, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.play-btn:hover { transform: scale(1.055); }
.play-btn:active { transform: scale(0.97); }
.play-btn svg { width: 19px; height: 19px; margin-left: 1px; }
.play-btn .i-pause { margin-left: 0; }
.play-btn .spinner { position: absolute; }

.player-progress { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 560px; }
.time { font-size: 10.5px; font-variant-numeric: tabular-nums; color: var(--text-3); width: 34px; text-align: center; flex: none; }

.progress {
  position: relative;
  flex: 1;
  height: 18px;
  display: flex;
  align-items: center;
  cursor: pointer;
  touch-action: none;
}
.progress-rail {
  width: 100%;
  height: 4px;
  border-radius: 99px;
  background: var(--panel-4);
  overflow: hidden;
  transition: height 0.15s;
}
.progress-fill {
  width: 0%;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent-strong), var(--cyan));
  transition: width 0.12s linear;
}
.progress:hover .progress-rail { height: 6px; }
.progress-knob {
  position: absolute;
  left: 0%;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--accent-strong);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  transform: translateX(-50%) scale(0);
  transition: transform 0.15s var(--ease);
  pointer-events: none;
}
.progress:hover .progress-knob,
.progress:focus-visible .progress-knob { transform: translateX(-50%) scale(1); }
.progress.dragging .progress-fill { transition: none; }
.progress.disabled { opacity: 0.5; pointer-events: none; }

.player-right { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.volume { display: flex; align-items: center; gap: 6px; }
.volume input[type="range"] {
  width: 92px;
  height: 4px;
  appearance: none;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent-strong) var(--vol, 85%), var(--panel-4) var(--vol, 85%));
  outline: none;
  cursor: pointer;
}
.volume input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--accent-strong);
}
.volume input[type="range"]::-moz-range-thumb {
  width: 9px;
  height: 9px;
  border: 2px solid var(--accent-strong);
  border-radius: 50%;
  background: #fff;
}

/* Cola */
.queue-drawer {
  position: fixed;
  right: 14px;
  bottom: calc(var(--player-h) + 12px);
  width: 336px;
  max-height: min(520px, 62vh);
  background: var(--bg-elevated);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-pop);
  z-index: 45;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: drawer-in 0.26s var(--ease);
}
@keyframes drawer-in { from { opacity: 0; transform: translateY(14px) scale(0.98); } }
.queue-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 16px 16px 10px; border-bottom: 1px solid var(--line); }
.queue-head h2 { font-size: 15px; letter-spacing: -0.02em; margin-top: 2px; }
.queue-list { overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.queue-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border-radius: 9px;
  font-size: 12.5px;
  text-align: left;
  width: 100%;
  color: var(--text-2);
}
.queue-item:hover { background: var(--panel-2); }
.queue-item.current { background: var(--accent-soft); color: var(--text); }
.queue-item .cover { width: 34px; height: 34px; border-radius: 6px; flex: none; }
.queue-item-meta { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.queue-item-meta strong { font-weight: 600; font-size: 12.3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.queue-item-meta span { font-size: 10.8px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.queue-empty { padding: 26px 16px 30px; text-align: center; color: var(--text-3); font-size: 12.5px; }
