/* Dark mode for the Field Office and the client portal. Active when <html data-theme="dark">. */
html[data-theme="dark"] .wgx {
	--x-bg: #0C100E; --x-surface: #151B18; --x-line: rgba(232,230,223,.14); --x-line2: rgba(232,230,223,.08); --x-hover: #1C2420;
	--x-text: #E8E6DF; --x-muted: #A3AA9F; --x-faint: #7D857A;
	--x-primary: #9BAF8F; --x-primary-dark: #C8D5BD; --x-primary-soft: rgba(155,175,143,.14);
	--x-accent: #F94F02; --x-danger: #FF6B5A; --x-danger-soft: rgba(255,107,90,.14); --x-warn: #FFA34D; --x-warn-soft: rgba(255,163,77,.14);
	--x-info: #B7C6C3; --x-info-soft: rgba(183,198,195,.12); --x-shadow: none;
	--x-label-bg: #151B18; --x-field: rgba(0,0,0,.28); --x-panel-line: rgba(232,230,223,.12);
	color-scheme: dark;
}
html[data-theme="dark"] .wgx a { color: #B9CBAA; }
html[data-theme="dark"] .wgx .x-pill, html[data-theme="dark"] .wgx .t-grey, html[data-theme="dark"] .wgx .x-tabs a i, html[data-theme="dark"] .wgx .x-tabs a.on i { background: rgba(232,230,223,.1); color: #C6C4BC; }
html[data-theme="dark"] .wgx .t-green { background: rgba(155,175,143,.18); color: #B9CBAA; }
html[data-theme="dark"] .wgx .t-orange { background: rgba(249,79,2,.18); color: #FF9A5C; }
html[data-theme="dark"] .wgx .t-red { background: rgba(255,107,90,.16); color: #FF8A7C; }
html[data-theme="dark"] .wgx .t-purple { background: rgba(180,150,240,.16); color: #C9B3F5; }
html[data-theme="dark"] .wgx .t-blue { background: rgba(183,198,195,.14); color: #C9D5D2; }

html[data-theme="dark"] .wgx .x-btn, html[data-theme="dark"] .wgx button.x-btn, html[data-theme="dark"] .wgx a.x-btn { border-color: rgba(232,230,223,.28); color: #E8E6DF; background: transparent; }
html[data-theme="dark"] .wgx .x-btn:hover { background: rgba(232,230,223,.06); border-color: #E8E6DF; color: #fff; }
html[data-theme="dark"] .wgx .x-btn-primary, html[data-theme="dark"] .wgx button.x-btn-primary, html[data-theme="dark"] .wgx a.x-btn-primary { background: #4C5F3D linear-gradient(90deg, #F94F02 0 4px, transparent 4px); border-color: rgba(255,255,255,.08); color: #E8E6DF; }
html[data-theme="dark"] .wgx .x-btn-primary:hover { background: #657A50 linear-gradient(90deg, #F94F02 0 4px, transparent 4px); color: #fff; }
html[data-theme="dark"] .wgx .x-btn-accent, html[data-theme="dark"] .wgx summary.x-btn-accent { color: #1A1D1C; }
html[data-theme="dark"] .wgx .x-link, html[data-theme="dark"] .wgx button.x-link, html[data-theme="dark"] .wgx .x-btn-ghost { color: #B9CBAA; }

html[data-theme="dark"] .wgx input[type=text], html[data-theme="dark"] .wgx input[type=email], html[data-theme="dark"] .wgx input[type=tel], html[data-theme="dark"] .wgx input[type=number], html[data-theme="dark"] .wgx input[type=url], html[data-theme="dark"] .wgx input[type=date], html[data-theme="dark"] .wgx input[type=time], html[data-theme="dark"] .wgx input[type=datetime-local], html[data-theme="dark"] .wgx input[type=search], html[data-theme="dark"] .wgx input[type=password], html[data-theme="dark"] .wgx select, html[data-theme="dark"] .wgx textarea { background: var(--x-field); border-color: rgba(232,230,223,.24); color: #E8E6DF; }
html[data-theme="dark"] .wgx input:focus, html[data-theme="dark"] .wgx select:focus, html[data-theme="dark"] .wgx textarea:focus { background: rgba(0,0,0,.4); border-color: #9BAF8F; box-shadow: 0 0 0 3px rgba(155,175,143,.16); }
html[data-theme="dark"] .wgx .wgs-field > span { background: var(--x-label-bg); border-color: rgba(232,230,223,.16); color: #C6C4BC; }
html[data-theme="dark"] .wgx .wgs-field:focus-within > span { color: #E8E6DF; border-color: rgba(232,230,223,.32); }
html[data-theme="dark"] .wgx .wgs-check input { accent-color: #9BAF8F; }
html[data-theme="dark"] .wgx select option { background: #151B18; color: #E8E6DF; }

html[data-theme="dark"] .wgx .x-table th, html[data-theme="dark"] .wgx .wgc-lines th { background: rgba(232,230,223,.04); color: #C8D5BD; }
html[data-theme="dark"] .wgx .x-table td, html[data-theme="dark"] .wgx .x-list > li { border-bottom-color: rgba(232,230,223,.07); }
html[data-theme="dark"] .wgx .x-flow-c::before { background: rgba(232,230,223,.08); }
html[data-theme="dark"] .wgx .x-feed li::before { background: #5A6356; }
html[data-theme="dark"] .wgx .wgc-flash { background: rgba(155,175,143,.14); color: #C8D5BD; border-color: rgba(155,175,143,.3); }
html[data-theme="dark"] .wgx .wgc-flash-err { background: var(--x-danger-soft); color: #FF8A7C; border-color: rgba(255,107,90,.3); }
html[data-theme="dark"] .wgx .wgc-flash-warn, html[data-theme="dark"] .wgx .x-note.is-warn { background: var(--x-warn-soft); color: #FFB877; border-color: rgba(255,163,77,.3); }
html[data-theme="dark"] .wgx .x-note { background: rgba(232,230,223,.04); border-color: var(--x-line2); }
html[data-theme="dark"] .wgx .x-note.is-info { background: var(--x-info-soft); color: #C9D5D2; border-color: rgba(183,198,195,.24); }
html[data-theme="dark"] .wgx .x-note.is-ok { background: rgba(155,175,143,.14); color: #C8D5BD; border-color: rgba(155,175,143,.3); }

html[data-theme="dark"] .wgx dialog.x-dialog, html[data-theme="dark"] .wgx .x-menu-pop, html[data-theme="dark"] .wgx .x-dialog-b > form > .x-form-foot, html[data-theme="dark"] .wgx .x-dialog-b .x-sticky-foot { background: #151B18; --x-label-bg: #151B18; border-color: rgba(232,230,223,.14); }
html[data-theme="dark"] .wgx .x-dialog-h { background: #34462F; }
html[data-theme="dark"] .wgx .wgc-doc { background: #F4F3EE; color: #1A1D1C; } /* documents stay paper-white: they are what the client receives */

html[data-theme="dark"] .wgx .x-day { background: #151B18; }
html[data-theme="dark"] .wgx .x-day.closed { background-color: #101512; }
html[data-theme="dark"] .wgx .x-visit { background: rgba(155,175,143,.14); color: #E8E6DF; }
html[data-theme="dark"] .wgx .x-visit.st-completed { background: rgba(232,230,223,.06); }
html[data-theme="dark"] .wgx .x-col { background: #101512; }
html[data-theme="dark"] .wgx .x-lead { background: #151B18; }
html[data-theme="dark"] .wgx .x-task .tick { background: transparent; border-color: #5A6356; }
html[data-theme="dark"] .wgx .x-pci { background: rgba(155,175,143,.16); color: #C8D5BD; }
html[data-theme="dark"] .wgx .x-pci.held { background: rgba(232,230,223,.06); }

/* Field Office shell */
html[data-theme="dark"] body.wga { background: #070908; }
html[data-theme="dark"] .wga-side { background: #0E1210; border-right: 1px solid rgba(232,230,223,.06); }
html[data-theme="dark"] .wga-top { background: rgba(12,16,14,.92); border-bottom-color: rgba(232,230,223,.1); }
html[data-theme="dark"] .wga-top .x-search input { background: rgba(0,0,0,.3); border-color: rgba(232,230,223,.14); color: #E8E6DF; }
html[data-theme="dark"] .wga-burger { background: transparent; color: #E8E6DF; border-color: rgba(232,230,223,.2); }
html[data-theme="dark"] .wga-page { background: #0C100E; border-color: rgba(232,230,223,.08); }
html[data-theme="dark"] .wga-page > .x-head { background: #34462F; }

/* client portal */
html[data-theme="dark"] .wgp2 .p-nav { box-shadow: inset 0 -3px 0 rgba(232,230,223,.08); background: transparent; }
html[data-theme="dark"] .wgp2 .p-nav a { color: rgba(232,230,223,.62); }
html[data-theme="dark"] .wgp2 .p-nav a.on { color: #E8E6DF; border-bottom-color: #9BAF8F; }
html[data-theme="dark"] .wgp2 .p-action, html[data-theme="dark"] .wgp2 .p-help div, html[data-theme="dark"] .wgp2 .p-gate { background: #151B18; border-color: rgba(232,230,223,.12); }

/* theme toggle in the Field Office top bar */
.wga-theme { width: 38px; height: 38px; display: inline-grid; place-items: center; border: 1px solid rgba(52,70,47,.3); border-radius: 2px; background: transparent; color: #F94F02; cursor: pointer; padding: 0; }
.wga-theme svg { width: 18px; height: 18px; }
html[data-theme="dark"] .wga-theme { border-color: rgba(232,230,223,.24); }
html:not([data-theme="dark"]) .wga-theme .t-sun, html[data-theme="dark"] .wga-theme .t-moon { display: none; }

/* file pickers sit below their floating label (both modes) */
.wgx .wgs-field input[type=file] { display: block; width: 100%; padding: 26px 12px 12px; border: 1px dashed rgba(52,70,47,.36); border-radius: 2px; background: var(--x-field, transparent); font-size: 13px; }
html[data-theme="dark"] .wgx .wgs-field input[type=file] { border-color: rgba(232,230,223,.24); color: #C6C4BC; }
html[data-theme="dark"] .wga-top summary.x-btn-accent, html[data-theme="dark"] .wga-top .x-btn-accent { background: #F94F02; border-color: #F94F02; color: #1A1D1C; }

/* portal: client ID is its own card, easy to find and copy */
.wgx .p-id { display: grid; grid-template-columns: auto auto; align-items: center; gap: 4px 14px; padding: 14px 18px; border: 1px solid var(--x-line); border-left: 4px solid var(--x-accent); background: var(--x-surface); border-radius: 2px; }
.wgx .p-id span { grid-column: 1 / -1; font: 700 11.5px/1 Rajdhani, sans-serif; letter-spacing: .16em; text-transform: uppercase; color: var(--x-muted); }
.wgx .p-id b { font: 700 30px/1 Rajdhani, sans-serif; letter-spacing: .06em; color: var(--x-text); font-variant-numeric: tabular-nums; }
.wgx .p-id small { grid-column: 1 / -1; color: var(--x-muted); }
.wgx .p-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; }
/* Field Office quick links */
.wga-top .wga-quick { height: 38px; }
@media (max-width: 760px) { .wga-top .wga-quick { display: none; } }
/* round 20: the request detail (drawn by the form plugin's staff view) in dark mode */
html[data-theme="dark"] .wgx .wgs { --wg-bg: #151B18; --wg-text: #E8E6DF; --wg-moss: #C8D5BD; --wg-green: #9BAF8F; --wg-border: rgba(232,230,223,.28); --wg-border-soft: rgba(232,230,223,.14); --wg-panel: rgba(232,230,223,.14); --wg-field: rgba(0,0,0,.26); color: #E8E6DF; }
html[data-theme="dark"] .wgx .wgs-card, html[data-theme="dark"] .wgx .wgs-filters, html[data-theme="dark"] .wgx .wgs-gate { background: rgba(232,230,223,.03); }
html[data-theme="dark"] .wgx .wgs-legend { background: #151B18; }
html[data-theme="dark"] .wgx .wgs-item { border-color: rgba(232,230,223,.14); }
html[data-theme="dark"] .wgx .wgs-item span, html[data-theme="dark"] .wgx .wgs-field span { color: #A9B99E; }
html[data-theme="dark"] .wgx .wgs-row span, html[data-theme="dark"] .wgx .wgs-muted, html[data-theme="dark"] .wgx .wgs-detail-head p, html[data-theme="dark"] .wgx .wgs-head p, html[data-theme="dark"] .wgx .wgs-contact span, html[data-theme="dark"] .wgx .wgs-tag, html[data-theme="dark"] .wgx .wgs-dl dt, html[data-theme="dark"] .wgx .wgs-log span, html[data-theme="dark"] .wgx .wgs-trail figcaption { color: #A3AA9F; }
html[data-theme="dark"] .wgx .wgs-row b, html[data-theme="dark"] .wgx .wgs-item strong { color: #E8E6DF; }
html[data-theme="dark"] .wgx .wgs-insights, html[data-theme="dark"] .wgx .wgs-more, html[data-theme="dark"] .wgx .wgs-table-wrap { background: rgba(0,0,0,.2); }
html[data-theme="dark"] .wgx .wgs-table th { background: rgba(232,230,223,.05); color: #C8D5BD; }
html[data-theme="dark"] .wgx .wgs-table tbody tr:hover { background: rgba(232,230,223,.05); }
html[data-theme="dark"] .wgx .wgs .wgs-btn-quiet { background: transparent; color: #E8E6DF; border-color: rgba(232,230,223,.28); }
html[data-theme="dark"] .wgx .wgs .wgs-btn-quiet:hover { background: rgba(232,230,223,.06); color: #fff; }
html[data-theme="dark"] .wgx .wgs-type-request { color: #B9CBAA; background: rgba(155,175,143,.12); }
html[data-theme="dark"] .wgx .wgs-type-message { color: #FFB86B; background: rgba(255,163,77,.12); }
html[data-theme="dark"] .wgx .wgs-type-consult { color: #FF9A8C; background: rgba(255,107,90,.12); }
html[data-theme="dark"] .wgx .wgs-trail svg, html[data-theme="dark"] .wgx .wgs-trail .mbg { background: #1C2420; fill: #1C2420; }
html[data-theme="dark"] .wgx .wgs-trail .mlabel { fill: #E8E6DF; }
