.portal-body { min-height: 100vh; background: #f4f2f0; }
.portal-header { padding-top: 16px; padding-bottom: 16px; }
.portal-main { width: min(1120px, calc(100% - 40px)); margin: 28px auto 90px; }
.portal-auth { min-height: 650px; display: grid; grid-template-columns: 1fr minmax(390px, .82fr); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.portal-promise { padding: clamp(38px, 6vw, 74px); color: #fff; background: #2b2729; }
.portal-promise .eyebrow { color: #efbd45; }
.portal-promise h1 { max-width: 560px; color: #fff; font-size: clamp(2.8rem, 5.5vw, 4.7rem); }
.portal-promise h1 em { color: var(--orange); }
.portal-promise > p { max-width: 540px; margin: 25px 0 34px; color: #ddd5d9; font-size: 1.05rem; line-height: 1.65; }
.portal-promise ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.portal-promise li { display: flex; align-items: start; gap: 12px; }
.portal-promise li > span { width: 27px; height: 27px; flex: 0 0 27px; display: grid; place-items: center; border-radius: 50%; color: var(--ink); background: var(--orange); font-weight: 900; }
.portal-promise li b, .portal-promise li small { display: block; }
.portal-promise li b { font-size: .9375rem; }
.portal-promise li small { margin-top: 2px; color: #cfc5ca; font-size: .8125rem; }
.auth-card { align-self: center; padding: clamp(28px, 5vw, 54px); }
.prototype-notice { margin-bottom: 20px; padding: 12px 13px; border: 1px solid #edddb1; border-radius: 11px; color: #684c13; background: #fff9e9; }
.prototype-notice b, .prototype-notice span { display: block; }
.prototype-notice b { font-size: .8125rem; }
.prototype-notice span { margin-top: 1px; font-size: .75rem; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 11px; background: #f1eeec; }
.auth-tabs button { min-height: 40px; border: 0; border-radius: 8px; color: var(--muted); background: none; font-size: .8125rem; font-weight: 850; cursor: pointer; }
.auth-tabs button.active { color: var(--purple-800); background: #fff; box-shadow: 0 3px 12px rgba(36,31,32,.08); }
.auth-form { margin-top: 25px; }
.auth-form h2 { margin: 0; color: var(--purple-950); font-size: 1.65rem; }
.auth-form > div > p { margin: 4px 0 20px; color: var(--muted); font-size: .875rem; }
.auth-form label { display: grid; gap: 6px; margin-top: 14px; font-size: .8125rem; }
.auth-form input { padding: 12px 13px; font-size: .9375rem; }
.auth-form .button { width: 100%; margin-top: 20px; }
.demo-details { margin: 12px 0 0; color: var(--muted); font-size: .75rem; line-height: 1.5; text-align: center; }

.account-shell { max-width: 980px; margin: 0 auto; }
.account-topbar { display: flex; justify-content: space-between; gap: 28px; align-items: start; margin-bottom: 22px; }
.account-topbar h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
.account-topbar > div > p:last-child { margin: 10px 0 0; color: var(--muted); }
.customer-message { margin-bottom: 14px; padding: 18px; display: flex; gap: 14px; align-items: start; border: 1px solid #ddcfeb; border-radius: 15px; color: var(--purple-950); background: var(--purple-50); }
.customer-message > span { width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center; border-radius: 12px; color: var(--ink); background: var(--orange); }
.customer-message > span svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.customer-message small { color: var(--purple-650); font-size: .75rem; font-weight: 850; text-transform: uppercase; letter-spacing: .06em; }
.customer-message h2 { margin: 3px 0; font-size: 1.1rem; }
.customer-message p { margin: 0; color: var(--muted); font-size: .875rem; }
.customer-message time { display: block; margin-top: 7px; color: var(--muted); font-size: .75rem; }
.urgent-contact { margin-bottom: 14px; padding: 17px 18px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-radius: 15px; color: #fff; background: var(--purple-800); box-shadow: 0 12px 28px rgba(63,20,102,.16); }
.urgent-contact b { font-size: .9375rem; }
.urgent-contact p { margin: 3px 0 0; color: #e9dff2; font-size: .8125rem; }
.urgent-contact .button { min-height: 42px; flex: 0 0 auto; padding: 9px 15px; color: var(--ink); background: var(--orange); text-decoration: none; }
.next-clean-card { display: grid; grid-template-columns: 170px 1fr; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 14px 38px rgba(36,31,32,.06); }
.next-date { padding: 28px; display: grid; place-items: center; align-content: center; color: #fff; background: var(--purple-800); text-align: center; }
.next-date span { font-size: .875rem; font-weight: 850; text-transform: uppercase; letter-spacing: .12em; }
.next-date strong { font-size: 4.2rem; line-height: 1; }
.next-date small { margin-top: 3px; font-size: .875rem; }
.next-details { padding: 27px 30px; }
.next-details .eyebrow { margin-bottom: 5px; }
.next-details h2 { margin: 0 0 16px; color: var(--purple-950); font-size: 1.45rem; }
.next-details dl { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 9px 24px; }
.next-details dl div { display: flex; justify-content: space-between; gap: 12px; font-size: .8125rem; }
.next-details dt { color: var(--muted); }
.next-details dd { margin: 0; font-weight: 800; text-align: right; }
.access-reminder { margin: 16px 0 0; padding-top: 13px; border-top: 1px solid var(--line); color: var(--muted); font-size: .8125rem; }
.portal-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 12px 0 20px; }
.portal-metrics article { padding: 16px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.portal-metrics span, .portal-metrics small, .portal-metrics strong { display: block; }
.portal-metrics span { color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 800; }
.portal-metrics strong { margin-top: 5px; color: var(--purple-950); font-size: 1.45rem; }
.portal-metrics small { color: var(--muted); font-size: .75rem; }
.portal-tabs { width: fit-content; margin-bottom: 10px; padding: 4px; display: flex; border-radius: 11px; background: #eae6e3; }
.portal-tabs button { min-height: 38px; padding: 8px 14px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; font-size: .8125rem; font-weight: 850; cursor: pointer; }
.portal-tabs button.active { color: #fff; background: #2b2729; }
.calendar-button { width: fit-content; margin-top: 18px; display: inline-flex; align-items: center; gap: 9px; color: #fff; background: var(--purple-950); }
.calendar-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.portal-panel { padding: clamp(20px, 4vw, 30px); border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.portal-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.portal-section-heading .eyebrow { margin-bottom: 4px; }
.portal-section-heading h2 { margin: 0; color: var(--purple-950); font-size: 1.45rem; }
.portal-section-heading > span { padding: 5px 9px; border-radius: 999px; color: var(--muted); background: #f1eeec; font-size: .75rem; font-weight: 800; }
.portal-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.portal-table-wrap table { width: 100%; min-width: 620px; border-collapse: collapse; }
.portal-table-wrap th, .portal-table-wrap td { padding: 12px 13px; border-bottom: 1px solid var(--line); text-align: left; font-size: .8125rem; }
.portal-table-wrap th { color: var(--muted); background: #faf9f8; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; }
.portal-table-wrap tbody tr:last-child td { border-bottom: 0; }
.portal-status { display: inline-flex; padding: 5px 8px; border-radius: 999px; font-size: .75rem; font-weight: 800; }
.portal-status.upcoming { color: #5f3885; background: #f1eaf6; }
.portal-status.success { color: var(--green); background: var(--green-50); }
.portal-status.issue { color: var(--red); background: var(--red-50); }
.automatic-note { margin: 14px 0 0; color: var(--muted); font-size: .75rem; }
.automatic-note span { color: var(--green); font-weight: 900; }
.customer-details { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.customer-details div { padding: 13px; border-radius: 10px; background: #f6f4f2; }
.customer-details dt { color: var(--muted); font-size: .75rem; }
.customer-details dd { margin: 4px 0 0; color: var(--purple-950); font-size: .875rem; font-weight: 800; }
.contact-card { margin-top: 16px; padding: 16px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border: 1px solid #edddb1; border-radius: 12px; background: #fff9e9; }
.contact-card b { color: var(--purple-950); font-size: .875rem; }
.contact-card p { max-width: 560px; margin: 3px 0 0; color: var(--muted); font-size: .8125rem; }
.contact-card .button { min-height: 42px; flex: 0 0 auto; padding: 9px 14px; font-size: .8125rem; text-decoration: none; }

@media (max-width: 820px) {
  .portal-auth { grid-template-columns: 1fr; }
  .portal-promise { padding: 38px; }
  .portal-promise h1 { font-size: 3rem; }
  .auth-card { padding: 35px; }
}
@media (max-width: 620px) {
  .portal-main { width: min(100% - 24px, 1120px); margin-top: 10px; }
  .portal-auth { border-radius: 18px; }
  .portal-promise, .auth-card { padding: 28px 20px; }
  .account-topbar, .portal-section-heading, .contact-card, .urgent-contact { align-items: stretch; flex-direction: column; }
  .next-clean-card { grid-template-columns: 1fr; }
  .next-date { padding: 20px; grid-template-columns: auto auto auto; gap: 8px; }
  .next-date strong { font-size: 2rem; }
  .next-details { padding: 22px 18px; }
  .next-details dl, .portal-metrics, .customer-details { grid-template-columns: 1fr; }
  .contact-card .button, .urgent-contact .button { width: 100%; text-align: center; }
}

/* Account forms reuse the established portal palette and spacing. */
.auth-form[hidden], .portal-auth[hidden] { display: none; }
.auth-links { display: flex; flex-wrap: wrap; gap: 12px 20px; margin-top: 18px; }
.auth-links .text-button { min-height: 44px; text-align: left; font-size: .875rem; }
.auth-form label, .auth-form input { font-size: 1rem; }
.password-hint, .auth-form .demo-details, .prototype-notice span { font-size: .875rem; line-height: 1.5; }
.password-hint { margin: 8px 0; color: var(--muted); }
#auth-notice { line-height: 1.5; overflow-wrap: anywhere; }
.auth-form button:disabled { opacity: .65; cursor: wait; }

.auth-card .message { margin: 16px 0 0; font-size: .875rem; }
#auth-notice { background: var(--purple-50); color: var(--purple-950); border: 1px solid #ddcfeb; }

.clean-group { margin-top: 32px; }
.clean-group h2 { font-size: 1.35rem; margin: 0 0 14px; }
.past-cleans { padding: 22px; background: #f3f3f3; border-radius: 12px; color: #555; scroll-margin-top: 24px; }
.past-cleans > p { margin: -4px 0 16px; font-size: .9375rem; }
.past-cleans .portal-status { color: #515151; background: #e4e4e4; }
.past-cleans th, .past-cleans td { color: #555; background: #f8f8f8; }
.portal-table-wrap td { font-size: .875rem; }
.changed-date { display: block; margin-top: 5px; font-size: .875rem; color: #625669; }
.portal-status.date-changed { color: #714510; background: #fff0d7; }
.date-change-note { background: #fff0d7; color: #714510; padding: 12px; border-radius: 8px; }
.latest-clean { margin-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.latest-clean p { margin: 5px 0 0; font-size: .9375rem; }
.latest-clean a { color: var(--purple-800); font-size: .875rem; }
.renewal-card { margin-bottom: 18px; padding: 24px; border: 2px solid var(--orange); border-radius: 16px; background: #fff8e8; }
.renewal-card h2 { margin: 0 0 10px; color: var(--purple-950); font-size: 1.4rem; }
.renewal-card .button { margin-top: 8px; text-decoration: none; }
.renewal-note { font-size: .875rem; line-height: 1.5; margin-bottom: 0; }
@media (max-width: 620px) { .latest-clean { align-items: start; flex-direction: column; gap: 10px; } .past-cleans { padding: 16px 12px; } }

.annual-end-card{padding:24px;margin:20px 0;border:1px solid #d9c7e6;border-radius:16px;background:#f7f3f9}.annual-end-card h2{font-size:20px;margin:0 0 8px}.annual-end-card strong{display:block;font-size:22px;color:#581991}.annual-end-card p{font-size:16px;line-height:1.5}

/* Keep navigation and account content on the same desktop grid. */
.portal-header {width:min(980px,calc(100% - 40px));}
.portal-book {background:#581991;color:#fff;text-decoration:none;min-height:44px;padding:10px 16px;}
.portal-header .header-actions {display:flex;align-items:center;gap:16px;flex-wrap:wrap;}
.portal-header .private-pill {display:none;}
.portal-header #sign-out {min-height:44px;font-size:16px;}
.portal-metrics {grid-template-columns:repeat(auto-fit,minmax(220px,1fr));}
.clean-filter {display:flex;align-items:center;gap:14px;margin-bottom:24px;font-size:16px;font-weight:700;}
.clean-filter select {font-size:16px;min-height:48px;padding:10px 36px 10px 12px;max-width:100%;}
@media(max-width:620px){.portal-header{width:calc(100% - 24px);gap:12px;}.portal-header .header-actions{gap:12px;}.portal-book{font-size:14px;padding:10px 12px;}.portal-header #sign-out{font-size:14px;}.clean-filter{align-items:stretch;flex-direction:column;gap:8px;}}
