/* Login page — shares the dark Persona Studio palette. Mobile-first centered
   card. Visual-only; the design overhaul track will redo this once a reference
   is supplied. */

:root {
  --bg: #0a0c12;
  --surface: rgba(26, 31, 45, 0.78);
  --surface-2: rgba(34, 40, 56, 0.78);
  --border: rgba(255, 255, 255, 0.07);
  --border-2: rgba(255, 255, 255, 0.12);
  --text: #eef0f6;
  --text-2: #c3c8d6;
  --muted: #868da3;
  --accent: #6d6cf6;
  --accent-2: #9b8bff;
  --accent-ink: #c9c6ff;
  --grad: linear-gradient(135deg, #7c6cff 0%, #5b4ddb 55%, #4f46e5 100%);
  --danger: #f87171;
  --danger-bg: rgba(248, 113, 113, 0.12);
  --r: 13px;
  --r-lg: 18px;
  --shadow-lg: 0 22px 60px rgba(0,0,0,.55);
  --glow: 0 0 0 1px rgba(124,108,255,.35), 0 10px 36px rgba(108,108,246,.32);
  --ring: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent);
  --ease: cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background:
    radial-gradient(900px 480px at 12% -8%, rgba(124,108,255,.18), transparent 60%),
    radial-gradient(820px 520px at 96% 4%, rgba(139,92,246,.14), transparent 58%),
    radial-gradient(1200px 700px at 50% 120%, rgba(40,52,96,.45), transparent 70%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.lg-stage {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px 40px;
  gap: 20px;
}

.lg-back {
  align-self: flex-start;
  max-width: 460px;
  width: 100%;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  padding: 4px 0;
}
.lg-back:hover { color: var(--accent-ink); }

.lg-card {
  width: 100%;
  max-width: 460px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 26px 22px 22px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-lg);
}

.lg-head { text-align: center; margin-bottom: 18px; }
.lg-logo {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 14px;
  background: var(--grad); color: #fff; font-size: 21px;
  box-shadow: var(--glow);
  margin-bottom: 10px;
}
.lg-head h1 { font-size: 22px; font-weight: 760; letter-spacing: -0.3px; margin: 4px 0 4px; }
.lg-sub { font-size: 13px; color: var(--muted); margin: 0; }

.lg-tabs {
  display: flex;
  gap: 4px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 18px;
}
.lg-tab {
  flex: 1;
  background: transparent;
  border: 0;
  color: var(--muted);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  padding: 9px 12px;
  border-radius: 9px;
  cursor: pointer;
  transition: background .15s var(--ease), color .15s var(--ease);
}
.lg-tab:hover { color: var(--text-2); }
.lg-tab.is-active {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 4px 14px rgba(108,108,246,.35);
}

.lg-form { display: flex; flex-direction: column; gap: 14px; }
/* The [hidden] attribute normally sets display:none, but display:flex above
   overrides it. Restore the hidden behavior explicitly. */
.lg-form[hidden] { display: none; }
.lg-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 480px) { .lg-grid { grid-template-columns: 1fr 1fr; } }

.lg-field { display: flex; flex-direction: column; gap: 6px; }
.lg-field label {
  font-size: 12.5px;
  color: var(--text-2);
  font-weight: 550;
}
.lg-muted { color: var(--muted); font-weight: 400; }

.lg-field input {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: var(--r);
  color: var(--text);
  font: inherit;
  font-size: 14.5px;
  padding: 11px 13px;
  min-height: 44px;
  outline: none;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.lg-field input::placeholder { color: var(--muted); opacity: .65; }
.lg-field input:focus {
  border-color: var(--accent);
  box-shadow: var(--ring);
}

/* Password show/hide toggle */
.lg-pw { position: relative; }
.lg-pw input { padding-right: 44px; }
.lg-pw-toggle {
  position: absolute;
  top: 50%; right: 6px;
  transform: translateY(-50%);
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 0; padding: 0;
  color: var(--muted); cursor: pointer;
  border-radius: 9px;
  transition: color .15s var(--ease), background .15s var(--ease);
}
.lg-pw-toggle:hover { color: var(--text); background: rgba(255,255,255,.06); }
.lg-pw-toggle:focus-visible { outline: none; box-shadow: var(--ring); color: var(--accent-ink); }
.lg-pw-toggle[aria-pressed="true"] { color: var(--accent-ink); }
.lg-pw-toggle svg { display: block; }

.lg-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%;
  min-height: 46px;
  padding: 12px 16px;
  border: 0;
  border-radius: var(--r);
  background: var(--grad);
  color: #fff;
  font: inherit;
  font-size: 14.5px;
  font-weight: 650;
  letter-spacing: 0.1px;
  cursor: pointer;
  box-shadow: 0 6px 22px rgba(108,108,246,.32);
  transition: transform .12s var(--ease), filter .15s var(--ease), box-shadow .15s var(--ease);
  margin-top: 2px;
}
.lg-btn:hover { filter: brightness(1.05); }
.lg-btn:active { transform: translateY(1px); }
.lg-btn:disabled { opacity: .65; cursor: progress; }

.lg-error {
  background: var(--danger-bg);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: #ffd5d5;
  padding: 10px 12px;
  border-radius: var(--r);
  font-size: 13.5px;
  line-height: 1.4;
}
.lg-success {
  background: rgba(52, 211, 153, 0.10);
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: #b1f2d3;
  padding: 12px 14px;
  border-radius: var(--r);
  font-size: 13.5px;
  line-height: 1.5;
}
.lg-intro {
  margin: 0 0 4px;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.5;
}
.lg-field textarea {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: var(--r);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  padding: 11px 13px;
  resize: vertical;
  min-height: 80px;
  outline: none;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.lg-field textarea::placeholder { color: var(--muted); opacity: .65; }
.lg-field textarea:focus { border-color: var(--accent); box-shadow: var(--ring); }

.lg-switch {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin: 4px 0 0;
}
.lg-switch a { color: var(--accent-ink); text-decoration: none; font-weight: 600; }
.lg-switch a:hover { color: var(--accent-2); text-decoration: underline; }

.lg-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 0 14px;
}
.lg-forgot { display: flex; flex-direction: column; gap: 12px; }

.lg-foot {
  color: var(--muted);
  font-size: 12px;
  margin: 0;
  text-align: center;
  max-width: 460px;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
