/* Sunnyside Portal (customer /portal/ and staff /portal/admin/).
   Tokens: /css/tokens.css. Font: the site's self-hosted Plus Jakarta Sans.
   Breakpoints: 480 / 720 / 960 / 1200 only. Icons: icons.js, 20px, 2px stroke. */
@font-face {
  font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("/assets/fonts/plus-jakarta-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  /* Palette, status colours, radii, shadows and the font stack come from /css/tokens.css. */
  --radius: var(--r-lg);
  --r-input: 14px;
  --shadow: var(--sh-2);
  --band: 300px;
  --tabbar-h: 0px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--mist); color: var(--ink); position: relative; isolation: isolate;
  font: 400 1.0625rem/1.6 var(--sans); -webkit-font-smoothing: antialiased;
  min-height: 100vh; display: flex; flex-direction: column;
}
a { color: var(--navy-700); text-underline-offset: 3px; }
a:hover { color: var(--navy-900); }
h1, h2, h3 { font-family: var(--sans); font-weight: 700; letter-spacing: -.035em; line-height: 1.1; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(1.9rem, 4.6vw, 2.8rem); font-weight: 800; letter-spacing: -.045em; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.02rem; letter-spacing: -.02em; }
p { margin: 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem; margin-bottom: .7rem;
  font-size: .74rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--sun-ink);
}
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 4px rgba(245,179,30,.2); flex: none; }
.soft { color: var(--ink-2); }
.small { font-size: .92rem; }
:where(a, button, input, select, textarea, summary):focus-visible { outline: 2px solid var(--sun); outline-offset: 3px; }
.i { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: middle; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--sun); color: var(--navy-950); padding: 8px 14px; border-radius: 10px; font-weight: 700; text-decoration: none; }
.skip:focus { left: 8px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- navy band behind the header and page heading (like the home hero) ---------- */
.band {
  position: absolute; left: 0; right: 0; top: 0; height: var(--band); z-index: -1; overflow: hidden;
  background:
    radial-gradient(50% 90% at 90% 0%, rgba(20,69,107,.65), rgba(20,69,107,0) 70%),
    radial-gradient(40% 80% at 0% 100%, rgba(245,179,30,.08), rgba(245,179,30,0) 70%),
    var(--navy-950);
}
body.auth { background: var(--navy-950); padding-bottom: 90px; }
body.auth .band { height: 100%; min-height: 100vh; }
/* Jake's rule: decorative wave lines live only in this 90px strip at the very bottom, never behind text. */
.wave-strip { display: none; }
body.auth .wave-strip { display: block; position: absolute; left: 0; right: 0; bottom: 0; height: 90px; overflow: hidden; pointer-events: none; z-index: 0;
  -webkit-mask: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent); mask: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent); }
.wave-strip svg { display: block; width: 100%; height: 90px; }

