/* Royalty Music — Auth pages
   Inherits tokens from styles.css; this file adds the auth-specific layout. */

.auth-app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

/* LEFT — brand panel */
.auth-brand {
  position: relative;
  padding: 36px 48px 36px;
  background:
    radial-gradient(900px 600px at 80% -10%, rgba(140,118,255,0.45), transparent 60%),
    radial-gradient(700px 500px at -10% 110%, rgba(54,214,195,0.18), transparent 60%),
    linear-gradient(165deg, #1a1640 0%, #15132e 55%, #11102a 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  isolation: isolate;
}
[data-theme="light"] .auth-brand {
  background:
    radial-gradient(900px 600px at 80% -10%, rgba(140,118,255,0.55), transparent 60%),
    radial-gradient(700px 500px at -10% 110%, rgba(54,214,195,0.18), transparent 60%),
    linear-gradient(165deg, #2a1f7a 0%, #1d1a55 55%, #15132e 100%);
}

/* decorative noise + gradient ring */
.auth-brand::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 22px 18px, rgba(255,255,255,0.5), transparent 50%),
    radial-gradient(1px 1px at 50px 80px, rgba(255,255,255,0.3), transparent 50%),
    radial-gradient(1px 1px at 110px 30px, rgba(255,255,255,0.4), transparent 50%);
  background-size: 160px 120px;
  opacity: 0.18;
  pointer-events: none;
  z-index: 0;
}

.brand-head {
  display: flex; align-items: center; gap: 12px;
  position: relative; z-index: 2;
}
.brand-logo {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #b8aaff, #6b5ced);
  display: grid; place-items: center;
  box-shadow: 0 6px 18px rgba(107,92,237,0.5), inset 0 1px 0 rgba(255,255,255,0.3);
}
.brand-logo svg { display: block; }
.brand-name {
  font-family: 'Inter Tight', sans-serif;
  font-size: 17px; font-weight: 600;
  letter-spacing: -0.02em;
}
.brand-name small { display: block; font-size: 11px; font-weight: 500; color: rgba(255,255,255,0.55); letter-spacing: 0.04em; text-transform: uppercase; margin-top: 1px; }

.brand-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 2;
  margin: 40px 0;
  max-width: 540px;
}
.brand-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11.5px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: #c9c2ff;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  padding: 6px 12px; border-radius: 999px;
  width: max-content; margin-bottom: 22px;
}
.brand-eyebrow .pulse {
  width: 6px; height: 6px; border-radius: 50%; background: #36d6c3;
  box-shadow: 0 0 0 0 rgba(54,214,195,0.5);
  animation: pulse 1.8s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(54,214,195,0.6); }
  70% { box-shadow: 0 0 0 8px rgba(54,214,195,0); }
  100% { box-shadow: 0 0 0 0 rgba(54,214,195,0); }
}

