/* Mapabox public password recovery — follows the same global light/dark theme as login. */
:root {
  --auth-accent: var(--mb-accent, #0cae83);
  --auth-accent-ink: var(--mb-accent-ink, #07131d);
  --auth-radius: 16px;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
html { color-scheme: dark; }
body.auth-recovery-page {
  min-height: 100vh;
  margin: 0;
  color: var(--auth-text);
  background: var(--auth-page);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
body.auth-recovery-page::before {
  position: fixed;
  inset: 0;
  z-index: 0;
  content: "";
  pointer-events: none;
  opacity: .45;
  background-image:
    linear-gradient(var(--auth-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--auth-grid) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 35% 48%, #000 4%, transparent 76%);
}

html[data-auth-theme="dark"] {
  --auth-page: var(--mb-login-bg, #0b1522);
  --auth-visual: var(--mb-login-visual, #0d1928);
  --auth-panel: var(--mb-login-panel, #111f30);
  --auth-text: var(--mb-login-text, #f3f7fc);
  --auth-muted: var(--mb-login-muted, #a5b4c6);
  --auth-soft: #8fa4bb;
  --auth-border: #2a3c51;
  --auth-field: #0b1725;
  --auth-field-border: #34475d;
  --auth-label: #c8d4e1;
  --auth-placeholder: #8192a7;
  --auth-grid: rgba(125,158,194,.11);
  --auth-card-shadow: 0 24px 70px rgba(0,0,0,.28);
  --auth-info-bg: rgba(45,133,188,.12);
  --auth-info-border: rgba(90,169,218,.25);
  --auth-info-text: #b8d8ee;
  --auth-error-bg: rgba(216,72,83,.12);
  --auth-error-border: rgba(241,117,126,.28);
  --auth-error-text: #ffb7bd;
}
html[data-auth-theme="light"] {
  --auth-page: #f2f7f4;
  --auth-visual: #edf5f0;
  --auth-panel: #ffffff;
  --auth-text: #1b3027;
  --auth-muted: #64796d;
  --auth-soft: #71877a;
  --auth-border: #dce8df;
  --auth-field: #fbfdfb;
  --auth-field-border: #cfddd3;
  --auth-label: #354f40;
  --auth-placeholder: #8b9d90;
  --auth-grid: rgba(71,113,87,.10);
  --auth-card-shadow: 0 24px 60px rgba(35,75,51,.09);
  --auth-info-bg: #eef6fc;
  --auth-info-border: #d7e8f5;
  --auth-info-text: #42647e;
  --auth-error-bg: #fff1f1;
  --auth-error-border: #f4d2d2;
  --auth-error-text: #a83c45;
}

.auth-recovery-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.58fr) minmax(410px, .92fr);
  min-height: 100vh;
  width: 100%;
}
.auth-recovery-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  min-height: 100vh;
  overflow: hidden;
  padding: clamp(28px, 4.5vw, 72px) clamp(26px, 5.5vw, 90px) 28px;
  border-right: 1px solid var(--auth-border);
  background:
    radial-gradient(ellipse at 58% 60%, rgba(8,185,135,.10), transparent 48%),
    linear-gradient(145deg, var(--auth-visual), var(--auth-page));
}
.auth-recovery-visual::after {
  position: absolute;
  right: -170px;
  bottom: -245px;
  width: min(56vw, 700px);
  aspect-ratio: 1;
  content: "";
  pointer-events: none;
  border: 1px solid color-mix(in srgb, var(--auth-accent) 16%, transparent);
  border-radius: 50%;
  box-shadow: 0 0 0 38px color-mix(in srgb, var(--auth-accent) 4%, transparent), 0 0 0 88px color-mix(in srgb, var(--auth-accent) 3%, transparent);
}
.auth-recovery-brand {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 13px;
  width: fit-content;
  text-decoration: none;
  color: inherit;
}
.auth-recovery-brand img {
  display: block;
  width: 48px;
  height: 48px;
  object-fit: contain;
}
.auth-recovery-brand-copy { display: grid; gap: 3px; }
.auth-recovery-brand-name { color: var(--auth-text); font-size: 19px; line-height: 1.1; font-weight: 780; letter-spacing: -.045em; }
.auth-recovery-brand-tagline { color: var(--auth-muted); font-size: 9px; font-weight: 650; letter-spacing: .11em; text-transform: uppercase; }
.auth-recovery-story {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  margin: auto 0;
  padding: 72px 0 66px;
}
.auth-recovery-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 20px;
  color: var(--auth-accent);
  font-size: 10px;
  line-height: 1.3;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.auth-recovery-kicker::before {
  width: 22px;
  height: 2px;
  content: "";
  border-radius: 2px;
  background: var(--auth-accent);
  box-shadow: 0 0 12px color-mix(in srgb, var(--auth-accent) 46%, transparent);
}
.auth-recovery-story h1 {
  max-width: 650px;
  margin: 0;
  color: var(--auth-text);
  font-size: clamp(38px, 5vw, 66px);
  line-height: 1.02;
  font-weight: 790;
  letter-spacing: -.055em;
}
.auth-recovery-story h1 span { color: var(--auth-accent); }
.auth-recovery-story > p {
  max-width: 570px;
  margin: 22px 0 0;
  color: var(--auth-muted);
  font-size: clamp(13px, 1.1vw, 15px);
  line-height: 1.8;
}
.auth-recovery-process {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
  max-width: 720px;
  margin-top: clamp(36px, 6vh, 64px);
}
.auth-recovery-step {
  min-width: 0;
  padding: 15px 15px 16px;
  border: 1px solid color-mix(in srgb, var(--auth-muted) 22%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--auth-panel) 68%, transparent);
  backdrop-filter: blur(10px);
}
.auth-recovery-step-number { color: var(--auth-accent); font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.auth-recovery-step strong { display: block; margin-top: 10px; color: var(--auth-text); font-size: 12px; font-weight: 740; }
.auth-recovery-step span { display: block; margin-top: 5px; color: var(--auth-muted); font-size: 10px; line-height: 1.55; }
.auth-recovery-visual-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--auth-soft);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.auth-recovery-secure { display: inline-flex; align-items: center; gap: 7px; letter-spacing: .04em; text-transform: none; }
.auth-recovery-secure svg { width: 14px; height: 14px; color: var(--auth-accent); }

.auth-recovery-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 100vh;
  padding: 48px clamp(26px, 4vw, 64px);
  background: var(--auth-panel);
}
.auth-recovery-content { width: 100%; max-width: 430px; }
.auth-recovery-mobile-brand { display: none; }
.auth-recovery-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: clamp(36px, 6vh, 58px);
  color: var(--auth-muted);
  font-size: 11px;
  font-weight: 650;
  text-decoration: none;
  transition: color .16s ease;
}
.auth-recovery-back:hover { color: var(--auth-accent); }
.auth-recovery-back svg { width: 15px; height: 15px; }
.auth-recovery-overline { margin: 0 0 10px; color: var(--auth-accent); font-size: 9px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.auth-recovery-title { margin: 0; color: var(--auth-text); font-size: clamp(27px, 2.5vw, 34px); line-height: 1.12; font-weight: 780; letter-spacing: -.045em; }
.auth-recovery-description { margin: 12px 0 28px; color: var(--auth-muted); font-size: 12px; line-height: 1.75; }
.auth-recovery-form { display: grid; gap: 17px; }
.auth-recovery-field { display: grid; gap: 8px; }
.auth-recovery-field label { color: var(--auth-label); font-size: 11px; font-weight: 700; }
.auth-recovery-field input {
  display: block;
  width: 100%;
  min-height: 49px;
  padding: 0 14px;
  border: 1px solid var(--auth-field-border);
  border-radius: 9px;
  outline: 0;
  color: var(--auth-text);
  background: var(--auth-field);
  font: inherit;
  font-size: 12px;
  color-scheme: inherit;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.auth-recovery-field input::placeholder { color: var(--auth-placeholder); opacity: 1; }
.auth-recovery-field input:hover { border-color: color-mix(in srgb, var(--auth-accent) 48%, var(--auth-field-border)); }
.auth-recovery-field input:focus { border-color: var(--auth-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--auth-accent) 17%, transparent); }
.auth-recovery-hint { color: var(--auth-soft); font-size: 10px; line-height: 1.55; }
.auth-recovery-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 49px;
  margin-top: 2px;
  padding: 11px 17px;
  border: 1px solid color-mix(in srgb, var(--auth-accent) 85%, #000);
  border-radius: 9px;
  color: var(--auth-accent-ink);
  background: var(--auth-accent);
  box-shadow: 0 8px 22px color-mix(in srgb, var(--auth-accent) 20%, transparent);
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .16s ease, filter .16s ease, box-shadow .16s ease;
}
.auth-recovery-submit:hover { filter: brightness(1.06); box-shadow: 0 10px 26px color-mix(in srgb, var(--auth-accent) 27%, transparent); }
.auth-recovery-submit:active { transform: translateY(1px); }
.auth-recovery-submit:focus-visible { outline: 3px solid color-mix(in srgb, var(--auth-accent) 35%, transparent); outline-offset: 3px; }
.auth-recovery-submit svg { width: 16px; height: 16px; }
.auth-recovery-notice, .auth-recovery-error {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 17px;
  padding: 12px 13px;
  border: 1px solid;
  border-radius: 9px;
  font-size: 10px;
  line-height: 1.6;
}
.auth-recovery-notice { color: var(--auth-info-text); background: var(--auth-info-bg); border-color: var(--auth-info-border); }
.auth-recovery-error { color: var(--auth-error-text); background: var(--auth-error-bg); border-color: var(--auth-error-border); }
.auth-recovery-notice svg, .auth-recovery-error svg { flex: 0 0 auto; width: 15px; height: 15px; margin-top: 1px; }
.auth-recovery-help {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-top: 22px;
  padding: 13px 14px;
  border: 1px solid var(--auth-border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--auth-visual) 55%, transparent);
}
.auth-recovery-help svg { flex: 0 0 auto; width: 17px; height: 17px; margin-top: 1px; color: var(--auth-accent); }
.auth-recovery-help p { margin: 0; color: var(--auth-muted); font-size: 10px; line-height: 1.65; }
.auth-recovery-help strong { color: var(--auth-text); font-weight: 750; }
.auth-recovery-footer { margin-top: 30px; padding-top: 19px; border-top: 1px solid var(--auth-border); text-align: center; color: var(--auth-soft); font-size: 10px; }
.auth-recovery-footer a { color: var(--auth-muted); font-weight: 700; text-decoration: none; }
.auth-recovery-footer a:hover { color: var(--auth-accent); }
.auth-recovery-expired {
  padding: 17px;
  border: 1px solid var(--auth-border);
  border-radius: 11px;
  background: color-mix(in srgb, var(--auth-visual) 60%, transparent);
}
.auth-recovery-expired-icon { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 13px; border-radius: 12px; color: #d49a43; background: rgba(212,154,67,.12); }
.auth-recovery-expired-icon svg { width: 21px; height: 21px; }
.auth-recovery-expired strong { display: block; color: var(--auth-text); font-size: 12px; }
.auth-recovery-expired p { margin: 6px 0 15px; color: var(--auth-muted); font-size: 10px; line-height: 1.6; }
.auth-recovery-expired .auth-recovery-submit { text-decoration: none; }

@media (max-width: 980px) {
  .auth-recovery-shell { grid-template-columns: minmax(0, 1.12fr) minmax(365px, .88fr); }
  .auth-recovery-visual { padding: 30px 30px 24px; }
  .auth-recovery-story h1 { font-size: clamp(35px, 5vw, 52px); }
  .auth-recovery-process { grid-template-columns: 1fr; max-width: 360px; margin-top: 30px; }
  .auth-recovery-step { padding: 11px 13px; }
  .auth-recovery-step strong { margin-top: 5px; }
  .auth-recovery-step span { margin-top: 2px; }
  .auth-recovery-panel { padding: 36px 28px; }
}
@media (max-width: 760px) {
  .auth-recovery-shell { display: flex; flex-direction: column; min-height: 100vh; }
  .auth-recovery-visual { min-height: auto; padding: 22px 22px 23px; border-right: 0; border-bottom: 1px solid var(--auth-border); }
  .auth-recovery-brand img { width: 39px; height: 39px; }
  .auth-recovery-brand-name { font-size: 17px; }
  .auth-recovery-story { margin: 35px 0 0; padding: 0 0 4px; }
  .auth-recovery-story h1 { max-width: 540px; font-size: clamp(31px, 8vw, 43px); }
  .auth-recovery-story > p { margin-top: 12px; font-size: 11px; }
  .auth-recovery-process, .auth-recovery-visual-footer { display: none; }
  .auth-recovery-panel { min-height: 0; padding: 35px 22px 42px; }
  .auth-recovery-content { max-width: 520px; }
  .auth-recovery-back { margin-bottom: 29px; }
}
@media (max-width: 420px) {
  .auth-recovery-visual { padding: 19px 18px 22px; }
  .auth-recovery-panel { padding: 30px 18px 36px; }
  .auth-recovery-title { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
