/* Shared clay surfaces across the suite. Loaded after each module's layout. */
:root {
  --clay-bg:#dde7e4; --clay-surface:#f4f8f7; --clay-field:#eaf1ef;
  --clay-ink:#18383c; --clay-muted:#4e686d; --clay-edge:#ffffffb3;
  --clay-shadow:12px 12px 28px #bccdca80,-8px -8px 22px #ffffffb3,inset 2px 2px 4px #fff,inset -3px -3px 7px #ccdcd670;
  --clay-small:4px 5px 10px #bacdca80,-3px -3px 8px #ffffffba,inset 1px 1px 2px #fff,inset -2px -2px 4px #c6d8d160;
  --clay-inset:inset 3px 3px 7px #bccdc980,inset -3px -3px 7px #ffffffc9;
  --bg:var(--clay-bg);--surface:var(--clay-surface);--surface-2:var(--clay-field);
  --ink:var(--clay-ink);--muted:var(--clay-muted);--line:#c6d8d2;
  --radius:24px;--radius-sm:14px;
}
html {background:var(--clay-bg)}
body {background:radial-gradient(ellipse at 15% 0%,#ffffff55,transparent 55%),var(--clay-bg);color:var(--clay-ink)}
p,.muted,.metric span,footer {color:var(--clay-muted)}
a {color:#086857;text-underline-offset:3px}
header,.top {background:var(--clay-surface);border-bottom:1px solid var(--clay-edge);box-shadow:0 5px 18px #a6bdb52b,inset 0 -2px 4px #d7e5df66}
header nav {gap:8px}
header nav a {padding:8px 12px;border-radius:14px;text-decoration:none;font-weight:600;font-size:.88rem}
header nav a:hover {background:var(--clay-field);box-shadow:var(--clay-inset)}
.card,.metric,.rail,.spatial-panel,.cart-visual,.finding,.inspection-check,.guard,.stat,.choice button {
  background:var(--clay-surface);border:1px solid var(--clay-edge);border-radius:24px;box-shadow:var(--clay-shadow);
}
.metric {padding:22px}
.metric strong {color:#0d6357}
.finding,.inspection-check,.guard,.stat,.choice button {border-radius:18px;box-shadow:var(--clay-small)}
.attention-list,.grid {gap:24px}
.card h3 {line-height:1.4}
.btn,button:where(:not(.dept-name):not(.item-name):not(.step):not(.iconbtn):not(.unit-toggle button)) {
  border-radius:15px;border:1px solid var(--clay-edge);background:var(--clay-surface);color:#195b50;
  box-shadow:var(--clay-small);transition:box-shadow .16s ease,transform .16s ease;
}
.btn:hover,button:not(:disabled):not(.dept-name):not(.item-name):hover {transform:translateY(-1px)}
.btn:active,button:not(:disabled):not(.dept-name):not(.item-name):active {transform:translateY(1px);box-shadow:var(--clay-inset)}
.btn.primary,button.primary,.choice button.on,.unit-toggle button.on {
  background:linear-gradient(145deg,#218875,#096453);color:#fff;border-color:#469a86;
  box-shadow:5px 6px 12px #789e9370,inset 2px 2px 4px #73bba780,inset -3px -3px 6px #054f4970;
}
button:disabled,.btn:disabled {transform:none;box-shadow:none}
input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]),select,textarea,.workflow textarea,.check-grid textarea {
  background:var(--clay-field);color:var(--clay-ink);border:1px solid #c4d7ce;border-radius:14px;
  box-shadow:var(--clay-inset);padding:12px;min-height:44px;
}
input[type=checkbox],input[type=radio] {accent-color:#087563}
input::placeholder,textarea::placeholder {color:#617a76;opacity:1}
:focus-visible {outline:3px solid #087563;outline-offset:4px}
input:focus,select:focus,textarea:focus {outline:3px solid #087563;outline-offset:2px;box-shadow:var(--clay-inset)}
.pill,.chip,.areas span,.supply-icon,.step .num {box-shadow:inset 1px 1px 3px #ffffffaa,inset -2px -2px 4px #648e7f26,2px 3px 5px #91afa12b}
.pill {padding:5px 12px;font-weight:600}
.notice,.note {background:#fff1d6;color:#674916;border-radius:18px;box-shadow:var(--clay-small);border-left:4px solid #b4791a}
.warning {background:#fff0cd;color:#79520e}
.danger,.btn.danger {background:#ffe5de;color:#923523}
.planned {background:#e6ecef;color:#4a616a}
#error {color:#923523}
th {color:var(--clay-muted);background:var(--clay-field)}
th,td {border-bottom-color:#ccdcd6}
tr:last-child td {border-bottom:0}
.scroll,.tbl-wrap {border-radius:14px}
.map-area,.supply-tile {border-radius:16px;background:var(--clay-surface);box-shadow:var(--clay-small)}
.step {margin:5px 0 9px;border-radius:14px}
.step.active {background:var(--brand-soft);box-shadow:var(--clay-inset)}
.drawer {border-radius:28px 0 0 28px;box-shadow:-15px 0 40px #18383c26,inset 3px 0 6px #ffffff70}
@media(max-width:600px) {
  header {padding:16px 20px;gap:12px}header nav {margin-left:0;gap:4px;flex-wrap:wrap}header nav a {padding:7px 9px}
  main {padding:28px 18px}.card {padding:22px}.metric {padding:18px}.drawer {border-radius:0}
}
/* Monitoring retains its existing light / dark theme preference. */
@media(prefers-color-scheme:dark) {
  :root:not([data-theme=light]):has(.top) {
    --clay-bg:#17282b;--clay-surface:#22373a;--clay-field:#1c3033;--clay-ink:#eef6f3;--clay-muted:#bdd0ce;--clay-edge:#47645d80;
    --clay-shadow:10px 10px 24px #0a1a2080,-6px -6px 18px #3c555640,inset 2px 2px 4px #63837930,inset -3px -3px 7px #0a1c2066;
    --clay-small:4px 5px 10px #0a1a2070,inset 1px 1px 3px #739a8740,inset -2px -2px 4px #071a1e60;
    --clay-inset:inset 3px 3px 7px #071a1e80,inset -3px -3px 7px #54736c30;
  }
}
:root[data-theme=dark] {
  --clay-bg:#17282b;--clay-surface:#22373a;--clay-field:#1c3033;--clay-ink:#eef6f3;--clay-muted:#bdd0ce;--clay-edge:#47645d80;
  --clay-shadow:10px 10px 24px #0a1a2080,-6px -6px 18px #3c555640,inset 2px 2px 4px #63837930,inset -3px -3px 7px #0a1c2066;
  --clay-small:4px 5px 10px #0a1a2070,inset 1px 1px 3px #739a8740,inset -2px -2px 4px #071a1e60;
  --clay-inset:inset 3px 3px 7px #071a1e80,inset -3px -3px 7px #54736c30;
}
:root[data-theme=dark] .btn:not(.primary):not(.danger),:root[data-theme=dark] a {color:#9ae2ce}
@media(prefers-color-scheme:dark) {:root:not([data-theme=light]):has(.top) .btn:not(.primary):not(.danger),:root:not([data-theme=light]):has(.top) a {color:#9ae2ce}}
@media(prefers-reduced-motion:reduce) {.btn,button {transition:none!important;transform:none!important}}
@media print {
  html,body {background:#fff!important;color:#000!important}
  .card,.metric,.rail,.spatial-panel,.cart-visual,.finding,.inspection-check,.guard,.stat,.choice button,.notice,.note,.pill,.chip,.labels article {box-shadow:none!important;background:#fff!important;border-radius:0!important}
  input,select,textarea {box-shadow:none!important;background:#fff!important;color:#000!important;min-height:0!important;padding:0!important;border-radius:0!important}
  th {background:#fff}p,.muted,td,th {color:#000!important}
}
.workspace-picker{margin:26px 0}.workspace-selectors{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
.workspace-path{font-size:.85rem;display:flex;flex-wrap:wrap;gap:6px;margin:0 0 22px;color:var(--clay-muted)}
.facility-tree{display:grid;gap:24px;margin:22px 0 36px}.facility-group h2{margin:8px 0}.department-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;margin-top:20px}
.department-card{padding:24px;background:var(--clay-field);border:1px solid #c6d8d2;border-radius:20px;box-shadow:var(--clay-inset)}
.department-card h3{margin:14px 0 8px}.department-card p{font-size:.88rem}.department-actions{gap:8px}.department-actions .btn{font-size:.8rem;padding:8px 12px}.department-focus{margin-top:18px;font-size:.8rem}
@media(max-width:750px){.department-grid,.workspace-selectors{grid-template-columns:1fr}.department-card{padding:20px}.facility-group{padding:20px}}
@media print{.department-card{box-shadow:none;background:white}}
body>.workspace-path{max-width:1280px;margin:20px auto 0;padding:0 20px}
.review-map-card{padding:20px}.review-map-card .card-head{margin-bottom:10px;gap:3px}.review-map-card .card-head h2{font-size:1.35rem}
.review-map-card .summary-grid{margin:10px 0;gap:10px}.review-map-card .stat{padding:8px 12px;display:flex;align-items:center;gap:12px}.review-map-card .stat b{font-size:1.25rem}.review-map-card .stat span{font-size:.75rem}
.review-map-card .map-toolbar{margin:10px 0;gap:8px}.review-map-card .legend{font-size:.72rem}.review-map-card .actions{margin-top:12px;padding-top:12px}.review-map-card #org-fit-status{margin:4px 0}
.org-overview{position:relative;width:100%;overflow:hidden;border-radius:16px;background:var(--clay-field);box-shadow:var(--clay-inset)}
.org-canvas{position:absolute;left:50%;top:8px;transform:translateX(-50%) scale(var(--org-scale,1));transform-origin:50% 0}
.org-facility{width:280px;height:58px;margin:auto;border-radius:16px;background:#146b5c;color:white;padding:9px 14px;text-align:center;box-shadow:var(--clay-small)}
.org-facility strong{display:block;font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.org-facility span{font-size:11px}
.org-connector{width:2px;height:20px;background:#88aaa0;margin:auto}
.org-departments{display:grid;grid-template-columns:repeat(var(--org-cols,3),176px);gap:10px;justify-content:center}
button.org-department{height:74px;padding:8px 10px;text-align:center;border-radius:14px;position:relative;font-size:12px;line-height:1.25}
.org-department strong{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:13px;line-height:1.2;max-height:32px}.org-department span{display:block;margin-top:5px;font-size:10px;color:var(--clay-muted)}
.org-department.incomplete{border:1.5px dashed #9b7729}.org-department i{position:absolute;top:-7px;right:5px;background:#fff0cd;padding:2px 5px;border-radius:6px;color:#79520e;font-size:9px;font-style:normal}
.org-detail-list{display:grid;gap:12px;margin:14px 0}.org-detail-list>div{padding:12px;background:var(--clay-field);border-radius:14px}.org-detail-list p{margin:4px 0}
.wrap:has(.review-map-card){padding-bottom:16px;padding-top:12px}
@media(max-width:600px){.review-map-card{padding:12px}.review-map-card .summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.review-map-card .stat{padding:5px 8px}.review-map-card .map-toolbar .btn{padding:7px 10px;font-size:.72rem}.review-map-card .legend{display:none}.review-map-card .card-head p{font-size:.8rem}}
@media print{.org-overview{display:none}.review-map-card .map-scroll[hidden]{display:block}.review-map-card .map-toolbar,#org-fit-status{display:none}}
@media(max-width:600px){
 body:has(.review-map-card) .top-inner{padding:8px 14px;gap:8px}
 body:has(.review-map-card) .brandmark{width:100%;gap:10px}
 body:has(.review-map-card) .brandmark img{width:110px}
 body:has(.review-map-card) .brandmark h1{font-size:1rem}
 body:has(.review-map-card) .top-inner>.btn,body:has(.review-map-card) .save-state{display:none}
 body:has(.review-map-card) .mode-switch{margin-left:0;font-size:.75rem}
 body:has(.review-map-card) .stepper{flex-wrap:nowrap;gap:2px;padding:0 10px;overflow-x:auto}
 body:has(.review-map-card) .stepper .step{flex:none;margin:3px 0 5px;padding:6px 9px;gap:5px;font-size:.75rem}
 body:has(.review-map-card) .stepper .num{width:20px;height:20px;font-size:.7rem}
 body:has(.review-map-card)>.workspace-path{margin-top:10px;font-size:.75rem}
 .review-map-card .actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}
 .review-map-card .actions .btn{font-size:.7rem;padding:8px 5px;min-height:38px;text-align:center}
}

/* Six-step cart configuration and compartment inventory. */
.wizard-steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding:0;list-style:none;margin:20px 0}.wizard-steps li{padding:10px 12px;background:#e4ece7;border-radius:12px;font-size:.85rem;color:#425f55}.wizard-steps [aria-current]{background:#245e50;color:white;font-weight:700}.wizard-area{display:grid;grid-template-columns:minmax(130px,2fr) minmax(65px,1fr) minmax(110px,1fr) auto;align-items:end;gap:10px;background:#edf2ed;padding:12px;border-radius:16px;margin:10px 0}.wizard-area input[type=color]{height:42px;padding:4px}.setup-columns>div{min-width:0}.setup-columns.inventory-step{display:block}.inventory-step #setup-preview{max-width:760px;margin:24px auto}.cart-setup .scroll{max-width:100%;overflow:auto}.cart-setup table input,.cart-setup table select{min-width:130px}.cart-setup [role=alert],.cart-inventory-dialog [role=alert]{white-space:pre-line;color:#8b2222}.cart-inventory-dialog{width:min(1120px,calc(100vw - 32px));max-height:calc(100dvh - 40px);box-sizing:border-box;overflow:auto;border:1px solid #fff;border-radius:24px;padding:26px;background:#edf2ed;color:#193d33;box-shadow:12px 18px 50px #102b3550,inset 3px 3px 6px #fff}.cart-inventory-dialog::backdrop{background:#102c37a6;backdrop-filter:blur(3px)}.cart-inventory-dialog .scroll{overflow:auto}.cart-inventory-dialog table{width:100%;border-collapse:collapse}.cart-inventory-dialog th,.cart-inventory-dialog td{padding:10px;text-align:left;vertical-align:top}.cart-inventory-dialog td input{min-width:120px}.cart-inventory-dialog td:first-child input{min-width:190px}.cart-config-svg [data-compartment],[data-compartment]{transition:transform 160ms ease,filter 160ms ease;transform-box:fill-box;transform-origin:center}.drawer-open{transform:translateY(13px);filter:drop-shadow(0 10px 5px #183d3555)}
@media(max-width:700px){.wizard-steps{grid-template-columns:repeat(2,minmax(0,1fr))}.wizard-area{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.cart-inventory-dialog{padding:16px}.cart-setup .setup-columns{display:block}.wizard-area label{min-width:0}.wizard-area input,.wizard-area select{max-width:100%;box-sizing:border-box}}
@media(prefers-reduced-motion:reduce){[data-compartment]{transition:none}.drawer-open{transform:none}}

@media(min-width:701px){.wizard-area{grid-template-columns:minmax(100px,2fr) minmax(55px,.7fr) minmax(80px,1fr) minmax(100px,1fr) auto;}.wizard-area label{min-width:0}.wizard-area input,.wizard-area select{box-sizing:border-box;max-width:100%}}
