/**
 * PromoFlow Auth — matches creator portal music theme
 * Tokens aligned with creator-shell + creator-music-theme
 */

/* ── Shared portal tokens (same as creator) ───────────────── */
html[data-theme="light"],
html:not([data-theme]) {
  --cs-bg: #f4f7fb;
  --cs-surface: #ffffff;
  --cs-surface-2: #eef3f9;
  --cs-border: rgba(15, 40, 80, 0.1);
  --cs-text: #0f172a;
  --cs-muted: #64748b;
  --cs-blue: #2563eb;
  --cs-cyan: #0ea5e9;
  --cs-violet: #7c3aed;
  --cs-magenta: #c026d3;
  --cs-grad: linear-gradient(135deg, #7c3aed 0%, #2563eb 48%, #0ea5e9 100%);
  --cs-grad-soft: linear-gradient(135deg, rgba(124, 58, 237, 0.12), rgba(14, 165, 233, 0.08));
  --cs-glow: rgba(124, 58, 237, 0.28);
  --cs-shadow: 0 1px 2px rgba(15, 40, 80, 0.04), 0 12px 32px rgba(37, 99, 235, 0.08);
  --cs-shadow-lg: 0 8px 16px rgba(15, 40, 80, 0.06), 0 24px 56px rgba(124, 58, 237, 0.12);
  --cs-font: "Inter", "Instrument Sans", system-ui, -apple-system, sans-serif;
  --cs-display: "Bricolage Grotesque", "Inter", sans-serif;
  --cs-ease: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --auth-header-bg: rgba(255, 255, 255, 0.82);
  --auth-panel-bg: linear-gradient(160deg, #0f172a 0%, #1e1b4b 42%, #0c4a6e 100%);
  --auth-input-bg: #f8fafc;
  --auth-input-border: rgba(15, 40, 80, 0.12);
  --auth-theme-color: #f4f7fb;
  color-scheme: light;
}

html[data-theme="dark"] {
  --cs-bg: #070b12;
  --cs-surface: #0f1624;
  --cs-surface-2: #152033;
  --cs-border: rgba(96, 165, 250, 0.12);
  --cs-text: #e8eef8;
  --cs-muted: #8b9cb3;
  --cs-blue: #818cf8;
  --cs-cyan: #22d3ee;
  --cs-violet: #a78bfa;
  --cs-magenta: #e879f9;
  --cs-grad: linear-gradient(135deg, #8b5cf6 0%, #3b82f6 50%, #22d3ee 100%);
  --cs-grad-soft: linear-gradient(135deg, rgba(139, 92, 246, 0.18), rgba(34, 211, 238, 0.1));
  --cs-glow: rgba(139, 92, 246, 0.4);
  --cs-shadow: 0 4px 6px rgba(0, 0, 0, 0.25), 0 16px 40px rgba(0, 0, 0, 0.35);
  --cs-shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(139, 92, 246, 0.1);
  --auth-header-bg: rgba(10, 16, 28, 0.88);
  --auth-panel-bg: linear-gradient(160deg, #0a101c 0%, #1a1040 45%, #0c2a3e 100%);
  --auth-input-bg: rgba(255, 255, 255, 0.04);
  --auth-input-border: rgba(148, 163, 184, 0.16);
  --auth-theme-color: #070b12;
  color-scheme: dark;
}

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

html {
  height: 100%;
}

body.auth-body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--cs-font);
  color: var(--cs-text);
  background: var(--cs-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background var(--cs-ease), color var(--cs-ease);
}

/* ── Ambient music backdrop ───────────────────────────────── */
.auth-ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(ellipse 90% 60% at 0% -10%, rgba(124, 58, 237, 0.1), transparent 50%),
    radial-gradient(ellipse 70% 50% at 100% 0%, rgba(14, 165, 233, 0.08), transparent 45%),
    radial-gradient(ellipse 50% 40% at 50% 100%, rgba(37, 99, 235, 0.05), transparent 50%),
    var(--cs-bg);
}
html[data-theme="dark"] .auth-ambient {
  background:
    radial-gradient(ellipse 90% 60% at 0% -10%, rgba(139, 92, 246, 0.16), transparent 50%),
    radial-gradient(ellipse 70% 50% at 100% 0%, rgba(34, 211, 238, 0.1), transparent 45%),
    radial-gradient(ellipse 50% 40% at 50% 100%, rgba(59, 130, 246, 0.08), transparent 50%),
    var(--cs-bg);
}

/* Soft waveform lines */
.auth-ambient::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.5;
  background: repeating-linear-gradient(
    90deg,
    transparent 0,
    transparent 22px,
    rgba(124, 58, 237, 0.04) 22px,
    rgba(124, 58, 237, 0.04) 24px
  );
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 10%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 10%, transparent 70%);
}
html[data-theme="dark"] .auth-ambient::before {
  background: repeating-linear-gradient(
    90deg,
    transparent 0,
    transparent 22px,
    rgba(167, 139, 250, 0.05) 22px,
    rgba(167, 139, 250, 0.05) 24px
  );
}

