:root{color-scheme:dark;--bg:#091322;--pane:#172b44;--edge:#304762;--text:#ecf4ff;--muted:#a7bacf;--sky:#7dccf4;--green:#6be5bd;--amber:#facb86;--red:#ff9f9f}*{box-sizing:border-box}body{margin:0;background:linear-gradient(143deg,#0c2036 0%,#081320 42%,#0e1c2c 100%);color:var(--text);font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:14px;min-height:100vh}a{color:var(--sky);text-decoration:none}.wrap{max-width:1450px;padding:0 24px;margin:0 auto}.top{border-bottom:1px solid #304159;background:#0b182ae8}.top-row{min-height:86px;display:flex;align-items:center;justify-content:space-between;gap:20px}.brand{display:flex;align-items:center;gap:14px;color:white;letter-spacing:.08em}.brand b{display:block;font-size:18px}.brand small{display:block;font-size:12px;letter-spacing:0;color:var(--muted)}.symbol{width:52px;height:52px;border:1px solid #3b718e;border-radius:14px;display:grid;place-items:center;font-size:32px;background:#153953;color:var(--sky)}nav{display:flex;align-items:center;flex-wrap:wrap;gap:20px}nav a{color:var(--muted)}.nav-key{padding:11px 17px;border:1px solid #486785;border-radius:10px;color:var(--sky)}.hero{display:flex;align-items:end;justify-content:space-between;gap:20px;padding:57px 0 35px}.eyebrow{font-size:12px;font-weight:800;letter-spacing:.18em;color:var(--sky)}h1{font-size:clamp(38px,5.2vw,62px);margin:15px 0 13px;line-height:1.1}h2{margin:0;font-size:22px}.hero p{font-size:16px;color:var(--muted);max-width:850px;line-height:1.6}.live{color:var(--muted);font-size:12px;white-space:nowrap}.caution{padding:15px 20px;background:#44382055;border:1px solid #826a39;border-radius:11px;color:#e8d3a4;line-height:1.6}.caution b{color:#ffdf9c}.kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:15px;margin:24px 0 35px}.kpi{padding:23px;border-radius:16px;background:linear-gradient(140deg,#193752,#12263d);border:1px solid #38516e}.kpi span{display:block;font-weight:700;text-transform:uppercase;letter-spacing:.065em;font-size:11px;color:var(--muted)}.kpi strong{display:block;font-size:41px;line-height:1.3;margin-top:8px}.kpi small{color:var(--muted)}.block-title{display:flex;justify-content:space-between;align-items:center;gap:14px;margin:35px 0 16px}.block-title p{margin:7px 0 0;color:var(--muted)}.tools{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.pane{border:1px solid #344c68;border-radius:16px;background:#13253b;box-shadow:0 12px 40px #00000018}.overflow{overflow:auto}table{width:100%;border-collapse:collapse;min-width:980px}th{text-align:left;background:#1c3350;color:var(--muted);font-size:11px;text-transform:uppercase;letter-spacing:.055em}td,th{border-bottom:1px solid #30435a;padding:13px 16px;vertical-align:middle}td{line-height:1.45}tr:last-child td{border-bottom:0}tbody tr:hover{background:#25405a55}.object{font-weight:650}.zone{font-size:11px;color:var(--muted);margin-top:4px}.value{white-space:nowrap}button,select,input,textarea{font:inherit}button{cursor:pointer;border:1px solid #4c6682;border-radius:9px;padding:10px 13px;background:#203750;color:#e3f2ff}button:hover{filter:brightness(1.15)}button:disabled{opacity:.5;cursor:default}.primary{background:#1586c5;border-color:#2699d4;color:#fff;font-weight:700}.secondary{background:#1c334e}select,input,textarea{border:1px solid #4a6480;border-radius:9px;padding:11px;background:#0c1c2f;color:#fff;max-width:100%}.tools select{max-width:210px}.tag{display:inline-block;padding:5px 8px;border-radius:7px;font-size:11px;font-weight:700;white-space:nowrap}.missing,.stale{color:#ffd59b;background:#70512455}.draft{color:#b6c8df;background:#55657955}.incomplete{color:#ffe0a3;background:#66501a66}.ok{color:#8fedd1;background:#255e4b77}.deviation{color:#ffb9b9;background:#883a3a77}.editor-panel{margin-top:42px}.access{color:var(--sky);font-size:12px}.form{padding:22px}.form-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-bottom:18px}.form-grid.inputs{grid-template-columns:repeat(5,minmax(0,1fr))}.form label{display:flex;flex-direction:column;gap:8px;color:var(--muted);font-weight:600}.form input,.form select,.form textarea{width:100%}.full{width:100%}.submit-line{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-top:17px;color:var(--muted);line-height:1.6}.submit-line button{min-width:185px}.history-title{margin-top:55px}.seg.active{background:#175c8c;border-color:#238dc0}.outline{background:transparent}.footnote{margin:12px 0;color:var(--muted);font-size:12px}footer{color:var(--muted);padding:55px 0 25px;font-size:12px}.del{border-color:#b76b6b;color:#ffbfbf;background:transparent;padding:5px 9px}.screen-reader{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}@media(max-width:1000px){.kpis{grid-template-columns:repeat(2,1fr)}.form-grid.inputs{grid-template-columns:repeat(3,1fr)}}@media(max-width:650px){.wrap{padding:0 15px}.top-row{align-items:start;flex-direction:column;padding:16px 0}nav{gap:14px}.hero{padding:30px 0;display:block}.kpis{gap:9px}.kpi{padding:15px}.kpi strong{font-size:31px}.block-title{align-items:start;flex-direction:column}.form-grid,.form-grid.inputs{grid-template-columns:1fr 1fr}.submit-line{flex-direction:column;align-items:stretch}.submit-line button{width:100%}.filters{width:100%}}

[hidden]{display:none!important}

/* v6: compact tiled water-monitoring overview */
.object-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,310px),1fr));gap:14px;align-items:stretch}
.pool-card{background:linear-gradient(145deg,#18334d,#112238);border:1px solid #36516e;border-radius:16px;padding:19px;min-width:0;box-shadow:0 6px 18px #0001}
.pool-head{display:flex;gap:10px;justify-content:space-between;align-items:start;min-height:70px}
.pool-head h3{font-size:17px;line-height:1.25;margin:5px 0;color:#f0f7ff}
.pool-head .tag{white-space:normal;text-align:center;max-width:120px}
.pool-zone{color:#7dc7e9;font-size:11px;letter-spacing:.07em;text-transform:uppercase}
.pool-time{font-size:11px;color:#9cb4cb;margin:5px 0 13px;line-height:1.4}
.pool-metrics,.pool-organo-values{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.pool-metric{background:#0a1e32aa;border:1px solid #30475c;border-radius:9px;padding:10px;min-width:0}
.pool-metric span{display:block;color:#aabfd3;font-size:10px;margin-bottom:5px}
.pool-metric strong{font-size:19px;line-height:1.2;white-space:nowrap;color:#f4faff}
.pool-organo{border-top:1px solid #36516e;margin-top:13px;padding-top:11px}
.pool-organo-cap{color:#a8bdd1;font-size:11px;margin-bottom:9px}
.pool-organo-values{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
.pool-organo .pool-metric{padding:7px}
.pool-organo .pool-metric strong{font-size:15px}
.sync-banner{margin:0 0 15px;padding:12px 16px;border:1px solid #32516f;background:#132a42;border-radius:10px;color:#bad3e9;font-size:12px}
.sync-banner.sync-error{border-color:#856346;color:#ffcf9e}
@media(max-width:600px){.object-grid{grid-template-columns:1fr}.pool-card{padding:16px}.pool-metric strong{font-size:18px}}

/* v7: date-only sample indicator, no stale/missing banners */
.kpis.compact{grid-template-columns:repeat(2,minmax(0,1fr));max-width:720px}
.pool-sample-date{flex-shrink:0;white-space:normal;text-align:right;max-width:145px;line-height:1.4;font-size:11px;color:#acc9df;background:#203a56;border:1px solid #3a5874;border-radius:8px;padding:6px 8px}
.history-fold{margin-top:38px;background:#10243a;border:1px solid #36516e;border-radius:16px;overflow:hidden}
.history-fold-trigger{list-style:none;display:flex;justify-content:space-between;gap:18px;align-items:center;cursor:pointer;padding:21px 23px;user-select:none}
.history-fold-trigger::-webkit-details-marker{display:none}
.history-fold-trigger b{display:block;font-size:20px;margin-bottom:5px}
.history-fold-trigger small{color:#afc6d8;font-size:13px}
.history-fold-right{color:#a7cde9;white-space:nowrap;font-size:13px}
.history-fold-right span{display:inline-block;transition:transform .16s;font-size:22px;vertical-align:middle;margin-left:10px}
.history-fold[open] .history-fold-right span{transform:rotate(180deg)}
.history-fold-content{padding:0 22px 24px}
.history-toolbar{margin:6px 0 16px;justify-content:flex-end}
.history-fold-content .pane{margin-top:13px}
.history-fold-trigger:focus-visible{outline:2px solid #6ac3f1;outline-offset:-4px}
@media(max-width:650px){.kpis.compact{grid-template-columns:1fr 1fr}.history-fold-trigger{padding:17px}.history-fold-content{padding:0 12px 18px}.history-fold-right{font-size:11px}.pool-sample-date{max-width:130px}}

/* v9: water first, air as a separate card section */
.pool-group-title{grid-column:1/-1;margin:15px 0 1px;border-bottom:1px solid #334d68;padding:0 1px 13px}
.pool-group-title h2{font-size:21px;margin:0 0 5px;color:#ecf4ff}
.pool-group-title p{margin:0;color:#a6c3d8;font-size:13px}
