:root{font-family:Inter,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;color-scheme:light;--bg:#f4f6f7;--panel:#fff;--text:#202d35;--muted:#7a858d;--line:#e6eaed;--accent:#146d78;--soft:#e5f3f1;--nav:#162f43;--shadow:0 12px 40px #13283906}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font-size:14px}body.dark{color-scheme:dark;--bg:#101416;--panel:#191f22;--text:#edf3f4;--muted:#94a2a8;--line:#2b3439;--accent:#75d7cb;--soft:#213b39;--nav:#edf3f4;--shadow:none}button,input,select,textarea{font:inherit}button,a,input{ -webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.5}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible{outline:3px solid #5ebbc8;outline-offset:3px}button{border:1px solid var(--line);background:var(--panel);color:var(--text);border-radius:10px;padding:11px 16px;transition:background .2s,transform .2s}button:hover:not(:disabled){background:var(--soft)}button:active:not(:disabled){transform:translateY(1px)}.primary{background:var(--accent);border-color:var(--accent);color:var(--panel);font-weight:600}.primary:hover:not(:disabled){filter:brightness(1.08);background:var(--accent)}.shell{display:grid;grid-template-columns:238px 1fr;min-height:100vh}.sidebar{background:var(--panel);padding:32px 22px;border-right:1px solid var(--line);display:flex;flex-direction:column;position:sticky;top:0;height:100vh}.logo{width:155px;max-height:65px;object-fit:contain;object-position:left;background:transparent;border-radius:0;padding:0}.eyebrow{font-size:10px;letter-spacing:1.7px;text-transform:uppercase;font-weight:700;color:var(--muted)}.sidebar .eyebrow{margin:35px 12px 14px}.nav{display:grid;gap:6px}.nav button{border:0;text-align:left;padding:14px;background:transparent;color:var(--muted);display:flex;gap:13px;align-items:center}.nav button.active{color:var(--accent);background:var(--soft);font-weight:600}.nav svg{width:18px;height:18px}.sidebar footer{margin-top:auto;font-size:12px;color:var(--muted);line-height:1.8;padding:20px 10px 0}.topbar{height:88px;padding:0 44px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;background:var(--panel)}.topbar .actions{display:flex;gap:10px;align-items:center}.avatar{width:34px;height:34px;border-radius:50%;background:var(--soft);display:grid;place-items:center;color:var(--accent);font-weight:600}.pill{display:inline-flex;gap:7px;align-items:center;font-size:11px;font-weight:600;padding:6px 10px;border-radius:20px;background:var(--soft);color:var(--accent)}.pill.amber{background:#b9841b15;color:#b88730}.main{max-width:1400px;margin:0 auto;padding:42px 44px 60px}.heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:30px}h1{font-size:32px;font-weight:550;letter-spacing:-1.2px;margin:8px 0 10px}h2{font-size:18px;letter-spacing:-.4px;font-weight:600;margin:0}h3{font-size:15px;margin:0}p{line-height:1.65}.muted{color:var(--muted)}.heading p{margin:0;color:var(--muted)}.hero{border-radius:20px;background:#072b71;color:#f1fafb;padding:32px 36px;position:relative;overflow:hidden;display:flex;justify-content:space-between;gap:30px}.hero h2{font-size:28px;font-weight:500;letter-spacing:-.8px;margin:18px 0 12px}.hero p{color:#c7d9f6;max-width:440px;font-size:13px}.hero .eyebrow{color:#b3d5ff}.hero .pill{color:#b8e8dc;background:#ffffff14}.water-art{width:180px;height:180px;flex-shrink:0;border:1px solid #ffffff18;border-radius:50%;position:relative;display:grid;place-items:center}.water-art:before,.water-art:after{content:'';position:absolute;inset:22px;border:1px solid #ffffff20;border-radius:50%}.water-art:after{inset:45px}.water-art svg{width:48px;height:48px;color:#99d9dc}.grid{display:grid;grid-template-columns:1.45fr 1fr;gap:22px;margin-top:24px}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;margin:24px 0}.card{background:var(--panel);border:1px solid var(--line);border-radius:16px;padding:25px;box-shadow:var(--shadow)}.stat-value{font-size:30px;letter-spacing:-1px;margin:13px 0 7px}.small{font-size:12px}.card-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:22px}.empty{text-align:center;padding:36px 15px;color:var(--muted)}.empty svg{width:32px;height:32px;margin-bottom:14px;opacity:.6}.empty h3{color:var(--text);margin-bottom:6px}.row{display:flex;justify-content:space-between;gap:18px;padding:17px 0;border-bottom:1px solid var(--line);align-items:center}.row:last-child{border:0}.row p{margin:5px 0 0}.notice{padding:16px 18px;border:1px solid var(--line);border-radius:12px;background:var(--panel);color:var(--muted);font-size:12px;line-height:1.6;margin-top:24px}.notice strong{color:var(--text)}.calendar{display:grid;grid-template-columns:repeat(7,1fr);gap:5px;text-align:center}.day{min-height:38px;padding:11px 0;border-radius:8px;font-size:12px}.day.today{background:var(--accent);color:var(--panel)}.day.has{box-shadow:inset 0 -3px var(--accent)}.day.blank{opacity:.2}.weekday{font-size:10px;color:var(--muted);padding:10px 0}.calendar-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.calendar-title button{padding:4px 10px}.tabs{display:flex;gap:8px;margin-bottom:20px;flex-wrap:wrap}.tabs button.selected{background:var(--soft);color:var(--accent);border-color:transparent}table{width:100%;border-collapse:collapse;text-align:left}th{font-size:11px;color:var(--muted);font-weight:500;padding:14px 10px;border-bottom:1px solid var(--line)}td{font-size:13px;padding:18px 10px;border-bottom:1px solid var(--line)}.table-scroll{overflow-x:auto}.login{min-height:100vh;display:grid;grid-template-columns:1fr 1fr}.login-aside{background:#072b71;padding:60px;display:flex;flex-direction:column;justify-content:space-between;color:white}.login-aside h1{font-size:54px;line-height:1.15;max-width:450px;letter-spacing:-2px}.login-aside p{color:#c7d9f6;max-width:360px}.login-form{display:flex;align-items:center;justify-content:center;padding:40px}.login-form>div{width:100%;max-width:360px}.login-form h1{font-size:28px}label{display:block;font-size:12px;font-weight:550;margin:18px 0 8px}input,textarea,select{width:100%;padding:12px 14px;background:var(--bg);border:1px solid var(--line);border-radius:9px;color:var(--text)}textarea{resize:vertical;min-height:80px}form .primary{width:100%;margin-top:24px}.error{color:#cf665e;font-size:12px;line-height:1.6}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}dialog{background:var(--panel);color:var(--text);border:1px solid var(--line);border-radius:20px;padding:30px;width:min(500px,calc(100vw - 30px));box-shadow:0 30px 100px #0004}dialog::backdrop{background:#07151c99;backdrop-filter:blur(6px)}.dialog-head{display:flex;align-items:center;justify-content:space-between}.dialog-head button{border:0;padding:6px 10px}.dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:24px}#toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:var(--text);color:var(--bg);border-radius:12px;padding:14px 22px;box-shadow:0 10px 30px #0002;z-index:20;display:none;max-width:90vw}.demo-banner{background:#fff0cc;color:#604a1a;text-align:center;padding:9px;font-size:12px}.section-gap{margin-top:24px}.mobile-brand{display:none}.text-button{border:0;background:transparent;color:var(--accent);padding:8px}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}@media(max-width:1050px){.shell{grid-template-columns:200px 1fr}.main{padding:28px}.topbar{padding:0 28px}.grid{grid-template-columns:1fr}.water-art{width:140px;height:140px}.hero{padding:28px}}@media(max-width:720px){.shell{display:block}.sidebar{height:auto;position:static;padding:15px;border-right:0;border-bottom:1px solid var(--line)}.sidebar .logo,.sidebar .eyebrow,.sidebar footer{display:none}.nav{display:flex;justify-content:space-between;overflow:auto;gap:2px}.nav button{font-size:10px;padding:10px;flex-direction:column;gap:6px}.topbar{height:68px;padding:0 20px}.topbar .small{display:none}.mobile-brand{display:block;font-size:13px;font-weight:600}.main{padding:26px 18px}.heading{align-items:flex-start}.heading h1{font-size:27px}.heading .primary{font-size:12px;padding:10px}.hero{padding:26px}.hero h2{font-size:24px}.water-art{display:none}.stats{gap:8px}.stats .card{padding:15px}.stat-value{font-size:24px}.stats .small{font-size:10px}.card{padding:20px}.login{grid-template-columns:1fr}.login-aside{display:none}.login-form{min-height:100vh;padding:30px}.form-grid{grid-template-columns:1fr 1fr}}@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}

.dark .logo{filter:brightness(1.5)}

.control-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:24px 0}.row>span:last-child{text-align:right}.activity-chart{display:flex;align-items:flex-end;height:150px;gap:3px;margin-top:28px;border-bottom:1px solid var(--line)}.activity-chart>div{flex:1;background:var(--accent);border-radius:3px 3px 0 0;min-width:1px}.chart-labels{display:flex;justify-content:space-between;color:var(--muted);font-size:11px;margin-top:10px}