.auth-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  opacity: 0.55;
  animation: authFloat 16s ease-in-out infinite;
}
.auth-blob.b1 {
  width: 24rem;
  height: 24rem;
  top: -8rem;
  left: -6rem;
  background: rgba(124, 58, 237, 0.22);
}
.auth-blob.b2 {
  width: 28rem;
  height: 28rem;
  bottom: -10rem;
  right: -8rem;
  background: rgba(14, 165, 233, 0.16);
  animation-delay: -6s;
}
.auth-blob.b3 {
  width: 14rem;
  height: 14rem;
  top: 42%;
  left: 48%;
  background: rgba(37, 99, 235, 0.12);
  animation-delay: -11s;
}
html[data-theme="dark"] .auth-blob.b1 { background: rgba(139, 92, 246, 0.28); }
html[data-theme="dark"] .auth-blob.b2 { background: rgba(34, 211, 238, 0.14); }

@keyframes authFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(14px, -20px) scale(1.06); }
}

/* ── Header ───────────────────────────────────────────────── */
.auth-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: 4rem;
  display: flex;
  align-items: center;
  background: var(--auth-header-bg);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border-bottom: 1px solid var(--cs-border);
  transition: background var(--cs-ease), border-color var(--cs-ease);
}

.auth-header-inner {
  width: 100%;
  max-width: 68rem;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.auth-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--cs-text);
}

.auth-logo-mark {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--cs-grad);
  color: #fff;
  box-shadow: 0 8px 22px var(--cs-glow), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.auth-logo:hover .auth-logo-mark {
  transform: translateY(-1px) scale(1.04);
  box-shadow: 0 12px 28px var(--cs-glow);
}
.auth-logo-mark svg {
  width: 1.1rem;
  height: 1.1rem;
}

