/* Sign-in and sign-up page ----------------------------------------------------- */
.auth-page {
  --auth-brand: #3154f5;
  --auth-brand-dark: #2440c8;
  --auth-ink: #172033;
  --auth-muted: #5b6678;
  --auth-line: #d5dbe6;
  --auth-panel: #0f1b3d;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  background: #fff;
  color: var(--auth-ink);
}
.auth-page [hidden] { display: none !important; }

.auth-panel { display: flex; flex-direction: column; justify-content: space-between; gap: 3rem; padding: 2.5rem clamp(2rem, 4vw, 3.5rem); background: var(--auth-panel); color: #fff; }
.auth-brand { display: inline-flex; align-items: center; gap: .6rem; color: inherit; font-size: 1.0625rem; font-weight: 700; text-decoration: none; }
.auth-brand img { width: 2rem; height: 2rem; }
.auth-panel-copy { max-width: 27rem; }
.auth-panel-copy h2 { margin: 0; font-size: clamp(1.75rem, 2.6vw, 2.25rem); font-weight: 700; line-height: 1.2; letter-spacing: -.02em; }
.auth-panel-copy ul { display: grid; gap: .9rem; margin: 1.75rem 0 0; padding: 0; list-style: none; color: #cdd6ea; font-size: .9375rem; }
.auth-panel-copy li { display: flex; align-items: flex-start; gap: .65rem; }
.auth-panel-copy svg { flex: 0 0 auto; width: 1.15rem; height: 1.15rem; margin-top: .15rem; fill: none; stroke: #8ea2ff; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.2; }
.auth-panel-note { margin: 0; color: #93a0bb; font-size: .8125rem; }

.auth-main { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2rem; padding: 2.5rem 1.5rem; }
.auth-card { width: 100%; max-width: 25rem; }
.auth-mobile-brand { display: none; margin-bottom: 2rem; color: var(--auth-ink); }
.auth-card h1 { margin: 0; font-size: 1.625rem; font-weight: 700; line-height: 1.25; letter-spacing: -.015em; }
.auth-hint { margin: .4rem 0 0; color: var(--auth-muted); font-size: .9375rem; }

.auth-page .form-result { min-height: 0; margin: 1rem 0 0; padding: .65rem .8rem; border-radius: .5rem; font-size: .875rem; }
.auth-page .form-result:empty { display: none; }
.auth-page .form-result.error { background: #fef2f2; color: #b42318; }
.auth-page .form-result.success { background: #ecfdf3; color: #067647; }
.auth-confirmation { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .25rem .75rem; margin-top: .6rem; color: var(--auth-muted); font-size: .875rem; }

.auth-google { display: flex; align-items: center; justify-content: center; gap: .65rem; min-height: 2.875rem; margin-top: 1.5rem; border: 1px solid var(--auth-line); border-radius: .5rem; background: #fff; color: var(--auth-ink); font-size: .9375rem; font-weight: 600; text-decoration: none; }
.auth-google:hover { background: #f6f7fb; }
.auth-google svg { width: 1.15rem; height: 1.15rem; }
.auth-page .form-divider { margin: 1.25rem 0; color: var(--auth-muted); font-size: .8125rem; }
.auth-page .form-divider::before, .auth-page .form-divider::after { background: var(--auth-line); }

.auth-form { display: grid; gap: 1rem; margin-top: 1.5rem; }
.auth-oauth:not([hidden]) + .auth-views .auth-form { margin-top: 0; }
.auth-field { display: grid; gap: .35rem; }
.auth-field label { color: var(--auth-ink); font-size: .875rem; font-weight: 600; }
.auth-field-heading { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; }
.auth-field-heading a { font-size: .8125rem; }
.auth-field input { width: 100%; min-height: 2.875rem; padding: .6rem .8rem; border: 1px solid var(--auth-line); border-radius: .5rem; background: #fff; color: var(--auth-ink); font: inherit; font-size: 1rem; }
.auth-field input::placeholder { color: #8390a5; }
.auth-field input:focus { border-color: var(--auth-brand); outline: 3px solid rgba(49, 84, 245, .18); }
.auth-field .password-field { position: relative; }
.auth-field .password-field input { padding-right: 3rem; }
.auth-field-help { margin: 0; color: var(--auth-muted); font-size: .8125rem; }
.auth-field input.auth-code { font-size: 1.125rem; font-variant-numeric: tabular-nums; letter-spacing: .15em; }

.auth-page .button-primary { width: 100%; min-height: 2.875rem; margin: .25rem 0 0; padding: .6rem 1rem; border: 0; border-radius: .5rem; background: var(--auth-brand); box-shadow: none; color: #fff; font-size: .9375rem; font-weight: 600; cursor: pointer; transform: none; }
.auth-page .button-primary:hover:not(:disabled) { background: var(--auth-brand-dark); box-shadow: none; transform: none; }
.auth-page .auth-done-action { display: flex; align-items: center; justify-content: center; margin-top: 1.5rem; text-decoration: none; }
.auth-resend { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; margin-top: 1rem; font-size: .875rem; }

.auth-alternatives { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: .6rem; margin-top: .85rem; }
.auth-alternatives a, .auth-alternatives button { display: flex; align-items: center; justify-content: center; min-height: 2.5rem; padding: .4rem .6rem; border: 1px solid var(--auth-line); border-radius: .5rem; background: #fff; color: var(--auth-ink); font: inherit; font-size: .8125rem; font-weight: 600; text-decoration: none; cursor: pointer; }
.auth-alternatives a:hover, .auth-alternatives button:hover { background: #f6f7fb; }

.auth-switch { margin: 1.5rem 0 0; color: var(--auth-muted); font-size: .9375rem; text-align: center; }
.auth-legal { margin: .85rem 0 0; color: var(--auth-muted); font-size: .8125rem; text-align: center; text-wrap: balance; }
.auth-link, .auth-page .auth-legal a, .auth-field-heading a { padding: 0; border: 0; background: none; color: var(--auth-brand); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.auth-link:hover, .auth-page .auth-legal a:hover, .auth-field-heading a:hover { text-decoration: underline; }
.auth-link:disabled { color: var(--auth-muted); font-weight: 500; text-decoration: none; cursor: default; }
.auth-field-heading a { font-size: .8125rem; }

.auth-footer { display: flex; gap: 1.25rem; color: var(--auth-muted); font-size: .8125rem; }
.auth-footer a { color: inherit; text-decoration: none; }
.auth-footer a:hover { color: var(--auth-ink); text-decoration: underline; }

.auth-page a:focus-visible, .auth-page button:focus-visible { outline: 3px solid rgba(49, 84, 245, .4); outline-offset: 2px; }

@media (max-width: 900px) {
  .auth-page { grid-template-columns: minmax(0, 1fr); }
  .auth-panel { display: none; }
  .auth-mobile-brand { display: inline-flex; }
  .auth-main { justify-content: flex-start; padding: 2rem 1rem; }
}
