/* styles.css — виртуальная лаборатория строительного эксперта. */

:root {
  --bg: #0e1626;
  --panel: #16213a;
  --panel-2: #1c2b48;
  --ink: #e8eefb;
  --muted: #9db0d0;
  --line: #2b3d63;
  --accent: #3b6fe0;
  --accent-2: #7c3aed;
  --ok: #16a34a;
  --warn: #d97706;
  --bad: #dc2626;
  --chrome: #1b2b4a;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", Roboto, system-ui, -apple-system, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
}

/* ---------- шапка ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 10px 18px;
  background: linear-gradient(180deg, #1b2b4a 0%, var(--chrome) 100%);
  color: #e6edf7;
  border-bottom: 1px solid #2c3e63;
}
.topbar-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.back {
  color: #cfe0ff; text-decoration: none; border: 1px solid #3b5180; border-radius: 8px;
  padding: 6px 12px; font-size: 13px; white-space: nowrap;
}
.back:hover { background: #24365c; }
.brand { display: flex; align-items: center; gap: 8px; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-ico { font-size: 19px; }
.zone-chip {
  font-size: 11.5px; color: #a9c2ea; border: 1px solid #33487a;
  border-radius: 999px; padding: 4px 12px; max-width: 460px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.auth-box { font-size: 13px; color: #c9d8f0; display: flex; align-items: center; gap: 8px; }
.auth-box a { color: #9dc0ff; }

/* ---------- переходы между шагами ---------- */
.secnav {
  position: sticky; top: 49px; z-index: 30;
  display: flex; gap: 6px; flex-wrap: wrap;
  padding: 8px 18px; background: #16233c; border-bottom: 1px solid #2c3e63;
}
.secnav button {
  border: 1px solid #33487a; background: #1d2d4c; color: #cfe0ff;
  border-radius: 8px; padding: 6px 12px; font-size: 12.5px; cursor: pointer; font-family: inherit;
}
.secnav button:hover { background: #27406c; }
.secnav button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.secnav button:disabled { opacity: .4; cursor: not-allowed; }

.banner {
  margin: 0; padding: 10px 18px; background: #7c2d12; color: #ffedd5;
  border-bottom: 1px solid #9a3412; font-size: 13.5px;
}

/* ---------- каркас ---------- */
.work { padding: 20px; max-width: 1460px; margin: 0 auto; }
.panel {
  background: var(--panel); border-radius: 14px; padding: 22px;
  box-shadow: 0 10px 30px rgba(3, 9, 24, .45);
}
.page-title { margin: 0 0 8px; font-size: 23px; font-weight: 700; }
.lead { margin: 0 0 16px; color: var(--muted); max-width: 1000px; }

/* ---------- карточки исследований ---------- */
.exp-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  margin-top: 18px;
}
.exp-card {
  border: 1px solid var(--line); border-radius: 12px; padding: 16px;
  background: #182742; cursor: pointer; text-align: left; color: inherit;
  font-family: inherit; font-size: 14px; display: flex; flex-direction: column; gap: 8px;
  transition: border-color .15s, transform .15s, background .15s;
  position: relative;
}
.exp-card--locked { background: #141d31; }
.exp-card--locked .ec-ico, .exp-card--locked .ec-title { opacity: .78; }
.exp-card--locked:hover { border-color: #d97706; background: #182338; }
.ec-lock {
  position: absolute; top: 10px; right: 10px; width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; border-radius: 8px;
  background: rgba(217, 119, 6, .16); border: 1px solid rgba(217, 119, 6, .5);
}
.ec-free {
  position: absolute; top: 10px; right: 10px; width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; color: #86efac; border-radius: 8px;
  background: rgba(22, 163, 74, .16); border: 1px solid rgba(22, 163, 74, .5);
}
.ec-note {
  font-size: 11.5px; color: #fbbf24; border-top: 1px dashed var(--line);
  padding-top: 7px;
}
.exp-card:hover { border-color: var(--accent); background: #1c2e50; transform: translateY(-2px); }
.exp-card:focus-visible { outline: 2px solid #7aa2ff; outline-offset: 2px; }
.exp-card .ec-ico { font-size: 28px; }
.exp-card .ec-title { font-size: 16.5px; font-weight: 700; }
.exp-card .ec-sum { color: var(--muted); font-size: 13px; }
.exp-card .ec-std { font-size: 11.5px; color: #8ea6cc; border-top: 1px dashed var(--line); padding-top: 7px; margin-top: auto; }

/* ---------- шапка исследования ---------- */
.exp-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 16px; }
.exp-ico {
  font-size: 34px; width: 60px; height: 60px; flex: 0 0 60px;
  display: flex; align-items: center; justify-content: center;
  background: #1d2e4f; border: 1px solid var(--line); border-radius: 14px;
}

/* ---------- теория ---------- */
.theory { max-width: 940px; }
.theory h3 { margin: 20px 0 8px; font-size: 16.5px; color: #bcd3ff; }
.theory p { margin: 0 0 10px; }
.theory ul { margin: 0 0 12px; padding-left: 22px; }
.theory li { margin-bottom: 5px; }
.theory .formula {
  background: #101c33; border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: 8px; padding: 11px 14px; margin: 12px 0;
  font-family: "Cambria Math", Georgia, "Times New Roman", serif; font-size: 15px;
}
.theory .formula small { display: block; margin-top: 6px; color: var(--muted); font-family: inherit; font-size: 12.5px; }
.theory .note { margin: 12px 0; }

.std-box {
  margin: 20px 0; padding: 14px 16px; border: 1px solid var(--line);
  border-radius: 10px; background: #142038;
}
.std-title { font-weight: 700; color: #bcd3ff; margin-bottom: 6px; }
.std-box ul { margin: 0; padding-left: 20px; font-size: 13.5px; color: var(--muted); }
.std-box li { margin-bottom: 4px; }

/* ---------- врезки ---------- */
.note { border-radius: 10px; padding: 12px 14px; font-size: 13.5px; border: 1px solid var(--line); background: #142038; }
.note-info { border-left: 3px solid var(--accent); }
.note-warn { border-left: 3px solid var(--warn); background: #241a0c; border-color: #5a4415; }
.note-bad { border-left: 3px solid var(--bad); background: #2a1315; border-color: #6b2226; }
.note-ok { border-left: 3px solid var(--ok); background: #0f2418; border-color: #1d5237; }
.note small, .note.small { font-size: 12.5px; }

/* ---------- стенд ---------- */
.stand-grid { display: grid; grid-template-columns: 340px 1fr; gap: 18px; align-items: start; }
@media (max-width: 980px) { .stand-grid { grid-template-columns: 1fr; } }
.stand-side { display: flex; flex-direction: column; gap: 12px; }
.side-block { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: #142038; }
.side-title { font-weight: 700; font-size: 13.5px; color: #bcd3ff; margin-bottom: 10px; }
.eq-list { margin: 0; padding-left: 18px; font-size: 12.5px; color: var(--muted); }
.eq-list li { margin-bottom: 5px; }

.fld { display: block; margin-bottom: 13px; }
.fld > span { display: block; font-size: 12.5px; color: #b8c9e6; margin-bottom: 5px; }
.fld select, .fld input[type="text"], .fld textarea {
  width: 100%; background: #0e1a30; color: var(--ink);
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px;
  font-family: inherit; font-size: 13.5px;
}
.fld select:focus, .fld input:focus, .fld textarea:focus { outline: none; border-color: var(--accent); }
.fld textarea { resize: vertical; }
.fld .rng-row { display: flex; align-items: center; gap: 10px; }
.fld input[type="range"] { flex: 1; accent-color: var(--accent); }
.fld .rng-val {
  min-width: 92px; text-align: right; font-variant-numeric: tabular-nums;
  font-size: 13px; color: #cfe0ff; background: #0e1a30;
  border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px;
}
.fld .hint { display: block; font-size: 11.5px; color: #8ea6cc; margin-top: 4px; }

.btn {
  border: 1px solid var(--line); background: #1d2d4c; color: #cfe0ff;
  border-radius: 9px; padding: 9px 14px; font-size: 13.5px; cursor: pointer;
  font-family: inherit; text-decoration: none; display: inline-block;
}
.btn:hover { background: #27406c; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: #2f5ec6; }
.btn-ghost { background: transparent; }
.btn-run { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.row-btns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.row-btns.center { justify-content: center; }
.stand-hint { font-size: 12px; color: #8ea6cc; }

/* ---------- результаты ---------- */
.stand-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty-ico { font-size: 46px; margin-bottom: 10px; }
.empty h3 { margin: 0 0 8px; color: var(--ink); }
.empty p { max-width: 620px; margin: 0 auto; font-size: 13.5px; }
.small-empty { padding: 30px 16px; }

.verdict { border-radius: 12px; padding: 15px 17px; border: 1px solid var(--line); }
.verdict h3 { margin: 0 0 6px; font-size: 17px; }
.verdict p { margin: 0; font-size: 14px; }
.verdict.ok { border-color: #1d5237; background: #0f2418; }
.verdict.ok h3 { color: #6ee7a0; }
.verdict.warn { border-color: #5a4415; background: #241a0c; }
.verdict.warn h3 { color: #fcd34d; }
.verdict.fail { border-color: #6b2226; background: #2a1315; }
.verdict.fail h3 { color: #fca5a5; }

.res-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.res-table th, .res-table td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.res-table th { background: #1b2c4c; color: #bcd3ff; font-weight: 600; font-size: 12.5px; }
.res-table td.val { font-variant-numeric: tabular-nums; white-space: nowrap; }
.res-table tr.bad td.val { color: #fca5a5; font-weight: 600; }
.res-table tr.good td.val { color: #86efac; }

.block { border: 1px solid var(--line); border-radius: 12px; padding: 15px 17px; background: #142038; }
.block-title { font-weight: 700; font-size: 14px; color: #bcd3ff; margin-bottom: 10px; }

.chart-box { margin-bottom: 16px; }
.chart-box:last-child { margin-bottom: 0; }
.chart-title { font-size: 13px; color: #cfe0ff; margin-bottom: 4px; }
.chart-note { font-size: 12px; color: #8ea6cc; margin-top: 4px; }
canvas.chart { width: 100%; height: 260px; display: block; background: #101c33; border: 1px solid var(--line); border-radius: 8px; }

.err-list { display: flex; flex-direction: column; gap: 10px; }
.err-item { border-radius: 10px; padding: 11px 13px; border: 1px solid var(--line); }
.err-item .et { font-weight: 700; font-size: 13.5px; margin-bottom: 4px; }
.err-item .ex { font-size: 13px; color: #c6d4ea; }
.err-item .ef { font-size: 12.5px; color: #9dc0ff; margin-top: 5px; }
.err-item.critical { border-left: 3px solid var(--bad); background: #241419; }
.err-item.warn { border-left: 3px solid var(--warn); background: #241c0d; }
.err-item.info { border-left: 3px solid var(--accent); background: #131f38; }

.steps { counter-reset: st; margin: 0; padding-left: 0; list-style: none; }
.steps li { counter-increment: st; position: relative; padding-left: 34px; margin-bottom: 9px; font-size: 13.5px; }
.steps li::before {
  content: counter(st); position: absolute; left: 0; top: 1px;
  width: 23px; height: 23px; border-radius: 50%; background: #24365c; color: #cfe0ff;
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700;
}

/* ---------- протокол ---------- */
.proto-grid { display: grid; grid-template-columns: 380px 1fr; gap: 18px; align-items: start; }
@media (max-width: 1020px) { .proto-grid { grid-template-columns: 1fr; } }
.proto-form {
  border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: #142038;
  position: sticky; top: 108px;
}
.proto-doc {
  border: 1px solid var(--line); border-radius: 12px; padding: 26px 30px;
  background: #ffffff; color: #111; font-family: "Times New Roman", Georgia, serif;
  font-size: 14px; line-height: 1.6; overflow-wrap: anywhere;
}
.proto-doc h1 { font-size: 19px; text-align: center; margin: 0 0 4px; }
.proto-doc h2 { font-size: 15px; margin: 20px 0 8px; }
.proto-doc .p-sub { text-align: center; margin: 0 0 18px; font-weight: 700; }
.proto-doc p { margin: 0 0 8px; text-align: justify; text-indent: 1.2cm; }
.proto-doc p.no-ind { text-indent: 0; }
.proto-doc ul, .proto-doc ol { margin: 0 0 10px; padding-left: 24px; }
.proto-doc table { width: 100%; border-collapse: collapse; margin: 8px 0 14px; font-size: 12.5px; }
.proto-doc th, .proto-doc td { border: 1px solid #333; padding: 5px 7px; text-align: left; vertical-align: top; }
.proto-doc th { background: #eef1f6; }
.proto-doc .kv { margin: 0 0 6px; text-indent: 0; }
.proto-doc .kv b { display: inline-block; min-width: 250px; }
.proto-doc .disclaimer { font-size: 11.5px; color: #555; border-top: 1px solid #999; padding-top: 8px; margin-top: 18px; text-indent: 0; }
.proto-doc .sign { margin-top: 22px; text-indent: 0; }
.proto-doc .chart-cap { font-size: 12.5px; margin: 6px 0 10px; }

/* ---------- модалка ---------- */
.modal {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(4, 10, 22, .72);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal[hidden] { display: none; }
.modal-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 24px; max-width: 520px; width: 100%; text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}
.modal-ico { font-size: 40px; margin-bottom: 8px; }
.modal-card h3 { margin: 0 0 10px; }
.modal-card p { color: var(--muted); font-size: 13.5px; }
.lic-prices { display: flex; gap: 10px; justify-content: center; margin: 16px 0; flex-wrap: wrap; }
.lic-price { border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; background: #142038; }
.lic-price b { display: block; font-size: 19px; }
.lic-price span { font-size: 12px; color: var(--muted); }
.lic-price--best { border-color: #3b6fe0; background: #16264a; }
.lic-price--best em { display: block; font-size: 11px; font-style: normal; color: #93c5fd; margin: 3px 0 6px; }
.lic-buy { width: 100%; margin-top: 9px; padding: 7px 10px; font-size: 13px; }
.lic-need { display: block; margin-top: 9px; font-size: 11.5px; color: #fbbf24; }
.lic-free {
  text-align: left; margin: 14px auto 0; max-width: 420px;
  border: 1px solid rgba(22, 163, 74, .35); border-radius: 10px;
  background: rgba(22, 163, 74, .08); padding: 11px 14px;
}
.lic-free b { font-size: 12.5px; color: #86efac; }
.lic-free ul { margin: 6px 0 0; padding-left: 18px; }
.lic-free li { font-size: 12.5px; color: var(--muted); }
.lic-mail { margin: 14px 0 0; text-align: left; }
.lic-note { font-size: 12px; color: var(--muted); margin: 10px 0 0; }
.lic-note.err { color: #fca5a5; }
.btn-lic {
  white-space: nowrap; display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px; font-size: 13px;
}
.btn-lic--need { border-color: rgba(217, 119, 6, .55); color: #fcd34d; }
.btn-lic--need:hover { background: rgba(217, 119, 6, .18); }
.btn-lic--ok { border-color: rgba(22, 163, 74, .5); color: #86efac; }
.btn-lic--ok:hover { background: rgba(22, 163, 74, .16); }
.btn-sm { padding: 5px 10px; font-size: 12px; }

/* ---------- аудиопрезентация ---------- */
.btn-pres {
  background: linear-gradient(180deg, #3b6fe0, #2c56b5);
  border-color: #4b7df0; color: #fff; padding: 7px 13px; font-size: 13px;
  white-space: nowrap; display: inline-flex; align-items: center; gap: 6px;
}
.btn-pres:hover { background: linear-gradient(180deg, #4b7df0, #3363c6); }
.btn-pres-lg {
  background: linear-gradient(180deg, #3b6fe0, #2c56b5);
  border-color: #4b7df0; color: #fff; padding: 10px 16px; font-size: 14px;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-pres-lg:hover { background: linear-gradient(180deg, #4b7df0, #3363c6); }

.pres-overlay {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(6, 12, 24, .93);
  display: flex; align-items: center; justify-content: center; padding: 18px;
}
.pres-overlay[hidden] { display: none; }
.pres-inner {
  width: 100%; max-width: 1180px; max-height: 100%;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .55);
}
.pres-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
  padding: 14px 18px; border-bottom: 1px solid var(--line); background: var(--panel-2);
}
.pres-title { font-size: 17px; font-weight: 700; }
.pres-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.pres-body {
  display: grid; grid-template-columns: 1fr 268px; gap: 16px;
  padding: 18px; overflow: auto; min-height: 0; flex: 1;
}
.pres-slide {
  background: #142038; border: 1px solid var(--line); border-radius: 12px;
  padding: 18px 20px; min-width: 0;
}
.pres-slide-no { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.pres-h { margin: 0 0 12px; font-size: 20px; }
.pres-bul { margin: 0; padding-left: 20px; }
.pres-bul li { margin-bottom: 7px; font-size: 14.5px; }
.pres-text {
  margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line);
  font-size: 13.5px; color: #c6d6f2; line-height: 1.6; white-space: pre-wrap;
}
.pres-fig { margin-top: 16px; }
.pres-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.pres-step {
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #17253f;
}
.pres-step b { display: block; font-size: 13px; margin-bottom: 4px; color: #9dc0ff; }
.pres-step span { font-size: 12.5px; color: var(--muted); }
.pres-studies { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.pres-study {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: #17253f;
  font-size: 12.5px;
}
.pres-study i { font-style: normal; font-size: 15px; }
.pres-study em { font-style: normal; color: var(--muted); font-size: 11.5px; }
.pres-side { min-width: 0; }
.pres-side-title { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.pres-list { list-style: none; margin: 0; padding: 0; }
.pres-list li {
  display: flex; gap: 8px; align-items: flex-start; cursor: pointer;
  padding: 7px 9px; border-radius: 8px; font-size: 12.5px; color: #c6d6f2;
  border: 1px solid transparent;
}
.pres-list li:hover { background: #1d2d4c; }
.pres-list li.on { background: #27406c; border-color: #3b6fe0; color: #fff; }
.pres-n {
  flex: 0 0 22px; text-align: center; border-radius: 6px; background: #22334f;
  font-size: 11.5px; color: #9dc0ff; padding: 1px 0;
}
.pres-list li.on .pres-n { background: var(--accent); color: #fff; }
.pres-player {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 18px; border-top: 1px solid var(--line); background: var(--panel-2);
}
.pres-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; padding: 0; border-radius: 10px;
}
.pres-btn-main { width: 44px; height: 44px; background: var(--accent); border-color: var(--accent); color: #fff; }
.pres-track {
  flex: 1 1 220px; min-width: 140px; height: 8px; border-radius: 999px;
  background: #22334f; overflow: hidden; cursor: pointer;
}
.pres-track i { display: block; height: 100%; width: 0; background: var(--accent); }
.pres-time { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.pres-toggle { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.pres-toggle input { accent-color: var(--accent); }

/* ---------- печать ---------- */
@media print {
  .topbar, .secnav, .banner, .proto-form, .btn, .modal, .pres-overlay { display: none !important; }
  body, html { background: #fff !important; color: #000 !important; }
  .work { padding: 0; max-width: none; }
  .panel { background: #fff; box-shadow: none; padding: 0; }
  .proto-doc { border: 0; padding: 0; background: #fff; }
  #view-list, #view-theory, #view-stand { display: none !important; }
}

@media (max-width: 720px) {
  .zone-chip { display: none; }
  .proto-doc { padding: 16px; }
  .pres-body { grid-template-columns: 1fr; }
  .pres-steps, .pres-studies { grid-template-columns: 1fr; }
}

/* ---------- демо-пример ---------- */
.btn-demo-labs {
  background: linear-gradient(180deg, #0f8b83, #0b6d66);
  border-color: #17a39a; color: #fff; padding: 7px 13px; font-size: 13px;
  white-space: nowrap; display: inline-flex; align-items: center; gap: 6px;
}
.btn-demo-labs:hover { background: linear-gradient(180deg, #14a49a, #0d7d75); }
.btn-demo-labs-lg {
  background: linear-gradient(180deg, #0f8b83, #0b6d66);
  border-color: #17a39a; color: #fff; padding: 9px 16px; font-size: 13.5px;
  display: inline-flex; align-items: center; gap: 7px;
}
.btn-demo-labs-lg:hover { background: linear-gradient(180deg, #14a49a, #0d7d75); }

body.demo-open { padding-right: 430px; }
.demo-panel[hidden] { display: none; }
.demo-panel {
  position: fixed; top: 0; right: 0; bottom: 0; width: 430px; z-index: 60;
  background: var(--panel); border-left: 1px solid var(--line);
  box-shadow: -12px 0 34px rgba(0, 0, 0, .45);
  display: flex; flex-direction: column; color: var(--ink);
}
.demo-head {
  display: flex; gap: 12px; align-items: flex-start; justify-content: space-between;
  padding: 16px 18px 12px; border-bottom: 1px solid var(--line); background: var(--panel-2);
}
.demo-title { font-size: 15px; font-weight: 700; color: #fff; }
.demo-sub { font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.4; }
.demo-x {
  border: 1px solid #3b5180; background: transparent; border-radius: 8px;
  width: 28px; height: 28px; cursor: pointer; color: var(--muted); font-size: 13px;
}
.demo-x:hover { background: #24365c; color: #fff; }
.demo-progress {
  display: flex; align-items: center; gap: 10px; padding: 10px 18px;
  font-size: 12.5px; color: var(--muted); border-bottom: 1px solid var(--line);
}
.demo-progress i { flex: 1; height: 6px; border-radius: 999px; background: #22345a; overflow: hidden; }
.demo-progress i b { display: block; height: 100%; width: 0; background: #14b8a6; transition: width .25s ease; }
.demo-steps { display: flex; flex-wrap: wrap; gap: 5px; padding: 10px 18px; border-bottom: 1px solid var(--line); }
.demo-step {
  width: 22px; height: 22px; border-radius: 6px; font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  background: #22345a; color: #9db0d0;
}
.demo-step.done { background: #0f766e; color: #d7f5f1; }
.demo-step.on { background: #14b8a6; color: #06231f; }
.demo-body { flex: 1; overflow: auto; padding: 14px 18px 18px; }
.demo-h { font-size: 16px; font-weight: 700; color: #fff; margin-bottom: 12px; }
.demo-block { margin-bottom: 14px; }
.demo-block h4 {
  font-size: 11px; text-transform: uppercase; letter-spacing: .07em;
  color: #8ea6cc; margin-bottom: 5px;
}
.demo-block p { font-size: 13.5px; line-height: 1.55; color: #dbe6fb; }
.demo-block.demo-err {
  background: rgba(217, 119, 6, .14); border: 1px solid rgba(217, 119, 6, .5);
  border-radius: 10px; padding: 10px 12px;
}
.demo-block.demo-err h4 { color: #fbbf24; }
.demo-block.demo-ok {
  background: rgba(22, 163, 74, .14); border: 1px solid rgba(22, 163, 74, .45);
  border-radius: 10px; padding: 10px 12px;
}
.demo-block.demo-ok h4 { color: #4ade80; }
.demo-events { margin: 0; padding-left: 18px; }
.demo-events li { font-size: 13px; line-height: 1.5; color: #dbe6fb; margin: 3px 0; }
.demo-events li.muted { color: var(--muted); }
.demo-foot {
  display: flex; gap: 10px; justify-content: space-between;
  padding: 12px 18px; border-top: 1px solid var(--line); background: var(--panel-2);
}
@media (max-width: 1100px) {
  body.demo-open { padding-right: 0; }
  .demo-panel { width: 100%; top: auto; height: 62vh; border-left: 0; border-top: 1px solid var(--line); }
}
