:root{color-scheme:dark;font:16px/1.6 system-ui,sans-serif;color:#e6e9ed;background:#0b0d10}*{box-sizing:border-box}[hidden]{display:none!important}body{margin:0}a{color:#52c5ee}.brand{display:flex;align-items:center;gap:12px;font-weight:900;letter-spacing:.04em;text-decoration:none;color:#fff}.eyebrow{color:#52c5ee;text-transform:uppercase;letter-spacing:.16em;font-size:.75rem;font-weight:700;margin-top:28px}h1{font-size:clamp(2rem,5vw,3.1rem);line-height:1.15;margin:14px 0}h2{font-size:1.3rem;margin:0}.lead{color:#b9c4d0}.muted{color:#a7b4c2;font-size:.88rem}label{display:block;font-weight:600;margin:20px 0}input{display:block;width:100%;font:inherit;padding:13px 14px;margin-top:8px;border:1px solid #526171;border-radius:6px;background:#0b0d10;color:white}input:focus-visible,a:focus-visible,button:focus-visible{outline:3px solid #52c5ee;outline-offset:3px}button,.button{display:inline-flex;justify-content:center;align-items:center;min-height:48px;padding:12px 20px;background:#2bb3e6;color:#071017;border:1px solid #2bb3e6;border-radius:6px;font:700 1rem system-ui;text-decoration:none;cursor:pointer}button:disabled{opacity:.5;cursor:wait}.secondary{background:transparent;border-color:#526171;color:#e6e9ed}.login-page{min-height:100vh;display:grid;place-items:center;padding:24px;background:linear-gradient(125deg,rgba(6,15,23,.97),rgba(6,15,23,.80)),url('/assets/img/pool-evening-waterfall.jpg') center/cover}.login-card{max-width:490px;width:100%;border:1px solid #34414f;background:#121820;padding:36px;border-radius:14px;box-shadow:0 30px 100px #0008}.login-card button{width:100%}.return-link{font-size:.9rem}#status.error{color:#ffb0a5}#status:empty{display:none}.dashboard{display:grid;grid-template-columns:255px 1fr;min-height:100vh}.sidebar{background:#080b0f;border-right:1px solid #27313d;padding:28px 20px;display:flex;flex-direction:column}.sidebar .brand{font-size:.85rem}.sidebar nav{display:grid;gap:8px;margin:12px 0 32px}.sidebar nav a{padding:12px 14px;color:#bcc7d2;text-decoration:none;border-radius:6px}.sidebar nav a[aria-current]{background:#142a38;color:#71d6f7}.sidebar button{margin-top:auto}.dashboard main{padding:36px clamp(20px,4vw,64px);max-width:1250px}.metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}.card{background:#141b23;border:1px solid #303b48;border-radius:10px;padding:24px;margin:24px 0}.metrics strong{font-size:2.6rem;display:block;line-height:1.2;margin-top:10px;color:#fff}.metrics span{color:#bcc7d2}.toolbar{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap}.record{display:flex;justify-content:space-between;gap:16px;padding:16px 0;border-top:1px solid #303b48}.record p{margin:0}.record span{color:#a7b4c2}dl{display:grid;grid-template-columns:100px 1fr;gap:15px}dt{font-weight:700}dd{margin:0;color:#b9c4d0}@media(max-width:700px){.dashboard{grid-template-columns:1fr}.sidebar{border-right:0;border-bottom:1px solid #27313d}.sidebar nav{display:flex;flex-wrap:wrap;margin:0 0 20px}.sidebar button{align-self:flex-start}.metrics{gap:10px}.metrics .card{padding:14px 12px}.metrics span{font-size:.8rem}dl{grid-template-columns:1fr;gap:5px}dd{margin-bottom:12px}.login-card{padding:24px}}
.workspace{scroll-margin-top:24px}.dashboard main{width:100%;min-width:0;max-width:1550px}.sidebar{position:sticky;top:0;height:100vh}.actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center}.filters,.form-grid{display:grid;grid-template-columns:2fr 1fr;gap:20px}.compact{margin:0}.week{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px;margin:20px 0}.week button{padding:10px;font-size:.8rem;min-width:0}.week .selected{background:#2bb3e6;color:#071017;border-color:#2bb3e6}.edit-form{border-top:1px solid #394759;margin-top:24px;padding-top:20px}.edit-form>button{margin:12px 10px 0 0}.edit-form h3{margin-top:0}select,textarea{display:block;width:100%;font:inherit;padding:12px 14px;margin-top:8px;border:1px solid #526171;border-radius:6px;background:#0b0d10;color:white}textarea{resize:vertical}input[type=checkbox]{width:22px;height:22px;display:inline-block;vertical-align:middle;margin:0 10px 0 0;accent-color:#2bb3e6}.check{margin:10px 0;display:flex;align-items:center;gap:8px;font-weight:400}fieldset{border:1px solid #394759;border-radius:6px;padding:16px}.chemical-row{display:grid;grid-template-columns:2fr 1fr 1fr 1fr;gap:12px;border:1px solid #394759;border-radius:8px;padding:16px;margin:16px 0}.chemical-row label{margin:0}.chemical-row button{grid-column:1/-1;justify-self:start}.property{border-top:1px solid #394759;padding:20px 0}.property h4{margin:0;font-size:1.15rem}.property p,.record p{margin:8px 0}.badge{display:inline-block;background:#142f3c;color:#81d8f6;border-radius:5px;padding:3px 10px;font-size:.85rem}.history{border-top:1px solid #394759;padding:16px 0}summary{cursor:pointer;font-weight:600}details p{overflow-wrap:anywhere}.preserve{white-space:pre-wrap;overflow-wrap:anywhere}.empty{padding:28px;border:1px dashed #526171;border-radius:8px;color:#b9c4d0}.card h3{margin:0 0 10px}#customer-detail{scroll-margin-top:24px}.record{align-items:center}select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:3px solid #52c5ee;outline-offset:3px}@media(max-width:1000px){.week{grid-template-columns:repeat(4,minmax(0,1fr))}.chemical-row{grid-template-columns:1fr 1fr}}@media(max-width:700px){.sidebar{position:static;height:auto}.dashboard main{padding:24px 16px}.sidebar nav{gap:4px;margin-bottom:16px}.sidebar nav a{padding:8px 10px}.filters,.form-grid{grid-template-columns:1fr;gap:0}.week{grid-template-columns:repeat(3,minmax(0,1fr))}.chemical-row{grid-template-columns:1fr}.card{padding:20px 16px}.record{align-items:flex-start;flex-direction:column}.metrics{grid-template-columns:repeat(3,minmax(0,1fr))}.metrics strong{font-size:2rem}.toolbar .compact{width:100%}.actions a,.actions button{font-size:.9rem}.toolbar button{flex-grow:1}}

@media(max-width:700px){.return-link{display:inline-flex;align-items:center;min-height:40px}}

/* Pressed and busy states: a press always shows, and a saving button looks busy until it finishes. */
button:active:not(:disabled),a.button:active{transform:translateY(1px);filter:brightness(.92)}
button[aria-busy=true]{cursor:progress;opacity:.6}
.danger,button.danger{background:#9f2d2d;border-color:#7f1d1d;color:#fff}#status .undo{margin-left:8px;min-height:44px;padding:8px 16px}.pick-form{margin:12px 0}
/* On-site service visit (phone first) */
.start-service{display:block;width:100%;min-height:56px;font-size:1.15rem;font-weight:700;margin:10px 0;background:#1d8fc0;color:#fff;border:0;border-radius:10px}
.attention{border:2px solid #d97706;background:#fff7ed;border-radius:10px;padding:10px 12px;margin:10px 0}.attention.done{border-color:#cbd5e1;background:#f8fafc}
.attention p{margin:6px 0}.error-text{color:#b42318}
body.vf-open{overflow:hidden}
.vf{position:fixed;inset:0;z-index:1000;background:#fff;display:flex;flex-direction:column;color:#15202b}
.vf-head{display:flex;align-items:center;gap:10px;padding:10px 14px;border-bottom:1px solid #dde3e8;background:#0b3d5c;color:#fff}
.vf-head strong{flex:1;font-size:1.05rem}.vf-date{font-size:.9rem;opacity:.85}
.vf-close{min-height:44px;background:transparent;color:#fff;border:1px solid #fff6;border-radius:8px;padding:0 12px}
.vf-body{flex:1;overflow-y:auto;padding:14px 14px 24px;-webkit-overflow-scrolling:touch}
.vf-body h2{font-size:1.2rem;margin:6px 0 10px}.vf-body h3{font-size:1rem;margin:8px 0 4px}
.vf-foot{position:sticky;bottom:0;display:flex;gap:10px;padding:10px 14px calc(10px + env(safe-area-inset-bottom));border-top:1px solid #dde3e8;background:#fff}
.vf-foot button{flex:1;min-height:54px;font-size:1.05rem;border-radius:10px;font-weight:700}
.vf-primary{background:#1d8fc0;color:#fff;border:0}.vf-secondary{background:#fff;color:#0b3d5c;border:2px solid #0b3d5c}
.vf-primary:disabled,.vf-secondary:disabled{opacity:.5}
.vf-file{position:absolute;left:-9999px;width:1px;height:1px;opacity:0}
.vf-photo{width:100%;max-height:60vh;object-fit:contain;border-radius:10px;background:#000}
.vf-sec{border-top:1px solid #dde3e8;padding-top:6px;margin-top:10px}
.vf-check{display:flex;align-items:center;gap:12px;min-height:48px;font-size:1rem;border-bottom:1px solid #f0f2f4}
.vf-check input{width:26px;height:26px;flex:none}
.vf-num{display:grid;grid-template-columns:1fr 110px 42px;align-items:center;gap:8px;min-height:52px}
.vf-num input,.vf-num output{font-size:1.1rem;min-height:46px;padding:0 10px;border:1px solid #9aa8b5;border-radius:8px;width:100%;box-sizing:border-box}
.vf-num output{display:flex;align-items:center;background:#f1f5f9;border-color:#dde3e8}.vf-num em{font-style:normal;color:#4a5763;font-size:.9rem}
.vf-chem{display:grid;grid-template-columns:1fr 84px;gap:8px;align-items:center;border-bottom:1px solid #f0f2f4}
.vf-chem .vf-num{grid-template-columns:1fr 90px;}.vf-chem select{min-height:46px;font-size:1rem;border-radius:8px}
.vf-other{grid-template-columns:1fr 84px;padding:6px 0}.vf-other>input{grid-column:1/-1;min-height:46px;font-size:1rem;padding:0 10px;border:1px solid #9aa8b5;border-radius:8px}
.vf-link{background:none;border:0;color:#b42318;min-height:44px;text-decoration:underline}
.vf-add{width:100%;min-height:50px;margin-top:10px;border-radius:10px;font-weight:700}
.vf-note{display:block;margin:10px 0}.vf-note span{display:block;font-weight:700;margin-bottom:4px}.vf-note textarea{width:100%;box-sizing:border-box;font-size:1rem;padding:10px;border:1px solid #9aa8b5;border-radius:8px}
.vf-note small{display:block;color:#4a5763;margin-top:4px}
.vf-pair{display:grid;grid-template-columns:1fr 1fr;gap:8px}.vf-pair figure{margin:0}.vf-pair img{width:100%;border-radius:8px}.vf-pair figcaption{font-size:.85rem;color:#4a5763}
.vf-err{color:#b42318;min-height:1.2em}.vf-result{font-size:1.05rem;padding:12px;border-radius:10px}.vf-result.ok{background:#e7f6ec;color:#14532d}.vf-result.bad{background:#fdecea;color:#7a1c12}
@media (min-width:700px){.vf{left:50%;transform:translateX(-50%);max-width:560px;box-shadow:0 0 0 100vmax #0006}}
/* Start visit tab */
.sidebar nav a.nav-visit{font-weight:700}
.sv-label{display:block;font-weight:700;margin:12px 0 4px}
.sv-search,.sv-pick{width:100%;box-sizing:border-box;min-height:52px;font-size:1.1rem;padding:0 12px;border:1px solid #9aa8b5;border-radius:10px}
.sv-results{display:grid;gap:6px;margin:8px 0}
.sv-hit{display:block;width:100%;text-align:left;min-height:52px;padding:8px 12px;font-size:1rem;border-radius:10px}
.sv-note{font-weight:700;color:#9a3412;background:#fff7ed;border-radius:8px;padding:8px 10px}
.sv-h{margin:22px 0 6px;font-size:1.1rem}
.sv-dates{display:flex;flex-wrap:wrap;gap:10px;align-items:flex-end;margin:8px 0}.sv-dates label{display:grid;gap:4px;font-weight:700;flex:1 1 140px}.sv-dates input{min-height:48px;font-size:1rem}.sv-dates button{min-height:48px}
.vl-list{display:grid;gap:8px}
.vl-tools{margin:8px 0}
.vl-row{display:flex;align-items:center;gap:10px;width:100%;min-height:60px;padding:10px 12px;border:1px solid #dde3e8;border-radius:10px;background:#fff;color:#15202b}
.vl-check{width:22px;height:22px;flex:0 0 auto;margin:0}
button.vl-open,button.vl-folder{display:grid;grid-template-columns:auto 1fr;gap:2px 10px;flex:1;width:100%;text-align:left;background:#fff;color:#15202b;border:1px solid #dde3e8;border-radius:10px;min-height:60px;padding:10px 12px;font-weight:400}
button.vl-open{border:0;padding:0;min-height:48px;background:transparent}
button.vl-open strong,button.vl-folder strong{color:#15202b;font-weight:700}
.vl-row .vl-date,.vl-folder .vl-date{grid-row:span 2;font-weight:700;color:#0b3d5c;min-width:88px}
.vl-row .muted,button.vl-folder .muted,button.vl-open .muted{grid-column:2;color:#3d4c5c}
.vl-flag{border-left:5px solid #d97706}.vl-tag{grid-column:2;justify-self:start;font-size:.8rem;font-weight:700;color:#9a3412;background:#fff7ed;border-radius:6px;padding:2px 8px}.vl-bad{color:#b42318;background:#fdecea}
.vl-more{width:100%;min-height:50px;margin:10px 0}
.vl-report h4{margin:14px 0 4px}.vl-report ul{margin:0;padding-left:20px}


/* Group the on-site checklist by work area, preserving phone-size tap targets. */
.vf-sec{padding:14px;margin:16px 0;border:1px solid #dde3e8;border-radius:12px;background:#fff}.vf-sec h2{color:#0b3d5c}.vf-help{font-size:14px;color:#4a5763;line-height:1.5}.vf-check:has(input:checked){background:#f1f9fc}.vf-check{padding:4px 8px;border-radius:6px}.vf-check input{accent-color:#1d8fc0}

.vf .vf-check{margin:0}.vf .vf-num{margin:10px 0}.vf .vf-num input,.vf .vf-other>input,.vf .vf-note textarea{background:#fff;color:#15202b}.vf .vf-chem select{background:#fff;color:#15202b;border:1px solid #9aa8b5}.vf .vf-num input{margin-top:0}

@media(max-width:420px){.vf-head{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 12px}.vf-head strong{grid-column:1;overflow-wrap:anywhere}.vf-head .vf-date{grid-column:1;grid-row:2;font-size:12px}.vf-head .vf-close{grid-column:2;grid-row:1/3}.vf-num{grid-template-columns:minmax(0,1fr) 90px 32px}.vf-chem .vf-num{grid-template-columns:minmax(0,1fr) 74px}.vf .vf-sec{padding:12px}}