.auth-logo-text {
  font-family: var(--cs-display);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
  line-height: 1;
}
.auth-logo-text span {
  background: var(--cs-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-header-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

/* Theme toggle — pill like creator shell */
.auth-theme {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem;
  border-radius: 999px;
  border: 1px solid var(--cs-border);
  background: var(--cs-surface-2);
  gap: 0.1rem;
}

.auth-theme-btn {
  width: 2.05rem;
  height: 2.05rem;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--cs-muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.auth-theme-btn svg {
  width: 1rem;
  height: 1rem;
}
.auth-theme-btn:hover {
  color: var(--cs-text);
}
.auth-theme-btn.is-active {
  background: var(--cs-surface);
  color: var(--cs-violet);
  box-shadow: 0 2px 8px rgba(15, 40, 80, 0.08);
}
html[data-theme="dark"] .auth-theme-btn.is-active {
  background: rgba(139, 92, 246, 0.2);
  color: #c4b5fd;
  box-shadow: 0 0 0 1px rgba(167, 139, 250, 0.25);
}

.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.95rem;
  border-radius: 12px;
  border: 1px solid var(--cs-border);
  background: var(--cs-surface);
  color: var(--cs-text);
  font-family: var(--cs-font);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  box-shadow: var(--cs-shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.auth-back:hover {
  transform: translateY(-1px);
  border-color: rgba(124, 58, 237, 0.28);
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.12);
}
.auth-back svg {
  width: 0.95rem;
  height: 0.95rem;
  color: var(--cs-violet);
}
@media (max-width: 480px) {
  .auth-back span.auth-back-full { display: none; }
}

/* ── Main ─────────────────────────────────────────────────── */
.auth-main {
  position: relative;
  z-index: 1;
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6rem 1rem 2.25rem;
}

.auth-shell {
  width: 100%;
  max-width: 54rem;
  display: grid;
  grid-template-columns: 1fr;
  border-radius: 1.35rem;
  border: 1px solid var(--cs-border);
  background: var(--cs-surface);
  box-shadow: var(--cs-shadow-lg);
  overflow: hidden;
  transition: background var(--cs-ease), border-color var(--cs-ease), box-shadow var(--cs-ease);
}
@media (min-width: 860px) {
  .auth-shell {
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.12fr);
  }
}

/* ── Left brand panel ─────────────────────────────────────── */
.auth-panel {
  position: relative;
  padding: 1.5rem 1.35rem 1.35rem;
  background: var(--auth-panel-bg);
  color: #e8eef8;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.15rem;
  overflow: hidden;
  min-height: 0;
}
@media (min-width: 860px) {
  .auth-panel {
    padding: 2rem 1.75rem 1.65rem;
    min-height: 36rem;
  }
}

.auth-panel-glow {
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(52px);
}
.auth-panel-glow.g1 {
  width: 16rem;
  height: 16rem;
  top: -4rem;
  left: -3rem;
  background: rgba(124, 58, 237, 0.45);
}
.auth-panel-glow.g2 {
  width: 14rem;
  height: 14rem;
  bottom: -3rem;
  right: -3rem;
  background: rgba(14, 165, 233, 0.35);
}

/* Equalizer decoration */
.auth-eq {
  position: absolute;
  right: 1.25rem;
  bottom: 1.35rem;
  display: none;
  align-items: flex-end;
  gap: 4px;
  height: 2.5rem;
  opacity: 0.35;
  pointer-events: none;
}
@media (min-width: 860px) {
  .auth-eq { display: flex; }
}
.auth-eq span {
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, #a78bfa, #22d3ee);
  animation: authEq 1.2s ease-in-out infinite;
}
.auth-eq span:nth-child(1) { height: 35%; animation-delay: 0s; }
.auth-eq span:nth-child(2) { height: 70%; animation-delay: 0.15s; }
.auth-eq span:nth-child(3) { height: 100%; animation-delay: 0.3s; }
.auth-eq span:nth-child(4) { height: 55%; animation-delay: 0.45s; }
.auth-eq span:nth-child(5) { height: 80%; animation-delay: 0.6s; }
.auth-eq span:nth-child(6) { height: 40%; animation-delay: 0.2s; }
@keyframes authEq {
  0%, 100% { transform: scaleY(0.55); }
  50% { transform: scaleY(1); }
}

.auth-panel-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  width: fit-content;
  padding: 0.38rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 0.9rem;
  backdrop-filter: blur(8px);
}
.auth-panel-badge svg {
  width: 0.85rem;
  height: 0.85rem;
  color: #a78bfa;
}

.auth-panel h1 {
  position: relative;
  margin: 0 0 0.7rem;
  font-family: var(--cs-display);
  font-size: clamp(1.7rem, 3.4vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.12;
  color: #fff;
}
.auth-panel h1 em {
  font-style: normal;
  background: linear-gradient(90deg, #c4b5fd, #67e8f9);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-panel-lead {
  position: relative;
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.55;
  color: rgba(226, 232, 240, 0.72);
  font-weight: 500;
  max-width: 18rem;
}

.auth-stats {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: 1.3rem;
}
@media (max-width: 859px) {
  .auth-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 1rem;
  }
}
@media (max-width: 520px) {
  .auth-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auth-panel-lead { display: none; }
}

.auth-stat {
  padding: 0.8rem 0.75rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  transition: transform 0.15s ease, background 0.15s ease;
}
.auth-stat:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.11);
}
.auth-stat b {
  display: block;
  font-family: var(--cs-display);
  font-size: clamp(1.05rem, 2.4vw, 1.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  background: linear-gradient(90deg, #fff, #c4b5fd);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.auth-stat.pink b {
  background: linear-gradient(90deg, #f0abfc, #a78bfa);
  -webkit-background-clip: text;
  background-clip: text;
}
.auth-stat.green b {
  background: linear-gradient(90deg, #67e8f9, #34d399);
  -webkit-background-clip: text;
  background-clip: text;
}
.auth-stat.lilac b {
  background: linear-gradient(90deg, #c4b5fd, #818cf8);
  -webkit-background-clip: text;
  background-clip: text;
}
.auth-stat span {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.55);
}

.auth-panel-features {
  position: relative;
  display: none;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: auto;
  padding-top: 1rem;
}
@media (min-width: 860px) {
  .auth-panel-features { display: flex; }
}

.auth-feat {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.78);
}
.auth-feat-ico {
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: rgba(124, 58, 237, 0.25);
  border: 1px solid rgba(167, 139, 250, 0.25);
  color: #c4b5fd;
  flex-shrink: 0;
}
.auth-feat-ico svg {
  width: 0.9rem;
  height: 0.9rem;
}

.auth-panel-foot {
  position: relative;
  margin: 0.75rem 0 0;
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(148, 163, 184, 0.85);
  display: none;
}
@media (min-width: 860px) {
  .auth-panel-foot { display: block; }
}

/* ── Right form panel ─────────────────────────────────────── */
.auth-form-panel {
  padding: 1.4rem 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--cs-surface);
  min-width: 0;
}
@media (min-width: 860px) {
  .auth-form-panel {
    padding: 2rem 2.15rem 2rem;
  }
}

/* Tabs */
.auth-tabs {
  position: relative;
  display: flex;
  padding: 0.28rem;
  margin-bottom: 1.35rem;
  border-radius: 14px;
  border: 1px solid var(--cs-border);
  background: var(--cs-surface-2);
}

.auth-tab-indicator {
  position: absolute;
  top: 0.28rem;
  bottom: 0.28rem;
  left: 0.28rem;
  width: calc(50% - 0.28rem);
  border-radius: 11px;
  background: var(--cs-grad);
  box-shadow: 0 6px 16px var(--cs-glow);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 0;
}

.auth-tab {
  position: relative;
  z-index: 1;
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.72rem 0.5rem;
  border-radius: 11px;
  font-family: var(--cs-font);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--cs-muted);
  cursor: pointer;
  transition: color 0.2s ease;
}
.auth-tab.is-active {
  color: #fff;
}
.auth-tab:not(.is-active):hover {
  color: var(--cs-text);
}

/* Forms */
.auth-form {
  display: none;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.28s ease, transform 0.28s ease;
}
.auth-form.active {
  display: block;
  opacity: 1;
  transform: none;
}

.auth-form-head {
  margin-bottom: 1.2rem;
}
.auth-form-head h2 {
  margin: 0 0 0.3rem;
  font-family: var(--cs-display);
  font-size: clamp(1.3rem, 2.5vw, 1.55rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--cs-text);
}
.auth-form-head p {
  margin: 0;
  font-size: 0.84rem;
  color: var(--cs-muted);
  font-weight: 500;
  line-height: 1.45;
}

.auth-field {
  margin-bottom: 0.95rem;
}
.auth-field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}
.auth-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--cs-muted);
  margin-bottom: 0.4rem;
}
.auth-field-row .auth-label {
  margin-bottom: 0;
}