.directory-tools{display:grid;grid-template-columns:1fr 170px;gap:20px;margin-bottom:20px}.directory-tools label{margin-top:0}.table-actions{display:flex;gap:6px}.nav{max-height:calc(100vh - 220px);overflow:auto}@media(max-width:720px){.directory-tools{grid-template-columns:1fr}.nav{justify-content:flex-start;max-height:none}.nav button{flex-shrink:0;min-width:70px}.table-actions{flex-direction:column}.heading .primary{flex-shrink:0}.row{flex-wrap:wrap}}

.inbox-filters{display:flex;align-items:end;gap:16px;flex-wrap:wrap;margin:20px 0}.inbox-filters>div:first-child{flex:1;min-width:220px}.inbox-check{display:flex;align-items:center;gap:8px;padding:12px 0}.inbox-check input{width:auto}details summary{cursor:pointer;color:var(--accent);font-size:12px;margin:8px 0}details p{overflow-wrap:anywhere}

.email-body{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;line-height:1.65;max-height:50vh;overflow:auto;padding:1rem;border:1px solid var(--line);border-radius:12px}

button.day{font:inherit;color:inherit;background:transparent;padding:0;min-width:0;width:100%;border:0;cursor:pointer}button.day:focus-visible{outline:2px solid var(--accent);outline-offset:2px}button.day:hover{box-shadow:inset 0 0 0 1px var(--accent)}

@media(max-width:420px){.heading{flex-direction:column;align-items:stretch;gap:16px}.heading .primary{align-self:flex-start}.topbar{gap:10px;flex-wrap:wrap}.topbar .actions{gap:8px}.topbar .avatar{display:none}.topbar button{white-space:nowrap}.mobile-brand{flex:1;min-width:110px}.calendar-title{flex-wrap:wrap;gap:12px}.calendar-title button{min-height:40px;min-width:40px}input,select,textarea{font-size:16px}.card{min-width:0}dialog{max-width:calc(100vw - 24px);box-sizing:border-box}.form-grid{grid-template-columns:1fr}}

.controller-stat{font-size:1.7rem}.control-grid{gap:12px}#controller-live .row strong{text-align:right;overflow-wrap:anywhere}#controller-live details{margin-top:24px}#controller-live summary{cursor:pointer}#controller-result{line-height:1.5}#controller-live .row{gap:16px}

/* Consistent section rhythm across live readings, reports and directories. */
#controller-live > .card,#controller-live > .grid + .grid{margin-top:24px}
.main > .card + .tabs,.main > .notice + .tabs,.main > .grid + .tabs,.main > .stats + .tabs{margin-top:24px}
.main > .card + .card{margin-top:24px}
.tabs{gap:12px}.customer-details{min-width:260px;margin-top:14px}
.customer-details summary{font-weight:600;padding:8px 0}
.detail-grid{display:grid;grid-template-columns:repeat(2,minmax(120px,1fr));gap:16px 22px;margin:12px 0}
.detail-grid dt{font-size:11px;color:var(--muted);margin-bottom:5px}.detail-grid dd{margin:0;overflow-wrap:anywhere;font-size:13px}
#record-form .form-grid{gap:4px 18px}#record-form h3{padding-top:8px}
@media(max-width:720px){.detail-grid{grid-template-columns:1fr}.customer-details{min-width:200px}}

