/* ==========================================================================
   MH FormX — site styles (industrial dark)
   ========================================================================== */
:root {
  --bg: #0F1115;
  --bg-2: #151920;
  --panel: #1C212A;
  --panel-2: #2A2E36;
  --line: #2F343D;
  --line-2: #3C424C;
  --text: #E5E7EB;
  --muted: #9BA3AE;
  --dim: #6c7680;
  --accent: #00A3FF;
  --accent-2: #4DC0FF;
  --accent-ink: #031A26;
  --steel: #7FA8C9;
  --ok: #3ecf8e;
  --warn: #f5b83d;
  --err: #FF5A5A;
  --info: #5aa9ff;
  --radius: 6px;
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, .65);
  --f-head: 'Barlow Condensed', 'Arial Narrow', system-ui, sans-serif;
  --f-body: 'Barlow', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --w: 1240px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); font: 400 17px/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden;
}
img, svg, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent-2); }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { font-family: var(--f-head); font-weight: 700; line-height: 1.05; margin: 0 0 .5em; letter-spacing: .01em; }
h1 { font-size: clamp(2.6rem, 6vw, 5rem); text-transform: uppercase; }
h2 { font-size: clamp(2rem, 4vw, 3.1rem); text-transform: uppercase; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.15rem; }
::selection { background: var(--accent); color: #000; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mono { font-family: var(--f-mono); }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.accent { color: var(--accent); }
.small { font-size: .88rem; }
.center { text-align: center; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.container { width: min(var(--w), 100% - 40px); margin-inline: auto; }
.section { padding: clamp(64px, 9vw, 120px) 0; position: relative; }
.section-tight { padding: 56px 0; }
.section-alt { background: var(--bg-2); border-block: 1px solid var(--line); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; font: 600 .78rem/1 var(--f-mono);
  letter-spacing: .18em; text-transform: uppercase; color: var(--accent); margin-bottom: 18px;
}
.eyebrow::before { content: ''; width: 28px; height: 2px; background: var(--accent); }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 62ch; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 48px; flex-wrap: wrap; }
.section-head p { margin: 0; max-width: 56ch; color: var(--muted); }

/* blueprint grid backdrop */
.grid-bg {
  background-image:
    linear-gradient(rgba(127, 168, 201, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(127, 168, 201, .06) 1px, transparent 1px),
    linear-gradient(rgba(127, 168, 201, .03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(127, 168, 201, .03) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
}

/* ---------- buttons ---------- */
.btn {
  --b: var(--line-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 22px; border-radius: var(--radius);
  font: 600 .95rem/1 var(--f-body); letter-spacing: .03em; border: 1px solid var(--b); background: transparent; color: var(--text);
  cursor: pointer; transition: .18s ease; white-space: nowrap; text-transform: uppercase;
}
.btn:hover { border-color: var(--text); color: var(--text); }
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); color: var(--accent-ink); transform: translateY(-1px); }
.btn-dark { background: var(--panel-2); }
.btn-sm { padding: 9px 14px; font-size: .8rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.btn-link { background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit; padding: 0; }
.btn-danger { border-color: rgba(255, 90, 90, .5); color: var(--err); }

/* ---------- header ---------- */
.topbar { background: #08090a; border-bottom: 1px solid var(--line); font-size: .82rem; color: var(--muted); }
.topbar .container { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; }
.topbar a { color: var(--muted); }
.topbar a:hover { color: var(--text); }
.topbar .tb-right { display: flex; gap: 22px; }
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(13, 15, 17, .86); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; gap: 28px; height: 74px; }
.brand { display: flex; align-items: center; gap: 12px; font: 700 1.5rem/1 var(--f-head); letter-spacing: .06em; }
.brand svg.brand-logo { width: auto; height: 34px; }
.brand svg { width: 56px; height: 38px; }
.brand b { color: var(--accent); font-weight: 700; }
.brand small { display: block; font: 500 .6rem/1 var(--f-mono); letter-spacing: .2em; color: var(--dim); margin-top: 4px; }
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a { padding: 10px 14px; font-weight: 500; color: var(--muted); border-radius: var(--radius); font-size: .98rem; }
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--panel); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.cart-btn { position: relative; width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line-2); border-radius: var(--radius); }
.cart-btn svg { width: 20px; height: 20px; }
.cart-count { position: absolute; top: -7px; right: -7px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--accent); color: #000; font: 700 .72rem/20px var(--f-mono); text-align: center; }
.cart-count:empty, .cart-count[data-n="0"] { display: none; }
.burger { display: none; width: 44px; height: 44px; border: 1px solid var(--line-2); background: none; border-radius: var(--radius); color: var(--text); cursor: pointer; }
.user-menu { position: relative; }
.user-menu .menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 6px; box-shadow: var(--shadow); display: none; }
.user-menu.open .menu { display: block; }
.user-menu .menu a, .user-menu .menu button { display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: 4px; background: none; border: 0; color: var(--text); font: inherit; cursor: pointer; }
.user-menu .menu a:hover, .user-menu .menu button:hover { background: var(--panel-2); color: var(--text); }
.user-menu .menu .who { padding: 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; font-size: .85rem; color: var(--muted); }

@media (max-width: 1020px) {
  .nav-links { position: fixed; inset: 74px 0 auto 0; flex-direction: column; background: var(--bg); border-bottom: 1px solid var(--line); padding: 12px 20px 20px; display: none; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 14px; font-size: 1.1rem; }
  .burger { display: grid; place-items: center; }
  .nav-actions { margin-left: auto; }
  .topbar .tb-left { display: none; }
  .nav-actions .hide-sm { display: none; }
}

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero .container { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; min-height: min(78vh, 760px); padding: 70px 0; }
.hero h1 { margin-bottom: 22px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lead { margin-bottom: 34px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-art { position: relative; aspect-ratio: 1 / 1; }
.hero-art svg { width: 100%; height: 100%; }
.hero::after { content: ''; position: absolute; inset: auto 0 0 0; height: 160px; background: linear-gradient(transparent, var(--bg)); pointer-events: none; }
.draw { stroke-dasharray: var(--len, 2000); stroke-dashoffset: var(--len, 2000); animation: draw 2.4s cubic-bezier(.6, .1, .2, 1) forwards; }
.draw.d2 { animation-delay: .5s; } .draw.d3 { animation-delay: 1s; } .draw.d4 { animation-delay: 1.4s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.fade-in { opacity: 0; animation: fade 1s ease forwards; animation-delay: 1.6s; }
@keyframes fade { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .draw, .fade-in { animation: none; stroke-dashoffset: 0; opacity: 1; } }
@media (max-width: 900px) { .hero .container { grid-template-columns: 1fr; min-height: 0; } .hero-art { max-width: 460px; margin: 0 auto; } }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.stat { padding: 26px 28px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat .n { font: 700 2.4rem/1 var(--f-head); color: var(--text); }
.stat .n span { color: var(--accent); }
.stat .l { color: var(--muted); font-size: .9rem; margin-top: 6px; }
@media (max-width: 800px) { .stats { grid-template-columns: 1fr 1fr; } .stat:nth-child(2) { border-right: 0; } .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }

/* ---------- cards / grids ---------- */
.grid { display: grid; gap: 22px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1000px) { .g3, .g4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; position: relative; }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--muted); }
.card-link { transition: .2s ease; display: flex; flex-direction: column; }
.card-link:hover { border-color: var(--accent); transform: translateY(-3px); color: var(--text); }
.card-link .go { margin-top: auto; padding-top: 18px; color: var(--accent); font-weight: 600; font-size: .9rem; letter-spacing: .05em; text-transform: uppercase; display: flex; align-items: center; gap: 8px; }
.card .ico { width: 54px; height: 54px; border: 1px solid var(--line-2); border-radius: var(--radius); display: grid; place-items: center; margin-bottom: 20px; color: var(--accent); }
.card .ico svg { width: 30px; height: 30px; }
.card .num { font: 600 .8rem/1 var(--f-mono); color: var(--dim); position: absolute; top: 24px; right: 24px; }

.product-card { padding: 0; overflow: hidden; }
.product-card .pc-art { aspect-ratio: 16 / 10; background: var(--bg-2); border-bottom: 1px solid var(--line); display: grid; place-items: center; padding: 18px; }
.product-card .pc-art svg { width: 100%; height: 100%; }
.product-card .pc-body { padding: 24px 26px 26px; display: flex; flex-direction: column; flex: 1; }
.product-card .pc-cat { font: 600 .72rem/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--steel); margin-bottom: 10px; }
.product-card .pc-meta { display: flex; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 18px; border-top: 1px dashed var(--line-2); font-size: .85rem; color: var(--muted); }

.feature-split { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
@media (max-width: 900px) { .feature-split { grid-template-columns: 1fr; gap: 36px; } }
.check-list { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 12px; }
.check-list li { padding-left: 32px; position: relative; color: var(--muted); }
.check-list li::before { content: ''; position: absolute; left: 0; top: 5px; width: 18px; height: 18px; border: 2px solid var(--accent); border-radius: 3px; background: linear-gradient(135deg, transparent 45%, var(--accent) 45%, var(--accent) 55%, transparent 55%); }
.check-list b { color: var(--text); font-weight: 600; }

.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; counter-reset: s; }
.step { padding: 28px 24px; border-left: 1px solid var(--line); position: relative; }
.step:first-child { border-left: 0; }
.step::before { counter-increment: s; content: '0' counter(s); display: block; font: 700 2.6rem/1 var(--f-head); color: var(--accent); margin-bottom: 14px; }
.step h4 { text-transform: uppercase; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: .95rem; margin: 0; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } .step { border-left: 0; border-top: 1px solid var(--line); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

.cta-band { background: var(--accent); color: var(--accent-ink); border-radius: var(--radius); padding: clamp(36px, 5vw, 60px); display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: center; position: relative; overflow: hidden; }
.cta-band h2 { margin: 0 0 8px; }
.cta-band p { margin: 0; font-size: 1.1rem; opacity: .85; }
.cta-band .btn { background: var(--accent-ink); color: #fff; border-color: var(--accent-ink); }
.cta-band .btn:hover { background: #000; }
.cta-band .btn-outline { background: transparent; color: var(--accent-ink); border-color: var(--accent-ink); }
.cta-band .btn-outline:hover { background: rgba(0, 0, 0, .08); color: var(--accent-ink); }
.cta-band::after { content: ''; position: absolute; right: -80px; top: -80px; width: 300px; height: 300px; border: 40px solid rgba(0, 0, 0, .07); border-radius: 50%; }
@media (max-width: 800px) { .cta-band { grid-template-columns: 1fr; } }

.page-hero { padding: 80px 0 60px; border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
.crumbs { font: 500 .8rem/1 var(--f-mono); color: var(--dim); margin-bottom: 22px; letter-spacing: .06em; }
.crumbs a { color: var(--muted); }

.logos { display: flex; flex-wrap: wrap; gap: 14px; }
.logos span { padding: 12px 18px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--muted); font: 600 .9rem/1 var(--f-head); letter-spacing: .12em; text-transform: uppercase; }

.faq details { border-bottom: 1px solid var(--line); padding: 20px 0; }
.faq summary { cursor: pointer; font: 600 1.2rem/1.3 var(--f-head); list-style: none; display: flex; justify-content: space-between; gap: 20px; }
.faq summary::after { content: '+'; color: var(--accent); font-size: 1.6rem; line-height: 1; }
.faq details[open] summary::after { content: '–'; }
.faq details p { color: var(--muted); margin: 14px 0 0; max-width: 75ch; }

.project-card { padding: 0; overflow: hidden; }
.project-card .pj-art { aspect-ratio: 4 / 3; position: relative; background: var(--bg-2); }
.project-card .pj-art svg { width: 100%; height: 100%; }
.project-card .pj-body { padding: 20px 22px; }
.project-card .tag { position: absolute; left: 14px; top: 14px; background: rgba(0, 0, 0, .7); padding: 6px 10px; border-radius: 3px; font: 600 .7rem/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: #08090a; padding: 70px 0 30px; margin-top: 0; color: var(--muted); font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; }
.site-footer h4 { color: var(--text); text-transform: uppercase; letter-spacing: .08em; font-size: 1rem; margin-bottom: 18px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.site-footer a:hover { color: var(--accent); }
.footer-base { margin-top: 50px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; font-size: .85rem; color: var(--dim); }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- forms ---------- */
.form { display: grid; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 7px; }
.field > label, .label { font: 600 .78rem/1.2 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.field .help { font-size: .82rem; color: var(--dim); }
input, select, textarea {
  width: 100%; padding: 13px 14px; background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--radius);
  color: var(--text); font: 400 1rem/1.3 var(--f-body); transition: border-color .15s;
}
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0, 163, 255, .15); }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%239aa4ae' stroke-width='2'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; accent-color: var(--accent); padding: 0; }
.check { display: flex; gap: 12px; align-items: center; cursor: pointer; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--bg); }
.check:hover { border-color: var(--muted); }
.input-unit { position: relative; }
.input-unit input { padding-right: 52px; font-family: var(--f-mono); }
.input-unit span { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--dim); font: 500 .85rem var(--f-mono); pointer-events: none; }
.hp { position: absolute; left: -9999px; }
.alert { padding: 14px 16px; border-radius: var(--radius); border: 1px solid; font-size: .95rem; }
.alert-err { border-color: rgba(255, 90, 90, .4); background: rgba(255, 90, 90, .08); color: #ffb3b3; }
.alert-ok { border-color: rgba(62, 207, 142, .4); background: rgba(62, 207, 142, .08); color: #a6f0cf; }
.alert-warn { border-color: rgba(245, 184, 61, .4); background: rgba(245, 184, 61, .08); color: #f8d88f; }
.alert-info { border-color: rgba(90, 169, 255, .35); background: rgba(90, 169, 255, .07); color: #b9d9ff; }

.auth-wrap { min-height: calc(100vh - 300px); display: grid; place-items: center; padding: 70px 20px; }
.auth-card { width: min(480px, 100%); }
.auth-card.wide { width: min(760px, 100%); }
.auth-card h1 { font-size: 2.4rem; }

/* ---------- configurator ---------- */
.cfg { display: grid; grid-template-columns: 420px 1fr; gap: 28px; align-items: start; }
.cfg-form { position: relative; }
.cfg-form .card { padding: 24px; }
.cfg-group { display: grid; gap: 16px; }
.cfg-view { position: sticky; top: 96px; display: grid; gap: 20px; }
.cfg-canvas { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); aspect-ratio: 16 / 11; position: relative; overflow: hidden; }
.cfg-canvas svg { width: 100%; height: 100%; }
.cfg-canvas .cv-label { position: absolute; left: 16px; top: 14px; font: 600 .72rem/1 var(--f-mono); color: var(--dim); letter-spacing: .12em; text-transform: uppercase; }
.specs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.specs div { background: var(--panel); padding: 14px 16px; }
.specs .k { font: 500 .7rem/1.2 var(--f-mono); color: var(--dim); text-transform: uppercase; letter-spacing: .08em; }
.specs .v { font: 600 1.15rem/1.3 var(--f-mono); margin-top: 4px; }
.price-box { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; }
.price-box .p { font: 700 2.4rem/1 var(--f-head); }
.price-box .p small { font: 500 .85rem var(--f-body); color: var(--muted); margin-left: 6px; }
.price-box .was { color: var(--dim); text-decoration: line-through; font-size: .95rem; }
.price-box .actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 1000px) { .cfg { grid-template-columns: 1fr; } .cfg-view { position: static; order: -1; } }
@media (max-width: 560px) { .price-box { grid-template-columns: 1fr; } .price-box .actions { justify-content: stretch; } .price-box .actions .btn { flex: 1; } }
.tabs-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 26px; }
.tabs-pills a { padding: 10px 16px; border: 1px solid var(--line-2); border-radius: 40px; color: var(--muted); font-size: .9rem; font-weight: 500; }
.tabs-pills a.active, .tabs-pills a:hover { border-color: var(--accent); color: var(--text); }
.tabs-pills a.active { background: rgba(0, 163, 255, .1); }

/* ---------- cart ---------- */
.cart-grid { display: grid; grid-template-columns: 1fr 400px; gap: 28px; align-items: start; }
@media (max-width: 1000px) { .cart-grid { grid-template-columns: 1fr; } }
.cart-item { display: grid; grid-template-columns: 110px 1fr auto; gap: 20px; padding: 22px; border-bottom: 1px solid var(--line); }
.cart-item:last-child { border-bottom: 0; }
.cart-item .thumb { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); aspect-ratio: 1; display: grid; place-items: center; padding: 8px; }
.cart-item .thumb svg { width: 100%; height: 100%; }
.cart-item .spec-list { font-size: .88rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 6px 0 10px; }
.cart-item .spec-list b { color: var(--text); font-weight: 500; }
.cart-item .ci-price { text-align: right; font: 600 1.2rem var(--f-mono); white-space: nowrap; }
@media (max-width: 640px) { .cart-item { grid-template-columns: 70px 1fr; } .cart-item .ci-price { grid-column: 2; text-align: left; } }
.summary-row { display: flex; justify-content: space-between; padding: 8px 0; color: var(--muted); }
.summary-row b { color: var(--text); font-family: var(--f-mono); font-weight: 500; }
.summary-row.total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 16px; color: var(--text); font-size: 1.2rem; }
.summary-row.total b { font-size: 1.4rem; font-weight: 700; }
.drop { border: 1.5px dashed var(--line-2); border-radius: var(--radius); padding: 22px; text-align: center; color: var(--muted); cursor: pointer; background: var(--bg); }
.drop:hover, .drop.over { border-color: var(--accent); color: var(--text); }
.file-list { display: grid; gap: 6px; margin-top: 10px; font-size: .88rem; }
.file-list div { display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; background: var(--panel-2); border-radius: 4px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; }
.seg label { padding: 12px; text-align: center; cursor: pointer; color: var(--muted); font-weight: 500; }
.seg input { display: none; }
.seg label:has(input:checked) { background: var(--accent); color: var(--accent-ink); }

/* ---------- app (portal/admin) ---------- */
.app { display: grid; grid-template-columns: 250px 1fr; min-height: calc(100vh - 74px); }
.app-side { border-right: 1px solid var(--line); background: var(--bg-2); padding: 26px 16px; position: sticky; top: 74px; height: calc(100vh - 74px); overflow: auto; }
.app-side .co { padding: 0 10px 20px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.app-side .co b { display: block; font: 700 1.2rem/1.2 var(--f-head); }
.app-side nav a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 12px; border-radius: var(--radius); color: var(--muted); font-weight: 500; }
.app-side nav a:hover { background: var(--panel); color: var(--text); }
.app-side nav a.active { background: var(--panel-2); color: var(--text); box-shadow: inset 3px 0 0 var(--accent); }
.app-side .badge { margin-left: auto; }
.app-main { padding: 34px clamp(20px, 3vw, 44px) 80px; min-width: 0; }
.app-main h1 { font-size: 2.3rem; text-transform: none; margin-bottom: 6px; }
.app-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .app-side { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 14px; }
  .app-side nav { display: flex; overflow-x: auto; gap: 4px; }
  .app-side nav a { white-space: nowrap; }
  .app-side .co { display: none; }
}
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-bottom: 28px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.kpi .k { font: 500 .72rem/1.2 var(--f-mono); color: var(--dim); text-transform: uppercase; letter-spacing: .1em; }
.kpi .v { font: 700 2.1rem/1.1 var(--f-head); margin-top: 8px; }
.table-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th { text-align: left; font: 600 .72rem/1.2 var(--f-mono); color: var(--dim); text-transform: uppercase; letter-spacing: .08em; padding: 14px 16px; border-bottom: 1px solid var(--line); background: var(--bg-2); white-space: nowrap; }
td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover td { background: var(--panel-2); }
td.num, th.num { text-align: right; font-family: var(--f-mono); white-space: nowrap; }
.badge { display: inline-block; padding: 4px 9px; border-radius: 3px; font: 600 .7rem/1.2 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; background: var(--panel-2); color: var(--muted); border: 1px solid var(--line-2); white-space: nowrap; }
.b-requested, .b-submitted, .b-pending { color: var(--warn); border-color: rgba(245, 184, 61, .35); background: rgba(245, 184, 61, .08); }
.b-quoted, .b-confirmed, .b-in_production, .b-ready { color: var(--info); border-color: rgba(90, 169, 255, .35); background: rgba(90, 169, 255, .08); }
.b-accepted, .b-approved, .b-delivered, .b-dispatched { color: var(--ok); border-color: rgba(62, 207, 142, .35); background: rgba(62, 207, 142, .08); }
.b-declined, .b-cancelled, .b-suspended, .b-expired { color: var(--err); border-color: rgba(255, 90, 90, .35); background: rgba(255, 90, 90, .08); }
.b-count { background: var(--accent); color: #000; border-color: var(--accent); }
.empty { padding: 50px 20px; text-align: center; color: var(--muted); }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar input, .toolbar select { width: auto; min-width: 180px; padding: 10px 12px; }
.timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line-2); }
.timeline li { padding: 0 0 18px 20px; position: relative; }
.timeline li::before { content: ''; position: absolute; left: -7px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); }
.timeline .t { font: 500 .78rem var(--f-mono); color: var(--dim); }
.progress { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin: 14px 0 6px; }
.progress div { height: 6px; background: var(--line-2); border-radius: 3px; }
.progress div.on { background: var(--accent); }
.progress-labels { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; font: 500 .68rem/1.2 var(--f-mono); color: var(--dim); text-transform: uppercase; }
.two-col { display: grid; grid-template-columns: 1fr 340px; gap: 22px; align-items: start; }
@media (max-width: 1100px) { .two-col { grid-template-columns: 1fr; } }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 14px; font-size: .93rem; }
.kv dt { color: var(--dim); }
.kv dd { margin: 0; }
.code-edit { font: 13px/1.5 var(--f-mono); min-height: 460px; tab-size: 2; white-space: pre; }