.auth-link-btn {
  border: none;
  background: none;
  padding: 0;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--cs-violet);
  cursor: pointer;
  font-family: inherit;
}
.auth-link-btn:hover {
  text-decoration: underline;
  color: var(--cs-blue);
}

.auth-input-wrap {
  position: relative;
}
.auth-input-wrap > .auth-ico {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--cs-muted);
  pointer-events: none;
  display: grid;
  place-items: center;
  transition: color 0.15s ease;
}
.auth-input-wrap > .auth-ico svg {
  width: 1.05rem;
  height: 1.05rem;
}
.auth-input-wrap:focus-within > .auth-ico {
  color: var(--cs-violet);
}

.auth-input {
  width: 100%;
  appearance: none;
  border: 1.5px solid var(--auth-input-border);
  background: var(--auth-input-bg);
  color: var(--cs-text);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  font-family: var(--cs-font);
  font-size: 0.9rem;
  font-weight: 500;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  outline: none;
}
.auth-input-wrap .auth-input {
  padding-left: 2.65rem;
}
.auth-input-wrap.has-toggle .auth-input {
  padding-right: 2.75rem;
}
.auth-input::placeholder {
  color: var(--cs-muted);
  opacity: 0.65;
  font-weight: 500;
}
.auth-input:hover {
  border-color: rgba(124, 58, 237, 0.28);
}
.auth-input:focus {
  border-color: rgba(124, 58, 237, 0.55);
  background: var(--cs-surface);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}