/* ---------- header ---------- */
.top { color: #fff; position: relative; z-index: 5; }
.top-inner {
  max-width: 1040px; margin: 0 auto; padding: 16px clamp(16px, 4vw, 28px);
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; line-height: 0; }
.brand img { height: 44px; width: auto; display: block; }
.area {
  font-size: .7rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; line-height: 1;
  color: var(--sun); padding: .45rem .7rem; border-radius: 999px; background: rgba(245,179,30,.12); white-space: nowrap;
}
.top-nav { display: flex; gap: .2rem; margin-left: .4rem; }
.top-nav a {
  position: relative; color: var(--on-dark-2); text-decoration: none; font-weight: 500; font-size: .94rem;
  padding: .55rem .85rem; border-radius: 999px;
}
.top-nav a:hover { color: #fff; background: var(--glass); }
.top-nav a[aria-current="page"] { color: #fff; background: var(--glass-2); box-shadow: inset 0 0 0 1px var(--glass-line); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: .6rem; }
.top-link { color: var(--on-dark-2); text-decoration: none; font-size: .9rem; font-weight: 500; display: inline-flex; align-items: center; gap: .35rem; }
.top-link:hover { color: #fff; }
.top-link .i { width: 20px; height: 20px; }
.who { display: flex; align-items: center; gap: .5rem; }
.who-email { font-size: .86rem; color: var(--on-dark-3); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-btn {
  background: var(--glass-2); border: 0; box-shadow: inset 0 0 0 1px var(--glass-line); color: #fff;
  font: 600 .88rem/1 var(--sans); padding: .7rem 1rem; border-radius: 999px; cursor: pointer; transition: background .25s;
}
.link-btn:hover { background: rgba(255,255,255,.16); }
@media (max-width: 719px) {
  .brand img { height: 36px; }
  .who-email, .top-link span { display: none; }
  .top-nav { order: 5; width: 100%; margin: 4px 0 0; overflow-x: auto; }
}

/* ---------- layout ---------- */
main { flex: 1; width: 100%; max-width: 1040px; margin: 0 auto; padding: 18px clamp(16px, 4vw, 28px) 56px; }
.stack > * + * { margin-top: 18px; }
.grid-2 { display: grid; gap: 18px; }
@media (min-width: 960px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

.page-head { color: #fff; padding: 14px 0 6px; min-height: 120px; }
.page-head .eyebrow { color: var(--sun); }
.page-head h1 { color: #fff; }
.page-head p { color: var(--on-dark-2); margin-top: .5rem; }
.page-head a { color: #fff; }
.page-head .back { display: inline-flex; align-items: center; gap: .4rem; color: var(--on-dark-2); text-decoration: none; font-size: .92rem; font-weight: 500; margin-bottom: .6rem; }
.page-head .back:hover { color: var(--sun); }

.card {
  background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 22px 20px;
}
@media (min-width: 720px) { .card { padding: 28px 30px; } }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }

/* ---------- buttons & inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 52px; padding: 0 1.5rem; border-radius: 999px; border: 0; cursor: pointer;
  font: 600 1rem/1 var(--sans); letter-spacing: -.01em; text-decoration: none; white-space: nowrap;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s var(--ease);
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn:active:not(:disabled) { transform: translateY(1px) scale(.99); }
.btn-sun { background: var(--sun); color: var(--navy-950); box-shadow: 0 14px 30px -16px rgba(245,179,30,.85); }
.btn-sun:hover { transform: translateY(-1px); box-shadow: 0 0 0 5px rgba(245,179,30,.16), 0 18px 34px -16px rgba(245,179,30,.9); color: var(--navy-950); }
.btn-navy { background: var(--navy-900); color: #fff; }
.btn-navy:hover { background: var(--navy-700); color: #fff; }
.btn-ghost { background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--navy-700); color: var(--ink); }
.btn-glass { background: var(--glass-2); color: #fff; box-shadow: inset 0 0 0 1px var(--glass-line); }
.btn-glass:hover { background: rgba(255,255,255,.16); color: #fff; }
.btn:disabled { opacity: .55; cursor: default; box-shadow: none; transform: none; }
.btn-block { width: 100%; }
.btn-sm { min-height: 40px; padding: 0 1rem; font-size: .9rem; }
.btn .spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

label { display: block; font: 600 .9rem/1.3 var(--sans); margin-bottom: 7px; color: var(--ink); }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=date], input[type=search], textarea, select {
  width: 100%; font: 400 1.0625rem/1.4 var(--sans); color: var(--ink);
  border: 0; box-shadow: inset 0 0 0 1.5px var(--line); border-radius: var(--r-input); padding: 14px 16px; background: var(--paper);
  transition: box-shadow .2s;
}
input[type=file] { font: inherit; font-size: .95rem; max-width: 100%; }
textarea { min-height: 92px; resize: vertical; }
input:hover, textarea:hover, select:hover { box-shadow: inset 0 0 0 1.5px #C3D2DD; }
input:focus, textarea:focus, select:focus { outline: none; box-shadow: inset 0 0 0 2px var(--navy-700), 0 0 0 4px rgba(245,179,30,.25); }
input[aria-invalid="true"] { box-shadow: inset 0 0 0 2px var(--bad-fg); }
.check { display: flex; gap: 10px; align-items: flex-start; font: 400 1rem/1.4 var(--sans); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--navy-900); flex: none; }

/* ---------- status pills ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 6px 11px;
  font: 600 .8rem/1 var(--sans); white-space: nowrap;
}
.pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.ok   { background: var(--ok-bg);   color: var(--ok-fg); }
.pill.warn { background: var(--warn-bg); color: var(--warn-fg); }
.pill.bad  { background: var(--bad-bg);  color: var(--bad-fg); }
.pill.info { background: var(--mist);    color: var(--ink-2); }

/* ---------- sign in ---------- */
.auth-shell { display: grid; gap: 28px; align-items: center; padding-top: clamp(8px, 4vw, 40px); }
@media (min-width: 960px) { .auth-shell { grid-template-columns: 1fr 470px; gap: 72px; } }
.auth-intro { color: #fff; }
.auth-intro .eyebrow { color: var(--sun); }
.auth-intro h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1; }
.auth-intro h1 em { font-style: normal; color: var(--sun); display: block; }
.auth-intro > p { color: var(--on-dark-2); margin-top: 1rem; max-width: 30rem; font-size: 1.08rem; }
.perks { list-style: none; margin: 1.8rem 0 0; padding: 0; display: grid; gap: .55rem; max-width: 30rem; }
.perks li {
  display: flex; gap: .9rem; align-items: center; padding: .8rem 1rem; border-radius: 18px;
  background: var(--solid-dark); box-shadow: inset 0 0 0 1px var(--glass-line); font-size: .96rem; color: var(--on-dark-2);
}
.perks li b { color: #fff; font-weight: 600; display: block; }
.perks .dot { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: rgba(245,179,30,.14); color: var(--sun); flex: none; }
.perks .dot .i { width: 20px; height: 20px; }
@media (max-width: 959px) { .perks { display: none; } .auth-intro > p { font-size: 1rem; } }

.login { max-width: 460px; width: 100%; margin: 0 auto; padding: 28px 24px; }
@media (min-width: 720px) { .login { padding: 34px 36px; } }
.login h1 { font-size: clamp(1.6rem, 3vw, 2rem); letter-spacing: -.04em; }
.login form { margin-top: 22px; display: grid; gap: 16px; }
.login .lede { margin-top: 8px; color: var(--ink-2); }
.tabs { display: flex; padding: 4px; border-radius: 999px; background: var(--mist); margin-bottom: 22px; }
.tabs button {
  flex: 1; border: 0; background: transparent; color: var(--ink-2); font: 600 .92rem var(--sans);
  padding: .75rem .8rem; border-radius: 999px; cursor: pointer;
}
.tabs button[aria-selected="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 4px 14px -6px rgba(7,23,38,.3); }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 76px; }
.pw-toggle {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: transparent;
  color: var(--navy-700); font: 600 .84rem var(--sans); padding: .5rem .6rem; border-radius: 10px; cursor: pointer;
}
.pw-toggle:hover { background: var(--mist); }
.label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.label-row a { font-size: .86rem; font-weight: 600; }
.hint { font-size: .84rem; color: var(--ink-3); margin-top: 6px; }
.hint.warn { color: var(--warn-fg); }
.form-msg { border-radius: var(--r-input); padding: 12px 14px; font-size: .94rem; line-height: 1.45; background: var(--bad-bg); color: var(--bad-fg); }
.form-msg:empty { display: none; }
.form-msg a { color: inherit; font-weight: 700; }
.login-foot { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); font-size: .9rem; color: var(--ink-2); display: grid; gap: 6px; }
.sent-icon { width: 56px; height: 56px; border-radius: 18px; background: var(--navy-900); display: grid; place-items: center; margin-bottom: 18px; }
.sent-icon .i { width: 24px; height: 24px; color: var(--sun); }

/* ---------- summary banner ---------- */
.summary { display: flex; gap: 14px; align-items: center; border-radius: 18px; padding: 14px 16px; margin-bottom: 18px; }
.summary.ok   { background: var(--ok-bg); }
.summary.warn { background: var(--warn-bg); }
.summary.bad  { background: var(--bad-bg); }
.summary.info { background: var(--mist); }
.summary-icon { width: 38px; height: 38px; border-radius: 12px; background: var(--navy-900); flex: none; display: grid; place-items: center; }
.summary-icon .i { color: var(--sun); }

/* ---------- at a glance ---------- */
.glance { display: grid; padding: 0; overflow: hidden; }
@media (min-width: 720px) { .glance { grid-template-columns: repeat(3, 1fr); } }
.glance > div { padding: 20px 22px; display: grid; gap: 4px; align-content: start; }
.glance > div + div { border-top: 1px solid var(--line); }
@media (min-width: 720px) { .glance > div + div { border-top: 0; border-left: 1px solid var(--line); } }
.glance .k { font-size: .72rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.glance .v { font-size: 1.3rem; font-weight: 700; letter-spacing: -.03em; line-height: 1.2; }
.glance .s { font-size: .9rem; color: var(--ink-2); }
.glance .pill { justify-self: start; margin-top: 4px; }
.glance a { font-size: .9rem; font-weight: 600; justify-self: start; margin-top: 4px; }

/* ---------- readings list ---------- */
.readings { list-style: none; margin: 0; padding: 0; }
.reading { display: grid; grid-template-columns: 1fr auto; gap: 6px 14px; padding: 18px 0; border-top: 1px solid var(--line); }
.reading:first-child { border-top: 0; padding-top: 4px; }
.reading-name { font: 700 1rem/1.3 var(--sans); letter-spacing: -.01em; }
.reading-val { font: 800 1.5rem/1 var(--sans); text-align: right; letter-spacing: -.04em; }
.reading-val small { font-size: .78rem; font-weight: 600; color: var(--ink-3); margin-left: 3px; letter-spacing: 0; }
.reading-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.reading-msg { grid-column: 1 / -1; font-size: .94rem; color: var(--ink-2); }
.range { grid-column: 1 / -1; position: relative; height: 18px; margin: 4px 0 2px; }
.range .rail { position: absolute; left: 0; right: 0; top: 7px; height: 4px; border-radius: 4px; background: var(--line); }
.range .zone { position: absolute; top: 5px; height: 8px; border-radius: 8px; background: rgba(245,179,30,.6); }
.range .mark { position: absolute; top: 1px; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: var(--navy-900); box-shadow: 0 0 0 3px #fff, 0 2px 8px rgba(7,23,38,.35); }
.range.ok .mark { background: var(--ok-fg); }
.range.warn .mark { background: var(--warn-mark); }
.range.bad .mark { background: var(--bad-fg); }

.note-block { background: var(--mist); border-radius: 16px; padding: 14px 16px; margin-top: 14px; }
.note-block h3 { font-size: .9rem; margin-bottom: 4px; }
.viewing { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--warn-bg); color: var(--warn-fg); border-radius: 14px; padding: 10px 14px; margin-bottom: 16px; font-size: .92rem; font-weight: 600; }
.viewing button { border: 0; background: none; color: var(--navy-700); font: 700 .92rem var(--sans); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; padding: 0; }

/* ---------- schedule ---------- */
.next-visit {
  position: relative; overflow: hidden; border-radius: 20px; padding: 20px; margin-bottom: 18px; color: #fff;
  background: linear-gradient(160deg, rgba(20,69,107,.7), rgba(16,49,76,.2) 60%), var(--navy-900);
}
.next-visit::after { content: ""; position: absolute; width: 220px; height: 220px; right: -100px; top: -100px; border-radius: 50%; background: radial-gradient(circle, rgba(245,179,30,.25), transparent 65%); pointer-events: none; }
.next-visit .eyebrow { color: var(--sun); }
.next-date { font: 800 1.45rem/1.2 var(--sans); letter-spacing: -.035em; }
.next-rel { color: var(--on-dark-2); font-size: .94rem; margin-top: 2px; }
.next-visit .btn { margin-top: 14px; position: relative; z-index: 1; }
.visit-list { list-style: none; margin: 0; padding: 0; }
.visit-list li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); font-size: .95rem; }
.visit-list li:first-child { border-top: 0; }
.tick { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: var(--sun); color: var(--navy-950); margin-right: 6px; vertical-align: middle; }
.tick .i { width: 14px; height: 14px; stroke-width: 3; }

/* ---------- history ---------- */
.history { list-style: none; margin: 0; padding: 0; }
.history button {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: none; border: 0; border-top: 1px solid var(--line); padding: 13px 10px; cursor: pointer; border-radius: 0;
  font: 600 .95rem/1.3 var(--sans); color: var(--ink); text-align: left; transition: background .2s;
}
.history button:hover { background: var(--mist); }
.history li:first-child button { border-top: 0; }
.history button[aria-current=true] { background: var(--mist); border-radius: 12px; }
.history li:has(button[aria-current=true]) + li button { border-top-color: transparent; }
.history button[aria-current=true] { box-shadow: inset 3px 0 0 var(--sun); }

/* ---------- files ---------- */
.files { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.files a { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 16px; text-decoration: none; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); transition: box-shadow .2s, background .2s; }
.files a:hover { box-shadow: inset 0 0 0 1.5px var(--navy-700); background: var(--mist); }
.files .ficon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(245,179,30,.16); color: var(--sun-ink); flex: none; font-size: .66rem; font-weight: 800; letter-spacing: .04em; }
.files b { display: block; font-weight: 600; font-size: .96rem; overflow-wrap: anywhere; }
.files span span { font-size: .84rem; color: var(--ink-3); }
.files .dl { margin-left: auto; color: var(--ink-3); }

/* ---------- contact ---------- */
.contact-card { position: relative; overflow: hidden; color: #fff; background: linear-gradient(160deg, rgba(20,69,107,.55), rgba(16,49,76,.2) 60%), var(--navy-950); }
.contact-card::after { content: ""; position: absolute; left: 50%; bottom: -220px; width: 700px; height: 360px; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(245,179,30,.2), transparent); pointer-events: none; }
.contact-card > * { position: relative; z-index: 1; }
.contact-card p { color: var(--on-dark-2); }
.contact-card a:not(.btn) { color: #fff; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
@media (max-width: 479px) { .contact-actions .btn { flex: 1 1 100%; } }

footer { text-align: center; padding: 22px 16px 32px; font-size: .88rem; color: var(--ink-3); }
footer a { color: var(--ink-2); }
body.auth footer, body.auth footer a { color: var(--on-dark-3); }

/* ---------- loading skeleton ---------- */
.skel { display: grid; gap: 18px; }
.skel .page-head { display: grid; gap: 12px; align-content: start; }
.skel .bar { height: 14px; border-radius: 8px; background: rgba(255,255,255,.12); }
.skel .card { min-height: 160px; display: grid; gap: 14px; align-content: start; }
.skel .card .bar { background: var(--mist); }
.skel .bar { background-image: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent); background-size: 200% 100%; background-repeat: no-repeat; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }

/* ---------- tech page ---------- */
.tech main { max-width: 720px; }
.cust-list { list-style: none; margin: 12px 0 0; padding: 0; max-height: 420px; overflow-y: auto; }
.cust-list button {
  width: 100%; text-align: left; background: var(--paper); border: 0; box-shadow: inset 0 0 0 1.5px var(--line); border-radius: 16px;
  padding: 14px 16px; margin-bottom: 8px; cursor: pointer; font: inherit; color: inherit; transition: box-shadow .2s, background .2s;
}
.cust-list button:hover { box-shadow: inset 0 0 0 1.5px var(--navy-700); background: var(--mist); }
.cust-name { font: 700 1rem/1.3 var(--sans); display: block; }
.cust-sub { font-size: .88rem; color: var(--ink-2); }
.chosen { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.chosen .link-btn { background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.chosen-notes { background: var(--warn-bg); color: #4D3600; border-radius: 14px; padding: 11px 14px; font-size: .92rem; margin-top: 12px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 479px) { .admin .field-grid { grid-template-columns: 1fr; } }
.field { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 0; }
.field label { align-self: end; }
.field-foot { display: flex; justify-content: space-between; align-items: flex-start; align-content: flex-start; gap: 6px; flex-wrap: wrap; min-height: 30px; margin-top: 6px; }
.field-foot .pill { font-size: .74rem; padding: 4px 9px; }
.field .target { font-size: .78rem; color: var(--ink-3); font-weight: 400; }
.form-section + .form-section { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line); }
.form-section > h2 { margin-bottom: 16px; }
.sticky-save { position: sticky; bottom: 0; background: linear-gradient(rgba(241,245,248,0), var(--mist) 40%); padding: 24px 0 14px; z-index: 4; }
.tech form.stack { padding-bottom: 8px; }
.done-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--sun); color: var(--navy-950); display: grid; place-items: center; margin: 0 auto 16px; }
.done-icon .i { width: 28px; height: 28px; stroke-width: 2.5; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 30px); opacity: 0; pointer-events: none;
  background: var(--navy-950); color: #fff; padding: 13px 22px; border-radius: 999px;
  font: 600 .94rem var(--sans); box-shadow: 0 0 0 1px var(--glass-line), 0 20px 40px -16px rgba(0,0,0,.6);
  transition: opacity .3s var(--ease), transform .3s var(--ease); z-index: 50; max-width: calc(100% - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.empty { text-align: center; padding: 30px 10px; color: var(--ink-2); }
.loading { text-align: center; padding: 60px 0; color: var(--on-dark-2); }
[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ---------- admin ---------- */
.admin main { max-width: 860px; }
.admin .cust-list { max-height: none; }
.cust-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.tag { display: inline-block; font-size: .74rem; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: var(--mist); color: var(--ink-2); white-space: nowrap; letter-spacing: 0; text-transform: none; }
.tag.ok { background: var(--ok-bg); color: var(--ok-fg); }
.tag.off { background: var(--bad-bg); color: var(--bad-fg); }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.row-actions .btn { min-height: 38px; padding: 0 14px; font-size: .88rem; }
.admin .visit-list li { align-items: center; flex-wrap: wrap; }
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; }
.quick-links { display: flex; flex-wrap: wrap; gap: 8px; }
.quick-links a { font-size: .88rem; font-weight: 600; text-decoration: none; padding: .55rem .9rem; border-radius: 999px; background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--line); color: var(--ink); }
.quick-links a:hover { box-shadow: inset 0 0 0 1.5px var(--navy-700); }
.hint:empty { display: none; }

/* customer sign-up form: required markers and inline errors */
.req { color: var(--bad-fg); font-weight: 700; }
#signup .su-err { margin: 6px 0 0; font-size: .9rem; font-weight: 600; color: var(--bad-fg); }
#signup select[aria-invalid="true"], #signup textarea[aria-invalid="true"] { box-shadow: inset 0 0 0 2px var(--bad-fg); }
#signup input, #signup select, #signup textarea { font-size: max(16px, 1.0625rem); }

/* =====================================================================
   Customer portal redesign (Dina, Oct 2026): sign-in, dashboard, request.
   ===================================================================== */
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--sun); color: var(--navy-950); display: grid; place-items: center; font-weight: 800; text-decoration: none; flex: none; }
.avatar:hover { color: var(--navy-950); box-shadow: 0 0 0 4px rgba(245,179,30,.2); }
.top-request { display: none; }
.portal .top-nav a { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; }
.portal .top-nav a .i { width: 18px; height: 18px; }
@media (max-width: 959px) {
  .portal .top-nav { display: none; }
  .portal .who .link-btn { display: none; }
}
@media (min-width: 960px) { .portal .top-request:not([hidden]) { display: inline-flex; } .portal .who-email { display: none; } }

/* sign-in: segmented toggle (a radio group) */
.seg { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 999px; background: var(--mist); margin-bottom: 18px; }
.seg button { border: 0; background: transparent; font: 700 .92rem var(--sans); color: var(--ink-2); padding: 11px; border-radius: 999px; cursor: pointer; min-height: 44px; }
.seg button[aria-checked="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 4px 14px -6px rgba(7,23,38,.3); }
.login h2.login-title { font-size: clamp(1.6rem, 3vw, 2rem); font-weight: 800; letter-spacing: -.04em; }
.login h2.login-title:focus { outline: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; padding: 0; list-style: none; }
.chips li { display: inline-flex; align-items: center; gap: 7px; font-size: .82rem; font-weight: 600; padding: 8px 12px; border-radius: 999px; background: var(--solid-dark); box-shadow: inset 0 0 0 1px var(--glass-line); color: #fff; }
.chips .i { width: 16px; height: 16px; color: var(--sun); }
@media (min-width: 960px) { .chips { display: none; } }
.remembered { display: flex; align-items: center; gap: 10px; background: var(--mist); border-radius: 16px; padding: 10px 12px; }
.remembered .av { flex: none; width: 38px; height: 38px; border-radius: 50%; background: var(--navy-900); color: var(--sun); display: grid; place-items: center; font-weight: 800; }
.remembered .who-txt { min-width: 0; flex: 1; }
.remembered b { display: block; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.remembered .soft { font-size: .82rem; }
.remembered a { white-space: nowrap; font-size: .86rem; font-weight: 700; }
.or { display: flex; align-items: center; gap: 10px; color: var(--ink-3); font-size: .84rem; font-weight: 600; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.btn-google { background: #fff; color: #1f1f1f; box-shadow: inset 0 0 0 1px #747775; }
.btn-google:hover { background: #f8fafc; color: #1f1f1f; }
.install { display: flex; gap: 12px; align-items: center; margin-top: 16px; padding: 12px 14px; border-radius: 18px; background: var(--solid-dark); box-shadow: inset 0 0 0 1px var(--glass-line); color: #fff; font-size: .9rem; max-width: 470px; margin-inline: auto; }
.install .ic { width: 36px; height: 36px; border-radius: 11px; background: var(--sun); color: var(--navy-950); display: grid; place-items: center; flex: none; }
.install b { display: block; }
.install .txt { color: var(--on-dark-2); }
.install .btn { margin-left: auto; }
.install-help { margin-top: 8px; color: var(--on-dark-2); font-size: .86rem; }
.card .install { background: var(--mist); color: var(--ink); box-shadow: none; max-width: none; }
.card .install .txt, .card .install-help { color: var(--ink-2); }

/* signed in: page heading on the navy band (no lines across it) */
.dash-head .eyebrow { display: inline-flex; align-items: center; gap: 8px; }
.dash-head h1 { font-size: clamp(1.75rem, 5vw, 2.75rem); }
.dash { display: grid; gap: 16px; }
.dash > * { min-width: 0; }
.col { display: grid; gap: 16px; align-content: start; }
@media (min-width: 960px) { .dash { grid-template-columns: 1.25fr 1fr; gap: 20px; } .dash .span { grid-column: 1 / -1; } }
.status-card { display: flex; gap: 14px; align-items: center; background: var(--paper); border-radius: 20px; padding: 14px 16px; box-shadow: var(--sh-2); }
.status-card .s { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; flex: none; }
.status-card.ok .s { background: var(--ok-bg); color: var(--ok-fg); }
.status-card.warn .s { background: var(--warn-bg); color: var(--warn-fg); }
.status-card.bad .s { background: var(--bad-bg); color: var(--bad-fg); }
.status-card.info .s { background: var(--mist); color: var(--ink-2); }
.status-card b { display: block; }
.status-card span span { color: var(--ink-2); font-size: .92rem; }
.ch { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.ch a, .link-more { display: inline-flex; align-items: center; gap: 4px; font-size: .86rem; font-weight: 700; color: var(--navy-700); text-decoration: none; }
.ch a .i, .link-more .i { width: 16px; height: 16px; }
.pill .i { width: 14px; height: 14px; stroke-width: 2.5; }
.pill:has(.i)::before { display: none; }

/* readings: value, a track, and always a Low / OK / High word */
.rd { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 14px 0; border-top: 1px solid var(--line); list-style: none; }
.rds { list-style: none; margin: 0; padding: 0; }
.rds .rd:first-child { border-top: 0; padding-top: 4px; }
.rd .n { font-weight: 700; }
.rd .v { font-size: 1.35rem; font-weight: 800; letter-spacing: -.04em; text-align: right; line-height: 1.1; }
.rd .v small { font-size: .75rem; color: var(--ink-3); font-weight: 600; margin-left: 3px; letter-spacing: 0; }
.rd .m { grid-column: 1 / -1; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: .86rem; color: var(--ink-2); }
.rd .msg { grid-column: 1 / -1; font-size: .92rem; color: var(--ink-2); }
.rd .range { margin: 2px 0; }
.rd .range .zone { background: rgba(14,110,124,.35); }

/* next visit: solid navy card, no lines */
.next-card { position: relative; color: #fff; border-radius: var(--r-lg); padding: 20px; background: linear-gradient(150deg, rgba(14,110,124,.55), rgba(16,49,76,.2) 60%), var(--navy-900); }
.next-card .eyebrow { color: var(--sun); margin-bottom: 4px; }
.next-card .d { font-size: 1.6rem; font-weight: 800; letter-spacing: -.04em; line-height: 1.15; margin-top: 4px; }
.next-card .r { color: var(--on-dark-2); font-size: .92rem; margin-top: 2px; }
.next-card .pend { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 6px 10px; border-radius: 999px; background: rgba(245,179,30,.16); color: var(--sun); font-size: .82rem; font-weight: 700; }
.acts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.acts > * { display: grid; justify-items: center; gap: 6px; padding: 12px 6px; border-radius: 16px; background: var(--navy-800); border: 0; box-shadow: inset 0 0 0 1px var(--glass-line); color: #fff; text-decoration: none; font: 700 .8rem/1.2 var(--sans); cursor: pointer; text-align: center; min-height: 64px; }
.acts > *:hover { background: var(--navy-700); color: #fff; }
.acts > *:disabled { opacity: .5; cursor: default; }
.acts .i { color: var(--sun); }

/* list rows (visits, requests, reminders) */
.rows { list-style: none; margin: 0; padding: 0; }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.rows .row:first-child { border-top: 0; }
.row b { display: block; font-size: .95rem; }
.row .sub { font-size: .84rem; color: var(--ink-2); }
.row .end { margin-left: auto; flex: none; }
.row .ic { width: 38px; height: 38px; border-radius: 12px; background: var(--mist); display: grid; place-items: center; color: var(--navy-700); flex: none; }

/* reminder switches: real buttons with role="switch" */
.switch { margin-left: auto; flex: none; width: 50px; height: 30px; border-radius: 999px; border: 0; padding: 0; background: var(--line); position: relative; cursor: pointer; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 4px; left: 4px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(7,23,38,.3); transition: transform .2s var(--ease); }
.switch[aria-checked="true"] { background: var(--lagoon); }
.switch[aria-checked="true"]::after { transform: translateX(20px); }
.switch:disabled { opacity: .5; cursor: default; }

/* bottom tab bar (phones and tablets) with a central Request button */
.tabbar { display: none; }
@media (max-width: 959px) {
  body.has-tabbar { --tabbar-h: 72px; }
  body.has-tabbar main { padding-bottom: calc(var(--tabbar-h) + 40px + env(safe-area-inset-bottom)); }
  body.has-tabbar .foot-bar { padding-bottom: calc(var(--tabbar-h) + 24px + env(safe-area-inset-bottom)); }
  .tabbar:not([hidden]) { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: rgba(255,255,255,.96); border-top: 1px solid var(--line); padding: 8px 6px calc(8px + env(safe-area-inset-bottom)); }
  .tabbar a { display: grid; justify-items: center; gap: 3px; font-size: .7rem; font-weight: 700; color: var(--ink-3); text-decoration: none; min-height: 48px; }
  .tabbar .ib { display: grid; place-items: center; width: 48px; height: 30px; border-radius: 999px; }
  .tabbar .i { width: 22px; height: 22px; }
  .tabbar a[aria-current="page"] { color: var(--navy-900); }
  .tabbar a[aria-current="page"] .ib { background: rgba(245,179,30,.25); }
  .tabbar a.req .ib { background: var(--sun); color: var(--navy-950); width: 52px; height: 36px; margin-top: -6px; box-shadow: 0 8px 18px -8px rgba(245,179,30,.9); }
  .tabbar a.req { color: var(--navy-900); }
  .toast { bottom: calc(var(--tabbar-h) + 16px); }
}

/* request a job */
.req-head .back, .page-back { display: inline-flex; align-items: center; gap: 10px; color: var(--on-dark-2); text-decoration: none; font-weight: 600; font-size: .92rem; margin-bottom: 10px; }
.page-back .bk { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--navy-800); box-shadow: inset 0 0 0 1px var(--glass-line); color: #fff; }
.page-back:hover { color: #fff; }
.req-form { display: grid; gap: 18px; }
.req-form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.req-form legend, .lbl { font-weight: 800; font-size: .95rem; margin-bottom: 10px; padding: 0; }
.types { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (min-width: 720px) { .types { grid-template-columns: repeat(3, 1fr); } }
.type { position: relative; background: var(--paper); border-radius: 18px; padding: 14px; box-shadow: inset 0 0 0 1.5px var(--line); display: grid; gap: 6px; cursor: pointer; }
.type input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.type .ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--mist); color: var(--navy-700); }
.type b { font-size: .92rem; }
.type span.d { font-size: .8rem; color: var(--ink-2); }
.type:has(input:checked) { box-shadow: inset 0 0 0 2px var(--navy-900), 0 8px 20px -12px rgba(7,23,38,.4); }
.type:has(input:checked) .ic { background: var(--sun); color: var(--navy-950); }
.type:has(input:focus-visible) { outline: 2px solid var(--sun); outline-offset: 3px; }
.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (min-width: 720px) { .photos { grid-template-columns: repeat(5, 1fr); } }
.photo { position: relative; aspect-ratio: 1; border-radius: 16px; overflow: hidden; background: var(--mist); }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo .x { position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(7,23,38,.78); color: #fff; display: grid; place-items: center; cursor: pointer; }
.photo .x .i { width: 16px; height: 16px; }
.add-photo { aspect-ratio: 1; border-radius: 16px; border: 2px dashed var(--line); background: var(--paper); display: grid; place-items: center; align-content: center; gap: 6px; color: var(--ink-2); font: 700 .8rem var(--sans); cursor: pointer; text-align: center; }
.add-photo:hover { border-color: var(--navy-700); color: var(--ink); }
.add-photo:focus-within { outline: 2px solid var(--sun); outline-offset: 3px; }
.urg { display: grid; grid-template-columns: repeat(3, 1fr); padding: 4px; border-radius: 999px; background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--line); }
.urg label { position: relative; margin: 0; text-align: center; padding: 11px 6px; border-radius: 999px; font: 700 .86rem var(--sans); color: var(--ink-2); cursor: pointer; }
.urg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.urg label:has(input:checked) { background: var(--navy-900); color: #fff; }
.urg label:has(input:focus-visible) { outline: 2px solid var(--sun); outline-offset: 2px; }
.req-note { display: flex; gap: 8px; align-items: center; font-size: .86rem; color: var(--ink-2); }
.req-submit { position: sticky; bottom: calc(var(--tabbar-h) + 8px + env(safe-area-inset-bottom)); padding: 14px 0 6px; background: linear-gradient(rgba(241,245,248,0), var(--mist) 30%); z-index: 5; }
.field-err { margin: 6px 0 0; font-size: .88rem; font-weight: 600; color: var(--bad-fg); }

/* skip / move sheet */
dialog.sheet { border: 0; padding: 0; border-radius: 24px; width: min(460px, calc(100% - 24px)); box-shadow: var(--sh-3); color: var(--ink); }
dialog.sheet::backdrop { background: rgba(7,23,38,.55); }
dialog.sheet form { display: grid; gap: 14px; padding: 24px; }
dialog.sheet h2 { font-size: 1.3rem; }
dialog.sheet .acts-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 479px) { dialog.sheet { margin: auto auto 12px; } dialog.sheet .acts-row .btn { flex: 1; } }

.foot-bar { display: grid; gap: 4px; justify-items: center; }
.empty-ic { width: 44px; height: 44px; border-radius: 14px; background: var(--navy-900); color: var(--sun); display: grid; place-items: center; margin: 0 auto 12px; }
.detail-list { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; font-size: .95rem; }
.detail-list dt { color: var(--ink-3); font-weight: 600; }
.detail-list dd { margin: 0; overflow-wrap: anywhere; }
.stack-sm { display: grid; gap: 12px; }
.login #google-wrap:not([hidden]) { margin-top: 18px; }
.login form { margin-top: 18px; }
/* Signed-in customer header stays on one row; sign out lives on the Account page. */
.portal.has-tabbar .who #signout { display: none; }
.portal .top-nav a { white-space: nowrap; }
.portal.has-tabbar .top-link span { display: none; }
