/* ── Login page — CSS variables not in shared.css ───────────────── */

:root {
  --text-heading: #fff;
}

[data-theme="light"] {
  --text-heading: #1a1a1a;
}

/* ── Body override for centered login layout ───────────────── */

body {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100dvh;
  overflow: unset;
}

/* ── Login box ────────────────────────────────────────────── */

.login-box {
  width: 100%;
  max-width: 320px;
  padding: 2rem;
}

/* ── Heading ─────────────────────────────────────────────────── */

h1 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 0.25rem;
  letter-spacing: -0.02em;
}

/* ── Subtitle ───────────────────────────────────────────────── */

.subtitle {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 2rem;
}

/* ── Auth buttons container ────────────────────────────────── */

.auth-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* ── Base button ────────────────────────────────────────────── */

.btn {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.15s, background 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn:active {
  opacity: 0.8;
}

/* ── Google button ───────────────────────────────────────────── */

.btn-google {
  background: #fff;
  color: #333;
  border-color: #ddd;
}

[data-theme="light"] .btn-google {
  background: #fff;
  color: #333;
  border-color: #ccc;
}

.btn-google svg {
  width: 20px;
  height: 20px;
}

/* ── Passkey button ──────────────────────────────────────────── */

.btn-passkey {
  background: var(--surface);
  color: var(--text);
}

.btn-passkey:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ── Primary button ──────────────────────────────────────────── */

.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
}

/* ── Divider ─────────────────────────────────────────────────── */

.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0.25rem 0;
  color: var(--text-dim);
  font-size: 0.8rem;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Password toggle link ──────────────────────────────────── */

.password-toggle {
  text-align: center;
  margin-top: 0.25rem;
}

.password-toggle a {
  color: var(--text-dim);
  font-size: 0.8rem;
  text-decoration: none;
  cursor: pointer;
}

.password-toggle a:hover {
  color: var(--text);
}

/* ── Password section ───────────────────────────────────────── */

.password-section {
  display: none;
  flex-direction: column;
  gap: 0.75rem;
}

.password-section.visible {
  display: flex;
}

/* ── Password input ──────────────────────────────────────────── */

input[type="password"] {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}

input:focus {
  border-color: var(--accent);
}

/* ── Error message ───────────────────────────────────────────── */

.error {
  color: #ef4444;
  font-size: 0.85rem;
  text-align: center;
  display: none;
}

/* ── Loading state ────────────────────────────────────────────── */

.loading {
  opacity: 0.6;
  pointer-events: none;
}