html[data-theme="dark"] .auth-input:focus {
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.18);
}

.auth-pass-toggle {
  position: absolute;
  right: 0.4rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2.15rem;
  height: 2.15rem;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--cs-muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: color 0.15s, background 0.15s;
}
.auth-pass-toggle:hover {
  color: var(--cs-text);
  background: var(--cs-surface-2);
}
.auth-pass-toggle svg {
  width: 1.05rem;
  height: 1.05rem;
}

.auth-hint {
  margin: 0.4rem 0 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: #059669;
}
html[data-theme="dark"] .auth-hint {
  color: #34d399;
}
.auth-optional {
  font-weight: 500;
  color: var(--cs-muted);
  opacity: 0.85;
}

/* Role picker */
.auth-roles {
  display: flex;
  gap: 0.4rem;
  padding: 0.28rem;
  margin-bottom: 1.05rem;
  border-radius: 14px;
  border: 1px solid var(--cs-border);
  background: var(--cs-surface-2);
}
.auth-role {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.7rem 0.4rem;
  border-radius: 11px;
  font-family: var(--cs-font);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--cs-muted);
  cursor: pointer;
  transition: all 0.18s ease;
}
.auth-role.is-active-creator {
  background: linear-gradient(135deg, #059669, #0ea5e9);
  color: #fff;
  box-shadow: 0 6px 16px rgba(5, 150, 105, 0.28);
}
.auth-role.is-active-brand {
  background: var(--cs-grad);
  color: #fff;
  box-shadow: 0 6px 16px var(--cs-glow);
}

.auth-grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}
@media (min-width: 480px) {
  .auth-grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}

