
:root{
  --bg:#f5f7fb;
  --surface:#ffffff;
  --surface-2:#f8fafc;
  --surface-3:#eef4fb;
  --text:#12233f;
  --text-2:#42526b;
  --muted:#718096;
  --line:#dce4ee;
  --line-strong:#c9d4e2;
  --brand:#2563b8;
  --brand-hover:#1f56a0;
  --brand-soft:#e9f2fd;
  --good:#0f7b57;
  --good-soft:#e7f6ef;
  --warn:#a05d00;
  --warn-soft:#fff4d9;
  --danger:#c9363e;
  --danger-soft:#fff0f1;
  --shadow-sm:0 1px 2px rgba(17,38,66,.04);
  --shadow-md:0 8px 28px rgba(17,38,66,.07);
  --shadow-lg:0 18px 46px rgba(17,38,66,.10);
  --radius-sm:9px;
  --radius-md:13px;
  --radius-lg:18px;
  --focus:0 0 0 3px rgba(37,99,184,.14);
  --font:"Segoe UI Variable","Segoe UI",Inter,system-ui,-apple-system,BlinkMacSystemFont,Arial,sans-serif;
}
body[data-theme="dark"]{
  --bg:#0e141d;--surface:#161f2b;--surface-2:#1c2735;--surface-3:#223146;
  --text:#edf3fb;--text-2:#c4cfdd;--muted:#92a2b6;--line:#2c3a4c;--line-strong:#3a4a5f;
  --brand:#69a7ee;--brand-hover:#83b8f2;--brand-soft:#173451;
  --good:#58c79b;--good-soft:#18382d;--warn:#eab35f;--warn-soft:#3c2c14;--danger:#ef7a82;--danger-soft:#3f2024;
  --shadow-sm:0 1px 2px rgba(0,0,0,.24);--shadow-md:0 12px 34px rgba(0,0,0,.25);--shadow-lg:0 22px 54px rgba(0,0,0,.32)
}
body[data-theme="graphite"]{--brand:#5b6877;--brand-hover:#4b5664;--brand-soft:#e8ebef;--surface-3:#eef0f2}
body[data-theme="teal"]{--brand:#007f74;--brand-hover:#006c63;--brand-soft:#e2f4f1;--surface-3:#edf8f6}
body[data-theme="violet"]{--brand:#6954c8;--brand-hover:#5843b5;--brand-soft:#eeeafd;--surface-3:#f4f1ff}
body[data-theme="emerald"]{--brand:#147849;--brand-hover:#0e633b;--brand-soft:#e5f4eb;--surface-3:#eef9f2}
body[data-theme="sunset"]{--brand:#c85b36;--brand-hover:#ac4928;--brand-soft:#fff0e9;--surface-3:#fff7f3}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--bg);color:var(--text);font-family:var(--font);font-size:14px;line-height:1.45;-webkit-font-smoothing:antialiased}
button,select,input{font:inherit}
button{cursor:pointer}
svg{display:block;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
a{color:var(--brand);text-decoration:none}
a:hover{text-decoration:underline}

.appbar{position:sticky;top:0;z-index:40;background:color-mix(in srgb,var(--surface) 92%,transparent);backdrop-filter:blur(18px);border-bottom:1px solid var(--line);box-shadow:0 1px 0 rgba(17,38,66,.02)}
.appbar-inner{max-width:1460px;margin:0 auto;padding:14px 24px;display:flex;align-items:center;justify-content:space-between;gap:24px}
.brand{display:flex;align-items:center;gap:13px;min-width:0}
.brand-mark{width:42px;height:42px;border-radius:12px;background:linear-gradient(145deg,var(--brand),color-mix(in srgb,var(--brand) 72%,#071c38));display:grid;place-items:center;color:#fff;box-shadow:0 8px 20px color-mix(in srgb,var(--brand) 24%,transparent)}
.brand-mark svg{width:24px;height:24px}
.brand-copy{min-width:0}
.brand-kicker,.page-kicker,.section-label,.summary-kicker{font-size:10px;line-height:1;font-weight:800;letter-spacing:.16em;color:var(--brand)}
.brand-line{display:flex;align-items:center;gap:10px}
.brand-line h1{font-size:22px;line-height:1.15;letter-spacing:-.025em;margin:2px 0 3px;font-weight:720;color:var(--text)}
.brand-copy p{margin:0;color:var(--muted);font-size:11px}
.version-badge{display:inline-flex;align-items:center;height:22px;padding:0 8px;border:1px solid var(--line);border-radius:999px;background:var(--surface-2);color:var(--text-2);font-size:10px;font-weight:700}
.app-actions{display:flex;align-items:flex-end;gap:9px}
.toolbar-field{display:grid;gap:5px;color:var(--muted);font-size:10px;font-weight:700;letter-spacing:.02em}
.toolbar-field select{min-width:122px}

.noticebar{border-bottom:1px solid var(--line);background:var(--surface-2)}
.noticebar-inner{max-width:1460px;margin:0 auto;padding:8px 24px;display:flex;align-items:center;gap:9px;font-size:11px;color:var(--text-2)}
.notice-icon{width:18px;height:18px;border-radius:50%;display:grid;place-items:center;background:var(--brand-soft);color:var(--brand);font-weight:800;font-size:11px;flex:0 0 auto}

.btn{height:38px;padding:0 13px;border-radius:10px;border:1px solid transparent;display:inline-flex;align-items:center;justify-content:center;gap:7px;font-weight:700;font-size:12px;transition:transform .12s ease,border-color .14s ease,background .14s ease,box-shadow .14s ease}
.btn svg{width:16px;height:16px}
.btn:hover{transform:translateY(-1px)}
.btn-primary{background:var(--brand);color:#fff;box-shadow:0 6px 14px color-mix(in srgb,var(--brand) 18%,transparent)}
.btn-primary:hover{background:var(--brand-hover)}
.btn-secondary{background:var(--surface);color:var(--text-2);border-color:var(--line)}
.btn-secondary:hover{border-color:var(--line-strong);background:var(--surface-2)}
.btn-soft{background:var(--brand-soft);color:var(--brand);border-color:color-mix(in srgb,var(--brand) 18%,var(--line))}

.workspace{max-width:1460px;margin:0 auto;padding:28px 24px 42px;display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:22px;align-items:start}
.builder{min-width:0}
.page-intro{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin:0 2px 18px}
.page-intro h2{font-size:24px;line-height:1.2;letter-spacing:-.025em;margin:4px 0 6px;font-weight:720}
.page-intro p{margin:0;color:var(--muted);max-width:760px;font-size:12px}
.intro-badges{display:flex;align-items:center;gap:7px;flex-wrap:wrap;justify-content:flex-end}
.status-pill,.required-pill,.audit-pill{display:inline-flex;align-items:center;justify-content:center;min-height:27px;padding:0 10px;border-radius:999px;font-size:10px;font-weight:750;white-space:nowrap}
.status-pill{background:var(--brand-soft);color:var(--brand);border:1px solid color-mix(in srgb,var(--brand) 12%,var(--line))}
.status-pill-subtle{background:var(--surface);color:var(--muted);border-color:var(--line)}
.required-pill{background:var(--surface-2);color:var(--muted);border:1px solid var(--line)}
.audit-pill{background:var(--surface-2);color:var(--text-2);border:1px solid var(--line)}
.audit-pill.ok,.compat.ok{background:var(--good-soft);color:var(--good);border-color:color-mix(in srgb,var(--good) 20%,var(--line))}
.audit-pill.warn,.compat.warn{background:var(--warn-soft);color:var(--warn);border-color:color-mix(in srgb,var(--warn) 20%,var(--line))}

.section-nav{display:flex;gap:7px;margin-bottom:14px;overflow:auto;padding-bottom:2px}
.nav-chip{height:34px;padding:0 12px;border:1px solid var(--line);border-radius:999px;background:var(--surface);color:var(--text-2);display:inline-flex;align-items:center;gap:7px;font-size:11px;font-weight:700;white-space:nowrap}
.nav-chip span{width:21px;height:21px;border-radius:50%;display:grid;place-items:center;background:var(--surface-3);color:var(--brand);font-size:9px}
.nav-chip:hover,.nav-chip.active{border-color:color-mix(in srgb,var(--brand) 35%,var(--line));color:var(--brand);background:var(--brand-soft)}

.config-card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-lg);box-shadow:var(--shadow-md);overflow:hidden;margin-bottom:15px;scroll-margin-top:92px}
.card-heading{min-height:76px;padding:15px 17px;display:flex;align-items:center;gap:12px;border-bottom:1px solid var(--line);background:linear-gradient(180deg,var(--surface),color-mix(in srgb,var(--surface-2) 30%,var(--surface)))}
.heading-icon{width:42px;height:42px;border-radius:12px;background:var(--brand-soft);color:var(--brand);display:grid;place-items:center;flex:0 0 auto}
.heading-icon svg{width:23px;height:23px}
.heading-icon.small{width:34px;height:34px;border-radius:10px}
.heading-icon.small svg{width:19px;height:19px}
.heading-copy{min-width:0;flex:1}
.heading-copy h3{font-size:17px;line-height:1.25;margin:3px 0 2px;font-weight:710;letter-spacing:-.015em}
.heading-copy p{margin:0;color:var(--muted);font-size:11px}
.heading-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.compact-field{display:grid;gap:4px;color:var(--muted);font-size:9px;font-weight:750}
.compact-field select{height:34px;min-width:132px}
.card-body{padding:17px}
.section-body{transition:max-height .28s ease,opacity .2s ease,padding .22s ease}
.section-body.collapsed{display:none}
.section-switch{width:38px;height:22px;border:0;border-radius:999px;padding:0;background:var(--line-strong);position:relative;flex:0 0 auto;transition:background .18s ease}
.section-switch span{position:absolute;left:3px;top:3px;width:16px;height:16px;border-radius:50%;background:#fff;box-shadow:0 1px 4px rgba(0,0,0,.18);transition:transform .18s ease}
.section-switch.is-on{background:var(--brand)}
.section-switch.is-on span{transform:translateX(16px)}
.section-switch:focus-visible{outline:none;box-shadow:var(--focus)}

.form-grid{display:grid;gap:12px}
.form-grid label{display:grid;gap:6px;font-size:10px;font-weight:750;color:var(--text-2)}
.chassis-grid{grid-template-columns:1fr 1fr 1.35fr 1.35fr .72fr}
.two-col{grid-template-columns:1.45fr .72fr}
.three-col{grid-template-columns:1.35fr .78fr .85fr}
.span-2{grid-column:span 1}
select,input{width:100%;height:39px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--text);padding:0 11px;outline:none;font-size:12px;transition:border-color .14s ease,box-shadow .14s ease,background .14s ease}
select:hover,input:hover{border-color:var(--line-strong)}
select:focus,input:focus{border-color:var(--brand);box-shadow:var(--focus)}
input:disabled{background:var(--surface-2);color:var(--text-2)}
optgroup{font-weight:800;color:var(--text)}
option{font-weight:500}

.fact-row{display:flex;gap:7px;flex-wrap:wrap;margin-top:13px}
.fact{display:inline-flex;align-items:center;min-height:28px;padding:0 9px;border:1px solid var(--line);border-radius:8px;background:var(--surface-2);font-size:10px;color:var(--text-2)}
.fact b{font-weight:800;color:var(--text)}

.info-strip,.capacity-strip{margin-top:11px;min-height:38px;border:1px solid var(--line);border-radius:10px;background:var(--surface-2);padding:9px 11px;color:var(--text-2);font-size:11px}
.info-strip:empty{display:none}
.subsection-title{display:flex;align-items:center;gap:9px;margin:1px 0 12px}
.subsection-title:after{content:"";height:1px;background:var(--line);flex:1}
.subsection-title span{font-size:10px;font-weight:800;letter-spacing:.12em;color:var(--muted);text-transform:uppercase}
.subsection-title:not(:first-child){margin-top:19px}

.drive-list-head{display:grid;grid-template-columns:minmax(0,1fr) 86px 36px;gap:10px;color:var(--muted);font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.08em;padding:0 1px 5px}
.drive-list{display:grid;gap:8px}
.drive-row{display:grid;grid-template-columns:minmax(0,1fr) 86px 36px;gap:10px;align-items:end}
.drive-row label{display:grid;gap:5px;font-size:10px;font-weight:750;color:var(--text-2)}
.drive-row button{width:36px;height:39px;border:1px solid color-mix(in srgb,var(--danger) 16%,var(--line));border-radius:10px;background:var(--danger-soft);color:var(--danger);font-weight:800;font-size:16px}
.drive-row button:hover{background:color-mix(in srgb,var(--danger-soft) 70%,var(--danger) 10%)}
.storage-actions{display:flex;align-items:center;gap:10px;margin-top:12px}
.capacity-strip{flex:1;margin:0}

.notes-card{box-shadow:var(--shadow-sm)}
.notes-toggle{width:100%;min-height:60px;padding:12px 15px;display:flex;align-items:center;gap:11px;border:0;background:var(--surface);color:var(--text);text-align:left}
.notes-toggle>span:nth-child(2){display:grid;gap:3px;flex:1}
.notes-toggle strong{font-size:13px}
.chevron{font-size:18px;color:var(--muted);transition:transform .18s ease}
.notes-card:not(.is-collapsed) .chevron{transform:rotate(180deg)}
.notes-body{padding:0 16px 15px;color:var(--text-2);font-size:11px}
.notes-body p{margin:0 0 8px}
.source-line{color:var(--muted)}

.summary{position:sticky;top:88px;align-self:start}
.summary-card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-lg);box-shadow:var(--shadow-lg);overflow:hidden}
.summary-head{padding:16px 17px 13px;display:flex;align-items:flex-start;justify-content:space-between;gap:10px;border-bottom:1px solid var(--line)}
.summary-kicker{display:flex;align-items:center;gap:7px;color:var(--brand)}
.live-dot{width:7px;height:7px;border-radius:50%;background:var(--good);box-shadow:0 0 0 4px var(--good-soft)}
.summary-head h2{font-size:18px;letter-spacing:-.02em;margin:5px 0 0}
.server-focus{margin:13px 14px 4px;padding:11px;border:1px solid var(--line);border-radius:12px;background:var(--surface-2);display:flex;gap:9px;align-items:center}
.server-focus-icon{width:34px;height:34px;border-radius:9px;background:var(--brand-soft);color:var(--brand);display:grid;place-items:center}
.server-focus-icon svg{width:19px;height:19px}
.server-focus strong{display:block;font-size:12px}
.server-focus small{display:block;color:var(--muted);font-size:9px;margin-top:2px}
.summary-lines{padding:3px 15px 0}
.sumline{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;padding:9px 0;border-bottom:1px dashed var(--line);font-size:11px;color:var(--text-2)}
.sumline>div{min-width:0}
.sumline small{display:block;color:var(--muted);font-size:9px;line-height:1.3;margin-top:2px;overflow:hidden;text-overflow:ellipsis}
.sumline b{color:var(--text);font-size:11px;white-space:nowrap}
.summary-totals{padding:11px 15px 13px}
.summary-totals>div{display:flex;align-items:center;justify-content:space-between;padding:4px 0;font-size:11px;color:var(--text-2)}
.summary-totals strong{color:var(--text)}
.grand-total{margin-top:7px;padding-top:11px!important;border-top:1px solid var(--line)}
.grand-total span{font-size:12px;font-weight:750}
.grand-total strong{font-size:19px;color:var(--brand)}
.summary-controls{padding:13px 15px;border-top:1px solid var(--line);background:var(--surface-2)}
.summary-controls .form-grid{gap:8px}
.summary-controls label{font-size:9px}
.summary-controls select{height:35px}
.fx-note{margin-top:7px;color:var(--muted);font-size:9px}
.export-panel{padding:13px 15px;border-top:1px solid var(--line)}
.export-title{font-size:10px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);margin-bottom:8px}
.export-panel label{display:grid;gap:5px;font-size:9px;font-weight:750;color:var(--text-2)}
.export-panel select{height:35px}
.export-buttons{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:8px}
.export-buttons .btn{width:100%}
.price-note{margin:0 15px 15px;padding:10px;border:1px solid var(--line);border-radius:10px;background:var(--surface-2);color:var(--muted);font-size:9px;line-height:1.45}

.app-footer{border-top:1px solid var(--line);background:var(--surface);color:var(--muted);font-size:9px}
.app-footer>div{max-width:1460px;margin:0 auto;padding:14px 24px}

.compat{display:inline-flex;align-items:center;min-height:27px;padding:0 9px;border:1px solid var(--line);border-radius:999px;font-size:9px;font-weight:750;background:var(--surface-2);color:var(--text-2)}
.add{border:0}

@media(max-width:1200px){
  .workspace{grid-template-columns:minmax(0,1fr) 320px}
  .chassis-grid{grid-template-columns:1fr 1fr 1fr}
  .chassis-grid label:nth-child(4){grid-column:span 2}
}
@media(max-width:1020px){
  .appbar{position:relative}
  .workspace{grid-template-columns:1fr}
  .summary{position:relative;top:auto}
  .summary-card{display:grid;grid-template-columns:1fr 1fr}
  .summary-head,.server-focus,.summary-lines,.summary-totals,.summary-controls,.export-panel,.price-note{grid-column:auto}
  .summary-head{grid-column:1/-1}
  .server-focus{grid-column:1/-1}
  .summary-lines{grid-column:1/2}
  .summary-totals{grid-column:2/3;border-left:1px solid var(--line)}
  .summary-controls{grid-column:1/2}
  .export-panel{grid-column:2/3}
  .price-note{grid-column:1/-1}
}
@media(max-width:760px){
  .appbar-inner{align-items:flex-start;flex-direction:column;padding:13px 15px}
  .app-actions{width:100%;justify-content:space-between}
  .noticebar-inner,.workspace{padding-left:15px;padding-right:15px}
  .page-intro{align-items:flex-start;flex-direction:column}
  .intro-badges{justify-content:flex-start}
  .chassis-grid,.two-col,.three-col{grid-template-columns:1fr}
  .card-heading{align-items:flex-start;flex-wrap:wrap}
  .heading-copy{min-width:calc(100% - 58px)}
  .heading-actions{width:100%;justify-content:space-between;padding-left:54px}
  .storage-actions{align-items:stretch;flex-direction:column}
  .summary-card{display:block}
  .summary-totals{border-left:0}
}
@media(max-width:520px){
  .brand-copy p{display:none}
  .brand-line h1{font-size:18px}
  .brand-mark{width:38px;height:38px}
  .toolbar-field{flex:1}
  .toolbar-field select{min-width:0}
  .section-nav{margin-left:-2px;margin-right:-2px}
  .drive-list-head{display:none}
  .drive-row{grid-template-columns:minmax(0,1fr) 72px 36px}
  .heading-actions{padding-left:0}
  .compact-field{flex:1}
  .compact-field select{min-width:0}
}
@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{scroll-behavior:auto!important;transition:none!important;animation:none!important}
}
@media print{
  body{background:#fff;color:#111}
  .appbar,.noticebar,.section-nav,.app-footer,.app-actions,.summary-controls,.export-panel,.price-note,.section-switch,.btn{display:none!important}
  .workspace{display:block;max-width:none;padding:0}
  .summary{position:static;margin-top:16px}
  .config-card,.summary-card{box-shadow:none;break-inside:avoid}
}
