/* Server Config Validation Tool: dark theme with a Dell-blue accent.
   To match Serviot's exact brand colours, change --brand and --brand-2 below. */
:root {
  --bg: #0b1220;
  --bg-2: #0f182a;
  --panel: #131e33;
  --panel-2: #18253e;
  --line: #24324d;
  --line-2: #2f4063;
  --text: #e6ecf5;
  --muted: #94a3bd;
  --faint: #6b7a96;
  --brand: #0672cb;        /* Dell blue */
  --brand-2: #4fa3ff;      /* lighter accent for text on dark */
  --brand-ink: #ffffff;
  --a: #22c55e;   --a-bg: rgba(34,197,94,.12);
  --b: #eab308;   --b-bg: rgba(234,179,8,.12);
  --f: #ef4444;   --f-bg: rgba(239,68,68,.12);
  --note: #3b82f6; --note-bg: rgba(59,130,246,.14);
  --radius: 10px;
  --mono: ui-monospace, "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  --sans: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 var(--sans); }
a { color: var(--brand-2); }
a:hover { color: #8cc4ff; }
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.25; font-weight: 600; }
h2 { font-size: 20px; } h3 { font-size: 16px; } h4 { font-size: 14px; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 12px; }
.mono { font-family: var(--mono); }
.hidden { display: none !important; }

/* ---------- top bar & tabs ---------- */
.topbar { display: flex; align-items: center; gap: 16px; padding: 0 20px; height: 56px;
  background: linear-gradient(90deg, #07101f, #0b1a33); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: .2px; }
.brand-mark { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--brand-2);
  display: grid; place-items: center; font-size: 12px; color: var(--brand-2); font-weight: 700; }
.brand small { color: var(--muted); font-weight: 400; margin-left: 4px; }
.topbar .spacer { flex: 1; }
.who { color: var(--muted); font-size: 13px; }
.who b { color: var(--text); font-weight: 600; }
.tabs { display: flex; gap: 2px; padding: 0 20px; background: var(--bg-2); border-bottom: 1px solid var(--line);
  overflow-x: auto; scrollbar-width: thin; position: sticky; top: 56px; z-index: 19; }
.tab { background: none; border: 0; color: var(--muted); padding: 11px 14px; cursor: pointer; font: inherit;
  border-bottom: 2px solid transparent; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--brand); }
.tab.pin { color: #cfd9ea; }
.tab .x { opacity: .5; padding: 0 2px; border-radius: 4px; }
.tab .x:hover { opacity: 1; background: var(--line); }
.tab .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.tab-sep { width: 1px; background: var(--line); margin: 8px 6px; }

main { max-width: 1240px; margin: 0 auto; padding: 24px 20px 80px; }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); font: inherit; font-weight: 500; }
.btn:hover { border-color: var(--brand-2); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { background: #0a80e0; }
.btn.big { padding: 12px 22px; font-size: 15px; }
.btn.ghost { background: transparent; }
.btn.danger { border-color: rgba(239,68,68,.5); color: #fca5a5; }
.btn.sm { padding: 4px 10px; font-size: 12px; }
label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; font-weight: 500; }
input, textarea, select { width: 100%; background: var(--bg-2); color: var(--text); border: 1px solid var(--line-2);
  border-radius: 8px; padding: 8px 10px; font: inherit; }
textarea { min-height: 90px; resize: vertical; font-family: var(--mono); font-size: 12.5px; }
input:focus, textarea:focus, select:focus { outline: 2px solid rgba(79,163,255,.45); border-color: var(--brand-2); }
.row { display: grid; gap: 12px; }
.cols-2 { grid-template-columns: 1fr 1fr; } .cols-3 { grid-template-columns: repeat(3, 1fr); } .cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 800px) { .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; } }
.field { margin-bottom: 12px; }
.hint { font-size: 12px; color: var(--faint); margin-top: 4px; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.panel-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.panel-head .spacer { flex: 1; }
.step { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--brand);
  font-size: 12px; font-weight: 700; color: #fff; }

.build-card { border: 1px solid var(--line-2); border-left: 3px solid var(--brand); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 14px; background: var(--panel-2); }
.build-card .panel-head h3 { margin: 0; }
.errors { background: var(--f-bg); border: 1px solid rgba(239,68,68,.4); color: #fecaca; padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; }
.errors ul { margin: 0; padding-left: 18px; }

/* ---------- grades ---------- */
.grade { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; font-weight: 800; font-size: 22px; }
.grade.A { background: var(--a-bg); color: var(--a); border: 1px solid var(--a); }
.grade.B { background: var(--b-bg); color: var(--b); border: 1px solid var(--b); }
.grade.F { background: var(--f-bg); color: var(--f); border: 1px solid var(--f); }
.grade.none { background: var(--panel-2); color: var(--faint); border: 1px solid var(--line-2); }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 12px;
  border: 1px solid var(--line-2); color: var(--muted); white-space: nowrap; }
.chip.A { color: var(--a); border-color: rgba(34,197,94,.5); background: var(--a-bg); }
.chip.B { color: var(--b); border-color: rgba(234,179,8,.5); background: var(--b-bg); }
.chip.F { color: var(--f); border-color: rgba(239,68,68,.5); background: var(--f-bg); }
.chip.note { color: #93c5fd; border-color: rgba(59,130,246,.6); background: var(--note-bg); }
.chip.ok { color: var(--a); } .chip.warn { color: var(--b); } .chip.bad { color: var(--f); }

.result { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 18px; background: var(--panel); overflow: hidden; }
.result.gA { border-left: 4px solid var(--a); }
.result.gB { border-left: 4px solid var(--b); }
.result.gF { border-left: 4px solid var(--f); }
.result.flag { box-shadow: inset 0 0 0 1px rgba(59,130,246,.35); }
.result-head { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.result-head .meta { flex: 1; min-width: 200px; }
.result-head .meta .t { font-weight: 600; font-size: 15px; }
.result-body { padding: 16px 18px; }
.score { font-family: var(--mono); color: var(--muted); }
.meter { width: 120px; height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--brand-2); }

.box { border-radius: 8px; padding: 10px 14px; margin-bottom: 10px; border: 1px solid; }
.box ul { margin: 4px 0 0; padding-left: 18px; }
.box.bad { background: var(--f-bg); border-color: rgba(239,68,68,.35); }
.box.warn { background: var(--b-bg); border-color: rgba(234,179,8,.35); }
.box.note { background: var(--note-bg); border-color: rgba(59,130,246,.4); }
.box.ok { background: var(--a-bg); border-color: rgba(34,197,94,.35); }
.box.plain { background: var(--bg-2); border-color: var(--line); }
.box h4 { margin: 0 0 2px; font-size: 13px; }

details.check { border: 1px solid var(--line); border-radius: 8px; margin-bottom: 8px; background: var(--bg-2); }
details.check > summary { list-style: none; cursor: pointer; padding: 10px 14px; display: flex; align-items: center; gap: 10px; }
details.check > summary::-webkit-details-marker { display: none; }
details.check > summary::before { content: "▸"; color: var(--faint); transition: transform .15s; }
details.check[open] > summary::before { transform: rotate(90deg); }
details.check > summary .title { font-weight: 600; min-width: 220px; }
details.check > summary .sum { color: var(--muted); flex: 1; font-size: 13px; }
.check-body { padding: 4px 14px 14px 34px; }
.status { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; padding: 2px 8px; border-radius: 4px; }
.status.verified { color: var(--a); background: var(--a-bg); }
.status.partial { color: var(--b); background: var(--b-bg); }
.status.missing, .status.conflict { color: var(--f); background: var(--f-bg); }
.status.na, .status.info { color: var(--muted); background: var(--panel-2); }

.doc-item { border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin: 10px 0; background: var(--panel); }
.doc-item .cap { font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.doc-figs { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 10px; margin-top: 8px; }
.doc-figs figure { margin: 0; background: #fff; border-radius: 6px; padding: 6px; }
.doc-figs img { width: 100%; height: auto; display: block; cursor: zoom-in; }
.doc-figs figcaption { color: #333; font-size: 11px; padding: 4px 2px 0; }
table.spec { border-collapse: collapse; width: 100%; font-size: 12px; margin-top: 6px; }
table.spec th, table.spec td { border: 1px solid var(--line-2); padding: 4px 7px; text-align: left; vertical-align: top; }
table.spec tr:first-child td, table.spec th { background: var(--panel-2); font-weight: 600; }
table.spec tr.hl td { background: rgba(79,163,255,.14); }
.table-wrap { overflow-x: auto; max-height: 420px; overflow-y: auto; }
.excerpt { font-family: var(--mono); font-size: 11.5px; white-space: pre-wrap; color: var(--muted); background: var(--bg); padding: 8px; border-radius: 6px; }
.sources { font-size: 12px; margin-top: 8px; }
.sources a { word-break: break-all; }
.kv { display: grid; grid-template-columns: 170px 1fr; gap: 4px 12px; font-size: 13px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }

table.list { width: 100%; border-collapse: collapse; font-size: 13px; }
table.list th { text-align: left; color: var(--muted); font-weight: 500; font-size: 12px; padding: 6px 8px; border-bottom: 1px solid var(--line); }
table.list td { padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list tr.click { cursor: pointer; }
table.list tr.click:hover td { background: var(--panel-2); }
.kind { font-family: var(--mono); font-size: 11px; color: var(--brand-2); }
.kind.unknown { color: var(--f); }

.correct { border-top: 1px dashed var(--line-2); margin-top: 14px; padding-top: 14px; }
.lookup { background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 8px; padding: 12px; margin: 8px 0; }

.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.toast { position: fixed; bottom: 24px; right: 24px; background: var(--panel-2); border: 1px solid var(--line-2); padding: 12px 16px;
  border-radius: 8px; z-index: 100; box-shadow: 0 10px 30px rgba(0,0,0,.4); max-width: 360px; }
.toast.err { border-color: var(--f); }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; background: rgba(3,7,15,.7); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal-card { background: var(--panel); border: 1px solid var(--line-2); border-radius: 12px; padding: 20px; width: min(560px, 100%); }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.88); z-index: 60; display: grid; place-items: center; cursor: zoom-out; padding: 20px; }
.lightbox img { max-width: 100%; max-height: 100%; background: #fff; border-radius: 6px; }

.fab { position: fixed; right: 22px; bottom: 22px; z-index: 30; border-radius: 999px; padding: 11px 18px; box-shadow: 0 8px 24px rgba(0,0,0,.45); }

/* ---------- boot loader ---------- */
.loader { position: fixed; inset: 0; z-index: 70; background: radial-gradient(ellipse at center, #0d1b33 0%, #050a14 75%);
  display: grid; place-items: center; }
.loader-inner { width: min(640px, 92vw); }
.chassis { background: linear-gradient(#2a3446, #1b2230); border: 1px solid #3c4960; border-radius: 6px; padding: 10px 12px;
  box-shadow: 0 20px 50px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.06); display: grid; grid-template-columns: 54px 1fr 54px; gap: 10px; }
.ear { background: #151b26; border-radius: 4px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 6px; }
.pwr { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #3f4f6a; position: relative; }
.pwr.on { border-color: var(--brand-2); box-shadow: 0 0 10px var(--brand-2); animation: pulse 1.8s infinite; }
.ear .bar { width: 22px; height: 3px; background: #2a3446; border-radius: 2px; }
.ear .logo { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #5b6b86; }
.bays { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; }
.bay { height: 74px; background: linear-gradient(#1a212e, #11161f); border: 1px solid #323d52; border-radius: 3px; position: relative; overflow: hidden; }
.bay::before { content: ""; position: absolute; left: 3px; right: 3px; top: 8px; bottom: 16px;
  background: repeating-linear-gradient(0deg, #232c3c 0 2px, #161c27 2px 5px); border-radius: 2px; }
.bay .led { position: absolute; bottom: 5px; width: 5px; height: 5px; border-radius: 50%; background: #233; }
.bay .led.a { left: 6px; } .bay .led.b { right: 6px; }
.bay.on .led.a { background: #34d399; box-shadow: 0 0 6px #34d399; }
.bay.on .led.b { animation: blink .35s steps(2) infinite; }
@keyframes blink { 0% { background: #233; } 50% { background: #60a5fa; box-shadow: 0 0 6px #60a5fa; } }
@keyframes pulse { 50% { box-shadow: 0 0 2px var(--brand-2); } }
.console { margin-top: 18px; font-family: var(--mono); font-size: 12.5px; color: #9fe6b5; background: #03070d; border: 1px solid #1c2638;
  border-radius: 6px; padding: 12px 14px; height: 170px; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; }
.console div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.console .cur::after { content: "▌"; animation: blink2 1s steps(2) infinite; }
@keyframes blink2 { 50% { opacity: 0; } }
.loader .lbl { text-align: center; color: var(--muted); margin-top: 12px; font-size: 13px; }
.progressbar { height: 3px; background: #121a2a; border-radius: 2px; margin-top: 12px; overflow: hidden; }
.progressbar i { display: block; height: 100%; width: 0; background: var(--brand-2); transition: width .5s; }
@media (prefers-reduced-motion: reduce) { .bay.on .led.b, .pwr.on, .console .cur::after { animation: none; } }

/* ---------- login ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-card { width: min(400px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 28px; }
.login-card .brand { margin-bottom: 18px; }

@media print {
  .topbar, .tabs, .fab, .correct, .toolbar, .no-print { display: none !important; }
  body { background: #fff; color: #000; }
  .result, .panel, details.check { border-color: #999; background: #fff; }
  details.check > .check-body { display: block !important; }
}

.mt0 { margin-top: 0; }
.wide { width: 100%; justify-content: center; }
.mt12 { margin-top: 12px; }
.w320 { width: 320px; max-width: 100%; }
.pre { white-space: pre-wrap; }
a.chip { text-decoration: none; }

.dropzone { border: 2px dashed var(--line-2); border-radius: var(--radius); padding: 28px 16px; text-align: center; cursor: pointer; background: var(--bg-2); transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone:focus { border-color: var(--brand-2); outline: none; }
.dropzone.over { border-color: var(--brand-2); background: rgba(79,163,255,.08); }
.dropzone.disabled { opacity: .5; cursor: not-allowed; }
.dz-big { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
td.ok, .small.ok { color: var(--a); } td.bad, .small.bad { color: #fca5a5; }
.mb8 { margin-bottom: 8px; }

/* v2 order view */
.spec { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin-bottom: 10px; background: var(--bg-2); }
.spec-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.spec-head h4 { margin: 0; font-size: 14px; }
.spec-result { margin: 4px 0 8px; padding-left: 18px; }
.spec-result li { margin: 2px 0; }
.spec-conflict { border-color: rgba(239,68,68,.55); }
.spec-review { border-color: rgba(234,179,8,.45); }
.status.ok { color: var(--a); background: var(--a-bg); }
.status.review { color: var(--b); background: var(--b-bg); }
.proof { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.proof figure { margin: 0; width: 210px; }
.proof img { width: 210px; height: 150px; object-fit: cover; object-position: top; background: #fff; border-radius: 6px; cursor: zoom-in; border: 1px solid var(--line-2); display: block; }
.proof figcaption { font-size: 11px; color: var(--muted); margin-top: 4px; line-height: 1.35; }
.option { border-top: 1px dashed var(--line-2); padding: 8px 0; }
.option:first-of-type { border-top: 0; }
.option-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 2px; }
.option-body { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-start; }
.option-body details { flex: 1; min-width: 280px; }
.refs { margin-top: 6px; color: var(--muted); }
.ok { color: var(--a); } .warn { color: var(--b); } .bad { color: #fca5a5; }
ul.alerts { margin: 4px 0 0; padding-left: 18px; } ul.alerts li { margin: 4px 0; }
details.mini { margin-top: 8px; } details.mini > summary { cursor: pointer; color: var(--brand-2); font-size: 13px; }
details.inline { display: inline-block; } details.inline > summary { display: inline; cursor: pointer; color: var(--brand-2); }
.footer-actions { display: flex; gap: 24px; flex-wrap: wrap; border-top: 1px solid var(--line); margin-top: 10px; padding-top: 4px; }
.footer-actions > details { flex: 1; min-width: 280px; }
.tdp-actions { margin-top: 6px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.w90 { width: 90px; } .nowrap { white-space: nowrap; }
.reminders { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0; }
.conf { min-width: 120px; }
.lib-item { display: flex; gap: 6px; align-items: center; font-size: 12px; }
.x-btn { background: none; border: 0; color: var(--faint); cursor: pointer; font-size: 14px; padding: 0 2px; }
.x-btn:hover { color: #fca5a5; }
.cpu-row .hint span { display: inline-block; margin-right: 6px; }

table.spec.riser td { min-width: 150px; }
table.spec.riser tr.hl td { background: rgba(59,130,246,.12); }
.pick b { color: var(--text); }
.rule-box { background: var(--panel); border: 1px dashed var(--line-2); border-radius: 8px; padding: 8px 12px; margin-top: 8px; }
.riser-configs { margin-top: 6px; }
