/* ───── Auth ───── */

.auth-shell-main {
  padding: 88px 0 72px;
}

.auth-shell-main .page-content {
  max-width: 1180px;
  margin: 0 auto;
}

.auth-runtime-hidden {
  position: fixed;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  pointer-events: none;
}

.auth-shell .notice {
  margin: 0 0 var(--s-5);
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(340px, 430px);
  gap: var(--s-5);
  align-items: start;
}

.auth-copy, .auth-card { min-height: 360px; }

.auth-copy {
  border-radius: var(--r-3);
  background: var(--nav);
  color: var(--nav-ink);
  padding: var(--s-7);
  background-image:
    linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent 38%),
    radial-gradient(circle at 90% 0%, rgba(var(--brand-blue-rgb), 0.18), transparent 50%),
    radial-gradient(circle at 0% 100%, rgba(var(--brand-blue-rgb), 0.12), transparent 40%);
  box-shadow: var(--shadow-2);
}

.auth-copy h1, .auth-copy h2 {
  margin: 0;
  color: var(--nav-ink);
  font-size: 28px;
  line-height: 1.08;
  letter-spacing: 0;
}
.auth-copy p { color: var(--nav-muted); max-width: 560px; line-height: 1.6; }

.auth-benefits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-3);
  margin-top: var(--s-7);
}

.auth-benefits div {
  display: grid;
  gap: 6px;
  min-height: 118px;
  padding: var(--s-4);
  border: 1px solid var(--nav-line);
  border-radius: var(--r-2);
  background: rgba(255, 255, 255, 0.035);
}

.auth-benefits strong {
  color: var(--nav-ink);
  font-size: 13.5px;
  letter-spacing: -0.005em;
}

.auth-benefits span {
  color: var(--nav-muted);
  font-size: 12.5px;
  line-height: 1.5;
}

.auth-switch { color: var(--muted); margin: var(--s-4) 0 0; font-size: 13.5px; }
.auth-switch a { color: var(--accent); font-weight: 600; }

.auth-card {
  display: grid;
  gap: var(--s-4);
  align-content: start;
  border-color: var(--line);
  box-shadow: var(--shadow-2);
}

.auth-card-head {
  display: grid;
  gap: 7px;
  padding-bottom: var(--s-4);
  border-bottom: 1px solid var(--line-soft);
}

.auth-card-kicker {
  color: var(--accent);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.auth-card-head h2,
.auth-card-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.08;
  letter-spacing: 0;
}

.auth-card-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.55;
}

.auth-oauth {
  display: grid;
  gap: var(--s-3);
}

.auth-google-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background: #fff;
  color: #1f2937;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  font-size: 13.5px;
  font-weight: 800;
  text-align: center;
}

.auth-google-button:hover {
  border-color: var(--line-strong);
  background: #f8fafc;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.auth-google-mark {
  display: inline-flex;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}

.auth-google-mark svg {
  display: block;
  width: 20px;
  height: 20px;
}

[data-theme="night"] .auth-google-button {
  background: rgba(248, 250, 252, 0.96);
  color: #111827;
}

[data-theme="night"] .auth-google-button:hover {
  background: #fff;
}

.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--s-3);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  background: var(--line-soft);
}

.auth-password-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--s-2);
  align-items: stretch;
}

.auth-password-row input {
  min-width: 0;
}

.auth-password-row button {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background: var(--paper-sunk);
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 800;
}

.auth-password-row button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.auth-remember {
  align-items: flex-start;
  padding: var(--s-3);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-2);
  background: var(--paper-sunk);
}

.auth-remember span {
  display: grid;
  gap: 2px;
}

.auth-remember strong {
  color: var(--ink);
  font-size: 13.5px;
}

.auth-remember small {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
}

/* ───── Settings: theme controls ───── */

.theme-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-3);
}

.theme-preview {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: var(--s-3);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-2);
  background: var(--paper-sunk);
  margin-top: var(--s-4);
  padding: var(--s-4);
}

.theme-preview span {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: var(--r-2);
  background: var(--nav);
}

.theme-preview span::after {
  content: "";
  position: absolute;
  right: -3px;
  top: -3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--paper-sunk);
}

.theme-preview strong, .theme-preview small { display: block; }
.theme-preview strong { font-size: 14px; letter-spacing: -0.005em; }
.theme-preview small { color: var(--muted); font-size: 12.5px; margin-top: 2px; }

/* ───── Legal ───── */

.legal-link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-2);
}

.legal-link-grid a {
  border: 1px solid var(--line-soft);
  border-radius: var(--r-2);
  background: var(--paper-sunk);
  padding: var(--s-3) var(--s-4);
  color: var(--accent);
  font-weight: 600;
  font-size: 13.5px;
  transition: background var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease);
}
.legal-link-grid a:hover { background: var(--card); border-color: var(--accent); }

.legal-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.45fr) minmax(0, 1fr);
  gap: var(--s-5);
  align-items: start;
}

.legal-hero { position: sticky; top: var(--s-6); }

.legal-hero h2 {
  margin: var(--s-2) 0 var(--s-3);
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-weight: 700;
}

.legal-hero p, .legal-document p {
  color: var(--muted);
  line-height: 1.7;
}

.legal-document { display: grid; gap: var(--s-5); }

.legal-document section {
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: var(--s-4);
}

.legal-document section:last-child { border-bottom: 0; padding-bottom: 0; }

.legal-document h3 {
  margin: 0 0 var(--s-2);
  font-size: 16px;
  letter-spacing: -0.01em;
  font-weight: 700;
}
