/* The customer portal's new look — Tyler's design of 12 October 2026
   (owner_finance_portal_responsive.html, with its phone preview): navy and
   blue, cards on a pale ground, four tabs across the top on a computer and a
   bar along the bottom on a phone. The home and signing in are drawn in it;
   the application and the waiver move across after. The top bar is its own
   sheet (portal-top.css), because the CIS draws it too.
   Its own sheet: the waiver's and the desk's styles never load with it. */

:root {
  --navy: #172b47; --blue: #244e89; --blue2: #edf4fd; --ink: #202e43; --muted: #6f7d90;
  --line: #e2e8f0; --bg: #f6f8fc; --white: #fff; --green: #177454; --greenbg: #e9f7f0;
  --shadow: 0 3px 16px #233d6110;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 14px; line-height: 1.5; -webkit-text-size-adjust: 100%;
}
button, textarea, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, textarea:focus-visible { outline: 3px solid #76a8ed; outline-offset: 2px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.shell { max-width: 1200px; margin: auto; padding: 0 28px; }

/* The top bar is its own sheet (portal-top.css), shared with the CIS. */

/* ---- the page ------------------------------------------------------------------ */
.content { padding: 30px 28px 55px; }
.greeting { margin-bottom: 23px; }
.eyebrow { color: var(--muted); font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; font-weight: 800; }
.greeting h1 { font-size: 29px; line-height: 1.2; letter-spacing: -1px; margin: 6px 0; color: var(--navy); }
.greeting p { margin: 5px 0 0; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.title { font-weight: 800; }
.notice {
  background: var(--greenbg); border: 1px solid #c6e9d8; color: #0f5a40; border-radius: 12px;
  padding: 12px 14px; margin: 0 0 18px; font-weight: 600;
}
.problem {
  background: #fdecea; border: 1px solid #f3c1bb; color: #5f140c; border-radius: 12px;
  padding: 12px 14px; margin: 0 0 18px; font-weight: 600;
}

.tabs { display: flex; gap: 7px; border-bottom: 1px solid var(--line); margin-bottom: 23px; overflow-x: auto; }
.tabs a {
  padding: 13px 18px; color: var(--muted); font-weight: 700; border-bottom: 3px solid transparent;
  white-space: nowrap;
}
.tabs a.active { color: var(--blue); border-color: var(--blue); }

.cols { display: grid; grid-template-columns: minmax(0, 1.68fr) minmax(280px, 1fr); gap: 20px; }
.stack { display: grid; gap: 19px; align-content: start; }
.inner-page { max-width: 860px; }
.inner-page .card + .card { margin-top: 18px; }

.card {
  background: white; border: 1px solid var(--line); border-radius: 16px; padding: 24px;
  box-shadow: var(--shadow); min-width: 0;
}
.card h2 { font-size: 17px; letter-spacing: -.35px; margin: 0 0 12px; color: var(--navy); }
.cardhead { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 17px; flex-wrap: wrap; }
.cardhead h2 { margin: 0; }
.section-note { font-size: 12px; color: var(--muted); margin: 12px 0 0; }

/* ---- the property and what happens next ---------------------------------------- */
.property-head { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.property-title { font-size: 27px; font-weight: 800; letter-spacing: -.8px; margin: 4px 0 0; color: var(--navy); line-height: 1.2; }
.company-line { margin-top: 4px; font-size: 13px; font-weight: 700; color: var(--blue); }
.badge {
  display: inline-flex; align-items: center; gap: 7px; background: var(--greenbg); color: var(--green);
  font-size: 12px; border-radius: 30px; font-weight: 800; padding: 7px 11px; white-space: nowrap;
}
.badge:before { content: ""; width: 7px; height: 7px; background: var(--green); border-radius: 50%; }
/* A deal that is over: grey, not the green of one going (13 October 2026). */
.badge.closed { background: #eef1f5; color: #4b5767; }
/* ---- the progress bar: applying to owning it (round 2, 13 October 2026) ---- */
.progress { list-style: none; margin: 0 0 20px; padding: 0 0 18px; border-bottom: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.progress li { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center;
  font-size: 12.5px; color: var(--muted); }
/* The line into each step from the one before it, behind the dots. */
.progress li + li::before { content: ""; position: absolute; top: 11px; right: 50%; width: 100%; height: 2px;
  background: var(--line); }
.progress li.done + li::before { background: var(--blue); }
.progress .dot { position: relative; z-index: 1; width: 24px; height: 24px; border-radius: 50%;
  border: 2px solid #c9d3e0; background: var(--white); display: grid; place-items: center;
  color: var(--white); font-size: 13px; font-weight: 800; line-height: 1; }
.progress li.done .dot { background: var(--blue); border-color: var(--blue); }
.progress li.current .dot { border-color: var(--blue); box-shadow: 0 0 0 5px var(--blue2); }
.progress .step-name { margin-top: 7px; line-height: 1.25; font-weight: 600; padding: 0 2px; }
.progress li.current .step-name { color: var(--navy); font-weight: 800; }
.progress li.done .step-name { color: var(--ink); }
.badge.complete { background: var(--greenbg); color: var(--green); }

.badge.closed:before { background: #8a96a6; }
.next { margin-top: 21px; padding: 18px; border-radius: 12px; background: var(--blue2); border: 1px solid #dce9f9; }
.next-head { display: flex; align-items: center; gap: 9px; color: var(--blue); font-size: 14px; font-weight: 800; }
.next p { margin: 7px 0 0; color: #425672; }
.btn.go { margin-top: 16px; }

/* ---- buttons --------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line);
  border-radius: 10px; padding: 11px 15px; background: white; font-weight: 800; color: var(--ink);
  font-size: 13px; min-height: 43px; text-align: center;
}
.btn.primary, .btn.btn-primary { background: var(--blue); color: white; border-color: var(--blue); }
.btn.light { color: var(--blue); border-color: #d8e6f7; background: #f7faff; min-height: 38px; padding: 8px 13px; }
.btn:hover { filter: brightness(.97); }

/* ---- the rep, the facts, the documents ------------------------------------------ */
.rep { display: flex; align-items: center; gap: 11px; margin: 14px 0; }
.face {
  height: 45px; width: 45px; flex: none; background: #e6effb; color: var(--blue); border-radius: 50%;
  display: grid; place-items: center; font-weight: 800;
}
.rep-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.rep-actions .btn:only-child { grid-column: 1 / -1; }
.fact { display: flex; justify-content: space-between; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.fact:last-child { border: 0; }
.fact strong { text-align: right; }
.visit { padding: 10px 0; border-top: 1px solid var(--line); }
.visit:first-of-type { border-top: 0; padding-top: 0; }
.doc-row { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.doc-row:first-of-type { border-top: 0; }
.doc-row .grow { flex: 1; min-width: 0; }
.doc-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.icon {
  height: 42px; width: 42px; background: var(--blue2); color: var(--blue); border-radius: 11px;
  display: grid; place-items: center; flex-shrink: 0; font-size: 19px;
}

/* ---- messages ---------------------------------------------------------------------- */
.messages { display: grid; gap: 10px; max-height: 520px; overflow-y: auto; }
.message { border: 1px solid var(--line); background: #fafcff; border-radius: 12px; padding: 16px; }
.message.is-mine { background: white; border-style: dashed; }
.message p { margin: 8px 0 0; white-space: pre-line; }
/* The Overview shows the start of the latest one; all of it is on Messages (the Congratulations is long — 13 October 2026). */
.overview-message .message p { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4; overflow: hidden; }
.recent { display: flex; justify-content: space-between; gap: 15px; align-items: flex-start; }
.message-date { font-size: 12px; color: var(--muted); white-space: nowrap; }
.replybox { display: grid; gap: 10px; margin-top: 20px; }
.replybox textarea {
  resize: vertical; min-height: 110px; padding: 13px; border: 1px solid var(--line); border-radius: 10px;
  width: 100%; font-size: 16px; background: #fbfcfe;
}
.replybox .btn { justify-self: start; }

/* ---- I Want A Different Property (views/customer/partials/different-property.ejs) - */
.ask-property { margin-top: 12px; }
.ask-property > summary { list-style: none; cursor: pointer; }
.ask-property > summary::-webkit-details-marker { display: none; }
.ask-property[open] > summary { display: none; }
.ask-property-form {
  display: grid; gap: 8px; padding: 16px; border: 1px solid #dce9f9; border-radius: 12px; background: var(--blue2);
}
.ask-property-form .title { font-weight: 800; font-size: 14px; }
.ask-property-form p { margin: 0; }
.ask-property-form input {
  width: 100%; padding: 12px 13px; border: 1px solid var(--line); border-radius: 10px; font-size: 16px; background: white;
}
.ask-property-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.asked-property { margin: 14px 0 0; padding: 12px 14px; border-radius: 10px; background: #edf8f1; color: #1f6b3d; font-size: 14px; }

/* ---- the CIS box (views/customer/partials/cis-card.ejs, the CIS chat's) ---------- */
.cis-cards { display: grid; gap: 19px; }
.cis-cards .card { border-color: #cfe0f6; }
.portal-card-title { font-size: 17px; letter-spacing: -.35px; margin: 0 0 12px; color: var(--navy); }
.portal-sent-head { margin: 0 0 6px; font-weight: 800; color: var(--green); }
.portal-soon { margin: 6px 0 0; color: #425672; }
.portal-button { margin-top: 14px; }

/* ---- signing in (views/customer/portal.ejs; round 3, 13 October 2026) ------------
   One card in a narrow column under the same top bar, the boxes and buttons in
   the look's navy and blue. The words are the ones these pages already had. */
.signin { max-width: 480px; margin: 0 auto; padding: 38px 16px 60px; }
.signin-head { margin-bottom: 20px; }
.signin .card { margin: 0 0 16px; }
.signin .notice { background: var(--blue2); border-color: #dce9f9; color: #22406b; }
.signin .field { margin: 0 0 16px; }
.signin label { display: block; margin: 0 0 6px; font-size: 13px; font-weight: 700; color: var(--navy); }
.signin input[type=text], .signin input[type=tel], .signin input[type=email], .signin input[type=password] {
  width: 100%; padding: 12px 13px; border: 1px solid #cfd8e3; border-radius: 10px; background: #fbfcfe;
  color: var(--ink); font-size: 16px; line-height: 1.3;
}
.signin input:focus { outline: none; border-color: var(--blue); background: white; box-shadow: 0 0 0 3px #244e8924; }
.btn.wide { width: 100%; min-height: 48px; font-size: 15px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.signin-note { margin: 0 0 16px; }
.signin-for { margin: 0 0 14px; }
.signin-property { padding: 18px 20px; }
.signin-property .property-title { font-size: 21px; margin: 0; }
.warning {
  margin: 0 0 16px; padding: 12px 14px; border: 1px solid #f0d58a; border-radius: 12px;
  background: #fff8e6; color: #5c4210; line-height: 1.5;
}
/* A tick box's label is not a field's: it is its own line, the box beside the words. */
.signin .agree { display: flex; gap: 10px; align-items: center; margin: 2px 0 18px; font-size: 14px; font-weight: 600; color: var(--ink); cursor: pointer; }
.signin .agree input { width: 19px; height: 19px; margin: 0; flex: none; accent-color: var(--blue); }
.cf-turnstile { min-height: 66px; margin: 0 0 14px; }
.signin input.portal-code { font-size: 22px; letter-spacing: .3em; text-align: center; }
.portal-links { display: flex; flex-direction: column; gap: 10px; margin: 18px 0 0; }
.portal-links a, .link { color: var(--blue); font-weight: 700; }
.link { border: 0; background: none; padding: 0; font-size: 14px; }
.link:hover, .portal-links a:hover { text-decoration: underline; }
/* Under the code page's centred "Didn’t get it?", in line with it. */
.portal-links-center { align-items: center; margin-top: 4px; }
.portal-inline { margin: 4px 0 20px; text-align: center; }
.signin .portal-choice {
  display: flex; gap: 10px; align-items: center; margin: 0 0 10px; padding: 12px 14px; border: 1px solid #cfd8e3;
  border-radius: 10px; background: white; font-size: 15px; font-weight: 700; color: var(--ink); cursor: pointer;
}
.portal-choice input { width: 19px; height: 19px; margin: 0; accent-color: var(--blue); }
.portal-choice + .btn { margin-top: 6px; }
/* Show / Hide on a password box (portal.js): inside the box, at its right. */
.password-wrap { position: relative; }
.signin .password-wrap input { padding-right: 78px; }
.show-password {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%); min-height: 40px; min-width: 64px;
  padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--blue); font-weight: 700;
}
.show-password:hover { background: var(--blue2); }

/* ---- the phone's bar along the bottom ------------------------------------------- */
.bottomnav { display: none; }
.phone-only { display: none; }

@media (max-width: 850px) {
  .cols { grid-template-columns: 1fr; }
  .right { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .right > .card:last-child { grid-column: 1 / -1; }
}
@media (max-width: 650px) {
  body { background: #f7f9fc; }
  .progress li { font-size: 11px; }
  .progress .step-name { margin-top: 6px; }
  /* A paper's Open and Download go under its name on a phone, not beside it. */
  .doc-row { flex-wrap: wrap; }
  .doc-actions { width: 100%; padding-left: 54px; }
  .shell { padding: 0 16px; }
  .content { padding: 20px 16px 110px; }
  .signin { padding: 22px 16px 40px; }
  .greeting { margin-bottom: 16px; }
  .greeting h1 { font-size: 24px; letter-spacing: -.6px; }
  .greeting p { font-size: 13px; }
  .tabs { display: none; }
  .card { padding: 18px; border-radius: 14px; }
  .card h2, .portal-card-title { font-size: 16px; }
  .property-title { font-size: 21px; }
  .property-head { display: block; }
  .property-head .badge { margin-top: 12px; }
  .next { padding: 14px; }
  .next p { font-size: 13px; }
  .btn.go, .ask-property > summary.btn { width: 100%; }
  /* The Overview on a phone, in the design's order: the property, the rep,
     the CIS, the documents, the latest message. The facts and the waivers are
     a tab away (Documents, Account). */
  .panel[data-panel="overview"] .cols, .panel[data-panel="overview"] .left,
  .panel[data-panel="overview"] .right { display: flex; flex-direction: column; gap: 14px; }
  .panel[data-panel="overview"] .cols { display: flex; }
  .panel[data-panel="overview"] .left, .panel[data-panel="overview"] .right { display: contents; }
  .overview-main { order: 1; }
  .rep-card { order: 2; }
  .cis-cards { order: 3; }
  .overview-doc { order: 4; }
  .overview-message { order: 5; }
  .summary-card, .visit-card { display: none; }
  .inner-page .card { margin-bottom: 14px; }
  .inner-page .card + .card { margin-top: 0; }
  .phone-only { display: block; }
  .bottomnav {
    display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; bottom: 0; left: 0; right: 0; z-index: 5;
    background: white; border-top: 1px solid var(--line); padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 16px #172b470d;
  }
  .bottomnav a {
    display: grid; justify-items: center; gap: 3px; color: #78869b; font-weight: 650; font-size: 10px;
    padding: 4px 1px; min-height: 52px;
  }
  .bottomnav .navicon { font-size: 20px; line-height: 23px; }
  .bottomnav a.active { color: var(--blue); }
}
@media (max-width: 370px) {
  .card { padding: 15px; }
  .pair { grid-template-columns: 1fr; gap: 0; }
  .rep-actions { grid-template-columns: 1fr; }
  .doc-row { flex-wrap: wrap; }
}