/* Primary buttons — music gradient */
.auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  margin-top: 0.4rem;
  padding: 0.95rem 1.1rem;
  border-radius: 12px;
  border: none;
  font-family: var(--cs-font);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  color: #fff;
  background: var(--cs-grad);
  box-shadow: 0 8px 22px var(--cs-glow);
}
.auth-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow: 0 12px 28px var(--cs-glow);
}
.auth-btn:active {
  transform: translateY(0);
  filter: brightness(0.98);
}
.auth-btn-green {
  background: linear-gradient(135deg, #059669 0%, #0ea5e9 100%);
  box-shadow: 0 8px 22px rgba(5, 150, 105, 0.28);
}
.auth-btn-green:hover {
  box-shadow: 0 12px 28px rgba(5, 150, 105, 0.35);
}
.auth-btn-pink {
  /* brand primary = music grad */
  background: var(--cs-grad);
}
.auth-btn-dark {
  background: var(--cs-text);
  color: var(--cs-bg);
  box-shadow: 0 8px 20px rgba(15, 40, 80, 0.15);
}
html[data-theme="dark"] .auth-btn-dark {
  background: #e8eef8;
  color: #0a0f18;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}

.auth-back-mini {
  width: 2.2rem;
  height: 2.2rem;
  display: grid;
  place-items: center;
  border-radius: 11px;
  border: 1px solid var(--cs-border);
  background: var(--cs-surface-2);
  color: var(--cs-muted);
  cursor: pointer;
  margin-bottom: 0.9rem;
  transition: all 0.15s ease;
}
.auth-back-mini:hover {
  color: var(--cs-violet);
  border-color: rgba(124, 58, 237, 0.3);
  background: rgba(124, 58, 237, 0.08);
}
.auth-back-mini svg {
  width: 1rem;
  height: 1rem;
}

.auth-reset-link {
  width: 100%;
  max-width: 54rem;
  margin-top: 1rem;
}

/* ── Footer ───────────────────────────────────────────────── */
.auth-footer {
  position: relative;
  z-index: 1;
  margin-top: auto;
  background: transparent;
  color: var(--cs-muted);
  border-top: 1px solid var(--cs-border);
  padding: 1.15rem 1.25rem;
  backdrop-filter: blur(8px);
}

.auth-footer-inner {
  max-width: 68rem;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
}

.auth-footer-copy {
  font-size: 0.78rem;
  font-weight: 500;
}

.auth-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
}
.auth-footer-links a {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cs-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}
.auth-footer-links a:hover {
  color: var(--cs-violet);
}

.auth-footer-social {
  display: flex;
  gap: 0.45rem;
}
.auth-footer-social a {
  width: 2rem;
  height: 2rem;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--cs-surface-2);
  border: 1px solid var(--cs-border);
  color: var(--cs-muted);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.auth-footer-social a:hover {
  background: var(--cs-grad);
  border-color: transparent;
  color: #fff;
}
.auth-footer-social svg {
  width: 0.9rem;
  height: 0.9rem;
}

/* ── Toasts ───────────────────────────────────────────────── */
#toast-container {
  position: fixed;
  top: 5rem;
  right: 1rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  pointer-events: none;
  max-width: 21rem;
  width: calc(100% - 2rem);
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-12px) scale(0.96); }
  to { opacity: 1; transform: none; }
}
@keyframes toast-out {
  from { opacity: 1; transform: none; }
  to { opacity: 0; transform: translateY(-8px) scale(0.97); }
}
.toast {
  animation: toast-in 0.32s cubic-bezier(0.34, 1.4, 0.64, 1) forwards;
  pointer-events: auto;
}
.toast-die {
  animation: toast-out 0.25s ease forwards;
}

/* ── Utils ────────────────────────────────────────────────── */
.auth-hidden {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .auth-blob,
  .auth-eq span,
  .auth-form,
  .auth-tab-indicator {
    animation: none !important;
    transition: none !important;
  }
}

