/* --- Auth --- */

.auth-page {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background:
    linear-gradient(180deg, rgba(255, 247, 238, .9), rgba(244, 241, 236, .95));
}

.auth-panel {
  width: 100%;
  max-width: 420px;
  padding: 28px 22px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
  box-shadow: 0 12px 32px rgba(var(--color-text-rgb), .08);
}

.auth-header {
  margin-bottom: 22px;
}

.auth-kicker {
  margin-bottom: 6px;
  color: var(--color-primary-dark);
  font-size: 0.82rem;
  font-weight: 900;
}

.auth-header h1 {
  font-size: 1.75rem;
  line-height: 1.2;
}

.auth-header p:not(.auth-kicker) {
  margin-top: 6px;
  color: var(--color-text-sub);
  font-size: 0.95rem;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-field {
  display: grid;
  gap: 6px;
}

.auth-field label,
.auth-check {
  color: var(--color-text);
  font-size: 0.92rem;
  font-weight: 800;
}

.auth-field input[type="email"],
.auth-field input[type="password"],
.auth-field input[type="number"] {
  width: 100%;
  min-height: 50px;
  padding: 10px 12px;
  border: 2px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
}

.auth-field input:focus {
  border-color: var(--color-primary);
  outline: none;
  box-shadow: 0 0 0 3px var(--color-primary-soft);
}

.auth-check {
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--color-primary);
}

.auth-check--consent {
  align-items: flex-start;
  font-weight: 600;
  line-height: 1.5;
}

.auth-check--consent input {
  margin-top: 3px;
  flex-shrink: 0;
}

.auth-inline-link {
  color: var(--color-primary-dark);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-inline-link:hover {
  color: var(--color-primary);
}

.auth-submit {
  margin-top: 4px;
  max-width: none;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: var(--color-text-sub);
  font-size: 0.85rem;
  font-weight: 800;
}

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

.auth-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: none;
}

.auth-google-icon {
  display: inline-flex;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

.auth-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  justify-content: center;
  margin-top: 18px;
  font-size: 0.92rem;
  font-weight: 800;
}

.auth-links a {
  color: var(--color-primary-dark);
  text-decoration: none;
}

.auth-links a:hover {
  text-decoration: underline;
}

.auth-message,
.auth-errors {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--color-primary-soft);
  color: var(--color-primary-dark);
  font-size: 0.92rem;
  font-weight: 800;
}

.auth-message-alert,
.auth-errors {
  background: var(--color-warn-bg);
  color: var(--color-warn);
}

.auth-errors ul {
  margin: 8px 0 0 18px;
  font-weight: 700;
}

.auth-errors li + li {
  margin-top: 4px;
}
/* --- Legal pages --- */

.legal-page {
  min-height: 100dvh;
  padding: 24px 16px 48px;
  background:
    linear-gradient(180deg, rgba(255, 247, 238, .9), rgba(244, 241, 236, .95));
}

.legal-document {
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 22px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
  box-shadow: 0 12px 32px rgba(var(--color-text-rgb), .08);
}

.legal-header {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--color-border);
}

.legal-kicker {
  margin-bottom: 6px;
  color: var(--color-primary-dark);
  font-size: 0.82rem;
  font-weight: 900;
}

.legal-header h1 {
  font-size: 1.75rem;
  line-height: 1.2;
}

.legal-meta {
  margin-top: 10px;
  color: var(--color-text-sub);
  font-size: 0.88rem;
  line-height: 1.6;
}

.legal-section {
  margin-bottom: 24px;
}

.legal-section h2 {
  margin-bottom: 10px;
  font-size: 1.08rem;
  line-height: 1.4;
}

.legal-section h3 {
  margin: 14px 0 8px;
  font-size: 0.98rem;
  line-height: 1.4;
}

.legal-section p,
.legal-section li {
  color: var(--color-text);
  font-size: 0.92rem;
  line-height: 1.75;
}

.legal-section p + p,
.legal-section ul {
  margin-top: 10px;
}

.legal-section ul {
  padding-left: 1.2em;
}

.legal-section li + li {
  margin-top: 6px;
}

.legal-contact {
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--color-bg);
}

.legal-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border);
}

.legal-link,
.settings-legal-link {
  color: var(--color-primary-dark);
  font-size: 0.92rem;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-link:hover,
.settings-legal-link:hover {
  color: var(--color-primary);
}

/* --- Access guide page --- */

.access-guide-page .legal-document {
  max-width: 480px;
}

.access-guide-intro p {
  font-size: 0.98rem;
  line-height: 1.8;
}

.access-guide-steps ol {
  margin: 0;
  padding-left: 1.4em;
}

.access-guide-steps li {
  color: var(--color-text);
  font-size: 0.92rem;
  line-height: 1.75;
}

.access-guide-steps li + li {
  margin-top: 8px;
}

.access-guide-note p {
  margin: 0;
  color: var(--color-text-sub);
  font-size: 0.86rem;
  line-height: 1.7;
}
