:root {
  color-scheme: light;
  --ink: #09242a;
  --muted: #445d61;
  --teal: #097568;
  --line: #d8e6e1;
  --canvas: #eef4f2;
  --white: #fff;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--canvas); color: var(--ink); }
a { color: #075e54; text-underline-offset: .2em; }
:focus-visible { outline: 3px solid #238b7d; outline-offset: 4px; }
.masthead { background: var(--white); border-bottom: 1px solid var(--line); }
.masthead-inner { max-width: 1160px; min-height: 78px; margin: 0 auto; padding: 15px 34px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: block; width: 224px; height: auto; max-width: 70%; }
.page { flex: 1; display: grid; align-content: center; width: min(100% - 68px, 1092px); margin: 0 auto; padding: clamp(36px, 7vh, 88px) 0; }
.entry { display: grid; grid-template-columns: minmax(0, 1.03fr) minmax(0, 1fr); min-height: 536px; overflow: hidden; border-radius: 22px; border: 1px solid #d8e5e0; box-shadow: 0 24px 64px rgba(15,54,47,.09); background: white; }
.intro { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 42px; padding: clamp(32px, 5.1vw, 66px); color: #effaf7; background: linear-gradient(153deg,#091d26 8%,#0d343a 62%,#105951 100%); }
.intro::before, .intro::after { content: ""; position: absolute; z-index: -1; pointer-events: none; border: 1px solid rgba(153,232,213,.24); width: 345px; height: 345px; border-radius: 50%; right: -155px; bottom: -188px; }
.intro::after { width: 434px; height: 434px; right: -200px; bottom: -233px; }
.eyebrow { margin: 0; display: flex; align-items: center; gap: 9px; color: #a2e4d7; font-weight: 730; font-size: .735rem; letter-spacing: .11em; text-transform: uppercase; }
.dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 7px; background: currentColor; }
h1 { margin: 15px 0 12px; font-size: clamp(2.45rem, 5.35vw, 4.15rem); font-weight: 750; letter-spacing: -.061em; line-height: 1.04; text-wrap: balance; }
.intro h1 { max-width: 10em; }
.lede { margin: 15px 0 0; max-width: 29ch; color: #d1eeea; font-size: clamp(1rem, 1.9vw, 1.15rem); }
.first-visit { max-width: 360px; padding-top: 19px; border-top: 1px solid rgba(185,243,231,.25); color: #d9f2ee; }
.first-visit p { margin: 0; }
.first-visit .first-visit-title { margin-bottom: 5px; color: #fff; font-weight: 730; }
.sign-in-card { min-width: 0; padding: 34px clamp(23px, 4vw, 46px) 24px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-content { min-width: 0; }
.auth-label { color: var(--teal); }
.auth-instruction { margin: 9px 0 14px; color: var(--muted); font-size: .91rem; }
.auth-status { margin: 12px 0; color: var(--muted); font-size: .9rem; }
.login-frame { min-width: 0; }
/* The SDK gives its iframe height:100%; this floor also covers the password step. */
.login-frame iframe {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 420px;
  border: 0;
}
.hosted-fallback { border-top: 1px solid var(--line); padding-top: 12px; margin: 10px 0 0; color: var(--muted); font-size: .82rem; }
.footer { font-size: .84rem; text-align: center; color: var(--muted); padding: 0 20px 22px; }
.footer p { margin: 0; }
.dashboard { width: min(100%, 700px); justify-self: center; border-radius: 20px; border: 1px solid var(--line); background: #fff; padding: clamp(20px, 4.4vw, 40px); box-shadow: 0 20px 45px rgba(15,54,47,.07); }
.dashboard-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 12px 18px; border-bottom: 1px solid var(--line); padding-bottom: 22px; }
.dealer-heading h1 { margin: 0; color: var(--ink); font-size: clamp(1.4rem, 4.5vw, 2.15rem); font-weight: 750; line-height: 1.13; letter-spacing: -.03em; overflow-wrap: anywhere; }
.dealer-heading p { margin: 5px 0 0; color: #075e54; font-size: 1rem; font-weight: 600; overflow-wrap: anywhere; }
@media (max-width: 350px) {
  .dashboard-header { grid-template-columns: 1fr; }
  .dashboard-header > button { justify-self: start; }
}
button { border-radius: 9px; cursor: pointer; white-space: nowrap; padding: .55rem .85rem; background: white; color: #075e54; border: 1px solid #aecdc5; font: inherit; font-weight: 650; }
button:disabled { cursor: wait; opacity: .65; }
.sections { margin-top: 8px; }
.status-section { padding: 19px 0; }
.status-section + .status-section { border-top: 1px solid var(--line); }
.status-section h2 { margin: 0; font-size: 1.11rem; font-weight: 730; letter-spacing: -.018em; }
.status-section p { margin: 4px 0 0; color: var(--muted); font-size: 1rem; overflow-wrap: anywhere; }
.dashboard-status { color: var(--muted); margin: 12px 0 0; font-size: .9rem; }
.dashboard-status:empty { display: none; }
@media (max-width: 760px) {
  .masthead-inner { min-height: 64px; padding: 12px 20px; }
  .brand { width: 184px; }
  .page { width: min(100% - 28px, 540px); padding: 23px 0; }
  .entry { grid-template-columns: minmax(0, 1fr); border-radius: 16px; min-height: 0; }
  .intro { gap: 20px; padding: 26px 20px; }
  .intro h1 { max-width: 13em; margin-top: 10px; }
  .intro .lede { margin-top: 8px; }
  .first-visit { padding-top: 12px; font-size: .88rem; }
  .sign-in-card { padding: 21px 13px 19px; }
  .auth-label, .auth-instruction, .auth-status, .hosted-fallback { margin-left: 7px; margin-right: 7px; }
}

/* Revoked state: keep the original compact, top-right Sign out button. */
.dashboard-header:has(.dealer-heading[hidden]) {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding-bottom: 0;
  border-bottom: 0;
}
.dashboard-header:has(.dealer-heading[hidden]) > #sign-out {
  width: auto;
  flex: 0 0 auto;
}
.inactive-portal { padding: 14px 4px 16px; text-align: center; }
.inactive-icon { font-size: 2.25rem; line-height: 1.3; margin-bottom: 16px; }
.inactive-portal h2 {
  color: var(--ink);
  font-size: clamp(1.22rem, 2.7vw, 1.5rem);
  line-height: 1.25;
  letter-spacing: -.025em;
  margin: 0 auto 15px;
  max-width: 100%;
}
.inactive-portal p {
  color: var(--muted);
  font-size: .91rem;
  line-height: 1.5;
  max-width: 560px;
  margin: 0 auto;
}
@media (max-width: 520px) {
  .inactive-portal { padding: 16px 0 18px; }
  .inactive-portal h2 { font-size: 1.2rem; }
  .inactive-portal p { font-size: .875rem; }
}
[hidden] { display: none !important; }

/* v1.4.3: reduce the unused header-to-message gap while keeping the active dashboard unchanged. */
.dashboard:has(.inactive-portal:not([hidden])) { padding-top: 24px; padding-bottom: 26px; }
.dashboard:has(.inactive-portal:not([hidden])) .dashboard-header { min-height: 38px; }
@media (max-width: 520px) { .dashboard:has(.inactive-portal:not([hidden])) { padding-top: 20px; padding-bottom: 22px; } }
