/* ==========================================================
   Radio PC — Estilos de acceso
   ========================================================== */
:root {
  --bg: #0a0d16;
  --bg-2: #111626;
  --surface: #151b2e;
  --surface-2: #1c2440;
  --border: #2a3354;
  --text: #eef1fa;
  --muted: #9aa3c0;
  --accent: #ff5a36;
  --accent-2: #ffb03a;
  --accent-soft: rgba(255, 90, 54, 0.14);
  --ok: #2fd18b;
  --error: #ff5d73;
  --radius: 14px;
  --radius-sm: 10px;
  --font-head: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Layout dividido ---------- */
.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
}

/* Panel de marca */
.brand {
  position: relative;
  overflow: hidden;
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    radial-gradient(900px 500px at -10% 110%, rgba(255, 90, 54, 0.35), transparent 60%),
    radial-gradient(700px 400px at 110% -10%, rgba(255, 176, 58, 0.18), transparent 60%),
    var(--bg-2);
  border-right: 1px solid var(--border);
}
.brand::after { /* líneas de onda */
  content: '';
  position: absolute; inset: 0;
  background-image: repeating-radial-gradient(circle at 0% 100%, transparent 0 38px, rgba(255,255,255,0.035) 39px 40px);
  pointer-events: none;
}
.logo { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; color: inherit; align-self: flex-start; }
a.logo:hover { text-decoration: none; }
.logo-mark {
  width: 44px; height: 44px; border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid; place-items: center;
  box-shadow: 0 8px 24px rgba(255, 90, 54, 0.35);
}
.logo-mark svg { width: 24px; height: 24px; }
.logo-text { font-family: var(--font-head); font-weight: 700; font-size: 1.35rem; letter-spacing: -0.02em; }
.logo-text span { color: var(--accent); }

.brand-copy { position: relative; z-index: 1; max-width: 460px; }
.on-air {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.18em;
  color: var(--accent);
  border: 1px solid rgba(255, 90, 54, 0.45);
  background: var(--accent-soft);
  padding: 6px 12px; border-radius: 999px; margin-bottom: 22px;
}
.on-air i {
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; box-shadow: 0 0 0 0 rgba(255,90,54,.6);} 50% { opacity: .5; box-shadow: 0 0 0 6px rgba(255,90,54,0);} }

