:root {
  color-scheme: light;
  --top:#fff2d9; --bottom:#c89462; --glow:#fff7e7; --ink:#302219; --muted:#665245;
  --glass:#fff8ea75; --float:#fbdfb8e8; --edge:#fff8e7d9; --low:#8a5a3b68; --field:#fff9ed92;
  --ai:#ddc9f1a8; --ai-ink:#4a285c; --hot:#ffc176; --warm:#ee812f; --orange-text:#361e0e;
  --shadow:#5e40281c; --error:#8b2216;
  font-family: -apple-system,BlinkMacSystemFont,'Segoe UI',system-ui,sans-serif;
  font-synthesis:none;
}
[data-theme="matte"] {--top:#f3ede5;--bottom:#b6a18e;--glow:#fff8ee;--ink:#302922;--muted:#594e42;--float:#e9dccde8;--low:#6d584666}
[data-theme="arctic"] {--top:#fff;--bottom:#d6e4eb;--glow:#ecf9ff;--ink:#1b2d3b;--muted:#435b6d;--edge:#ffffff;--float:#f2f8fbe8;--low:#6d8b9b64;--ai:#e6dbf5;--ai-ink:#4c3061}
[data-theme="midnight"] {color-scheme:dark;--top:#253548;--bottom:#0d1625;--glow:#394c63;--ink:#f5f4f8;--muted:#c3d0e0;--glass:#98b5d325;--float:#1d2b3dea;--edge:#baccdf65;--low:#040a13aa;--field:#121f30a8;--ai:#8568ae80;--ai-ink:#f9ecff;--error:#ffc0af;--shadow:#0004}
[data-theme="titanium"] {--top:#f6f3ee;--bottom:#9f9f9d;--glow:#fff;--ink:#272723;--muted:#4d4c47;--edge:#ffffffd9;--float:#ece8e0e8;--low:#64625f73}
[data-theme="ocean"] {color-scheme:dark;--top:#145b75;--bottom:#082f4a;--glow:#287e96;--ink:#f0fbff;--muted:#c4e3ef;--glass:#a2dbeb24;--float:#114966ed;--edge:#b6e7f386;--low:#041e30a6;--field:#072d44a0;--ai:#785eaa9e;--ai-ink:#fcf0ff;--error:#ffc4b2;--shadow:#001a2a45}
* {box-sizing:border-box}
html {min-height:100%;scroll-padding-bottom:6rem}
body {margin:0;min-height:100svh;color:var(--ink);background:
  radial-gradient(ellipse at 10% 1%,var(--glow),transparent 65%) fixed,
  linear-gradient(158deg,var(--top),var(--bottom)) fixed}
button,input,select,textarea {font:inherit;color:inherit}
button {cursor:pointer}
button:disabled {opacity:.52;cursor:default}
:focus-visible {outline:2px solid currentColor;outline-offset:3px}
[hidden] {display:none!important}
h1,h2,p {margin:0}
h1 {font-size:clamp(1.75rem,4vw,2.6rem);letter-spacing:-.043em;line-height:1.1}
h2 {font-size:1.25rem;letter-spacing:-.025em}
small,.muted {color:var(--muted)}
svg {width:23px;height:23px;flex:none;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}
.glass,.button,input,select,textarea {border:1px solid var(--edge);border-bottom-color:var(--low);
  box-shadow:inset 0 1px #ffffff55,0 3px 10px var(--shadow);background:var(--glass)}
.glass {border-radius:22px}
.button {border-radius:15px;min-height:45px;padding:.64rem .9rem;display:inline-flex;gap:.6rem;align-items:center;
  justify-content:center;font-weight:650;overflow-wrap:anywhere}
.button.primary,.dock .active,.dock .create svg,.button.back {color:var(--orange-text);background:linear-gradient(var(--hot),var(--warm));border-color:#ffe0b2a8;border-bottom-color:#a04a1e9e}
.button.ai-button {color:var(--ai-ink);background:var(--ai)}
.login {min-height:100svh;display:grid;place-items:center;padding:1.2rem}
.login-card {width:min(100%,430px);padding:clamp(1.4rem,6vw,2.25rem);display:grid;gap:1rem}
.login-card h1 {font-size:clamp(1.65rem,6vw,2.35rem)}
.login-form,.stack {display:grid;gap:.72rem}
.login-form .primary {justify-content:space-between}
.login-form>div:empty {display:none}
.shell {width:min(100%,1100px);margin:auto;padding:clamp(.7rem,2vw,1.8rem) clamp(.72rem,3vw,1.8rem) calc(6.8rem + env(safe-area-inset-bottom))}
.top {display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:.55rem}
.top-title {display:flex;align-items:center;justify-content:center;gap:.5rem;font-weight:650;min-width:0}
.top-title small {font-variant-numeric:tabular-nums}
.top .button {border-radius:50%;width:44px;height:44px;padding:0;flex:none}
.workspace {display:grid;gap:1.05rem;margin:1.25rem auto 0}
.content {min-width:0}
.panel {padding:clamp(.9rem,3vw,1.45rem)}
.panel h2 {margin-bottom:.8rem}
.hero {display:flex;position:relative;overflow:hidden;isolation:isolate;align-items:end;justify-content:space-between;gap:1rem;
  min-height:clamp(155px,30vw,265px);padding:clamp(1rem,4vw,2.5rem);color:#fff4e4;
  background:radial-gradient(ellipse at 100% 0%,#bd8855,transparent 86%),linear-gradient(125deg,#3e2b22,#6b482f)}
.hero h2 {font-size:clamp(1.45rem,4vw,3.15rem);margin:.44rem 0;line-height:1.03}
.hero p {color:#ffead2;font-size:.9rem}
.hero>svg {width:clamp(80px,20vw,210px);height:auto;stroke-width:.7;opacity:.38;color:#ffcf95;position:absolute;right:3%;top:9%;z-index:-1}
.metrics,.tools,.themes,.fields {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.7rem}
.metric {min-height:84px;text-align:left;display:flex;align-items:center;gap:.6rem;padding:.7rem .85rem;min-width:0}
.metric span {display:grid;gap:.15rem;min-width:0}
.metric strong {font-size:1.55rem;font-variant-numeric:tabular-nums}
.metric svg,.row-icon svg {width:25px;height:25px}
.row {width:100%;text-align:left;display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:.8rem;
  align-items:center;min-height:58px;padding:.65rem .8rem}
.row-label {display:grid;gap:.22rem;overflow-wrap:anywhere}
.row-icon {display:grid;place-items:center;width:36px;height:36px;border-radius:12px;background:var(--field)}
.ai-heading {display:flex;align-items:center;gap:.8rem;padding:.8rem 1rem}
.ai-heading svg {color:var(--ai-ink);background:var(--ai);width:44px;height:44px;padding:10px;border-radius:14px}
.tools .button {justify-content:flex-start;text-align:left}
.dock {display:grid;grid-template-columns:repeat(5,minmax(0,1fr));align-items:end;gap:.3rem;position:fixed;
  z-index:5;bottom:calc(.55rem + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);
  width:min(95%,550px);padding:.38rem;background:var(--float);backdrop-filter:blur(12px)}
.dock .button {padding:.25rem .1rem;gap:.14rem;min-width:0;flex-direction:column;font-size:clamp(.61rem,2.7vw,.78rem);border-color:transparent;box-shadow:none;background:none}
.dock .button.active {background:linear-gradient(var(--hot),var(--warm));border-color:#ffe0b2a8}
.dock .create svg {width:34px;height:34px;padding:6px;border-radius:50%;border:1px solid #ffe3b9}
input,select,textarea {padding:.69rem .74rem;border-radius:12px;background:var(--field);width:100%;min-width:0;max-width:100%;font-size:1rem;min-height:44px}
input[type="date"],input[type="datetime-local"] {appearance:none;display:block;min-inline-size:0}
input[type="date"]::-webkit-date-and-time-value,input[type="datetime-local"]::-webkit-date-and-time-value {text-align:left}
textarea {resize:vertical}
label {display:grid;gap:.3rem;min-width:0;font-weight:600;font-size:.91rem}
label .wide,.wide {grid-column:1/-1}
.filter {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,150px),1fr));gap:.55rem;padding:.65rem}
.details {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,235px),1fr));gap:.85rem;margin:0}
.details div {min-width:0;border-top:1px solid var(--edge);padding-top:.6rem}
dt {color:var(--muted);font-size:.87rem}
dd {margin:.27rem 0 0;white-space:pre-wrap;overflow-wrap:anywhere}
.actions {display:flex;justify-content:flex-end;gap:.65rem;flex-wrap:wrap}
.align-start {justify-self:start}
.error {color:var(--error);font-weight:600;margin-block:.3rem}
.theme-button[aria-pressed="true"] {outline:2px solid currentColor;outline-offset:-4px}
@media (min-width:760px) {
  .metrics {grid-template-columns:repeat(4,minmax(0,1fr))}
  .tools,.themes {grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media (max-width:410px) {
  .top-title img {display:none}
  .fields {grid-template-columns:minmax(0,1fr)}
}
@media (max-height:455px) {
  .dock {position:sticky;bottom:.25rem;margin:1rem auto 0;left:auto;transform:none}
  .shell {padding-bottom:1rem}
}
/* Golden Matte Liquid Glass */
html[data-theme="sunset"] {
  color-scheme: dark;
  --top:#95704c;--bottom:#543923;--glow:#bc8857;--ink:#fff8ed;--muted:#f4ddc7;
  --glass:#d6a77838;--float:#755234ed;--edge:#fff5df9c;--low:#371e0db0;--field:#493120b0;
  --ai:#a577bb5e;--ai-ink:#fceaff;--hot:#ffab38;--warm:#e66a09;--orange-text:#211206;
  --shadow:#2f1b1170;--error:#ffe0d5;
}
html[data-mode="night"] {
  color-scheme:dark;
  --top:#473827;--bottom:#211916;--glow:#705039;--ink:#fff4e5;--muted:#e8d2bb;
  --glass:#b9926c32;--float:#39291fee;--edge:#f6dfc56b;--low:#140b06ae;--field:#211911be;
  --ai:#9970b55c;--ai-ink:#fae7ff;--shadow:#130a07a0;--error:#ffc7b5;
}
html[data-theme="sunset"][data-mode="night"] {
  --top:#64472f;--bottom:#302019;--glow:#8c5c37;--glass:#d6a7782b;--float:#4b3425ef;
}
html[data-theme="midnight"][data-mode="night"] {--top:#182435;--bottom:#0b121b;--glow:#2e435b;--float:#172336ed;}
html[data-theme="ocean"][data-mode="night"] {--top:#194252;--bottom:#061d2c;--glow:#236071;--float:#103344ed;}
html[data-theme="midnight"][data-mode="day"] {color-scheme:light;--top:#e4ecf7;--bottom:#a0b2ca;--glow:#f5f9ff;--ink:#19283d;--muted:#364b66;--field:#f2f7ffc0;--glass:#ffffff60;--float:#e1ebf9ee;--edge:#ffffffd9;--low:#61738c83;--ai-ink:#45295a;--error:#852415;}
html[data-theme="ocean"][data-mode="day"] {color-scheme:light;--top:#daeff3;--bottom:#75a9b7;--glow:#f1fffd;--ink:#143742;--muted:#285562;--field:#ecfbffc0;--glass:#eaffff72;--float:#d5edf0ee;--edge:#ffffffd9;--low:#376e7d80;--ai-ink:#45295a;--error:#852415;}
body {background:radial-gradient(ellipse at 12% 0%,var(--glow),transparent 62%) fixed,linear-gradient(145deg,var(--top),var(--bottom)) fixed;}
.glass,.button,input,select,textarea {box-shadow:inset 0 1px 0 #fff5, inset 0 -1px 0 #31190655,0 2px 8px var(--shadow);}
.glass {border-radius:17px;}
.dock {border-radius:24px;}
button.button.primary,.dock .button.active,.dock .create svg {background:linear-gradient(175deg,var(--hot),var(--warm));}
.hero {background:linear-gradient(0deg,#201009c9,#20100908 86%),url('warehouse-reference.webp') center 55% / cover no-repeat #513522;min-height:clamp(133px,27vw,271px);}
.hero>svg {display:none;}
.mode-select {display:grid;gap:.35rem;grid-template-columns:repeat(3,minmax(0,1fr));margin:0 0 1rem;}
.theme-button[aria-pressed=true] {outline:1px solid var(--edge);outline-offset:-3px;box-shadow:inset 0 0 0 2px var(--warm);}
@media(max-width:600px) {
  .shell {width:min(100%,460px);padding-inline:.74rem;}
  .top-title img {display:block;width:32px;height:32px;}
  .top-title {gap:.35rem;font-size:clamp(.69rem,3.15vw,.94rem);}
  .workspace {gap:.65rem;margin-top:.75rem;}
  .workspace>h1 {font-size:1.32rem;}
  .metric {min-height:61px;padding:.48rem .58rem;}
  .metric strong {font-size:1.26rem;}
  .row {min-height:50px;padding:.42rem .58rem;}
  .row-icon {width:30px;height:30px;}
  .hero h2 {font-size:1.25rem;}
}
