/*
 * Login — the only page without the shared header/container shell, and
 * the first thing anyone sees, so it carries the design thesis whole.
 *
 * The signature here is the background, not the card: Ginnungagap, the
 * yawning void, with Niflheim's cold light bleeding in from one side and
 * Muspelheim's forge light from the other, meeting in the middle where
 * the form sits. Two radial gradients at very low opacity -- no
 * animation, no particles, no glassmorphism. The card itself stays
 * almost severe so the atmosphere reads as depth rather than decoration.
 */
/* No app shell here -- there is no sidebar before you are signed in, so
   this overrides base.css's sidebar+main flex row back to a centred card. */
body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 24px;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(58ch 46ch at 22% 18%, rgba(var(--color-accent-rgb), 0.16), transparent 68%),
    radial-gradient(52ch 42ch at 80% 88%, rgba(var(--color-ember-rgb), 0.13), transparent 66%);
}

/* A single hairline across the middle of the void: the seam where the
   two realms meet. It sits behind the card and runs off both edges. */
body::after {
  content: "";
  position: fixed;
  left: 0; right: 0; top: 50%;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg,
    transparent,
    rgba(var(--color-accent-rgb), 0.22) 30%,
    rgba(var(--color-ember-rgb), 0.22) 70%,
    transparent);
}

.login-card {
  position: relative;
  z-index: 1;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 44px 40px 38px;
  width: 100%;
  max-width: 396px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.55);
}
:root[data-theme="light"] .login-card { box-shadow: 0 24px 60px rgba(22, 32, 46, 0.14); }

.login-logo { height: 42px; margin-bottom: 10px; }

.login-card .tagline {
  font-family: var(--font-display);
  font-size: 16px;
  font-style: italic;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}

/* One plain sentence saying what this actually is -- a login screen
   should tell a first-time user what they are signing in to. */
.login-card .lede {
  font-size: 13px;
  color: var(--color-text-faint);
  margin-bottom: 30px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--color-border-subtle);
}

.login-card label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 6px;
  color: var(--color-text-faint);
}

.login-card input[type="text"],
.login-card input[type="password"] {
  width: 100%;
  padding: 10px 12px;
  font-size: 14.5px;
  font-family: inherit;
  background: var(--color-bg-sunken);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  margin-bottom: 18px;
}
.login-card input[type="text"]:focus,
.login-card input[type="password"]:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(var(--color-accent-rgb), 0.18);
}

.login-card button[type="submit"] {
  width: 100%;
  padding: 11px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-family: inherit;
  background: var(--color-ember);
  color: var(--color-btn-text);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.login-card button[type="submit"]:hover { background: var(--color-btn-green-hover); }

/* Needs to out-specify `.login-card label` above, which upper-cases and
   letter-spaces every field label -- this one is a sentence, not a label. */
.login-card label.remember-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--color-text-muted);
  margin-bottom: 24px;
  cursor: pointer;
}
.remember-row input[type="checkbox"] {
  width: auto;
  margin: 0;
  accent-color: var(--color-ember);
  cursor: pointer;
}

.error-msg {
  color: var(--color-danger);
  font-size: 13px;
  margin-bottom: 18px;
  padding: 10px 12px;
  background: var(--color-danger-bg);
  border: 1px solid rgba(var(--color-danger-rgb), 0.3);
  border-radius: var(--radius-sm);
}

@media (max-width: 480px) {
  .login-card { padding: 32px 24px 28px; }
}