.brand h1 {
  font-family: var(--font-head);
  font-size: clamp(2rem, 3.4vw, 3rem);
  line-height: 1.08; letter-spacing: -0.03em; margin-bottom: 16px;
}
.brand h1 em { font-style: normal; background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand p.lead { color: var(--muted); font-size: 1.02rem; max-width: 420px; }

.features { list-style: none; margin-top: 28px; display: grid; gap: 12px; }
.features li { display: flex; gap: 12px; align-items: center; color: #cfd5ea; font-size: 0.95rem; }
.features li b {
  width: 30px; height: 30px; border-radius: 8px; flex: none;
  display: grid; place-items: center; font-size: 0.95rem;
  background: var(--surface-2); border: 1px solid var(--border);
}

/* Ecualizador animado */
.eq { display: flex; align-items: flex-end; gap: 6px; height: 64px; position: relative; z-index: 1; }
.eq span {
  width: 8px; border-radius: 4px 4px 2px 2px;
  background: linear-gradient(to top, var(--accent), var(--accent-2));
  animation: eq 1.1s ease-in-out infinite;
  opacity: 0.9;
}
@keyframes eq { 0%,100% { height: 18%; } 50% { height: 100%; } }
.brand-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; position: relative; z-index: 1; }
.brand-foot small { color: var(--muted); font-size: 0.8rem; }

/* ---------- Panel del formulario ---------- */
.form-side {
  display: grid; place-items: center;
  padding: 48px 24px;
}
.card { width: 100%; max-width: 420px; }
.card h2 { font-family: var(--font-head); font-size: 1.85rem; letter-spacing: -0.02em; margin-bottom: 6px; }
.card .sub { color: var(--muted); margin-bottom: 28px; }

.field { margin-bottom: 18px; }
.field label { display: block; font-size: 0.86rem; font-weight: 600; margin-bottom: 7px; color: #d7dcee; }
.input-wrap { position: relative; }
.input-wrap svg.ico {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: var(--muted); pointer-events: none;
}
.field input[type='text'],
.field input[type='email'],
.field input[type='password'] {
  width: 100%;
  font: inherit; color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 44px 13px 42px;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.field input::placeholder { color: #6a7396; }
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); background: var(--surface-2); }
.field.invalid input { border-color: var(--error); box-shadow: 0 0 0 4px rgba(255, 93, 115, 0.12); }
.field .hint { font-size: 0.8rem; color: var(--muted); margin-top: 6px; }
.field .err { font-size: 0.8rem; color: var(--error); margin-top: 6px; display: none; }
.field.invalid .err { display: block; }

.toggle-pw {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; color: var(--muted); cursor: pointer;
  width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center;
}
.toggle-pw:hover { color: var(--text); background: var(--surface-2); }
.toggle-pw svg { width: 18px; height: 18px; }

.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 24px; font-size: 0.9rem; }
.check { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; color: #cfd5ea; user-select: none; }
.check input { width: 17px; height: 17px; accent-color: var(--accent); }

/* Medidor de fuerza */
.strength { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-top: 9px; }
.strength i { height: 4px; border-radius: 2px; background: var(--border); transition: background .2s; }
.strength[data-level='1'] i:nth-child(-n+1) { background: var(--error); }
.strength[data-level='2'] i:nth-child(-n+2) { background: var(--accent-2); }
.strength[data-level='3'] i:nth-child(-n+3) { background: #b5d33a; }
.strength[data-level='4'] i { background: var(--ok); }

/* Botones */
.btn {
  width: 100%;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: 600 1rem var(--font-body);
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #ff7a3a);
  border: 0; border-radius: var(--radius-sm);
  padding: 14px 18px; cursor: pointer;
  box-shadow: 0 10px 26px rgba(255, 90, 54, 0.28);
  transition: transform .12s, box-shadow .12s, filter .12s;
}
.btn:hover { filter: brightness(1.06); box-shadow: 0 12px 30px rgba(255, 90, 54, 0.38); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .65; cursor: progress; }
.btn .spinner { display: none; width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.btn.loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn-ghost { background: var(--surface); box-shadow: none; border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); box-shadow: none; }

.alt { text-align: center; margin-top: 26px; color: var(--muted); font-size: 0.92rem; }

/* Alertas */
.alert {
  display: none; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: var(--radius-sm);
  font-size: 0.9rem; margin-bottom: 20px; border: 1px solid;
}
.alert.show { display: flex; }
.alert.error { color: #ffd2d9; background: rgba(255, 93, 115, 0.1); border-color: rgba(255, 93, 115, 0.4); }
.alert.success { color: #c9f7e2; background: rgba(47, 209, 139, 0.1); border-color: rgba(47, 209, 139, 0.4); }
.alert.info { color: #ffe3b8; background: rgba(255, 176, 58, 0.1); border-color: rgba(255, 176, 58, 0.4); }

.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 0.9rem; margin-bottom: 28px; }
.back:hover { color: var(--text); text-decoration: none; }
.icon-badge {
  width: 56px; height: 56px; border-radius: 16px; margin-bottom: 20px;
  display: grid; place-items: center;
  background: var(--accent-soft); border: 1px solid rgba(255,90,54,.35); color: var(--accent);
}
.icon-badge svg { width: 26px; height: 26px; }
.hidden { display: none !important; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .brand { padding: 28px 20px; border-right: 0; border-bottom: 1px solid var(--border); gap: 22px; }
  .brand-copy .features, .brand-foot small, .brand p.lead { display: none; }
  .brand h1 { font-size: 1.6rem; margin-bottom: 0; }
  .on-air { margin-bottom: 12px; }
  .eq { height: 34px; }
  .form-side { padding: 32px 16px 48px; place-items: start center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