/* modal & toast */
.modal { position: fixed; inset: 0; background: rgba(0, 0, 0, .7); display: grid; place-items: center; z-index: 100; padding: 20px; backdrop-filter: blur(4px); }
.modal .card { width: min(560px, 100%); max-height: 90vh; overflow: auto; box-shadow: var(--shadow); }
.modal .card.wide { width: min(980px, 100%); }
.toasts { position: fixed; bottom: 20px; right: 20px; display: grid; gap: 10px; z-index: 200; }
.toast { background: var(--panel-2); border: 1px solid var(--line-2); border-left: 4px solid var(--ok); padding: 14px 18px; border-radius: var(--radius); box-shadow: var(--shadow); max-width: 380px; animation: tin .25s ease; }
.toast.err { border-left-color: var(--err); }
@keyframes tin { from { transform: translateY(10px); opacity: 0; } }
.spinner { width: 18px; height: 18px; border: 2px solid rgba(255, 255, 255, .25); border-top-color: currentColor; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.prose { max-width: 780px; }
.prose h2 { font-size: 1.8rem; margin-top: 1.6em; text-transform: none; }
.prose p, .prose li { color: var(--muted); }
.reveal { opacity: 0; transform: translateY(18px); transition: .7s cubic-bezier(.2, .7, .2, 1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

a.kpi { display: block; color: inherit; transition: border-color .15s; }
a.kpi:hover { border-color: var(--accent); color: inherit; }
@media print { .site-header, .topbar, .site-footer, .app-side, .btn, .toasts { display: none !important; } body { background: #fff; color: #000; } .app { display: block; } .card, .table-wrap { border-color: #ccc; background: #fff; } td, th { color: #000; } }
.field > label.check { font: inherit; letter-spacing: normal; text-transform: none; color: var(--text); }
.hero .container { position: relative; z-index: 1; }

/* 10mm combo dropdown on dimension fields */
.combo input { padding-right: 88px; }
.combo > span { right: 50px; }
.combo-btn { position: absolute; right: 1px; top: 1px; bottom: 1px; width: 42px; border: 0; border-left: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); border-radius: 0 var(--radius) var(--radius) 0; cursor: pointer; font-size: 1rem; }
.combo-btn:hover { background: var(--line-2); }
.combo-list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); max-height: 260px; overflow: auto; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius); box-shadow: var(--shadow); padding: 4px; }
.combo-list button { display: block; width: 100%; text-align: left; padding: 8px 12px; background: none; border: 0; color: var(--text); font: 500 .95rem var(--f-mono); border-radius: 4px; cursor: pointer; }
.combo-list button:hover, .combo-list button.on { background: var(--panel-2); color: var(--accent); }
.price-box { display: flex; flex-wrap: wrap; justify-content: space-between; }
#priceLeft { flex: 1 1 240px; min-width: 0; }

/* Plan / 3D viewer */
#canvas, #c3d { position: absolute; inset: 0; width: 100%; height: 100%; }
#c3d { touch-action: none; cursor: grab; display: block; }
#c3d:active { cursor: grabbing; }
.view-tabs { position: absolute; top: 12px; right: 12px; display: flex; border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; z-index: 2; }
.view-tabs button, .v3-btns button { background: rgba(13,15,17,.85); color: var(--muted); border: 0; padding: 8px 14px; font: 600 .75rem var(--f-mono); letter-spacing: .08em; cursor: pointer; }
.view-tabs button.on { background: var(--accent); color: var(--accent-ink); }
.view3d-bar { position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; z-index: 2; pointer-events: none; }
.view3d-bar > * { pointer-events: auto; }
#layers3d { display: flex; gap: 6px; flex-wrap: wrap; }
#layers3d label { display: flex; gap: 6px; align-items: center; background: rgba(13,15,17,.85); border: 1px solid var(--line-2); border-radius: 30px; padding: 5px 12px; font: 600 .72rem var(--f-mono); color: var(--text); cursor: pointer; text-transform: uppercase; letter-spacing: .06em; }
#layers3d input { width: 14px; height: 14px; }
.v3-btns { display: flex; border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; }
.v3-btns button:hover, .view-tabs button:hover:not(.on) { color: var(--text); }
.view3d-hint { position: absolute; left: 14px; top: 14px; font: 500 .7rem var(--f-mono); color: var(--dim); z-index: 2; pointer-events: none; }
.cfg-canvas .cv-label { z-index: 2; }
