.auth-page {
  min-height: 100dvh;
  background: radial-gradient(ellipse at 50% 0, var(--brand-tint) 0, var(--wash) 52%, #fff 100%);
}
.auth-shell { max-width: 1120px; min-height: 100dvh; margin: auto; padding: 22px clamp(18px, 5vw, 46px); }
.auth-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.auth-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 750; }
.auth-brand img { display: block; border-radius: 12px; }
.auth-back, .auth-help a, .auth-restart { color: var(--brand-ink); font-size: .85rem; text-underline-offset: 4px; }
.auth-main { width: min(100%, 460px); margin: clamp(56px, 12vh, 136px) auto 0; }
.auth-panel { padding: clamp(21px, 6vw, 39px); background: #fff; border: 1px solid var(--edge); border-radius: 24px; box-shadow: 0 15px 48px #174e5919; }
.auth-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--soft); color: var(--brand-ink); }
.auth-panel h1 { margin: 20px 0 8px; font-size: clamp(1.55rem, 5vw, 2rem); line-height: 1.4; }
.auth-intro, .auth-alert { font-size: .9rem; color: var(--muted); line-height: 1.9; margin: 0 0 22px; overflow-wrap: anywhere; }
.auth-alert { background: var(--wash); color: var(--brand-ink); border: 1px solid var(--edge); border-radius: 10px; padding: 9px 11px; margin-bottom: 15px; }
.auth-alert[role=alert] { background: #fff4ef; border-color: #f4d8ca; color: #803520; }
.auth-form { display: grid; gap: 10px; }
.auth-form label { font-size: .88rem; font-weight: 650; }
.auth-form input:not([type=hidden]) { width: 100%; min-height: 52px; border-radius: 11px; border: 1px solid var(--input-edge); padding: 10px 13px; background: white; color: var(--text); font-size: 1rem; text-align: start; }
.auth-form input:disabled { background: var(--wash); }
.auth-form .auth-code { text-align: center; letter-spacing: .4em; font-variant-numeric: tabular-nums; }
.auth-submit { min-height: 52px; margin-top: 7px; border: 0; border-radius: 11px; background: var(--brand); color: var(--text); font-weight: 720; cursor: pointer; }
.auth-submit:hover:not(:disabled) { background: var(--brand-hover); }
.auth-submit:disabled { background: #dfedef; color: #496870; cursor: default; }
.auth-restart { justify-self: center; margin-top: 6px; }
.auth-help { text-align: center; margin: 24px 0; }
@media (max-width: 500px) {
  .auth-shell { padding-block: 14px; }
  .auth-brand img { width: 42px; height: 42px; }
  .auth-main { margin-top: clamp(32px, 8vh, 78px); }
}

.auth-form .activity-picker { min-inline-size: 0; margin: 0; padding: 1rem; border: 1px solid var(--input-edge, #cfdee0); border-radius: 12px; }
.auth-form .activity-picker legend { padding-inline: .3rem; font-weight: 700; }
.auth-form .activity-picker select { display: block; inline-size: 100%; margin-block-start: .35rem; padding: .65rem; font: inherit; border: 1px solid var(--input-edge, #cfdee0); border-radius: 8px; background: #fff; }
.auth-activity-choice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin: 0 0 18px;
  padding: 10px 12px;
  border: 1px solid var(--edge);
  border-radius: 14px;
  background: var(--soft, #e7f6f7);
}
.auth-activity-label { flex: 1 1 9rem; min-inline-size: 0; font-size: .875rem; line-height: 1.6; }
.auth-activity-label strong { color: var(--brand-deep); }

.auth-panel .auth-help { margin: 12px 0 0; }
.auth-action-group { display: grid; gap: 10px; }
.auth-panel :is(.auth-help > a:not(.qcar-action), .auth-action-group > a, .auth-back, .auth-restart, .auth-activity-edit) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  max-inline-size: 100%;
  padding: 9px 14px;
  border: 1px solid var(--input-edge, #a9cbd0);
  border-radius: 11px;
  background: #fff;
  color: var(--brand-deep, #153d46);
  font-size: .85rem;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
  text-decoration: none;
}
.auth-panel :is(.auth-help > a:not(.qcar-action), .auth-action-group > a, .auth-back, .auth-restart) { inline-size: 100%; }
.auth-panel .auth-activity-edit { flex: 0 0 auto; border-color: var(--brand-ink, #1f606c); }
.auth-activity-edit::after {
  content: "";
  inline-size: 7px;
  block-size: 7px;
  border-top: 1.5px solid currentColor;
  border-left: 1.5px solid currentColor;
  transform: rotate(-45deg);
}
.auth-panel :is(.auth-help > a:not(.qcar-action), .auth-action-group > a, .auth-back, .auth-restart, .auth-activity-edit):hover {
  background: var(--wash, #f1f9fa);
  border-color: var(--brand-ink, #1f606c);
}
.auth-panel :is(.auth-help > a:not(.qcar-action), .auth-action-group > a, .auth-back, .auth-restart, .auth-activity-edit):focus-visible {
  outline: 2px solid var(--brand-ink, #1f606c);
  outline-offset: 3px;
}
@media (max-width: 360px) {
  .auth-panel .auth-activity-edit { inline-size: 100%; }
}

.auth-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 48px;
  padding: 8px 14px;
  margin: 14px 0 20px;
  border: 1px solid #747775;
  border-radius: 10px;
  background: #fff;
  color: #1f1f1f;
  font-size: .9rem;
  font-weight: 650;
  text-decoration: none;
}
.auth-google svg { flex: none; }
.auth-google:hover { background: #f3f7fc; }
.auth-google:focus-visible { outline: 2px solid #1a73e8; outline-offset: 3px; }
