/* auth.css — shared styles for login / register / reset pages */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --h: 213;
  --bg-page:    hsl(var(--h), 22%, 9%);
  --bg-surface: hsl(var(--h), 18%, 13%);
  --bg-raised:  hsl(var(--h), 16%, 17%);
  --border:     hsl(var(--h), 14%, 22%);
  --accent:     hsl(var(--h), 78%, 58%);
  --accent-dim: hsl(var(--h), 60%, 48%);
  --text-primary:   hsl(var(--h), 12%, 92%);
  --text-secondary: hsl(var(--h),  8%, 68%);
  --text-dim:       hsl(var(--h),  6%, 44%);
  --text-inverse:   hsl(var(--h), 22%,  9%);
  --tone-neg: hsl(4, 72%, 58%);
  --tone-pos: hsl(148, 60%, 50%);
}

[data-theme="twilight"] { --h: 258; }
[data-theme="lagoon"]   { --h: 178; }
[data-theme="ember"]    { --h:  28; }
[data-theme="dusk"]     { --h: 290; }
[data-theme="scarlet"]  { --h:   4; }
[data-theme="horizon"]  { --h: 200; }
[data-theme="canopy"]   { --h: 148; }
[data-theme="terracotta"]{ --h: 18; }
[data-theme="mist"]     { --h: 220; --bg-page: hsl(220,20%,94%); --bg-surface: hsl(220,18%,98%); --bg-raised: hsl(220,14%,92%); --border: hsl(220,12%,82%); --text-primary: hsl(220,20%,12%); --text-secondary: hsl(220,12%,38%); --text-dim: hsl(220,8%,54%); --text-inverse: hsl(220,20%,96%); }
[data-theme="slate"]    { --h: 210; --bg-page: hsl(210,18%,92%); --bg-surface: hsl(210,14%,97%); --bg-raised: hsl(210,12%,88%); --border: hsl(210,10%,78%); --text-primary: hsl(210,20%,10%); --text-secondary: hsl(210,12%,36%); --text-dim: hsl(210,8%,52%); --text-inverse: hsl(210,20%,96%); }
[data-theme="citrus"]   { --h:  52; }

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-page);
  font-family: 'Plus Jakarta Sans', 'Avenir Next', -apple-system, sans-serif;
  color: var(--text-primary);
  position: relative;
  overflow: hidden;
}

body::before, body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(80px);
  opacity: 0.12;
  animation: float 12s ease-in-out infinite;
}
body::before { width: 500px; height: 500px; background: var(--accent); top: -150px; left: -150px; }
body::after  { width: 400px; height: 400px; background: hsl(calc(var(--h) + 40), 70%, 55%); bottom: -100px; right: -100px; animation-delay: -6s; }
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(30px, -40px) scale(1.05); }
  66%      { transform: translate(-20px, 20px) scale(0.97); }
}

.login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  padding: 48px 44px 44px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 24px 80px hsl(var(--h), 30%, 4%, 0.5);
}

.brand { text-align: center; margin-bottom: 30px; }
.brand-icon { font-size: 40px; line-height: 1; margin-bottom: 10px; }
.brand-name { font-size: 28px; font-weight: 800; letter-spacing: -0.5px; color: var(--accent); }
.brand-sub  { font-size: 12px; font-weight: 500; color: var(--text-dim); margin-top: 3px; letter-spacing: 0.3px; }

.form-hint { font-size: 13px; color: var(--text-secondary); text-align: center; margin-bottom: 26px; line-height: 1.5; }

.field { margin-bottom: 16px; }
.field label {
  display: block; font-size: 12px; font-weight: 600; color: var(--text-secondary);
  letter-spacing: 0.5px; text-transform: uppercase; margin-bottom: 6px;
}
.field input {
  width: 100%; padding: 13px 16px;
  background: var(--bg-raised); border: 1px solid var(--border); border-radius: 10px;
  color: var(--text-primary); font-family: inherit; font-size: 15px; font-weight: 500;
  outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
.field input::placeholder { color: var(--text-dim); font-weight: 400; }
.field input:focus { border-color: var(--accent-dim); box-shadow: 0 0 0 3px hsl(var(--h), 78%, 58%, 0.15); }

.otp-input {
  text-align: center; letter-spacing: 0.5em; font-size: 22px !important; font-weight: 700 !important;
  font-variant-numeric: tabular-nums;
}

.submit-btn {
  width: 100%; padding: 14px; margin-top: 8px;
  background: var(--accent); color: var(--text-inverse); border: none; border-radius: 10px;
  font-family: inherit; font-size: 15px; font-weight: 700; cursor: pointer;
  transition: opacity 0.15s, transform 0.1s; letter-spacing: 0.2px;
}
.submit-btn:hover  { opacity: 0.9; }
.submit-btn:active { transform: scale(0.98); }
.submit-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.error-msg, .ok-msg {
  display: none; margin-top: 14px; padding: 10px 14px; border-radius: 8px;
  font-size: 13px; font-weight: 500; text-align: center;
}
.error-msg { background: hsl(4, 72%, 58%, 0.12); border: 1px solid hsl(4, 72%, 58%, 0.3); color: var(--tone-neg); }
.ok-msg    { background: hsl(148, 60%, 50%, 0.12); border: 1px solid hsl(148, 60%, 50%, 0.3); color: var(--tone-pos); }
.error-msg.visible, .ok-msg.visible { display: block; }

.aux-links {
  margin-top: 22px; display: flex; justify-content: space-between; gap: 12px;
  font-size: 13px;
}
.aux-links a { color: var(--text-secondary); text-decoration: none; font-weight: 500; cursor: pointer; }
.aux-links a:hover { color: var(--accent); }

.footer-note { margin-top: 26px; font-size: 12px; color: var(--text-dim); text-align: center; line-height: 1.6; }

.powered {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  font-size: 11px; color: var(--text-dim); letter-spacing: 0.3px; white-space: nowrap;
}

.hidden { display: none !important; }