/* Logo image in mark */
.auth-logo-mark.has-img{
  padding:0;overflow:hidden;background:#fff;
  box-shadow:0 8px 22px var(--cs-glow, rgba(124,58,237,.28));
}
.auth-logo-mark.has-img img{
  width:100%;height:100%;object-fit:contain;display:block;
}
html[data-theme="dark"] .auth-logo-mark.has-img{background:#0f1624}

/* Remember me checkbox */
.auth-check{
  display:flex;align-items:center;gap:.55rem;
  margin:.15rem 0 .85rem;
  font-size:.82rem;font-weight:600;color:var(--cs-muted);
  cursor:pointer;user-select:none;
}
.auth-check input{
  width:1.05rem;height:1.05rem;accent-color:var(--cs-violet,#7c3aed);
  cursor:pointer;
}

/* Live validation messages */
.auth-field-msg{
  margin:.35rem 0 0;
  font-size:.72rem;font-weight:700;
  letter-spacing:.01em;
}
.auth-field-msg.is-err{color:#ef4444}
.auth-field-msg.is-ok{color:#059669}
html[data-theme="dark"] .auth-field-msg.is-err{color:#fca5a5}
html[data-theme="dark"] .auth-field-msg.is-ok{color:#34d399}

.auth-input.is-valid{
  border-color:rgba(5,150,105,.55)!important;
  box-shadow:0 0 0 3px rgba(5,150,105,.12);
}
.auth-input.is-invalid{
  border-color:rgba(239,68,68,.55)!important;
  box-shadow:0 0 0 3px rgba(239,68,68,.12);
}

/* Password strength meter */
.auth-strength{
  display:grid;grid-template-columns:repeat(4,1fr);gap:4px;
  margin-top:.45rem;height:4px;
}
.auth-strength span{
  border-radius:99px;background:var(--auth-input-border,rgba(15,40,80,.12));
  transition:background .2s;
}
.auth-strength[data-score="1"] span:nth-child(1){background:#ef4444}
.auth-strength[data-score="2"] span:nth-child(-n+2){background:#f59e0b}
.auth-strength[data-score="3"] span:nth-child(-n+3){background:#0ea5e9}
.auth-strength[data-score="4"] span{background:#059669}

/* Music panel equalizer strip on auth page */
.auth-panel::after{
  content:"";
  position:absolute;left:1.4rem;right:1.4rem;bottom:0;
  height:3px;border-radius:3px 3px 0 0;
  background:linear-gradient(90deg,#7c3aed,#2563eb,#0ea5e9,#22c55e,#ec4899);
  opacity:.55;
  animation:authBar 3s ease-in-out infinite alternate;
}
@keyframes authBar{from{opacity:.35}to{opacity:.85}}

#register-btn:disabled{
  opacity:.55;cursor:not-allowed;transform:none!important;filter:none!important;
}

/* Social / passkey / OTP */
.auth-social{display:flex;flex-direction:column;gap:.55rem;margin-bottom:.85rem}
.auth-btn-social{
  display:inline-flex;align-items:center;justify-content:center;gap:.55rem;
  width:100%;padding:.85rem 1rem;border-radius:12px;
  border:1.5px solid var(--auth-input-border,rgba(15,40,80,.12));
  background:var(--auth-input-bg, #f8fafc);
  color:var(--cs-text,#0f172a);
  font-family:var(--cs-font,Inter,system-ui,sans-serif);
  font-size:.88rem;font-weight:700;cursor:pointer;text-decoration:none;
  transition:border-color .15s,background .15s,transform .15s,box-shadow .15s;
}
.auth-btn-social:hover{
  border-color:rgba(124,58,237,.35);
  background:var(--cs-surface,#fff);
  transform:translateY(-1px);
  box-shadow:0 8px 20px rgba(124,58,237,.1);
}
html[data-theme="dark"] .auth-btn-social{
  background:rgba(255,255,255,.04);
  border-color:rgba(148,163,184,.16);
  color:#e8eef8;
}
.auth-btn-google svg{flex-shrink:0}
.auth-or{
  display:flex;align-items:center;gap:.75rem;
  margin:.15rem 0 1rem;color:var(--cs-muted,#64748b);
  font-size:.72rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;
}
.auth-or::before,.auth-or::after{
  content:"";flex:1;height:1px;background:var(--auth-input-border,rgba(15,40,80,.12));
}
.auth-micro{
  margin:.65rem 0 0;font-size:.75rem;color:var(--cs-muted,#64748b);font-weight:500;line-height:1.4;text-align:center;
}
.auth-otp-input{
  text-align:center;font-size:1.35rem;letter-spacing:.35em;font-weight:800;
  font-family:var(--cs-display,"Bricolage Grotesque"),sans-serif;
}
.auth-otp-modal{
  position:fixed;inset:0;z-index:10080;display:none;
  align-items:center;justify-content:center;padding:1rem;
}
.auth-otp-modal.is-open{display:flex}
.auth-otp-backdrop{
  position:absolute;inset:0;background:rgba(8,12,24,.55);
  backdrop-filter:blur(8px);cursor:pointer;
}
.auth-otp-panel{
  position:relative;z-index:1;width:min(100%,24rem);
  padding:1.5rem 1.35rem 1.25rem;border-radius:1.35rem;
  background:var(--cs-surface,#fff);color:var(--cs-text,#0f172a);
  border:1px solid var(--cs-border,rgba(15,40,80,.1));
  box-shadow:0 24px 64px rgba(0,0,0,.28);
  text-align:center;
}
html[data-theme="dark"] .auth-otp-panel{
  background:#111827;border-color:rgba(148,163,184,.16);
}
.auth-otp-panel h3{
  margin:0 0 .4rem;font-family:var(--cs-display,"Bricolage Grotesque"),sans-serif;
  font-size:1.2rem;font-weight:800;
}
.auth-otp-lead{
  margin:0 0 1rem;font-size:.88rem;color:var(--cs-muted,#64748b);font-weight:500;line-height:1.45;
}
.auth-otp-lead strong{color:var(--cs-text,#0f172a)}

/* Login music animation overlay */
.auth-music-fx{
  position:fixed;inset:0;z-index:10090;
  display:flex;align-items:center;justify-content:center;
  opacity:0;visibility:hidden;pointer-events:none;
  transition:opacity .22s ease,visibility .22s ease;
  background:
    radial-gradient(ellipse 70% 50% at 50% 45%,rgba(124,58,237,.4),transparent 55%),
    radial-gradient(ellipse 50% 40% at 80% 70%,rgba(14,165,233,.25),transparent 50%),
    rgba(7,11,18,.72);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
}
.auth-music-fx.is-on{
  opacity:1;visibility:visible;pointer-events:auto;
}
.auth-music-fx-inner{
  display:flex;flex-direction:column;align-items:center;gap:1rem;
}
.auth-music-disc{
  width:4.5rem;height:4.5rem;border-radius:50%;
  background:
    radial-gradient(circle at 50% 50%,#1a1a24 0 18%,transparent 19%),
    conic-gradient(from 0deg,#7c3aed,#2563eb,#0ea5e9,#ec4899,#7c3aed);
  box-shadow:0 0 0 4px rgba(255,255,255,.08),0 16px 40px rgba(124,58,237,.45);
  animation:authSpin 1.1s linear infinite;
  position:relative;
}
.auth-music-disc::after{
  content:"";position:absolute;inset:28%;
  border-radius:50%;background:#0f172a;
  box-shadow:inset 0 0 0 2px rgba(255,255,255,.08);
}
@keyframes authSpin{to{transform:rotate(360deg)}}
.auth-music-eq{
  display:flex;align-items:flex-end;gap:5px;height:2.4rem;
}
.auth-music-eq span{
  width:5px;border-radius:999px;
  background:linear-gradient(180deg,#c4b5fd,#22d3ee);
  animation:authEq 0.42s ease-in-out infinite alternate;
  box-shadow:0 0 10px rgba(139,92,246,.5);
}
.auth-music-eq span:nth-child(1){height:30%;animation-delay:0s}
.auth-music-eq span:nth-child(2){height:65%;animation-delay:.07s}
.auth-music-eq span:nth-child(3){height:100%;animation-delay:.14s}
.auth-music-eq span:nth-child(4){height:50%;animation-delay:.08s}
.auth-music-eq span:nth-child(5){height:80%;animation-delay:.18s}
.auth-music-eq span:nth-child(6){height:40%;animation-delay:.1s}
.auth-music-eq span:nth-child(7){height:70%;animation-delay:.04s}
@keyframes authEq{
  from{transform:scaleY(.4);opacity:.7}
  to{transform:scaleY(1);opacity:1}
}
.auth-music-fx-label{
  font-family:var(--cs-display,"Bricolage Grotesque"),sans-serif;
  font-size:.85rem;font-weight:800;letter-spacing:.12em;
  text-transform:uppercase;color:#e8eef8;
  text-shadow:0 2px 16px rgba(124,58,237,.5);
}
