/* Auth / sign-in — theme-aware, matches app chrome */

.auth-body {
  --auth-bg: #0f1419;
  --auth-surface: #1a2332;
  --auth-border: rgba(148, 163, 184, 0.18);
  --auth-text: #e8eef7;
  --auth-muted: #8b9bb4;
  --auth-accent: #3b82f6;
  margin: 0;
  min-height: 100vh;
  color: var(--auth-text);
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(59, 130, 246, 0.14), transparent),
    var(--auth-bg);
}

[data-bs-theme="light"] .auth-body {
  --auth-bg: #e8eef8;
  --auth-surface: #ffffff;
  --auth-border: rgba(15, 23, 42, 0.12);
  --auth-text: #0f172a;
  --auth-muted: #475569;
  --auth-accent: #1d4ed8;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(29, 78, 216, 0.12), transparent),
    var(--auth-bg);
}

[data-bs-theme="dusk"] .auth-body {
  --auth-bg: #7f8b99;
  --auth-surface: #d5dbe3;
  --auth-border: rgba(15, 23, 42, 0.22);
  --auth-text: #121821;
  --auth-muted: #3a4452;
  --auth-accent: #1e40af;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(30, 64, 175, 0.16), transparent),
    var(--auth-bg);
}

.auth-theme-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 10;
  color: var(--auth-muted) !important;
  padding: 0.5rem !important;
  border-radius: 0.5rem;
  background: var(--auth-surface);
  border: 1px solid var(--auth-border) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.auth-theme-toggle:hover {
  color: var(--auth-text) !important;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 2rem 1.75rem 1.75rem;
  border-radius: 12px;
  background: var(--auth-surface);
  border: 1px solid var(--auth-border);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
  color: var(--auth-text);
}

.auth-brand {
  margin: 0 0 0.35rem;
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-align: center;
  color: var(--auth-text);
}

.auth-subtitle {
  margin: 0 0 1.5rem;
  text-align: center;
  font-size: 0.9375rem;
  color: var(--auth-muted);
}

.auth-card .form-floating > .form-control {
  background: transparent;
  color: var(--auth-text);
  border-color: var(--auth-border);
}

.auth-card .form-floating > .form-control:focus {
  border-color: var(--auth-accent);
  box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--auth-accent) 25%, transparent);
}

.auth-card .form-floating > label {
  color: var(--auth-muted);
}

.auth-card .form-floating > .form-control:focus ~ label,
.auth-card .form-floating > .form-control:not(:placeholder-shown) ~ label {
  color: var(--auth-muted);
}

.auth-submit {
  margin-top: 0.25rem;
  background: var(--auth-accent);
  border-color: var(--auth-accent);
  font-weight: 600;
}

.auth-submit:hover {
  background: color-mix(in srgb, var(--auth-accent) 88%, #000);
  border-color: color-mix(in srgb, var(--auth-accent) 88%, #000);
}

.auth-error {
  margin-bottom: 1rem;
  padding: 0.65rem 0.85rem;
  border-radius: 0.5rem;
  background: rgba(185, 28, 28, 0.12);
  border: 1px solid rgba(185, 28, 28, 0.28);
  color: #f87171;
  font-size: 0.875rem;
}

[data-bs-theme="light"] .auth-error,
[data-bs-theme="dusk"] .auth-error {
  color: #b91c1c;
}
