/* One set of control, form and dialog rules for the four resource workspaces. */
:root{--ui-ink:#183e4c;--ui-muted:#526f7d;--ui-line:#cfdee5;--ui-accent:#087f91;--ui-soft:#f3f7f9;--ui-danger:#b33b36;--ui-radius:10px}
body{font-variant-numeric:tabular-nums}
:where(button,a,input,select,textarea,summary):focus-visible{outline:3px solid #37aab6;outline-offset:3px}
body :is(.button,.btn){min-height:40px;border-radius:8px;font-family:inherit;font-size:13px;font-weight:600;line-height:1.35;display:inline-flex;align-items:center;justify-content:center;gap:7px;text-decoration:none}
body :is(.button.primary,.btn.primary){background:var(--ui-accent);color:#fff;border-color:var(--ui-accent)}
body :is(.button.secondary,.btn:not(.primary)){border:1px solid var(--ui-line);background:#fff;color:#245565}
body :is(.button,.btn):disabled{opacity:.5;cursor:not-allowed;box-shadow:none;transform:none}
body :is(.field,.connect-form label,.mapping-grid label){color:var(--ui-ink);font-size:13px;font-weight:550;line-height:1.5;gap:6px}
body :is(.field,.connect-form,.mapping-grid,.scope-bar,.registry-toolbar) :is(input,select,textarea):not([type=checkbox]):not([type=radio]):not([type=range]){border:1px solid var(--ui-line);background:#fff;color:var(--ui-ink);border-radius:8px;min-height:42px;padding:10px 12px;font-family:inherit;font-size:13px;box-sizing:border-box;max-width:100%}
body :is(input,textarea)::placeholder{color:#738791;opacity:1}
body :is(input,select,textarea):disabled{background:#f0f3f5;color:#697e87;cursor:not-allowed}
body textarea{resize:vertical;line-height:1.6}
body dialog :is(input,select,textarea){scroll-margin-block:110px 24px}
body :is(input[type=checkbox],input[type=radio],input[type=range]){accent-color:var(--ui-accent)}
body .connect-form fieldset{margin:22px 0;padding:20px;border:1px solid var(--ui-line);border-radius:var(--ui-radius);background:#fafcfd;min-width:0}
body .connect-form legend{padding:0 9px;font-size:14px;color:var(--ui-ink)}
body .connect-grid{gap:18px 20px;align-items:start}
.form-required-note{font-size:12px;color:var(--ui-muted);margin:8px 0 18px}
.required-mark{color:var(--ui-danger);font-weight:700;display:inline}
/* Keep asterisk beside the label text, including existing flex-column labels. */
label:has(>.required-mark){position:relative}label>.required-mark{position:absolute;right:2px;top:0}
body [aria-invalid=true]{border-color:var(--ui-danger)!important;box-shadow:0 0 0 2px #b33b3610}
.form-field-error{display:block;color:var(--ui-danger);font-size:12px;line-height:1.5;font-weight:400;margin:3px 0 0}
.form-error-summary{padding:14px 16px;margin:12px 0 20px;border:1px solid #e5b7af;border-left:3px solid var(--ui-danger);border-radius:8px;background:#fff6f3;color:#84372f}
.form-error-summary strong{display:block;margin-bottom:6px;font-size:13px}
.form-error-summary button{display:inline-block;width:auto;padding:4px 0;margin:0 18px 0 0;border:0;background:none;color:#84372f;text-decoration:underline;font:inherit;font-size:12px;cursor:pointer}
body dialog[open]{border:1px solid var(--ui-line);border-radius:16px;box-shadow:0 24px 90px #102b3940;max-height:calc(100dvh - 40px);overscroll-behavior:contain}
body dialog::backdrop{background:#0b26395c;backdrop-filter:blur(3px)}
body .dialog-heading{position:sticky;top:0;background:#fff;z-index:8;padding:20px 26px;border-bottom:1px solid #dde7eb;gap:16px}
body .dialog-heading h2{font-size:23px;line-height:1.25;letter-spacing:-.4px;margin:5px 0 0}
body .dialog-heading .icon-button,body .dialog-close{width:36px;height:36px;min-width:36px;border:1px solid #d8e4e9;border-radius:8px;background:#f5f9fa;color:#325c6b;display:grid;place-items:center;font-size:22px;cursor:pointer}
body .dialog-body{padding:24px 26px}
body .dialog-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap;padding-top:18px;margin-top:22px;border-top:1px solid #e0e9ed}
body :is(.table-scroll,.table-wrap){border-radius:10px;scrollbar-width:thin}
body :is(.table-scroll,.table-wrap) th{font-size:12px;font-weight:650;line-height:1.4;background:#f2f6f8;color:#496674}
body :is(.table-scroll,.table-wrap) td{font-size:13px;line-height:1.5}
body :is(.table-scroll,.table-wrap) td,body :is(.table-scroll,.table-wrap) th{padding-top:13px;padding-bottom:13px}
body .connect-error:not(:empty){padding:12px 14px;border:1px solid #e5b7af;border-radius:8px;background:#fff6f3;font-size:13px;line-height:1.5}
body :is(.hint,.connect-form .hint){font-size:12px;line-height:1.6;color:var(--ui-muted)}
@media(max-width:600px){body .connect-grid,body .mapping-grid{grid-template-columns:minmax(0,1fr)}body dialog[open]{width:calc(100vw - 16px);max-width:calc(100vw - 16px);max-height:calc(100dvh - 16px);margin:8px auto}body .dialog-heading{padding:16px}body .dialog-heading h2{font-size:21px}body .dialog-body{padding:18px 16px}body .connect-form fieldset{padding:15px 12px}body .dialog-actions{justify-content:stretch}body .dialog-actions>.button,body .dialog-actions>.btn{flex:1 1 auto}body :is(.field,.connect-form,.mapping-grid) :is(input,select,textarea):not([type=checkbox]):not([type=radio]){font-size:16px}}
@media(prefers-reduced-motion:reduce){:is(.button,.btn,dialog){animation:none!important;transition:none!important}}
@media print{.form-required-note,.required-mark,.form-error-summary,.form-field-error{display:none!important}.dialog-heading{position:static!important}body dialog[open]{box-shadow:none;max-height:none}}
/* Resource-specific content uses the water cabinet's typography and surfaces. */
body .gas-workspace-heading{margin:22px 0 4px;padding:0;align-items:center}
body .gas-workspace-heading h1,body .utility-suite-heading h2{font-size:clamp(25px,2.3vw,36px);font-weight:650;line-height:1.18;letter-spacing:-1.1px;margin:8px 0 10px}
body .gas-workspace-heading p{font-size:13px;line-height:1.6;max-width:710px;color:#617b88}
body .gas-workspace-heading .eyebrow{font-size:9px;letter-spacing:1.4px;color:#78909b}
body :is(.gas-day-strip,.gas-day-picture,.utility-resource,.suite-capabilities){border-radius:13px;border-color:#d3e1e8;box-shadow:none}
body .gas-kpis{gap:14px}
body .gas-kpis button{border:1px solid #d3e1e8;border-radius:13px;padding:19px 20px;min-height:130px;box-shadow:none}
body .gas-kpis span{text-transform:none;letter-spacing:0;font-size:11px;color:#607d89}
body .gas-kpis strong{font-size:30px;line-height:1.2;margin:12px 0 8px}
body .gas-kpis p{font-size:11px;line-height:1.5;color:#607d89}
body .gas-kpis button:last-child{background:linear-gradient(115deg,#163f50,#14757c);color:#fff;border-color:#176b74}
body .gas-kpis button:last-child :is(span,p,small){color:#d0ebee}
body .gas-workspace-nav{width:max-content;max-width:100%;border:0;border-radius:10px;background:#e5edf1;padding:4px;box-shadow:none}
body .gas-workspace-nav button{border-radius:7px;padding:11px 20px;font-size:13px;font-weight:500}
body .gas-workspace-nav button.active{background:#173f50;color:#fff;font-weight:700}
body .utility-suite-heading{border-radius:13px;box-shadow:none;background:#143f50;padding:26px 28px}
body .utility-resource{padding:24px;border-top-width:3px}
body .utility-resource>header b{font-size:21px;letter-spacing:-.3px}
body :is(.gas-day-caption,.gas-day-legend){font-size:12px}
@media(max-width:800px){body .gas-workspace-heading{align-items:flex-start;gap:14px;flex-direction:column}body .gas-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}body .gas-kpis button{padding:16px 13px}body .gas-kpis strong{font-size:25px}body .gas-heading-actions{flex-wrap:wrap}body .gas-day-caption{flex-wrap:wrap;gap:6px}body .utility-suite-heading{padding:22px 20px}}
/* The same content column and header alignment on each resource. Wall mode is separate. */
body:not(.command-window):not([data-wall="true"]) :is(.content,.el-main){max-width:1540px;width:100%;margin-left:auto;margin-right:auto;padding:18px 24px 24px;box-sizing:border-box}
body:not(.command-window):not([data-wall="true"]) :is(.app-masthead,.header-service-row,.app-navigation){padding-left:max(24px,calc((100% - 1492px)/2));padding-right:max(24px,calc((100% - 1492px)/2))}
body [hidden]:not([hidden="until-found"]){display:none!important}
@media(max-width:760px){body:not(.command-window):not([data-wall="true"]) :is(.content,.el-main){padding:16px 12px 24px}body:not(.command-window):not([data-wall="true"]) :is(.app-masthead,.header-service-row,.app-navigation){padding-left:12px;padding-right:12px}}

/* Dispatch puts the map first; engineering detail stays one click away. */
.gas-dispatch-workspace{gap:10px!important}
body .gas-dispatch-workspace .gas-workspace-heading{margin:0;min-height:48px}
body .gas-dispatch-workspace .gas-workspace-heading h1{font-size:26px;margin:3px 0}
.gas-dispatch-workspace .gas-workspace-heading p,.gas-dispatch-workspace .gas-workspace-heading .eyebrow{display:none}
.gas-dispatch-workspace .gas-day-strip{padding:8px 14px}
.gas-workspace .gas-day-bars{height:160px;margin-top:0}
.gas-dispatch-workspace .gas-day-legend{margin-top:4px;font-size:10px}
.gas-dispatch-workspace .gas-day-caption{font-size:11px}
.dispatch-engineering-details,.dispatch-delivery-details{border:1px solid #d1e1e6;border-radius:9px;background:#fff;padding:10px 14px;margin:8px 0;color:#325e6b}
.dispatch-engineering-details>summary,.dispatch-delivery-details>summary{font-size:12px;cursor:pointer;font-weight:600}
.dispatch-engineering-details[open]>summary,.dispatch-delivery-details[open]>summary{margin-bottom:12px}
body[data-view=dispatch] .objects-console .ops-stats>div,body[data-view=dispatch] .objects-console .ops-stats>button{padding:10px 14px;min-height:68px}
body[data-view=dispatch] .objects-console .objects-atlas>.atlas-frame,body[data-view=dispatch] .objects-console .objects-atlas>.site-index{height:clamp(390px,calc(100dvh - 405px),720px);max-height:720px}
@media(max-width:760px){.gas-dispatch-workspace .gas-day-caption>span:last-child{display:none}.gas-dispatch-workspace .gas-workspace-heading{flex-direction:row;flex-wrap:wrap}body .gas-dispatch-workspace .gas-workspace-heading h1{font-size:23px}.gas-dispatch-workspace .gas-heading-actions .button{padding:6px 9px;font-size:11px}body[data-view=dispatch] .objects-console .objects-atlas>.site-index{height:auto;max-height:390px}}

body[data-view=dispatch] .objects-console .objects-atlas>.atlas-frame,body[data-view=dispatch] .objects-console .objects-atlas>.site-index{height:clamp(370px,calc(100dvh - 480px),680px)}

/* Preserve a readable zero-based plot when the dispatch header is compact. */
.gas-timeline-plot{display:grid;grid-template-columns:52px minmax(0,1fr);gap:10px;margin-top:18px}
.gas-timeline-axis{position:relative;height:140px;color:#607c84;font-size:11px;text-align:right}
.gas-timeline-axis span{position:absolute;right:0;transform:translateY(50%)}
.gas-timeline-plot .gas-day-bars{background:linear-gradient(to top,#dce8ec 1px,transparent 1px,transparent calc(50% - 1px),#edf2f4 calc(50% - 1px),#edf2f4 50%,transparent 50%,transparent calc(100% - 1px),#edf2f4 calc(100% - 1px));background-size:100% calc(100% - 20px);background-repeat:no-repeat}
.gas-workspace .gas-day-caption{font-size:12px;line-height:1.6}
.gas-workspace .gas-day-caption>span:last-child{text-align:right}
@media(max-width:760px){.gas-dispatch-workspace .gas-day-caption>span:last-child{display:block}.gas-workspace .gas-day-caption>span:last-child{text-align:left}.gas-timeline-plot{grid-template-columns:42px minmax(0,1fr);gap:6px}.gas-workspace .gas-day-bars{height:140px}.gas-timeline-axis{height:120px;font-size:10px}}