.brand-h1 {
  font-family: 'Inter Tight', sans-serif;
  font-size: 52px; line-height: 1.04; font-weight: 600; letter-spacing: -0.035em;
  margin: 0 0 18px;
  text-wrap: balance;
}
.brand-h1 em {
  font-style: normal;
  background: linear-gradient(120deg, #ffd23f 0%, #ff6b8a 50%, #36d6c3 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.brand-sub {
  font-size: 15.5px; line-height: 1.55;
  color: rgba(255,255,255,0.7);
  margin: 0 0 36px; max-width: 480px;
}

/* Stat strip */
.brand-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 14px;
  overflow: hidden;
}
.brand-stat {
  background: linear-gradient(180deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);
  padding: 18px 18px 16px;
}
.brand-stat .lbl {
  font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase;
  color: rgba(255,255,255,0.55); font-weight: 500;
}
.brand-stat .val {
  font-family: 'Inter Tight', sans-serif;
  font-size: 26px; font-weight: 600; letter-spacing: -0.02em;
  margin-top: 8px;
}
.brand-stat .delta { font-size: 11.5px; color: #36d6c3; margin-top: 2px; font-weight: 500; }

/* Quote card */
.brand-quote {
  position: relative;
  padding: 28px 28px 24px;
  background:
    radial-gradient(180px 120px at 100% 0%, rgba(255,210,63,0.18), transparent 70%),
    linear-gradient(180deg, rgba(255,255,255,0.07) 0%, rgba(255,255,255,0.02) 100%);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(0,0,0,0.28), inset 0 1px 0 rgba(255,255,255,0.06);
}
.bq-mark { position: absolute; top: -10px; left: 22px; }
.bq-text {
  font-family: 'Inter Tight', sans-serif;
  font-size: 19px; line-height: 1.45; font-weight: 500;
  letter-spacing: -0.012em;
  color: rgba(255,255,255,0.94);
  margin: 14px 0 22px;
  text-wrap: balance;
}
.bq-author {
  display: flex; align-items: center; gap: 14px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.10);
}
.bq-avatar { position: relative; width: 42px; height: 42px; flex-shrink: 0; }
.bq-init {
  position: absolute; inset: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff6b8a 0%, #8676ff 100%);
  display: grid; place-items: center;
  font-family: 'Inter Tight', sans-serif;
  font-size: 14px; font-weight: 600; letter-spacing: -0.01em;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.bq-ring {
  position: absolute; inset: -3px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.18);
}
.bq-meta { flex: 1; min-width: 0; }
.bq-name { font-size: 13.5px; font-weight: 600; color: #fff; }
.bq-role { font-size: 12px; color: rgba(255,255,255,0.6); margin-top: 1px; }
.bq-stat { text-align: right; flex-shrink: 0; }
.bq-stat-val {
  font-family: 'Inter Tight', sans-serif;
  font-size: 16px; font-weight: 600; letter-spacing: -0.015em;
  background: linear-gradient(120deg, #ffd23f, #36d6c3);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.bq-stat-lbl { font-size: 10.5px; color: rgba(255,255,255,0.55); margin-top: 1px; letter-spacing: 0.02em; }

/* Trust row */
.brand-trust {
  display: flex; align-items: center; gap: 14px;
  margin-top: 22px;
  font-size: 12px; color: rgba(255,255,255,0.65);
  font-weight: 500;
}
.bt-item { display: inline-flex; align-items: center; gap: 7px; }
.bt-dot {
  width: 6px; height: 6px; border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.05);
}
.bt-sep { width: 3px; height: 3px; border-radius: 50%; background: rgba(255,255,255,0.25); }

/* "Now playing" mini-card to add visual interest */
.np-card {
  position: absolute;
  right: -40px; bottom: 100px;
  width: 320px;
  padding: 14px 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.04));
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 14px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.4);
  z-index: 3;
  transform: rotate(-2deg);
  display: flex; align-items: center; gap: 12px;
}
.np-cover {
  width: 44px; height: 44px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(135deg, #ff6b8a, #8676ff);
  display: grid; place-items: center;
  font-size: 22px;
}
.np-meta { flex: 1; min-width: 0; }
.np-title { font-size: 13px; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.np-sub { font-size: 11.5px; color: rgba(255,255,255,0.6); margin-top: 1px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.np-amount { font-family: 'Inter Tight'; font-size: 13px; font-weight: 600; color: #36d6c3; }
.np-amount small { font-weight: 500; color: rgba(255,255,255,0.55); }

/* Equalizer-style decoration */
.eq {
  position: absolute;
  bottom: 36px; left: 48px; right: 48px;
  height: 64px;
  display: flex; align-items: flex-end; gap: 4px;
  z-index: 1;
  opacity: 0.7;
}
.eq span {
  flex: 1;
  background: linear-gradient(180deg, rgba(255,255,255,0.18), rgba(140,118,255,0.5));
  border-radius: 2px 2px 0 0;
  animation: eq 1.4s ease-in-out infinite;
}
@keyframes eq {
  0%, 100% { height: 14%; }
  50%      { height: 90%; }
}

.brand-foot {
  margin-top: auto;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: rgba(255,255,255,0.5);
  position: relative; z-index: 2;
}
.brand-foot a { color: rgba(255,255,255,0.75); text-decoration: none; }
.brand-foot a:hover { color: #fff; }

/* RIGHT — form panel */
.auth-form {
  padding: 36px 48px;
  display: flex; flex-direction: column;
  background: var(--bg);
  position: relative;
  overflow-y: auto;
}
.form-top {
  display: flex; align-items: center; justify-content: space-between;
}
.form-top .small {
  font-size: 12.5px; color: var(--fg-3);
}
.form-top a {
  color: var(--brand-2); font-weight: 500; text-decoration: none;
  margin-left: 6px;
}
.form-top a:hover { text-decoration: underline; }

.theme-toggle {
  display: inline-flex; gap: 2px; padding: 3px;
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: 999px;
}
.theme-toggle button {
  padding: 5px 11px; border-radius: 999px;
  font-size: 12px; font-weight: 500; color: var(--fg-3);
}
.theme-toggle button.on {
  background: var(--bg-elev);
  color: var(--fg);
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

.form-wrap {
  flex: 1;
  display: flex; flex-direction: column; justify-content: center;
  max-width: 400px; width: 100%;
  margin: 0 auto;
  padding: 32px 0;
}

.form-eyebrow {
  font-size: 11.5px; font-weight: 500; color: var(--brand-2);
  letter-spacing: 0.05em; text-transform: uppercase;
  margin-bottom: 8px;
}
.form-h1 {
  font-family: 'Inter Tight', sans-serif;
  font-size: 30px; font-weight: 600; letter-spacing: -0.025em;
  margin: 0 0 6px;
  color: var(--fg);
}
.form-sub {
  font-size: 14px; color: var(--fg-2); line-height: 1.55;
  margin: 0 0 26px;
}

/* Field */
.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 12px; font-weight: 500;
  color: var(--fg-2);
  margin-bottom: 7px;
}
.field-wrap {
  position: relative;
  display: flex; align-items: center;
}
.field input {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--fg);
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input::placeholder { color: var(--fg-4); }
.field input:hover { border-color: rgba(107,92,237,0.4); }
.field input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-glow);
}
.field input.with-icon { padding-left: 42px; }
.field-icon {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  color: var(--fg-3); pointer-events: none;
}
.field-action {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  padding: 6px 8px; border-radius: 6px;
  color: var(--fg-3); font-size: 12px; font-weight: 500;
}
.field-action:hover { background: var(--bg-hover); color: var(--fg); }

.field-row { display: flex; gap: 10px; }
.field-row .field { flex: 1; }

.field-hint { font-size: 11.5px; color: var(--fg-3); margin-top: 6px; }
.field-error {
  font-size: 12px; color: var(--red); margin-top: 6px;
  display: flex; align-items: center; gap: 5px;
}

/* Checkbox + remember */
.row-between {
  display: flex; align-items: center; justify-content: space-between;
  margin: 6px 0 22px;
}
.checkbox {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 13px; color: var(--fg-2); cursor: pointer; user-select: none;
}
.checkbox input { display: none; }
.checkbox .box {
  width: 16px; height: 16px;
  border-radius: 5px;
  border: 1.5px solid var(--line-strong);
  background: var(--bg-card);
  display: grid; place-items: center;
  transition: all 0.15s;
  flex-shrink: 0;
}
.checkbox input:checked + .box {
  background: var(--brand);
  border-color: var(--brand);
}
.checkbox input:checked + .box::after {
  content: '';
  width: 4px; height: 8px;
  border: 2px solid #fff; border-top: 0; border-left: 0;
  transform: rotate(45deg) translate(-1px, -1px);
}
.link-quiet { font-size: 13px; color: var(--brand-2); text-decoration: none; font-weight: 500; }
.link-quiet:hover { text-decoration: underline; }

/* Primary button */
.btn-auth {
  width: 100%;
  padding: 13px 18px;
  border-radius: 10px;
  background: linear-gradient(180deg, #7d6dff 0%, #6b5ced 100%);
  color: #fff;
  font-size: 14px; font-weight: 600; letter-spacing: -0.005em;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 4px 14px rgba(107,92,237,0.35), inset 0 1px 0 rgba(255,255,255,0.18);
  transition: transform 0.05s, box-shadow 0.15s;
}
.btn-auth:hover { box-shadow: 0 6px 20px rgba(107,92,237,0.5), inset 0 1px 0 rgba(255,255,255,0.18); }
.btn-auth:active { transform: translateY(1px); }
.btn-auth.ghost {
  background: var(--bg-card);
  border: 1px solid var(--line-strong);
  color: var(--fg);
  box-shadow: none;
}
.btn-auth.ghost:hover { background: var(--bg-hover); border-color: var(--brand); color: var(--fg); }

/* Divider with text */
.divider {
  display: flex; align-items: center; gap: 14px;
  color: var(--fg-3); font-size: 11.5px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.06em;
  margin: 22px 0;
}
.divider::before, .divider::after {
  content: ''; flex: 1; height: 1px; background: var(--line);
}

/* Social row */
.social-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.social-btn {
  padding: 11px 14px;
  background: var(--bg-card);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  font-size: 13.5px; font-weight: 500;
  color: var(--fg);
  transition: all 0.15s;
}
.social-btn:hover { border-color: var(--brand); background: var(--bg-hover); }

/* Footer notice */
.form-foot {
  margin-top: 26px;
  font-size: 12px; color: var(--fg-3);
  text-align: center;
}
.form-foot a { color: var(--fg-2); }

/* OTP */
.otp { display: flex; gap: 10px; justify-content: center; margin: 12px 0 22px; }
.otp input {
  width: 52px; height: 60px;
  text-align: center;
  font-family: 'Inter Tight', sans-serif;
  font-size: 24px; font-weight: 600;
  background: var(--bg-card);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--fg);
  outline: none;
  caret-color: var(--brand);
  transition: all 0.15s;
}
.otp input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-glow);
  background: var(--bg-elev);
}
.otp input.filled {
  border-color: rgba(107,92,237,0.5);
  color: var(--brand-2);
}

/* Strength meter */
.strength {
  display: flex; gap: 4px; margin-top: 8px;
}
.strength span {
  flex: 1; height: 4px; border-radius: 999px;
  background: var(--bg-hover);
  transition: background 0.2s;
}
.strength.s1 span:nth-child(1) { background: var(--red); }
.strength.s2 span:nth-child(-n+2) { background: var(--amber); }
.strength.s3 span:nth-child(-n+3) { background: var(--brand); }
.strength.s4 span { background: var(--green); }
.strength-text {
  font-size: 11.5px; color: var(--fg-3);
  margin-top: 6px; display: flex; justify-content: space-between;
}

/* State chooser at top of form panel */
.state-chooser {
  display: flex; gap: 6px; flex-wrap: wrap;
  padding: 6px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 22px;
  font-size: 11.5px; font-weight: 500;
}
.state-chooser button {
  padding: 6px 10px; border-radius: 7px;
  color: var(--fg-3);
  transition: all 0.15s;
}
.state-chooser button.on {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 2px 6px rgba(107,92,237,0.4);
}
.state-chooser button:not(.on):hover { color: var(--fg); }

/* Success screen */
.success-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: rgba(54,211,154,0.15);
  border: 1px solid rgba(54,211,154,0.3);
  display: grid; place-items: center;
  margin: 0 auto 24px;
  color: #34d39a;
  animation: pop 0.4s ease-out;
}
@keyframes pop {
  from { transform: scale(0.6); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

@media (max-width: 960px) {
  .auth-app { grid-template-columns: 1fr; }
  .auth-brand { padding: 24px 24px 28px; min-height: 280px; }
  .brand-h1 { font-size: 36px; }
  .np-card, .eq { display: none; }
  .auth-form { padding: 24px; }
  .form-wrap { padding: 16px 0; }
}

/* ==============================================================
   Powered-by badge — Tochka Music. Sits at the bottom of the form
   panel. Gradient-bordered pill with a subtle glow so it reads as
   a badge (a thing) rather than a throwaway footer line. Dot
   animates softly.
   ============================================================== */
.powered-by-wrap {
  display: flex; justify-content: center;
  margin-top: 22px;
}
.powered-by {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 9px 16px 9px 13px;
  border-radius: 999px;
  background:
    linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
    linear-gradient(135deg, #6b5ced 0%, #36d6c3 50%, #f5b544 100%) border-box;
  border: 1px solid transparent;
  box-shadow: 0 2px 14px rgba(107,92,237,0.15),
              0 8px 24px rgba(0,0,0,0.18);
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-2);
  white-space: nowrap;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}
.powered-by:hover {
  transform: translateY(-1px);
  color: var(--fg);
  box-shadow: 0 4px 18px rgba(107,92,237,0.28),
              0 12px 32px rgba(0,0,0,0.22);
  text-decoration: none !important;
  border-bottom: 1px solid transparent !important;
}
.powered-by .pb-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: linear-gradient(135deg, #6b5ced, #36d6c3);
  box-shadow: 0 0 0 0 rgba(107,92,237,0.55);
  animation: pb-pulse 2.4s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes pb-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(107,92,237,0.55); }
  50%      { box-shadow: 0 0 0 6px rgba(107,92,237,0);   }
}
.powered-by .pb-label { color: var(--fg-3); font-weight: 500; }
.powered-by .pb-brand {
  background: linear-gradient(135deg, #8676ff, #36d6c3);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
  letter-spacing: 0.06em;
}
