/* v1.35: log in / forgot password / new password, in the card look (one centered card on a quiet page with
   faint rings, like Aether's activation page) with Andivo's black ring-and-dot. Loaded after andivo.css, only
   on these three pages. Light and dark follow the person's theme; the app.css colors are reused. */

.auth-page {
  --ac-page: #F4F3EF; --ac-card: #FFFFFF; --ac-line: #E7E5E0; --ac-field: #F4F3F0; --ac-field-line: #E4E2DC;
  --ac-ink: #0A0B0F; --ac-mute: #6B6B70; --ac-ring: rgba(10, 11, 15, .06); --ac-ok: #1F8A5B; --ac-ok-soft: #E3F4EA;
  --ac-focus: #0A0B0F; --ac-shadow: 0 1px 2px rgba(10, 11, 15, .04), 0 12px 40px -12px rgba(10, 11, 15, .14);
  margin: 0; min-height: 100vh; min-height: 100dvh; background: var(--ac-page); color: var(--ac-ink);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased;
}
:root[data-theme="dark"] .auth-page {
  --ac-page: #0B0B0C; --ac-card: #161618; --ac-line: #2A2A2D; --ac-field: #1E1E21; --ac-field-line: #2E2E32;
  --ac-ink: #F2F0EA; --ac-mute: #9A9AA0; --ac-ring: rgba(242, 240, 234, .05); --ac-ok: #3DDCA6; --ac-ok-soft: #10302A;
  --ac-focus: #F2F0EA; --ac-shadow: 0 0 0 1px rgba(255, 255, 255, .02), 0 20px 50px -20px rgba(0, 0, 0, .7);
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] .auth-page {
    --ac-page: #0B0B0C; --ac-card: #161618; --ac-line: #2A2A2D; --ac-field: #1E1E21; --ac-field-line: #2E2E32;
    --ac-ink: #F2F0EA; --ac-mute: #9A9AA0; --ac-ring: rgba(242, 240, 234, .05); --ac-ok: #3DDCA6; --ac-ok-soft: #10302A;
    --ac-focus: #F2F0EA; --ac-shadow: 0 0 0 1px rgba(255, 255, 255, .02), 0 20px 50px -20px rgba(0, 0, 0, .7);
  }
}

/* faint rings behind the card, fading out toward the edges */
.auth-page::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: repeating-radial-gradient(circle at 50% 38%, transparent 0 79px, var(--ac-ring) 79px 80px);
  -webkit-mask-image: radial-gradient(circle at 50% 38%, #000 18%, transparent 68%);
  mask-image: radial-gradient(circle at 50% 38%, #000 18%, transparent 68%);
}

.ac-wrap {
  position: relative; z-index: 1; min-height: 100vh; min-height: 100dvh; box-sizing: border-box;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: max(28px, env(safe-area-inset-top)) 18px max(28px, env(safe-area-inset-bottom));
}
.ac-card {
  width: 100%; max-width: 440px; box-sizing: border-box; padding: 30px 32px 28px;
  background: var(--ac-card); border: 1px solid var(--ac-line); border-radius: 24px; box-shadow: var(--ac-shadow);
}

/* logo + language */
.ac-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 26px; }
.ac-brand { display: inline-flex; color: var(--ac-ink); text-decoration: none; border-radius: 8px; }
.ac-brand .wordmark { display: block; color: var(--ac-ink); }
.ac-lang { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--ac-field); }
.ac-lang a { padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--ac-mute); text-decoration: none; }
.ac-lang a[aria-current="true"] { background: var(--ac-card); color: var(--ac-ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }

.ac-badge-icon { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 16px; border-radius: 16px; background: var(--ac-field); color: var(--ac-ink); }
.ac-h1 { margin: 0; font-family: "Bricolage Grotesque", Inter, system-ui, sans-serif; font-size: 30px; font-weight: 800; letter-spacing: -.025em; line-height: 1.1; }
.ac-sub { margin: 8px 0 0; font-size: 15px; line-height: 1.5; color: var(--ac-mute); overflow-wrap: anywhere; }
.ac-rule-line { margin: 22px 0; border: 0; border-top: 1px solid var(--ac-line); }

.ac-alert { margin: 0 0 16px; padding: 11px 14px; border-radius: 12px; font-size: 14px; line-height: 1.45; }
.ac-alert-error { background: var(--danger-soft, #FDECEC); color: var(--danger, #C8282E); }
.ac-alert-ok { background: var(--ac-ok-soft); color: var(--ac-ok); }

/* Continue with Google, then "or" */
.ac-google {
  display: flex; align-items: center; justify-content: center; gap: 10px; height: 50px; box-sizing: border-box;
  border: 1px solid var(--ac-field-line); border-radius: 999px; background: var(--ac-card); color: var(--ac-ink);
  font-size: 15px; font-weight: 600; text-decoration: none; transition: background .15s, border-color .15s;
}
.ac-google:hover { background: var(--ac-field); }
.ac-google:focus-visible { outline: 3px solid var(--ac-focus); outline-offset: 2px; }
.ac-or { display: flex; align-items: center; gap: 12px; margin: 18px 0; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ac-mute); }
.ac-or::before, .ac-or::after { content: ""; flex: 1; border-top: 1px solid var(--ac-line); }

/* fields: label above, rounded gray box with an icon on the left (and the eye on the right) */
.ac-form { display: flex; flex-direction: column; }
.ac-label { margin: 0 0 7px; font-size: 13.5px; font-weight: 600; }
.ac-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.ac-field { position: relative; margin-bottom: 16px; }
.ac-field .f-ic { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--ac-mute); pointer-events: none; }
.ac-field input {
  width: 100%; height: 50px; box-sizing: border-box; padding: 0 48px 0 44px; margin: 0;
  border: 1px solid var(--ac-field-line); border-radius: 14px; background: var(--ac-field); color: var(--ac-ink);
  font: inherit; font-size: 16px; outline: none; transition: border-color .15s, box-shadow .15s, background .15s;
  -webkit-appearance: none; appearance: none;
}
.ac-field input::placeholder { color: var(--ac-mute); opacity: .75; }
.ac-field input:focus { border-color: var(--ac-focus); background: var(--ac-card); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ac-focus) 16%, transparent); }
.ac-field input[aria-invalid="true"] { border-color: var(--danger, #C8282E); }
.ac-field .pw-toggle { right: 6px; width: 38px; height: 38px; border-radius: 10px; color: var(--ac-mute); }

.ac-check { display: flex; align-items: center; gap: 10px; margin: 2px 0 20px; font-size: 14px; color: var(--ac-mute); cursor: pointer; }
.ac-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--ac-ink); }