.view-toggle{font-weight:600;color:var(--accent);white-space:nowrap}.customer-preview-banner{display:flex;gap:10px;flex-direction:column;background:var(--soft);border:1px solid var(--accent);border-radius:14px;padding:18px 22px;margin-bottom:28px}.customer-preview-banner span{font-size:12px;color:var(--muted)}
dialog:has(#record-form){width:min(740px,calc(100vw - 32px));max-height:90vh;padding:32px}.form-intro{margin:10px 0 24px}.entry-section{border:1px solid var(--line);border-radius:16px;padding:22px;margin:18px 0;background:var(--panel)}.entry-heading{display:flex;align-items:center;gap:12px;margin-bottom:12px}.entry-heading>span{background:var(--soft);color:var(--accent);border-radius:10px;padding:10px;font-weight:600;font-size:12px}.entry-heading p{font-size:12px;color:var(--muted);margin:4px 0 0}.address-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 18px}.field-wide{grid-column:1/-1}#record-form .entry-heading h3{padding:0}#record-form input,#record-form textarea{transition:border-color .2s}#record-form input:focus,#record-form textarea:focus{border-color:var(--accent)}
@media(max-width:720px){.topbar{height:auto;min-height:88px;flex-wrap:wrap;padding-top:12px;padding-bottom:12px}.topbar .actions{flex-wrap:wrap}.view-toggle{font-size:12px}.entry-section{padding:16px}dialog:has(#record-form){padding:20px}.address-grid{grid-template-columns:1fr}.field-wide{grid-column:auto}}

/* Phone review: usable touch targets, flexible cards and a reachable form close control. */
.shell>div,.main,.entry-section,.form-grid>div{min-width:0}
.customer-preview-banner>button{align-self:flex-start}
@media(max-width:720px){
 .topbar .actions{width:100%;gap:8px}.topbar .avatar{display:none}
 .topbar button,.nav button,.dialog-head button{min-height:44px}
 .topbar .view-toggle{margin-right:auto}
 .stats{grid-template-columns:1fr;gap:12px}.stats .card{padding:18px 20px}.stats .small{font-size:12px}
 .stat-value{margin:8px 0}.card-head{flex-wrap:wrap;gap:14px}.control-grid{grid-template-columns:1fr}
 .customer-preview-banner{padding:18px;gap:12px}.customer-preview-banner>button{width:100%;min-height:44px}
 dialog{max-height:calc(100dvh - 24px);overflow-y:auto;overscroll-behavior:contain}
 dialog:has(#record-form){max-height:calc(100dvh - 24px);padding:16px;width:calc(100vw - 24px)}
 dialog:has(#record-form) .dialog-head{position:sticky;top:-16px;background:var(--panel);z-index:2;padding:8px 0;border-bottom:1px solid var(--line)}
 .entry-section{padding:16px;margin:16px 0}.entry-heading{align-items:flex-start}
 #record-form .form-grid,.address-grid{grid-template-columns:1fr;gap:8px}
 input,select,textarea{font-size:16px;min-width:0;min-height:44px}
 .dialog-actions{flex-wrap:wrap}#client-view-form select{max-width:100%}
}
@media(max-width:360px){.entry-section{padding:12px}.topbar{padding-inline:16px}.main{padding-inline:14px}.hero{padding:22px}.topbar button{padding-inline:10px}}

.schedule-toolbar{display:flex;gap:12px;flex-wrap:wrap}.schedule-clear{margin-top:16px}.schedule-section-title{margin:28px 0 16px}.watering-table table{min-width:790px}.watering-table td{vertical-align:top}.watering-table td:first-child{max-width:220px}.watering-table td p{overflow-wrap:anywhere}.schedule-toolbar button{min-height:44px}
/* Account preferences and reporting */
#profile-form{margin-top:24px}#profile-form>.primary{width:auto;min-width:180px}.report-filters{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:20px}.report-filter-actions{display:flex;gap:16px;align-items:center;flex-wrap:wrap;margin-top:24px}.report-filter-actions .check-label{margin-right:auto;display:flex;align-items:center;gap:10px}.check-label input{width:20px;height:20px;margin:0}.report-chart-grid{display:grid;grid-template-columns:minmax(0,2fr) minmax(280px,1fr);gap:24px}.report-chart{width:100%;overflow:hidden;margin-top:24px}.report-chart svg{width:100%;height:auto;display:block}.chart-gridline{stroke:var(--line);stroke-width:1}.chart-axis{fill:var(--muted);font-size:11px}.chart-bar{fill:#73cbc2}.chart-bar.operation{fill:#507bd0}.chart-legend{display:flex;justify-content:center;gap:24px;flex-wrap:wrap;font-size:13px;color:var(--muted)}.chart-legend span{display:flex;align-items:center;gap:8px}.legend-dot{width:10px;height:10px;border-radius:50%;background:#73cbc2;display:inline-block}.legend-dot.operation{background:#507bd0}.outcome-ring{width:174px;height:174px;border-radius:50%;margin:28px auto;display:grid;place-items:center}.outcome-ring>div{background:var(--panel);border-radius:50%;width:132px;height:132px;display:flex;flex-direction:column;align-items:center;justify-content:center}.outcome-ring strong{font-size:36px}.outcome-ring span{font-size:12px;color:var(--muted)}.outcome-key>div{display:flex;justify-content:space-between;gap:16px;margin-top:12px}.outcome-key span{display:flex;gap:10px;align-items:center}.outcome-key i{width:10px;height:10px;border-radius:50%}.breakdown{display:grid;gap:22px;margin-top:24px}.breakdown .card-head{margin-bottom:8px;gap:24px}.breakdown-track{height:8px;background:var(--line);border-radius:5px;overflow:hidden}.breakdown-track span{display:block;height:100%;background:#73cbc2;border-radius:5px}.report-stats{grid-template-columns:repeat(4,minmax(0,1fr))}.report-unit-label{display:flex;align-items:center}.admin-row p{overflow-wrap:anywhere}.report-chart-grid .empty{padding:32px 0}table details{margin-top:10px;max-width:440px}table details summary{cursor:pointer;color:var(--muted)}
@media(max-width:1000px){.report-filters,.report-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.report-chart-grid{grid-template-columns:minmax(0,1fr)}}
@media(max-width:600px){.report-filters,.report-stats{grid-template-columns:minmax(0,1fr)}.report-filter-actions{align-items:stretch;flex-direction:column}.report-filter-actions button{width:100%}.report-filter-actions .check-label{margin-right:0}.admin-row{align-items:flex-start;gap:20px;flex-direction:column}.outcome-ring{margin:24px auto}.chart-legend{gap:12px}#profile-form>.primary{width:100%}}

.outcome-ring{position:relative}.outcome-ring>svg{position:absolute;inset:0;width:100%;height:100%}.outcome-ring>div{position:relative}.breakdown-svg{width:100%;height:8px;display:block;border-radius:5px}
/* Customer and model inventory */
.model-group{border:1px solid var(--line);border-radius:18px;margin:18px 0;overflow:hidden}.model-group summary{display:flex;gap:24px;align-items:center;justify-content:space-between;padding:24px;cursor:pointer}.model-group summary strong{font-size:1.15rem}.model-group summary span{display:block;margin-top:8px}.model-group summary:after{content:'+';font-size:24px}.model-group[open] summary:after{content:'−'}.model-body{padding:0 24px 24px}.model-counts{text-align:right;margin-left:auto}.assigned-unit,#selected-unit-details:not(:empty),#assignment-unit-details{margin-top:24px;padding:20px;border:1px solid var(--line);border-radius:14px}.welcome-help{margin-top:18px!important;line-height:1.6}.customer-name{font-weight:700;text-align:left}.model-body .card-head{gap:16px;flex-wrap:wrap}.detail-grid dd{overflow-wrap:anywhere}#unit-form .form-grid{margin-bottom:24px}#unit-form>button{margin-top:20px}#assignment-form>button{margin-top:20px}
@media(max-width:600px){.model-group summary{padding:18px;gap:12px;flex-wrap:wrap}.model-counts{text-align:left;margin-left:0}.model-body{padding:0 12px 18px}.heading>.table-actions{width:100%}.heading>.table-actions button{flex:1}.assigned-unit,#selected-unit-details:not(:empty),#assignment-unit-details{padding:14px}.model-group summary strong{font-size:1rem}}

/* Welcome health and administrator test recipients */
.unit-health{display:inline-flex;align-items:center;gap:10px;padding:9px 14px;border-radius:999px;background:var(--soft);color:var(--text);font-size:14px;font-weight:650;line-height:1.4}
.status-dot{width:10px;height:10px;flex:0 0 10px;border-radius:50%;background:#cbd5e1}
.unit-health.healthy .status-dot{background:#69e6a5;box-shadow:0 0 0 4px #69e6a51f;animation:status-pulse 2.5s ease-in-out infinite}
.unit-health.warning .status-dot{background:#ffd36b}.unit-health.error .status-dot{background:#ff8181}
@keyframes status-pulse{50%{box-shadow:0 0 0 7px #69e6a508}}
@media(prefers-reduced-motion:reduce){.unit-health.healthy .status-dot{animation:none}}
.alert-recipients{border:1px solid var(--line);border-radius:16px;padding:16px;margin:20px 0;min-width:0}
.alert-recipients legend{font-size:14px;padding:0 8px}
.alert-recipient{display:flex;align-items:center;gap:14px;padding:12px;margin:4px 0;border-radius:10px;cursor:pointer}
.alert-recipient input{width:20px;height:20px;margin:0;flex:0 0 20px;accent-color:#71d5cc}
.alert-recipient>span{min-width:0}.alert-recipient strong,.alert-recipient .small{display:block;overflow-wrap:anywhere}

.hero h1{font-size:28px;font-weight:500;letter-spacing:-.8px;margin:18px 0 12px}.hero-action{display:flex;align-items:center;flex-shrink:0}.hero-action .primary{background:#75d7cb;border-color:#75d7cb;color:#102b32;padding:15px 22px}.hero-action .primary:hover{background:#8ce1d7}@media(max-width:720px){.hero{flex-direction:column;gap:22px}.hero h1{font-size:26px}.hero-action .primary{width:100%;min-height:48px}.hero-action{width:100%}}

/* Keep watering choices equally accessible on desktop and mobile. */
#schedule-form .schedule-form-actions{display:flex;flex-direction:column;gap:12px;width:100%}#schedule-form .schedule-form-actions>button{width:100%;margin:0}

.controller-operation{padding:18px 0;border-bottom:1px solid var(--line)}.controller-operation summary{cursor:pointer;line-height:1.7}.controller-operation li{padding:6px 0;line-height:1.6}.controller-operation p{overflow-wrap:anywhere}
/* Actions in schedule rows */
.table-scroll td .text-button:is([data-edit-draft],[data-cancel],[data-controller-draft]){
 display:inline-flex;align-items:center;justify-content:center;min-height:40px;
 padding:8px 13px;margin:3px 6px 3px 0;border:1px solid var(--muted);
 border-radius:9px;background:var(--panel);color:var(--text);white-space:nowrap;font-weight:600;
}
.table-scroll td .text-button:is([data-edit-draft],[data-cancel]):hover{background:var(--soft)}
.table-scroll td .text-button[data-controller-draft]{background:var(--accent);border-color:var(--accent);color:var(--panel)}
.table-scroll td .text-button[data-controller-draft]:hover{filter:brightness(1.08)}

.password-field{position:relative;display:grid}.password-field input{padding-right:58px;margin:0}.password-toggle{position:absolute;right:8px;top:50%;transform:translateY(-50%);width:40px;height:40px;padding:8px;border:0;background:transparent;color:var(--muted);display:grid;place-items:center}.password-toggle:hover,.password-toggle[aria-pressed="true"]{color:var(--accent)}

/* Header controls keep their shape when space is tight. */
.topbar{height:auto;min-height:88px;gap:18px;padding-top:14px;padding-bottom:14px;flex-wrap:wrap}
.topbar .actions{min-width:0;flex-wrap:wrap;justify-content:flex-end;margin-left:auto}
.topbar .actions>button{flex-shrink:0;white-space:nowrap}
.topbar .avatar{flex:0 0 34px;min-width:34px;min-height:34px;aspect-ratio:1;border-radius:50%}
#workspace-unit{appearance:none;width:auto;max-width:min(330px,75vw);min-width:180px;margin:0;padding-right:42px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='10' viewBox='0 0 14 10'%3E%3Cpath d='m2 2 5 5 5-5' fill='none' stroke='%237a858d' stroke-width='1.8'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 16px center}
.topbar label[for="workspace-unit"]{margin:0}

/* Compact mobile workspace with persistent bottom navigation. */
.operation-summary{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:16px;list-style:none}
.operation-summary::-webkit-details-marker{display:none}.operation-date{display:block;margin-top:3px}
.operation-status{font-size:12px;font-weight:600;text-align:right;color:var(--muted);background:none;padding:0;border-radius:0;max-width:170px}
.operation-status.healthy{color:#279363}.operation-status.warning{color:#b88730}
button[data-155-refresh],button[data-controller-refresh]{white-space:nowrap;flex-shrink:0}
@media(max-width:720px){
 .sidebar{position:fixed;top:auto;bottom:0;left:0;right:0;height:auto;z-index:30;padding:8px 8px calc(8px + env(safe-area-inset-bottom));border:0;border-top:1px solid var(--line);background:var(--panel)}
 .sidebar .nav{display:flex;overflow-x:auto;justify-content:flex-start;gap:4px;overscroll-behavior-x:contain}
 .sidebar .nav button{flex:0 0 auto;min-width:70px;min-height:56px;padding:8px;font-size:10px;white-space:nowrap}
 .main{padding-bottom:calc(110px + env(safe-area-inset-bottom))}
 .topbar{min-height:68px;padding:10px 12px;display:block}
 .topbar>.small,.topbar>.mobile-brand,.topbar .avatar,.topbar label[for="workspace-unit"]{display:none}
 .topbar .actions{width:100%;display:flex;flex-wrap:nowrap;gap:6px;margin:0;justify-content:flex-end}
 .topbar #workspace-unit{flex:1 1 0;width:0;min-width:60px;max-width:none;font-size:12px;padding:11px 26px 11px 8px;background-position:right 8px center;text-overflow:ellipsis}
 .topbar .actions>button{font-size:11px;padding:10px 8px;min-height:44px;margin:0;white-space:nowrap}
 .topbar .actions .view-toggle{margin:0}
 .heading:has([data-155-refresh]),.heading:has([data-controller-refresh]){flex-wrap:wrap;gap:14px}
 .heading [data-155-refresh],.heading [data-controller-refresh]{align-self:flex-start;width:auto;font-size:12px;padding:10px 14px}
 .operation-summary{gap:10px}.operation-info strong{font-size:12px}.operation-date{font-size:10px}.operation-status{font-size:11px;max-width:125px}
}

/* A focused, single-column sign-in screen. */
.login{display:flex;align-items:center;justify-content:center;min-height:100dvh;padding:40px 24px}
.login .login-form{width:100%;min-height:0;padding:0}
.login .login-form>div{max-width:480px;width:100%}
.login .card-head{justify-content:center;margin-bottom:32px}
.login .logo{width:220px;max-height:none;height:auto;object-position:center}
.login h1,.login h1+p{text-align:center}
.login h1+p{margin-bottom:28px}
.login-actions{display:grid;grid-template-columns:1.35fr 1fr;gap:12px;margin-top:24px;align-items:stretch}
.login-actions .primary{margin:0}
.login-alternative button{width:100%;height:auto;min-height:44px}
#login+.login-alternative{margin-top:16px}
#login-recovery:not([hidden]){display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:16px}
#login-recovery button{min-height:44px;line-height:1.4}
@media(max-width:520px){.login{padding:32px 24px}.login-actions,#login-recovery:not([hidden]){grid-template-columns:1fr}.login .logo{width:200px}.login-actions button{min-height:48px}}

/* Quiet blue surround and a finely outlined sign-in card. */
.login{background:radial-gradient(ellipse at 50% 20%,#123f88 0%,#082b66 48%,#061b40 100%);padding:56px 24px}
.login .login-form{flex-direction:column;gap:24px}
.login .login-form>div{max-width:560px;padding:44px 40px 36px;border:1px solid var(--line);border-radius:24px;background:var(--bg);box-shadow:0 28px 80px #0003,0 1px 0 #ffffff10 inset}
.login .card-head{margin-bottom:26px}
.login .login-footer{color:#ccd7e9;font-size:11px;letter-spacing:.15px;text-align:center;line-height:1.6}
@media(max-width:520px){.login{padding:32px 18px}.login .login-form>div{padding:32px 22px 26px;border-radius:20px}.login .login-footer{font-size:10px}.login .logo{width:190px}}

body:not(.dark) .login .login-form>div{background:#f8f9fb}

/* Consistent inset arrows on every single-choice dropdown, including mobile. */
select:not([multiple]){appearance:none;-webkit-appearance:none;padding-right:46px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='10' viewBox='0 0 14 10'%3E%3Cpath d='m2 2 5 5 5-5' fill='none' stroke='%237a858d' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 16px center;background-size:14px 10px;text-overflow:ellipsis}
.topbar #workspace-unit{padding-right:42px;background-position:right 14px center}
select:focus-visible{outline:3px solid #5ebbc8;outline-offset:3px}
.units-back{margin-bottom:24px}.units-filters{display:grid;grid-template-columns:2fr 1fr 1fr;gap:20px}.unit-type-group{margin-top:28px;padding-top:24px;border-top:1px solid var(--line)}
@media(max-width:720px){.units-filters{grid-template-columns:1fr}.units-filters label{margin-top:8px}}
@media(forced-colors:active){select:not([multiple]){appearance:auto;background-image:none}}

.hero .unit-health{background:#ffffff17;color:#fff}

.password-toggle:active:not(:disabled){transform:translateY(-50%)}
.login-alternative{display:flex;flex-wrap:wrap;gap:12px}
.password-field+label{margin-top:18px}

/* Compact authentication controls and responsive unit inventory. */
.login-alternative{display:grid;align-content:start;gap:12px;min-width:0}
.login-actions{align-items:start}
.login-actions button,.login-alternative button{min-width:0;line-height:1.4;padding:12px 16px}
.dialog-head{gap:16px}
.dialog-head button[data-close]{display:grid;place-items:center;flex:0 0 44px;width:44px;height:44px;min-height:44px;padding:0;line-height:1;border-radius:50%}
#unit-form input,#unit-form select{width:100%;min-width:0;max-width:100%}
.unit-directory .table-actions button{white-space:nowrap}
@media(max-width:720px){
 dialog:has(#unit-form){width:calc(100vw - 32px);max-width:520px;max-height:calc(100dvh - 32px);padding:24px;overflow-y:auto}
 #unit-form .form-grid{grid-template-columns:minmax(0,1fr);gap:8px}
 #unit-form input[type=date]{display:block;min-height:48px;appearance:none;-webkit-appearance:none}
 .unit-directory{overflow:visible}
 .unit-directory table,.unit-directory tbody{display:block;width:100%;min-width:0}
 .unit-directory thead{display:none}
 .unit-directory tr{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:20px 16px;margin:12px 0;padding:20px;border:1px solid var(--line);border-radius:16px;background:var(--bg)}
 .unit-directory td{display:block;min-width:0;padding:0;border:0;overflow-wrap:anywhere}
 .unit-directory td[data-label]:before{content:attr(data-label);display:block;margin-bottom:8px;font-size:11px;font-weight:600;color:var(--muted)}
 .unit-directory .unit-identity,.unit-directory td[data-label="Type / installed"],.unit-directory .unit-actions{grid-column:1/-1}
 .unit-directory .unit-identity strong{font-size:17px;letter-spacing:-.3px}
 .unit-directory p{margin:6px 0 0}
 .unit-directory .table-actions{display:flex;flex-direction:row;flex-wrap:nowrap;gap:8px;padding-top:16px;border-top:1px solid var(--line)}
 .unit-directory .table-actions button{flex:1;min-width:0;min-height:44px;padding:10px 8px;font-size:13px}
 .unit-type-group .card-head{gap:12px}.unit-type-group .card-head h2{font-size:18px}
 .unit-type-group .card-head .pill{flex-shrink:0}
}
/* Controller evidence: compact, readable run cards and event details. */
.irrigation-run-list{display:grid;gap:12px}.irrigation-run,.controller-log-event{border:1px solid var(--line,#dce3e7);border-radius:16px;padding:16px}.irrigation-run summary,.controller-log-event summary{display:flex;justify-content:space-between;align-items:center;gap:16px;cursor:pointer;list-style:none}.irrigation-run summary>span:first-child,.controller-log-event summary>span{display:grid;gap:5px}.run-result{font-size:.8rem;font-weight:600;text-align:right}.run-result.complete{color:#16814a}.dark .run-result.complete{color:#6ce3a3}.run-result.stopped{color:#b06d13}.dark .run-result.stopped{color:#efbd72}.run-result.neutral{color:var(--muted,#75848a)}.run-milestones{display:grid;gap:14px;margin-top:24px}.run-milestones>div{display:flex;justify-content:space-between;gap:18px;font-size:.9rem}.run-milestones time,.controller-log-event time{font-size:.8rem;color:var(--muted,#75848a)}.controller-event-list{display:grid;gap:10px;margin-bottom:20px}.controller-log-event dl{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:20px}.controller-log-event dl>div{display:flex;justify-content:space-between;gap:12px;font-size:.8rem}.controller-log-event dd{margin:0}.controller-log-event pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:.7rem;max-height:140px;overflow:auto}#controller-event-kind{max-width:200px}#recorded-controller-history{margin-bottom:24px}@media(max-width:600px){.irrigation-run summary,.controller-log-event summary{align-items:flex-start;gap:10px}.run-result{max-width:40%}.run-milestones>div{display:grid;gap:4px}.controller-log-event dl{grid-template-columns:1fr}#recorded-controller-history .card-head{flex-wrap:wrap}#recorded-controller-history{padding:20px}.controller-log-event time{max-width:38%;text-align:right}}

/* Administrator issue review uses the workspace's existing cards and controls. */
.issue-details{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.issue-details dd{margin:6px 0 0;overflow-wrap:anywhere}.issue-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:22px 0;border-bottom:1px solid var(--line,#334044)}.issue-row button{flex-shrink:0}.issue-history{padding:16px 0;border-bottom:1px solid var(--line,#334044)}#issue-update{display:grid;gap:12px;margin-top:24px}#issue-update button{justify-self:start}.issue-list{margin-top:20px}@media(max-width:600px){.issue-details{grid-template-columns:1fr}.issue-row{align-items:flex-start}.issue-row strong{overflow-wrap:anywhere}}

/* Button-style disclosure preserves native keyboard and expanded-state behavior. */
.run-event-timeline{margin-top:18px}
.irrigation-run .run-event-timeline>summary{display:inline-flex;align-items:center;justify-content:center;gap:12px;min-height:44px;max-width:100%;padding:11px 16px;border:1px solid var(--accent);border-radius:10px;background:var(--soft);color:var(--accent);font-weight:600;line-height:1.4;list-style:none;cursor:pointer;transition:background .2s}
.run-event-timeline>summary::-webkit-details-marker{display:none}
.run-event-timeline>summary::after{content:'';width:7px;height:7px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(45deg);margin-top:-4px}
.run-event-timeline[open]>summary::after{transform:rotate(225deg);margin-top:4px}
.irrigation-run .run-event-timeline>summary:hover{background:var(--panel)}
.run-event-timeline>summary:focus-visible{outline:3px solid #5ebbc8;outline-offset:3px}
.run-event-timeline>[data-run-events]{margin-top:14px}

.stat-link{display:block;width:100%;text-align:left;font:inherit;color:var(--text);height:100%}.stat-link:disabled{opacity:1;cursor:default}.stat-link:not(:disabled):hover{border-color:var(--accent)}.unit-type-filters{display:flex;gap:10px;flex-wrap:wrap;margin:0 0 24px}.unit-type-filters [aria-pressed=true]{background:var(--soft);border-color:var(--accent);color:var(--accent)}.app-update-notice{position:fixed;bottom:24px;right:24px;z-index:1000;max-width:420px;padding:18px;border:1px solid var(--accent);border-radius:14px;background:var(--panel);color:var(--text);box-shadow:0 8px 40px #0003}.app-update-notice p{margin:0 0 12px}@media(max-width:700px){.app-update-notice{left:16px;right:16px;bottom:100px}}

/* Consistent preferences and report keys. CSP-safe colors match SVG chart series. */
.admin-row{display:grid;grid-template-columns:minmax(0,1fr) 80px 150px;gap:20px;align-items:center}
.admin-row>div{min-width:0;overflow-wrap:anywhere}.admin-row>button{width:100%;margin:0;white-space:nowrap}.admin-row>span{text-align:center}
#unit-email-form .notification-choice,.alert-recipients .check-label{display:grid;grid-template-columns:22px minmax(0,1fr);align-items:center;gap:14px;text-align:left}
#unit-email-form .notification-choice{padding:14px 0;margin:0;border-bottom:1px solid var(--line)}
#unit-email-form input[type=checkbox],.alert-recipients input[type=checkbox]{width:20px;height:20px;min-height:0;padding:0;margin:0;justify-self:start}
.chart-legend{flex-wrap:wrap}.legend-dot.outcome-workspace{background:#4786c7}.legend-dot.outcome-successful,.pill.outcome-successful{background:#30975d}.legend-dot.outcome-safety,.pill.outcome-safety{background:#dcaa48}.legend-dot.outcome-service,.pill.outcome-service{background:#d66a62}.legend-dot.outcome-incomplete,.pill.outcome-incomplete{background:#879aca}.legend-dot.outcome-unknown,.pill.outcome-unknown{background:#8995a5}.legend-dot.outcome-failed,.pill.outcome-failed{background:#b04a57}.legend-dot.outcome-pending,.pill.outcome-pending{background:#a38bbd}.pill.outcome-test{background:#314781;color:white}.pill[class*=outcome-]{color:#101820}
@media(max-width:600px){.admin-row{grid-template-columns:minmax(0,1fr) 80px;gap:12px}.admin-row>div{grid-row:span 2}.admin-row>button,.admin-row>span{grid-column:2;font-size:12px;padding:10px 6px}}

/* Review status is distinct from controller operation outcomes. */
.pill.issue-resolved{color:#166534;background:#dcfce7}
.pill.issue-investigating{color:#854d0e;background:#fef3c7}
.pill.issue-open{color:#9a3412;background:#ffedd5}
.dark .pill.issue-resolved{color:#86efac;background:#163b2b}
.dark .pill.issue-investigating{color:#fcd34d;background:#40351c}
.dark .pill.issue-open{color:#fdba74;background:#402c20}

/* Clear upcoming details and model grouping on desktop and mobile. */
.hero-action{display:flex;flex-direction:column;gap:18px;min-width:260px;max-width:100%}
.hero-upcoming{padding:18px 20px;border:1px solid #ffffff40;border-radius:18px;background:#ffffff0d;color:#fff;display:flex;flex-direction:column;gap:8px;line-height:1.5}
.hero-upcoming span{font-size:.9rem;color:#e2ecff}
.unit-type-group>.card-head{background:#0b3074;color:#fff;border:1px solid #ffffff25;border-radius:20px;padding:22px 24px;margin-bottom:18px}
.unit-type-group>.card-head h2{color:#fff;margin:0}.unit-type-group>.card-head .pill{background:#ffffff20;color:#fff}
@media(max-width:600px){.hero-action{width:100%;min-width:0}.unit-type-group>.card-head{padding:18px}}

/* Equal-width hero controls and individual inventory cards. */
.hero-action{align-items:stretch;width:320px}.hero-action>button,.hero-action>#hero-upcoming{width:100%;box-sizing:border-box}.hero-upcoming{box-sizing:border-box;width:100%}
.hero-status-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.hero-status-row .unit-health{margin:0}.hero-status-row #valve-seated-notice:empty{display:none}
.unit-type-group>.card-head{background:transparent;border:0;padding:0;color:var(--text);margin:28px 0 18px}.unit-type-group>.card-head h2{color:inherit}.unit-type-group>.card-head .pill{color:var(--text);background:var(--surface)}
.unit-card-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,290px),1fr));gap:22px}
.unit-blue-card{background:#0b3074;color:#fff;border:1px solid #ffffff26;border-radius:24px;padding:28px;min-height:310px;display:flex;flex-direction:column;box-sizing:border-box}
.unit-card-top{display:flex;justify-content:space-between;align-items:center;gap:12px}.unit-card-number{font-size:1.05rem;font-weight:650}.unit-blue-card h3{font-size:1.55rem;line-height:1.25;margin:28px 0 8px;overflow-wrap:anywhere}.unit-card-type{color:#d7e5ff;margin:0 0 24px}.unit-blue-card dl{margin:0 0 26px;display:grid;gap:12px}.unit-blue-card dl>div{display:flex;justify-content:space-between;gap:20px}.unit-blue-card dt{color:#c8d8f5}.unit-blue-card dd{margin:0;text-align:right}.unit-blue-card .table-actions{margin-top:auto;display:flex;gap:10px;flex-wrap:wrap}.unit-blue-card button{background:#ffffff12;color:#fff;border:1px solid #ffffff50;min-height:44px;padding:10px 18px;border-radius:12px}.unit-blue-card button:hover{background:#ffffff24}.unit-blue-card .pill{background:#ffffff18;color:#d5ffef}.unit-blue-card .pill.amber{color:#ffe2a3}
@media(max-width:700px){.hero-action{width:100%;min-width:0}.unit-blue-card{padding:24px;min-height:290px}}

.unit-category-card{margin:24px 0;background:#0b3074;color:#fff;border:1px solid #ffffff30;border-radius:24px;overflow:hidden}.unit-category-card>summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:24px;padding:32px;min-height:190px;cursor:pointer}.unit-category-card>summary::-webkit-details-marker{display:none}.unit-category-card h2{color:#fff;font-size:1.7rem;margin:14px 0}.unit-category-card .eyebrow{color:#c3d8ff}.category-count{color:#e4eeff;font-size:1.1rem}.category-open{border:1px solid #ffffff70;border-radius:12px;padding:12px 24px;background:#ffffff15;color:#fff}.unit-category-card[open] .category-open{background:#ffffff30}.category-units{background:var(--panel);color:var(--text);padding:24px;border-top:1px solid var(--line)}
.app-update-notice{position:sticky;top:0;bottom:auto;left:0;right:0;max-width:none;width:100%;border-radius:0;display:flex;align-items:center;justify-content:center;gap:24px;padding:12px 24px;margin:0;box-sizing:border-box}.app-update-notice p{margin:0}.app-update-notice button{white-space:nowrap}@media(max-width:700px){.app-update-notice{top:0;bottom:auto;left:0;right:0;padding:12px 16px;gap:14px}.unit-category-card>summary{padding:24px}.category-units{padding:16px}}

/* Category totals and explicit expansion controls. */
.unit-category-card .category-title{display:flex;align-items:center;gap:20px;flex-wrap:wrap}
.unit-category-card .category-title h2{margin:0;font-size:1.7rem}
.unit-category-card .category-count{display:inline-flex;align-items:center;justify-content:center;min-width:64px;min-height:60px;padding:6px 16px;border:1px solid #ffffff70;border-radius:14px;font-size:1.7rem;font-weight:700;line-height:1.2;color:#fff}
.category-close-label{display:none}
.unit-category-card[open] .category-open-label{display:none}
.unit-category-card[open] .category-close-label{display:inline}
.units-filters{grid-template-columns:minmax(0,2fr) minmax(0,1fr)}
.notification-group{margin:24px 0 10px;font-size:1rem}
@media(max-width:640px){.units-filters{grid-template-columns:1fr}.unit-category-card>summary{padding:24px;gap:16px}.unit-category-card .category-title{gap:12px}.unit-category-card .category-title h2,.unit-category-card .category-count{font-size:1.4rem}.unit-category-card .category-open{padding:10px 16px}}

.topbar button.avatar{padding:0;line-height:1;cursor:pointer}.topbar button.avatar:focus-visible{outline:2px solid var(--accent);outline-offset:3px}

/* Model collection: consistent geometry and a quiet, tactile surface. */
.unit-category-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px;margin-top:28px;align-items:start}
.unit-category-grid .unit-category-card{margin:0;min-width:0;border-radius:24px;border:1px solid #ffffff26;background:linear-gradient(135deg,#153f86 0%,#102e64 65%,#0c2450 100%);box-shadow:inset 0 1px 0 #ffffff12,0 12px 28px #071a3414;transition:box-shadow .2s,border-color .2s}
.unit-category-grid .unit-category-card:hover{border-color:#8fb5ef80;box-shadow:inset 0 1px 0 #ffffff18,0 16px 32px #071a3424}
.unit-category-grid .unit-category-card>summary{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;padding:30px;gap:28px;min-height:240px;box-sizing:border-box}
.unit-category-grid .category-title{display:grid;grid-template-columns:minmax(0,1fr) 72px;align-items:start;gap:20px;min-height:76px}
.unit-category-grid .category-title h2{font-size:1.5rem;font-weight:600;letter-spacing:-.035em;line-height:1.25;margin:0;padding-top:8px;overflow-wrap:anywhere;color:#f5f8ff}
.unit-category-grid .category-count{width:72px;min-width:0;height:72px;min-height:0;padding:0;box-sizing:border-box;border:1px solid #c4d9ff40;border-radius:18px;background:#ffffff08;box-shadow:inset 0 1px 0 #ffffff0a;font-size:2rem;font-variant-numeric:tabular-nums;font-weight:500;letter-spacing:-.04em;color:#fff}
.unit-category-grid .category-open{align-self:flex-start;display:inline-flex;align-items:center;justify-content:space-between;gap:24px;min-width:128px;min-height:44px;padding:11px 16px;box-sizing:border-box;border:1px solid #e1edff45;border-radius:12px;background:#ffffff0d;color:#f5f8ff;font-weight:500;font-size:.9rem;line-height:1.3;transition:background .18s,border-color .18s}
.unit-category-grid .category-open:after{content:'';width:7px;height:7px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:translateY(-2px) rotate(45deg);transition:transform .18s}
.unit-category-grid summary:hover .category-open{background:#ffffff20;border-color:#e1edff80}
.unit-category-grid summary:focus-visible{outline:3px solid #8de0d8;outline-offset:-5px;border-radius:24px}
.unit-category-grid .unit-category-card[open]{grid-column:1/-1}
.unit-category-grid .unit-category-card[open]>summary{min-height:0}
.unit-category-grid .unit-category-card[open] .category-title{max-width:420px;min-height:72px}
.unit-category-grid .unit-category-card[open] .category-open{background:#ffffff18}
.unit-category-grid .unit-category-card[open] .category-open:after{transform:translateY(2px) rotate(225deg)}
.unit-category-grid .category-units{padding:28px;border-top:1px solid #ffffff20}
@media(max-width:1050px){.unit-category-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:640px){.unit-category-grid{grid-template-columns:1fr;gap:18px}.unit-category-grid .unit-category-card>summary{padding:24px;min-height:216px;gap:24px}.unit-category-grid .category-title{min-height:72px;gap:16px}.unit-category-grid .category-title h2{font-size:1.4rem}.unit-category-grid .category-units{padding:16px}}
@media(prefers-reduced-motion:reduce){.unit-category-grid .unit-category-card,.unit-category-grid .category-open,.unit-category-grid .category-open:after{transition:none}}

/* Overview and issue review: balanced layout with explicit action spacing. */
.overview-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
.controller-refresh-note{display:block;margin-top:8px}
.issue-review-actions{display:flex;flex-wrap:wrap;gap:16px;margin-top:24px;align-items:stretch}
#issue-update .issue-review-actions button{width:auto;flex:1 1 200px;margin:0;min-height:48px}
#issue-update .issue-resolve-button{background:#177449;color:#fff;border:1px solid #177449;font-weight:700}
#issue-update .issue-resolve-button:hover{background:#115d3a}
@media(max-width:640px){.overview-stats{grid-template-columns:1fr}.issue-review-actions{flex-direction:column}#issue-update .issue-review-actions button{flex:auto;width:100%}}
/* v0.11: unified inventory, shared notifications and issue overview */
.unit-category-card>summary{padding:0;gap:0;min-height:230px;justify-content:space-between}
.unit-category-card .category-title{padding:30px;width:100%;box-sizing:border-box;align-items:center}
.unit-category-card .category-open{align-self:stretch;display:flex;width:auto;margin:0;padding:17px 30px;min-height:54px;border:0;border-top:1px solid #ffffff30;border-radius:0;background:#ffffff0b;justify-content:space-between;color:#fff}
.unit-category-card>summary:hover .category-open{background:#ffffff18}
.unit-category-card[open] .category-open{background:#ffffff14}
.model-manager{margin-top:20px}.model-manager .issue-row{gap:20px;flex-wrap:wrap}
.issue-summary .issue-stat{text-align:left;display:flex;flex-direction:column;align-items:flex-start;gap:14px;width:100%;font:inherit;cursor:pointer}
.issue-stat[aria-pressed=true]{outline:2px solid var(--accent,#70d1c7);outline-offset:2px}
.issue-patterns{margin-bottom:24px}.issue-pattern-row{display:flex;justify-content:space-between;gap:20px;padding:12px 0;border-top:1px solid var(--line,#334047)}
.inbox-tabs{margin:20px 0;gap:12px}.inbox-tabs button[aria-pressed=true]{background:var(--accent);border-color:var(--accent);color:#fff;font-weight:600}.dark .inbox-tabs button[aria-pressed=true]{color:#112d31}.inbox-heading button{flex-shrink:0;white-space:nowrap}.inbox-tabs button{min-height:44px}
.shared-message{border-bottom:1px solid var(--line,#334047);padding:0}.shared-message>summary{display:flex;justify-content:space-between;gap:24px;cursor:pointer;padding:22px 0;list-style:none}.shared-message>summary>span{display:grid;gap:8px}.shared-message>summary:after{content:'+';font-size:20px}.shared-message[open]>summary:after{content:'−'}.shared-message-body{padding:0 0 24px}.shared-message-body>button{margin:0 12px 16px 0}.shared-message .email-body{white-space:pre-wrap;overflow-wrap:anywhere}.shared-message-body>details>summary{cursor:pointer;padding:12px 0}
@media(max-width:640px){.unit-category-card .category-title{padding:24px}.unit-category-card .category-open{padding:16px 24px}.issue-pattern-row{flex-direction:column;gap:6px}.shared-message>summary{gap:12px;flex-wrap:wrap}.shared-message time{flex-basis:100%}}

/* Keep every irrigation action the same size, including wrapped test help. */
.control-grid{align-items:start;grid-template-columns:repeat(2,minmax(0,1fr))}.control-grid>button,.control-grid>div>button{width:100%;min-width:0;min-height:52px;box-sizing:border-box}.control-grid>div{min-width:0}.control-grid>div>p:empty{display:none}@media(max-width:640px){.control-grid{grid-template-columns:minmax(0,1fr)}}

/* Branded notification reader; isolated email document preserves email styling. */
#modal.notification-preview-dialog { width:min(760px,calc(100vw - 32px)); max-width:760px; }
.notification-email-preview { display:block; width:100%; height: min(64vh,760px); min-height:320px; border:1px solid var(--border,#dbe5ef); border-radius:16px; background:#edf3f8; margin:20px 0; }
.notification-technical { margin-top:20px; }
.notification-technical>summary { display:list-item; cursor:pointer; padding:12px 16px; border:1px solid var(--border,#dbe5ef); border-radius:12px; font-weight:600; }
.notification-technical .email-body { white-space:pre-wrap; overflow-wrap:anywhere; }
@media(max-width:600px){#modal.notification-preview-dialog{padding:20px;}.notification-email-preview{height:60vh;}}

/* SMS consent stays separate from email and readable at every width. */
#sms-preferences{scroll-margin-top:100px}
#sms-preferences .notification-choice{display:grid;grid-template-columns:22px minmax(0,1fr);align-items:start;gap:14px;text-align:left;padding:16px 0;margin:0;border-bottom:1px solid var(--line);line-height:1.6}
#sms-preferences input[type=checkbox]{width:20px;height:20px;margin:3px 0 0;padding:0;accent-color:var(--teal,#176e79)}
#sms-preferences fieldset{min-width:0;border:1px solid var(--line);border-radius:16px;padding:16px 24px;margin:24px 0}
#sms-preferences legend{font-weight:650;padding:0 8px}
#sms-preferences input[type=tel]{max-width:420px}
#sms-preferences .dialog-actions{display:flex;gap:12px;flex-wrap:wrap}
#sms-preferences .dialog-actions button{width:auto;min-height:48px;padding:12px 24px}
@media(max-width:640px){#sms-preferences fieldset{padding:12px 16px}#sms-preferences .dialog-actions button{width:100%}}

/* Model and unit notification choices share the account preference layout. */
#notification-scopes .notification-choice{display:grid;grid-template-columns:22px minmax(0,1fr);align-items:start;gap:14px;text-align:left;padding:14px 0;margin:0;border-bottom:1px solid var(--line);line-height:1.6}
#notification-scopes .notification-choice input[type=checkbox]{width:18px;height:18px;margin:3px 0 0;justify-self:start;accent-color:var(--teal)}
#notification-scopes fieldset{min-width:0;margin:20px 0;padding:16px 20px;border:1px solid var(--line);border-radius:16px}
#notification-scopes legend{font-weight:650;padding:0 8px}
#notification-scopes .form-grid{margin:24px 0 12px}
#notification-scopes select{min-width:0;max-width:100%}
#notification-scopes fieldset:disabled{opacity:.65}
@media(max-width:600px){#notification-scopes .form-grid{grid-template-columns:minmax(0,1fr)}#notification-scopes fieldset{padding:12px}#notification-scopes button[type=submit]{width:100%}}

.scope-channel-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;margin:16px 0}.scope-alert-table{width:100%;table-layout:fixed;border-collapse:collapse;margin:24px 0}.scope-alert-table th,.scope-alert-table td{padding:14px 8px;border-bottom:1px solid var(--line)}.scope-alert-table th:first-child{width:auto;text-align:left;overflow-wrap:anywhere}.scope-alert-table th:not(:first-child),.scope-alert-table td{width:70px;text-align:center}.scope-alert-table input[type=checkbox]{width:20px;height:20px;margin:0;accent-color:var(--teal)}@media(max-width:600px){.scope-channel-options{grid-template-columns:1fr;gap:0}.scope-alert-table th:not(:first-child),.scope-alert-table td{width:48px;padding:12px 4px}}

/* Native iOS date controls must shrink to the card's content width. */
input[type=date],input[type=datetime-local],input[type=time]{display:block;appearance:none;-webkit-appearance:none;box-sizing:border-box;width:100%;min-width:0;max-width:100%;min-inline-size:0;max-inline-size:100%}
input::-webkit-date-and-time-value{min-width:0;text-align:left}
input::-webkit-datetime-edit{min-width:0;padding:0}
.shell>div,.main,.card,form,label,.ms-unit,.ms-fields>*{min-width:0}
@media(max-width:720px){
 .main input:not([type=checkbox]):not([type=radio]),.main select,.main textarea{min-width:0;max-width:100%;font-size:16px}
 .heading{flex-wrap:wrap;align-items:flex-start;gap:16px}
 .heading>div{min-width:0;flex:1 1 auto}
 .card-head{flex-wrap:wrap}
 .topbar .actions{min-width:0;flex-wrap:wrap}
 .topbar select{min-width:0;max-width:100%}
 .customer-preview-banner{flex-wrap:wrap;overflow-wrap:anywhere}
 .row>div,.grid>*,.stats>*{min-width:0}
 .ms-fields{grid-template-columns:minmax(0,1fr)}
}

.connection-status{display:inline-flex;align-items:center;gap:9px}.connection-status::before{content:"";width:10px;height:10px;border-radius:50%;background:#b42318;flex-shrink:0}.connection-status.needs-attention::before{animation:connection-pulse 2s ease-in-out infinite}.connection-status.connected::before{background:#168347}@keyframes connection-pulse{50%{box-shadow:0 0 0 6px #b4231820}}@media(prefers-reduced-motion:reduce){.connection-status.needs-attention::before{animation:none}}#sms-verification{margin-top:24px;padding:24px;border:2px solid var(--border,#d7e3e5);border-radius:16px}#sms-preferences .card-head{flex-wrap:wrap;gap:16px}#preferences-save-footer{padding-bottom:24px}

/* Preferences: clear setup steps and consistent touch targets. */
.preferences-page{max-width:1200px;margin-inline:auto}
.preferences-page .heading{margin-bottom:32px}
.preferences-page .card{padding:32px;border-radius:24px;box-shadow:0 6px 28px #00000003}
.preferences-page .section-gap{margin-top:24px}
.preferences-page h2{font-size:26px;letter-spacing:-.6px;margin:0 0 12px}
.preferences-page h3{font-size:19px;margin:0 0 8px}
.preferences-page p{line-height:1.6}
.setup-kicker{font-size:12px;font-weight:750;letter-spacing:1.6px;color:var(--accent);margin-bottom:14px}
.preferences-page button{min-height:48px;padding:12px 22px;border-radius:12px;font-size:15px;line-height:1.4;white-space:normal}
.preferences-page input:not([type=checkbox]),.preferences-page select{min-height:48px;box-sizing:border-box;max-width:100%;min-width:0;border-radius:12px}
.preferences-page .form-grid{gap:24px;margin-top:24px}
.preferences-page .row{gap:20px;padding-block:24px;flex-wrap:wrap}
.preferences-page .row>div:first-child{flex:1;min-width:200px}
.preferences-page .row>button{min-width:144px}
.preferences-page .connection-status{padding:9px 14px;font-size:14px;line-height:1.4;border-radius:999px}
.preferences-page .connected::before{animation:connected-pulse 3s ease-in-out infinite}
@keyframes connected-pulse{50%{box-shadow:0 0 0 5px #16834718}}
.preferences-page #sms-readiness{padding:18px 20px;border-radius:14px;margin:20px 0}
.preferences-page #sms-preference-form{max-width:820px}
.preferences-page #sms-phone{max-width:420px;font-size:18px}
.preferences-page #sms-preference-form fieldset{border:1px solid var(--line);border-radius:16px;padding:20px;margin:24px 0;min-width:0}
.preferences-page #sms-preference-form legend{font-weight:650;padding:0 8px}
.preferences-page .notification-choice{display:flex;align-items:flex-start;gap:14px;padding:12px 0;line-height:1.6}
.preferences-page .notification-choice input{flex:0 0 20px;width:20px;height:20px;margin-top:4px}
.preferences-page .dialog-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:24px}
.preferences-page #sms-verification{padding:24px;border:1px solid var(--line);background:var(--bg);border-radius:18px;margin-top:28px}
.preferences-page #sms-code-form{max-width:420px;margin-top:20px}
.preferences-page #sms-code-form button{margin-top:12px;width:100%}
.preferences-page #notification-scope-target{max-width:640px;margin-bottom:16px}
.preferences-page .scope-alert-table{margin-top:16px}
.preferences-page #preferences-save-footer{border-top:1px solid var(--line);padding-top:24px;display:flex;align-items:center;justify-content:space-between;gap:24px}
.preferences-page #preferences-save-footer p{max-width:600px}
@media(max-width:640px){.preferences-page .card{padding:22px 18px;border-radius:20px}.preferences-page h2{font-size:23px}.preferences-page .card-head{align-items:flex-start;gap:16px;flex-direction:column}.preferences-page .row{gap:14px}.preferences-page .row>button,.preferences-page .dialog-actions>button{flex:1;min-width:0}.preferences-page .dialog-actions{flex-direction:column}.preferences-page #sms-phone{max-width:none}.preferences-page #sms-verification{padding:20px 16px}.preferences-page #sms-request-code{width:100%}.preferences-page #sms-preference-form fieldset{padding:16px 12px}.preferences-page #preferences-save-footer{display:block}.preferences-page #preferences-save-footer button{width:100%}.preferences-page .form-grid{gap:20px}}
@media(prefers-reduced-motion:reduce){.preferences-page .connection-status::before{animation:none}}

@media(max-width:640px){.preferences-page .form-grid{grid-template-columns:minmax(0,1fr)}.preferences-page .account-preferences .row{flex-direction:column;align-items:stretch}.preferences-page .account-preferences .row>button{width:100%}}
.preferences-page button{height:48px;white-space:nowrap}
.preferences-page .admin-row{display:flex;align-items:center;flex-wrap:wrap}
.preferences-page .admin-row>button{width:auto;min-width:160px;flex:0 0 auto}
.preferences-page #sms-preferences .dialog-actions{align-items:center;justify-content:flex-start}
.preferences-page #sms-preferences .dialog-actions button{height:48px;min-width:180px;flex:0 0 auto}
@media(max-width:640px){.preferences-page .admin-row>button{flex:1;min-width:130px}.preferences-page #sms-preferences .dialog-actions button{width:100%;min-width:0}}
.preferences-page #sms-preferences .dialog-actions>button{margin:0}
.preferences-page a{color:var(--accent)}

/* Section navigation and progressive phone verification. */
.preferences-shortcuts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:0 0 28px}
.preferences-shortcuts a{display:flex;align-items:center;gap:12px;padding:16px;border:1px solid var(--line);border-radius:16px;background:var(--panel);text-decoration:none;color:var(--text);min-width:0;transition:border-color .2s,background .2s}
.preferences-shortcuts a:hover{background:var(--soft);border-color:var(--accent)}
.preferences-shortcuts a>strong{color:var(--accent);font-size:13px;align-self:flex-start;padding-top:2px}
.preferences-shortcuts a>span{font-weight:650;line-height:1.4}
.preferences-shortcuts small{display:block;font-size:12px;font-weight:450;color:var(--muted);margin-top:5px}
.preferences-shortcuts small.connection-status{display:flex;font-size:12px;padding:0;background:transparent}
.preferences-page section[id]{scroll-margin-top:24px}
.preferences-page .email-address{font-size:20px;font-weight:600;overflow-wrap:anywhere;margin:20px 0 12px}
.preferences-page [hidden]{display:none!important}
@media(max-width:900px){.preferences-shortcuts{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:420px){.preferences-shortcuts{gap:8px}.preferences-shortcuts a{padding:12px;gap:8px}.preferences-shortcuts a>span{font-size:13px}.preferences-shortcuts small{font-size:11px}}

.sms-resubscribe{margin-top:24px;padding:20px 24px;border:1px solid var(--line);border-radius:16px;background:var(--bg)}.sms-resubscribe summary{cursor:pointer;font-weight:650;color:var(--accent);line-height:1.5}.sms-resubscribe h3{margin-top:20px}.sms-resubscribe li{line-height:1.7;margin:12px 0}.sms-open-messages{display:inline-flex;align-items:center;min-height:48px;padding:12px 18px;border:1px solid var(--line);border-radius:12px;text-decoration:none;font-weight:600;background:var(--panel)}
/* Saved-history browser: scoped dates and independent run/event pagination. */
.history-browser{padding-bottom:28px;border-bottom:1px solid var(--line,#dfe5e8);margin-bottom:30px}
.history-browser-title h2{font-size:clamp(26px,3vw,36px);letter-spacing:-.035em;margin:10px 0}
.history-browser-title p{color:var(--muted);margin:0 0 24px}
.history-presets{display:flex;flex-wrap:wrap;gap:10px;margin:20px 0}
.history-presets button{border-radius:999px;padding:12px 20px;min-height:46px}
.history-presets button[aria-pressed="true"]{background:#176f78;color:#fff;border-color:transparent}
.history-date-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;gap:16px;align-items:end;max-width:850px}
.history-date-grid>div{min-width:0}.history-date-grid input{display:block;width:100%;max-width:100%;min-width:0;box-sizing:border-box;height:52px}
.history-date-grid button{min-height:52px}.history-section-heading{margin-top:20px}
#recorded-controller-history [data-runs-more],#recorded-controller-history [data-log-more]{margin-top:20px;min-height:46px}
#recorded-controller-history .controller-log-event summary{gap:16px}
@media(max-width:600px){.history-date-grid{grid-template-columns:minmax(0,1fr)}.history-presets{gap:8px}.history-presets button{flex:1 0 28%;padding:10px 12px}.history-browser{padding-bottom:20px}.history-section-heading{flex-wrap:wrap}.history-section-heading h2{font-size:22px}#recorded-controller-history .controller-log-event summary{flex-wrap:wrap}#recorded-controller-history select{max-width:100%;min-width:0}.history-date-grid input::-webkit-date-and-time-value{min-width:0;text-align:left}}

.activity-history-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:28px}.activity-history-tabs button{display:flex;flex-direction:column;text-align:left;gap:8px;padding:20px;white-space:normal;min-width:0;border-radius:18px}.activity-history-tabs strong{font-size:18px}.activity-history-tabs span{font-size:14px;line-height:1.5;font-weight:400}.activity-history-tabs [aria-selected="true"]{background:#176f78;color:white;border-color:#176f78}.activity-history-tabs button:focus-visible{outline:3px solid #56bfc8;outline-offset:3px}main [hidden]{display:none!important}[data-history-pane]>p{line-height:1.6;max-width:850px}@media(max-width:600px){.activity-history-tabs{grid-template-columns:minmax(0,1fr);gap:8px}.activity-history-tabs button{padding:14px 18px;gap:4px}.activity-history-tabs strong{font-size:17px}}

/* Request titles and timestamps remain distinct at every screen size. */
#activity-panel-actions .operation-info{display:flex;flex-direction:column;gap:6px;min-width:0}
#activity-panel-actions .operation-info strong{font-size:16px;line-height:1.4}
#activity-panel-actions .request-date{display:block;font-size:14px;line-height:1.5;overflow-wrap:anywhere}
#activity-panel-actions .controller-operation{min-width:0;overflow-wrap:anywhere}
#activity-panel-actions .operation-status{white-space:normal}
@media(max-width:600px){#activity-panel-actions .operation-summary{grid-template-columns:minmax(0,1fr);gap:10px}#activity-panel-actions .operation-status{justify-self:start;max-width:100%;font-size:13px}#activity-panel-actions .controller-operation ol{padding-left:22px}#recorded-controller-history{min-width:0}.history-date-grid input{max-width:100%;min-width:0}}
