:root {
  color-scheme: light;
  font: 16px/1.5 system-ui, sans-serif;
  color: #16324e;
  background: #d8edff;
  --white: #fff;
  --border: #9dbbd3;
  --blue: #165787;
  --muted: #405b73;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; }
.wrap { width: min(63rem, calc(100% - 2rem)); margin-inline: auto; }
header { background: #eaf5ff; border-bottom: 1px solid #b4d1e8; }
header .wrap { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 4.25rem; }
header .brand { color: #16324e; font-size: 1.125rem; font-weight: 800; text-decoration: none; }
main { padding-block: clamp(1.75rem, 5vw, 4rem); }
h1, h2, p { margin: 0 0 .65rem; overflow-wrap: anywhere; }
h1 { font-size: clamp(2rem, 6vw, 3rem); line-height: 1.1; letter-spacing: -.035em; }
h2 { font-size: 1.25rem; margin: 0; }
p { color: var(--muted); }
.panel { padding: clamp(1.15rem, 4vw, 2rem); background: var(--white); border: 1px solid #b6d1e6; border-radius: 1.15rem; box-shadow: 0 6px 22px #244f7712; }
#sign-in { max-width: 34rem; margin: 0 auto; }
form { display: grid; gap: .7rem; margin-top: 1.15rem; }
label { display: grid; gap: .4rem; font-weight: 700; color: #16324e; }
input, select, button { min-height: 2.75rem; padding: .6rem .8rem; border-radius: .55rem; font: inherit; }
input, select { width: 100%; min-width: 0; border: 1px solid var(--border); background: #fff; color: inherit; }
input::placeholder { color: #537089; }
select { appearance: none; padding-right: 2rem; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m5 7 5 5 5-5' fill='none' stroke='%2316324e' stroke-width='2'/%3E%3C/svg%3E") right .55rem center / 1rem no-repeat; }
button { justify-self: start; border: 1px solid transparent; background: var(--blue); color: #fff; font-weight: 750; cursor: pointer; }
button:hover:not(:disabled) { background: #10456d; }
button.secondary { background: #eaf5ff; color: #17496d; border-color: #a5c5df; }
button.secondary:hover:not(:disabled) { background: #d1e9ff; }
button:disabled { opacity: .65; cursor: wait; }
:focus-visible { outline: 3px solid #1d679f; outline-offset: 3px; }
.key-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .55rem; }
#login > button { width: 100%; }
#notice, .feedback { margin: 0; }
#notice { color: #903424; }
#business-name { font-weight: 700; }
#lead-count { margin-bottom: 1.35rem; }
#leads { display: grid; gap: 1rem; }
.lead-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .6rem; }
.lead-status { background: #d8edff; color: #17496d; border-radius: 2rem; padding: .22rem .72rem; font-size: .875rem; font-weight: 750; }
.details { display: flex; flex-wrap: wrap; gap: .7rem 2rem; margin-block: 1rem; }
.details dt { color: var(--muted); font-size: .875rem; }
.details dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.description { white-space: pre-wrap; }
.lead-editor { grid-template-columns: minmax(8rem, 1fr) minmax(0, 2.5fr); align-items: end; border-top: 1px solid #cee1f2; padding-top: .9rem; }
.lead-editor .feedback { grid-column: 1 / -1; }
@media (max-width: 35rem) {
  .lead-editor { grid-template-columns: 1fr; }
  .lead-editor button { width: 100%; }
}

.saved-next { display: grid; gap: .2rem; padding: .65rem .8rem; margin-top: 1rem; border-radius: .55rem; background: #eaf5ff; white-space: pre-wrap; }
.saved-next strong { color: #16324e; }
.quote-panel { border-top: 1px solid #cee1f2; margin-top: 1rem; padding-top: .8rem; }
.quote-panel summary { cursor: pointer; font-weight: 750; }
.quote-editor textarea { width: 100%; padding: .6rem .8rem; border: 1px solid var(--border); border-radius: .55rem; color: inherit; font: inherit; resize: vertical; }
.quote-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.quote-feedback { margin-top: .6rem; }
#inbox { display: grid; gap: 1rem; margin-top: 1rem; }
#workspace { padding-bottom: 6rem; }
.dashboard-banner { background: linear-gradient(120deg,#143e68,#1e6198 64%,#3880ad); border-radius: 1.3rem; color: white; padding: 1.65rem 1.3rem 3.4rem; }
.dashboard-banner p { color: #e5f3ff; margin-bottom: .4rem; }
.dashboard-label { font-size: .9rem; font-weight: 650; }
.overview-card { position: relative; margin: -2.15rem .7rem 1rem; }
.overview-card h2, .home-action h2 { margin-bottom: .35rem; }
#lead-count { color: #16324e; font-size: clamp(1.55rem,5vw,2.2rem); font-weight: 800; margin: .15rem 0 .55rem; }
.overview-stats { display: flex; gap: 2rem; padding: .75rem 0; margin: 0 0 .65rem; border-top: 1px solid #cee1f2; }
.overview-stats dt { color: var(--muted); }
.overview-stats dd { margin: 0; font-size: 1.35rem; font-weight: 750; }
.home-action { margin-inline: .7rem; }
.bottom-nav { position: fixed; z-index: 8; bottom: 0; left: 0; right: 0; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); background: #fff; border-top: 1px solid #a5c5df; padding: .4rem max(0px,calc((100vw - 48rem) / 2)) calc(.4rem + env(safe-area-inset-bottom)); }
.bottom-nav button { justify-self: stretch; display: grid; place-items: center; padding: .28rem .15rem; gap: .12rem; color: #204b70; background: #fff; font-size: .85rem; }
.bottom-nav button span { font-size: 1.35rem; line-height: 1; }
.bottom-nav button:hover, .bottom-nav button[aria-current] { background: #dfedfa; }
#app-menu { position: fixed; inset: 0 auto 0 0; margin: 0; height: 100%; max-height: none; width: min(21rem, 85vw); max-width: none; padding: 1.4rem; border: 0; background: #143e68; color: #fff; }
#app-menu::backdrop { background: #112b49a0; }
#app-menu button { display: block; width: 100%; text-align: left; background: #eaf5ff; color: #16324e; margin-block: .55rem; }
#app-menu form { margin-top: 1rem; }
#quote-choice-label { max-width: 28rem; margin-top: 1rem; }
#workspace[data-view="quotes"] .lead-editor,
#workspace[data-view="quotes"] .saved-next { display: none; }
.bottom-nav { grid-template-columns: repeat(5,minmax(0,1fr)); }
.schedule-card { margin-top: 1rem; }
#schedule-day { max-width: 16rem; }
#schedule-state { margin-block: .75rem; }
#totals-day { max-width: 16rem; }
#totals-state { margin-block: .7rem; }
.totals-list { display: grid; gap: .9rem; }
.totals-list div + div { border-top: 1px solid #cee1f2; padding-top: .8rem; }
.totals-list dt { font-weight: 750; }
.totals-list dd { font-size: 1.65rem; font-weight: 800; margin: .15rem 0; }
.totals-table { border-collapse: collapse; width: 100%; margin-bottom: 1rem; }
.totals-table caption { text-align: left; font-weight: 800; font-size: 1.2rem; margin-bottom: .6rem; }
.totals-table th, .totals-table td { border-bottom: 1px solid #cee1f2; padding: .55rem .25rem; text-align: left; }
.totals-table td, .totals-table thead th:last-child { text-align: right; white-space: nowrap; }
.totals-table tfoot { background: #eaf5ff; font-weight: 800; }
.dashboard-shortcuts { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; margin: 0 .7rem 1rem; }
.dashboard-shortcuts button { width: 100%; min-height: 3rem; }
#assign-form textarea { width:100%; font:inherit; padding:.6rem .8rem; border:1px solid var(--border); border-radius:.55rem; }
.assignment-check { display:flex; align-items:flex-start; gap:.65rem; }
.assignment-check input { width:1.15rem; min-height:1.15rem; flex:none; margin-top:.22rem; }