.ac-btn {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 52px; box-sizing: border-box;
  border: 0; border-radius: 999px; background: var(--ac-ink); color: var(--ac-card);
  font: inherit; font-size: 16px; font-weight: 600; text-decoration: none; cursor: pointer; transition: opacity .15s, transform .1s;
}
.ac-btn:hover { opacity: .9; }
.ac-btn:active { transform: scale(.99); }
.ac-btn:focus-visible { outline: 3px solid var(--ac-focus); outline-offset: 3px; }
.ac-btn[disabled] { opacity: .35; cursor: not-allowed; }

.ac-link { color: var(--ac-ink); font-size: 13.5px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--ac-ink) 30%, transparent); }
.ac-link:hover { text-decoration-color: currentColor; }
.ac-help { margin: 20px 0 0; text-align: center; font-size: 14px; color: var(--ac-mute); }

/* new password: live checklist */
.ac-rules { margin: -4px 0 18px; padding: 14px 16px; border-radius: 14px; background: var(--ac-field); }
.ac-rule { display: flex; align-items: center; gap: 9px; margin: 0; font-size: 13.5px; color: var(--ac-mute); transition: color .15s; }
.ac-rule-main { font-weight: 600; color: var(--ac-ink); }
.ac-rules-cap { margin: 12px 0 8px; font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ac-mute); }
.ac-rules-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; }
.ac-tick { flex: none; position: relative; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--ac-field-line); background: var(--ac-card); transition: background .15s, border-color .15s; }
.ac-rule.is-ok { color: var(--ac-ink); }
.ac-rule.is-ok .ac-tick { border-color: var(--ac-ok); background: var(--ac-ok); }
.ac-rule.is-ok .ac-tick::after { content: ""; position: absolute; left: 4.5px; top: 1.5px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.ac-match { margin: -8px 0 16px; font-size: 13.5px; font-weight: 600; color: var(--ac-mute); }
.ac-match.is-ok { color: var(--ac-ok); }

/* under the card */
.ac-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; margin: 22px 0 0; padding: 0; list-style: none; }
.ac-badges li { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; color: var(--ac-mute); }
.ac-foot { display: flex; gap: 18px; margin-top: 14px; font-size: 12.5px; }
.ac-foot a { color: var(--ac-mute); text-decoration: none; }
.ac-foot a:hover { color: var(--ac-ink); text-decoration: underline; }

/* essential-cookies card, bottom right (bottom of the screen on phones) */
.ac-cookie {
  position: fixed; z-index: 5; right: 20px; bottom: 20px; width: 300px; box-sizing: border-box; padding: 18px 18px 16px;
  background: var(--ac-card); border: 1px solid var(--ac-line); border-radius: 18px; box-shadow: var(--ac-shadow);
}
.ac-cookie[hidden] { display: none; }
.ac-eyebrow { margin: 0 0 6px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ac-mute); }
.ac-cookie h2 { margin: 0 0 6px; font-size: 16px; font-weight: 700; }
.ac-cookie p:not(.ac-eyebrow) { margin: 0; font-size: 13px; line-height: 1.5; color: var(--ac-mute); }
.ac-cookie-row { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }
.ac-cookie-row a { font-size: 13px; font-weight: 600; color: var(--ac-ink); }
.ac-cookie-row button { height: 36px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--ac-ink); color: var(--ac-card); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }

@media (max-width: 520px) {
  .ac-wrap { justify-content: flex-start; padding-top: max(18px, env(safe-area-inset-top)); }
  .ac-card { padding: 24px 20px 22px; border-radius: 22px; }
  .ac-top { margin-bottom: 22px; }
  .ac-h1 { font-size: 27px; }
  .ac-cookie { left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); width: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .ac-field input, .ac-btn, .ac-google, .ac-tick, .ac-rule { transition: none; }
}
