/* ReviDrive account screens. All styles are local to preserve the strict CSP. */
:root {
  color-scheme: light;
  --auth-paper: #f4f6f5;
  --auth-white: #ffffff;
  --auth-ink: #173242;
  --auth-muted: #5f7480;
  --auth-navy: #142e3d;
  --auth-teal: #116d75;
  --auth-teal-dark: #0c555e;
  --auth-teal-soft: #eaf5f3;
  --auth-line: #dbe5e6;
  --auth-danger: #9e3535;
  --auth-focus: #258f9b;
  font-family: "Segoe UI", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  color: var(--auth-ink);
  background: var(--auth-paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; line-height: 1.65; }
button, input, textarea, select { font: inherit; }
fieldset { min-width: 0; border: 0; margin: 0; padding: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: var(--auth-teal); text-underline-offset: 4px; }
button:disabled { cursor: not-allowed; opacity: .58; }
input:disabled { cursor: not-allowed; background: #f3f6f7; }
[hidden] { display: none !important; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid var(--auth-focus);
  outline-offset: 3px;
}
h1, h2, h3, p { margin-top: 0; }
svg { flex-shrink: 0; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  left: 20px;
  top: 10px;
  z-index: 20;
  transform: translateY(-150%);
  padding: 10px 18px;
  background: var(--auth-white);
  border: 2px solid var(--auth-teal);
  border-radius: 8px;
}
.skip-link:focus { transform: translateY(0); }
.site-header {
  max-width: 1240px;
  padding: 26px 30px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.brand-link { display: inline-flex; align-items: center; gap: 11px; color: var(--auth-ink); text-decoration: none; }
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--auth-teal);
  color: #fff;
  font-size: 23px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -1px;
}
.brand-name { font-size: 22px; font-weight: 750; letter-spacing: -.6px; line-height: 1.2; }
.brand-name > span { display: block; color: var(--auth-muted); font-size: 8px; line-height: 1.7; font-weight: 600; letter-spacing: 1.5px; margin-top: 3px; }
.header-note { display: flex; align-items: center; gap: 7px; color: var(--auth-muted); font-size: 12px; }
.header-note::before { content: ""; width: 6px; height: 6px; background: #3c877c; border-radius: 50%; }
.auth-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 1120px;
  margin: 14px auto 0;
  border: 1px solid #d9e2e3;
  border-radius: 22px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 18px 48px #1a3c4510;
}
.intro-pane {
  display: flex;
  flex-direction: column;
  position: relative;
  padding: 52px 48px 38px;
  background: var(--auth-navy);
  color: #fff;
  min-width: 0;
  overflow: hidden;
}
.intro-pane::after {
  content: "";
  position: absolute;
  width: 380px;
  height: 380px;
  right: -260px;
  top: 76px;
  border: 1px solid #80becb23;
  border-radius: 50%;
  box-shadow: 0 0 0 42px #80becb08, 0 0 0 84px #80becb05;
  pointer-events: none;
}
.eyebrow { color: #84c9c9; font-size: 11px; font-weight: 700; letter-spacing: 2.2px; margin-bottom: 23px; }
.intro-title { font-size: clamp(32px, 3.5vw, 43px); line-height: 1.35; letter-spacing: -1.9px; font-weight: 700; margin: 0 0 23px; word-break: keep-all; }
.intro-title span, .intro-title em { color: #95d5ce; font-style: normal; }
.intro-title > span { display: block; }
.intro-copy { color: #bdcfd5; font-size: 14px; line-height: 1.95; max-width: 370px; word-break: keep-all; margin-bottom: 34px; }
.process-list { list-style: none; display: grid; gap: 18px; margin: 0; padding: 0; }
.process-list li { display: flex; align-items: flex-start; gap: 14px; }
.process-number { flex-shrink: 0; display: flex; align-items: center; justify-content: center; width: 31px; height: 31px; border-radius: 50%; border: 1px solid #577987; color: #badbdc; font-size: 10px; font-weight: 650; letter-spacing: .4px; }
.process-list strong { display: block; color: #eef6f6; font-size: 13px; font-weight: 600; line-height: 1.65; }
.process-list p, .process-list small { display: block; color: #a7bfc7; font-size: 12px; margin: 2px 0 0; line-height: 1.7; }
.intro-callout { margin-top: 35px; padding: 17px 19px; border: 1px solid #466673; background: #1b3a49; border-radius: 12px; color: #d7e9e9; font-size: 12px; line-height: 1.8; }
.intro-callout strong { display: block; color: #e3f2ef; font-size: 12px; font-weight: 650; margin-bottom: 4px; }
.intro-callout p { margin: 0; color: #b5ccd2; }
.intro-footer { padding-top: 32px; margin-top: auto; color: #88a5af; font-size: 10px; letter-spacing: 1.8px; }
.intro-footer .intro-callout { display: flex; align-items: center; gap: 14px; margin-top: 0; letter-spacing: 0; }
.callout-mark { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 31px; height: 35px; border: 1px solid #70999e; border-radius: 8px; font-size: 17px; font-weight: 650; color: #a3d4cd; }
.intro-disclaimer { font-size: 10px; line-height: 1.85; letter-spacing: 0; margin: 13px 2px 0; }
.auth-panel { min-width: 0; padding: 48px 50px 38px; }
.panel-kicker { margin-bottom: 11px; color: var(--auth-teal); font-size: 10px; font-weight: 750; letter-spacing: 1.7px; }
.auth-heading { margin-bottom: 10px; font-size: 27px; line-height: 1.45; letter-spacing: -.9px; }
.auth-description { color: var(--auth-muted); font-size: 13px; line-height: 1.85; margin-bottom: 24px; word-break: keep-all; }
.auth-tabs { display: flex; align-items: stretch; border-bottom: 1px solid var(--auth-line); margin: 0 0 26px; gap: 8px; }
.tab-button { flex: 1; padding: 12px 5px; background: none; border: 0; border-bottom: 2px solid transparent; border-radius: 0; color: var(--auth-muted); font-weight: 650; font-size: 13px; white-space: nowrap; }
.tab-button:hover { color: var(--auth-ink); background: #f7faf9; }
.tab-button[aria-selected="true"] { color: var(--auth-teal); border-bottom-color: var(--auth-teal); }
.auth-view { outline: none; }
.auth-view h2 { font-size: 20px; letter-spacing: -.5px; margin-bottom: 7px; }
.field { display: block; margin: 0 0 18px; min-width: 0; }
.field-label, .field > label, .field > span:first-child { display: block; color: var(--auth-ink); font-size: 13px; font-weight: 650; margin-bottom: 7px; }
.field-label small { color: var(--auth-muted); font-size: 11px; font-weight: 400; margin-left: 5px; }
.optional { font-size: 10px; color: var(--auth-muted); font-weight: 400; margin-left: 5px; }
.field input:not([type="checkbox"]), .field textarea, .field select {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 47px;
  border: 1px solid #c9d7dc;
  border-radius: 8px;
  background: #fcfdfd;
  color: var(--auth-ink);
  padding: 11px 13px;
  font-size: 14px;
  line-height: 1.55;
  transition: border-color .15s, box-shadow .15s;
}
.field input::placeholder, .field textarea::placeholder { color: var(--auth-muted); opacity: 1; font-size: 13px; }
.field input:focus, .field textarea:focus { border-color: #318892; background: #fff; box-shadow: 0 0 0 3px #e4f1f0; }
.field input[aria-invalid="true"] { border-color: #b34b4b; background: #fffafa; }
.field input[readonly] { color: #5c727d; background: #f3f6f7; }
.field-hint { display: block; margin: 6px 0 0; color: var(--auth-muted); font-size: 11px; line-height: 1.7; word-break: keep-all; }
.password-wrap { display: flex; position: relative; align-items: center; }
.password-wrap input { padding-right: 68px !important; }
.password-toggle { position: absolute; right: 7px; top: 50%; transform: translateY(-50%); background: transparent; border: 0; border-radius: 5px; padding: 7px 8px; color: #436774; font-size: 11px; font-weight: 650; min-height: 32px; }
.password-toggle:hover { background: #e8f2f2; color: var(--auth-teal); }
.caps-warning { color: #8e581d; background: #fff5e6; border-radius: 5px; padding: 5px 9px; margin: 7px 0 0; font-size: 11px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border: 1px solid transparent; border-radius: 8px; padding: 10px 17px; font-size: 13px; font-weight: 650; line-height: 1.6; text-align: center; text-decoration: none; transition: background-color .15s, border-color .15s; }
.button-primary { background: var(--auth-teal); border-color: var(--auth-teal); color: #fff; }
.button-primary:hover:not(:disabled) { background: var(--auth-teal-dark); border-color: var(--auth-teal-dark); }
.auth-view .button-primary { width: 100%; min-height: 48px; margin-top: 5px; }
.button-secondary { background: #fff; border-color: #c7d7dc; color: #294b5b; }
.button-secondary:hover:not(:disabled) { background: #eff6f5; border-color: #99b9bf; }
.button-quiet { background: transparent; border-color: transparent; color: var(--auth-teal); }
.button-quiet:hover:not(:disabled) { background: #e9f3f1; }
.button-full { width: 100%; }
.retry-button { margin: 0 0 20px; }
.button-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.text-link { border: 0; background: transparent; padding: 4px 0; color: var(--auth-teal); font-size: 12px; font-weight: 650; text-decoration: underline; text-underline-offset: 4px; }
.text-link:hover { color: var(--auth-teal-dark); }
.forgot-link { display: block; margin: 14px auto 0; text-align: center; }
.code-input { font-family: Consolas, "SFMono-Regular", monospace !important; letter-spacing: .5px; }
.message { margin: 18px 0 0; padding: 12px 14px; border: 1px solid #c6dce0; border-radius: 8px; background: #eff6f8; color: #365566; font-size: 12px; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
.message:empty { display: none; }
.auth-panel > .message { margin: 0 0 20px; }
.message[data-tone="error"] { color: #903131; border-color: #e8c9c9; background: #fff4f3; }
.message[data-tone="success"] { color: #216154; border-color: #bddfd3; background: #edf8f1; }
.message[data-tone="warning"] { color: #805721; border-color: #e7d8b7; background: #fff8e9; }
.form-note, .footer-note { color: var(--auth-muted); font-size: 11px; line-height: 1.85; margin: 19px 0 0; word-break: keep-all; }
.form-note a, .form-note button { font-size: inherit; }
.footer-note { margin-top: 27px; padding-top: 20px; border-top: 1px solid #e4ebec; }
.auth-footer { max-width: 1120px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; margin: 22px auto 25px; color: var(--auth-muted); font-size: 10px; letter-spacing: .2px; }
.recovery-tip { margin: 0 0 21px; padding: 13px 15px; background: #edf6f4; border-left: 3px solid #71aaa2; border-radius: 0 7px 7px 0; color: #41666b; font-size: 12px; line-height: 1.8; }
.recovery-tip p { margin: 0; }
.recovery-tip strong { font-weight: 650; }
noscript { display: block; background: #fff3dd; border: 1px solid #e7cf9c; padding: 14px 18px; margin: 12px auto; max-width: 1120px; font-size: 13px; }

/* Account settings reuse the same form components without changing the workspace. */
.account-body .site-header { max-width: 1200px; padding-bottom: 20px; }
.account-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 25px; }
.account-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.account-actions .button { min-height: 38px; font-size: 12px; padding: 8px 13px; }
.account-shell { max-width: 1140px; padding: 23px 0 50px; margin: 0 auto; }
.account-intro { margin: 0; }
.account-header > .session-note { max-width: 235px; margin: 0 0 3px; text-align: right; }
.account-shell > .message { margin: 0 0 20px; }
.account-intro .eyebrow { color: var(--auth-teal); margin-bottom: 9px; }
.account-intro h1 { font-size: 30px; letter-spacing: -1px; margin: 0 0 8px; line-height: 1.4; }
.account-intro p { color: var(--auth-muted); font-size: 13px; margin: 0; }
.account-grid { display: grid; grid-template-columns: 250px minmax(0, 1fr); align-items: start; gap: 28px; }
.account-sidebar { position: sticky; top: 20px; min-width: 0; }
.profile-summary { background: var(--auth-navy); color: #f7ffff; padding: 24px; border-radius: 14px; margin-bottom: 15px; }
.profile-avatar { display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; background: #285864; border: 1px solid #55868f; border-radius: 12px; font-size: 20px; font-weight: 650; margin-bottom: 17px; }
.profile-summary strong { display: block; font-size: 17px; font-weight: 650; overflow-wrap: anywhere; word-break: break-word; }
.profile-summary p, .profile-summary small, .profile-summary > span:not(.profile-avatar) { display: block; color: #bbced5; margin: 5px 0 0; font-size: 12px; overflow-wrap: anywhere; }
.account-navigation { display: grid; gap: 5px; padding: 6px; border: 1px solid var(--auth-line); border-radius: 12px; background: #fff; }
.account-nav-link { display: flex; align-items: center; gap: 10px; padding: 12px 13px; color: #55707d; font-size: 13px; font-weight: 600; text-align: left; text-decoration: none; border: 0; border-radius: 7px; background: transparent; min-width: 0; }
.account-nav-link:hover { background: #f2f7f6; color: var(--auth-teal); }
.account-nav-link[aria-current="page"], .account-nav-link[aria-current="true"], .account-nav-link[aria-current="location"] { background: #e9f3f1; color: var(--auth-teal-dark); }
.account-nav-link span:first-child:not(:only-child) { opacity: .7; font-size: 11px; }
.session-note { color: var(--auth-muted); font-size: 11px; margin: 18px 9px 0; line-height: 1.9; }
.sidebar-note { color: var(--auth-muted); font-size: 11px; margin: 18px 9px 0; line-height: 1.9; }
.account-content { display: grid; gap: 20px; min-width: 0; }
.account-section { min-width: 0; background: #fff; border: 1px solid var(--auth-line); border-radius: 14px; padding: 29px 32px; scroll-margin-top: 24px; box-shadow: 0 3px 14px #1b3e4605; }
.section-heading { display: flex; align-items: flex-start; gap: 13px; padding-bottom: 21px; margin-bottom: 23px; border-bottom: 1px solid #e5ecec; }
.section-heading h2 { margin: 0 0 5px; font-size: 20px; line-height: 1.4; letter-spacing: -.5px; }
.section-heading p { font-size: 12px; line-height: 1.8; color: var(--auth-muted); margin: 0; word-break: keep-all; }
.section-number { flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: var(--auth-teal); background: #eaf4f1; border-radius: 9px; width: 35px; height: 35px; font-size: 11px; font-weight: 700; margin-top: 2px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 18px; }
.form-grid .field-full { grid-column: 1 / -1; }
.change-warning { background: #fff8eb; border: 1px solid #e9dabc; color: #7c5a29; border-radius: 8px; padding: 12px 15px; font-size: 12px; line-height: 1.8; margin: 0 0 22px; }
.change-warning p { margin: 0; }
.recovery-state { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; border: 1px solid #e6d6b8; background: #fff9ed; color: #805d25; border-radius: 8px; padding: 12px 15px; font-size: 12px; line-height: 1.8; margin-bottom: 20px; }
.recovery-state[data-state="ready"], .recovery-state[data-state="active"] { color: #286457; background: #eff8f3; border-color: #c4ded1; }
.recovery-state strong { font-weight: 650; }
.recovery-code-panel { border: 1px solid #85b5b2; background: #f1faf7; border-radius: 11px; padding: 20px; margin-top: 24px; }
.recovery-code-panel h3 { font-size: 15px; color: #174e4c; margin: 0 0 8px; }
.recovery-code-panel p { color: #4b6b6e; font-size: 12px; line-height: 1.85; margin: 7px 0 12px; }
.recovery-code-field { display: block; width: 100%; background: #fff; border: 1px solid #bfd6d3; border-radius: 7px; color: #174d51; padding: 12px 11px; margin: 12px 0; font-family: Consolas, "SFMono-Regular", monospace; font-size: 13px; line-height: 1.8; text-align: center; letter-spacing: .7px; overflow-wrap: anywhere; word-break: break-word; user-select: all; }
textarea.recovery-code-field { resize: none; }
.ack-row { display: flex; align-items: flex-start; gap: 9px; color: #425f65; font-size: 12px; line-height: 1.8; margin: 16px 0; }
.ack-row input[type="checkbox"] { width: 16px; height: 16px; margin: 3px 0 0; flex-shrink: 0; accent-color: var(--auth-teal); }
.account-facts { display: grid; grid-template-columns: 110px 1fr; gap: 10px 15px; font-size: 12px; margin: 0 0 22px; }
.account-facts dt { color: var(--auth-muted); }
.account-facts > span { color: var(--auth-muted); }
.account-facts dd { margin: 0; overflow-wrap: anywhere; }
.account-facts > strong { overflow-wrap: anywhere; }
.account-section .button-row { margin-top: 6px; }
.account-section .form-note { margin-bottom: 0; }
.account-content > .message { margin-top: 0; }
.relogin-panel { padding: 27px 30px; border: 1px solid #8eb8b5; border-radius: 14px; background: #f1faf6; margin: 0 0 22px; }
.relogin-panel h2 { font-size: 22px; line-height: 1.5; margin-bottom: 8px; color: #22554f; }
.relogin-panel p { color: #4a6b6b; font-size: 13px; line-height: 1.85; margin-bottom: 19px; }
.account-footer { max-width: 1140px; margin: 0 auto 30px; color: var(--auth-muted); font-size: 11px; text-align: center; }

@media (min-width: 1400px) {
  .auth-main { margin-top: 36px; }
}
@media (max-width: 1199px) {
  .auth-main, .auth-footer { margin-left: 32px; margin-right: 32px; }
  .account-shell { margin-left: 28px; margin-right: 28px; }
  .intro-pane { padding: 42px 37px 32px; }
  .auth-panel { padding: 42px 37px 32px; }
}
@media (max-width: 900px) {
  .site-header { padding: 22px 26px; }
  .auth-main { margin: 8px 24px 0; grid-template-columns: .9fr 1.1fr; }
  .intro-pane { padding: 35px 28px 29px; }
  .intro-title { font-size: 32px; }
  .intro-copy { font-size: 12px; }
  .intro-callout { padding: 13px 14px; }
  .auth-panel { padding: 35px 29px 29px; }
  .auth-heading { font-size: 25px; }
  .account-grid { grid-template-columns: 205px minmax(0, 1fr); gap: 20px; }
  .account-section { padding: 25px; }
  .form-grid { grid-template-columns: 1fr; }
  .profile-summary { padding: 21px; }
}
@media (max-width: 700px) {
  .site-header { padding: 20px; }
  .brand-name { font-size: 20px; }
  .brand-mark { width: 34px; height: 34px; font-size: 21px; }
  .header-note { font-size: 10px; }
  .auth-main { grid-template-columns: 1fr; margin: 4px 18px 0; border-radius: 16px; }
  .intro-pane { padding: 27px 27px 25px; }
  .eyebrow { margin-bottom: 13px; font-size: 10px; }
  .intro-title { font-size: 28px; margin-bottom: 13px; line-height: 1.4; letter-spacing: -1.2px; }
  .intro-copy { margin: 0; font-size: 12px; max-width: 100%; }
  .process-list, .intro-callout, .intro-footer { display: none; }
  .auth-panel { padding: 30px 27px 28px; }
  .auth-heading { font-size: 24px; }
  .auth-tabs { margin-bottom: 22px; }
  .auth-footer { margin: 19px 23px 24px; justify-content: center; text-align: center; }
  .account-body .site-header { padding: 18px 20px; flex-wrap: wrap; }
  .account-actions { gap: 4px; }
  .account-actions .button { padding: 7px 9px; font-size: 11px; }
  .account-shell { margin: 0 18px; padding-top: 17px; }
  .account-header { display: block; margin-bottom: 20px; }
  .account-header > .session-note { text-align: left; max-width: none; margin: 10px 0 0; }
  .account-intro h1 { font-size: 27px; }
  .account-intro p { font-size: 12px; }
  .account-grid { grid-template-columns: 1fr; gap: 20px; }
  .account-sidebar { position: static; }
  .profile-summary { padding: 18px 20px; margin-bottom: 11px; }
  .profile-avatar { float: left; margin: 0 13px 0 0; width: 40px; height: 40px; }
  .profile-summary strong { font-size: 15px; }
  .profile-summary p, .profile-summary > span:not(.profile-avatar) { font-size: 11px; margin-top: 2px; }
  .account-navigation { display: flex; flex-wrap: wrap; gap: 3px; }
  .account-nav-link { flex: 1 1 45%; padding: 10px 12px; font-size: 12px; }
  .session-note { margin: 12px 4px 0; font-size: 11px; }
  .account-section { padding: 23px 22px; }
  .section-heading { padding-bottom: 18px; margin-bottom: 20px; }
  .section-heading h2 { font-size: 18px; }
  .recovery-code-panel { padding: 16px; }
  .recovery-code-field { font-size: 11px; letter-spacing: .3px; }
  .account-footer { padding: 0 24px; }
}
@media (max-width: 380px) {
  .header-note { display: none; }
  .auth-panel, .intro-pane { padding-left: 21px; padding-right: 21px; }
  .tab-button { font-size: 12px; padding-left: 2px; padding-right: 2px; }
  .account-body .site-header { align-items: flex-start; gap: 12px; }
  .account-section { padding: 21px 18px; }
  .account-facts { grid-template-columns: 85px 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
