/*
 * Auth page styles — login, register, forgot, reset.
 * Extends tokens.css and base.css.
 */

/* ── Layout ─────────────────────────────────────────────────────────────── */

.auth-wrap {
  min-height: calc(100vh - var(--nav-height, 64px) - 80px);
  display: grid;
  place-items: center;
  padding: var(--sp-8) var(--sp-4);
}

.auth-card {
  width: 100%;
  max-width: 420px;
}

.auth-card--wide {
  max-width: 520px;
}

/* ── Header block ───────────────────────────────────────────────────────── */

.auth-header {
  text-align: center;
  margin-bottom: var(--sp-6);
}

.auth-header .brand-mark {
  margin: 0 auto var(--sp-4);
}

.auth-header h1 {
  font-size: 30px;
  margin: 0 0 var(--sp-2);
}

.auth-header p {
  color: var(--muted);
  font-size: var(--text-sm);
  margin: 0;
}

/* ── Role selector ──────────────────────────────────────────────────────── */

.role-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
}

.role-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-1);
  padding: var(--sp-4) var(--sp-3);
  background: var(--bone-1);
  border: 1.5px solid var(--line);
  border-radius: var(--rad-md);
  text-decoration: none;
  color: var(--ink);
  transition: border-color var(--ease), background var(--ease);
  cursor: pointer;
}

.role-card:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.role-card--active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.role-icon {
  font-size: 24px;
  line-height: 1;
}

.role-label {
  font-weight: 600;
  font-size: var(--text-sm);
}

.role-sub {
  font-size: 11px;
  color: var(--muted);
}

/* ── Form helpers ───────────────────────────────────────────────────────── */

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
}

@media (max-width: 480px) {
  .field-row {
    grid-template-columns: 1fr;
  }
}

.field {
  margin-bottom: var(--sp-4);
}

.label-link {
  float: right;
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  text-decoration: none;
}
.label-link:hover {
  color: var(--ink);
}

.field-hint {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
}

.terms-note {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: var(--sp-4);
}

.terms-note a {
  color: var(--ink);
}

/* ── Footer link ────────────────────────────────────────────────────────── */

.auth-foot {
  text-align: center;
  margin-top: var(--sp-5);
  font-size: var(--text-sm);
  color: var(--muted);
}

.auth-foot a {
  color: var(--ink);
  font-weight: 500;
}

/* ── Button modifier ────────────────────────────────────────────────────── */

.btn--full {
  width: 100%;
}

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

.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  color: var(--muted);
  font-size: var(--text-sm);
  margin: var(--sp-5) 0;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-top: 1px solid var(--line);
}

/* ── Required star ──────────────────────────────────────────────────────── */

.req {
  color: var(--accent);
  margin-left: 2px;
}

/* ── OAuth buttons ──────────────────────────────────────────────────────── */

.oauth-buttons {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  margin-top: var(--sp-4);
}

.btn--oauth {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 0.625rem 1rem;
  border-radius: var(--radius);
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s, box-shadow 0.15s;
  border: 1px solid var(--line);
  background: var(--surface, #fff);
  color: var(--ink);
}

.btn--oauth:hover {
  background: var(--bg, #f5f5f5);
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}

.btn--oauth-x {
  background: #000;
  color: #fff;
  border-color: #000;
}

.btn--oauth-x:hover {
  background: #222;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
}

.oauth-divider {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  color: var(--muted);
  font-size: var(--text-sm);
  margin: var(--sp-5) 0 var(--sp-3);
}

.oauth-divider::before,
.oauth-divider::after {
  content: '';
  flex: 1;
  border-top: 1px solid var(--line);
}

/* compact role-grid variant used on oauth-complete page */
.role-grid--compact {
  margin-bottom: var(--sp-2);
}

.role-grid--compact .role-card {
  cursor: pointer;
}
