/* ============================================================
   VISON — design system. Dark "control room": near-black green
   ground, lime accent, viewfinder brackets as the signature motif.
   Plain CSS, no build. Cyrillic-safe faces: Unbounded / Manrope /
   JetBrains Mono (Google Fonts), with real fallbacks.
   ============================================================ */

/* Light is the default (business-facing). Dark is an explicit choice via the toggle. */
:root {
  --bg: #f3f6f4; --bg-2: #ffffff; --bg-3: #eef3ef; --bg-4: #e1e8e3;
  --line: #dbe3dd; --line-2: #c3cfc8;
  --ink: #152019; --ink-2: #3c4b43; --muted: #69786f; --muted-2: #9aa79f;
  --lime: #1f7a52; --lime-2: #2e9b69; --lime-rgb: 31, 122, 82; --lime-glow: rgba(31, 122, 82, .22); --lime-hover: #23895c;
  --green: #17945a; --green-rgb: 23, 148, 90; --amber: #a2650a; --amber-rgb: 190, 122, 18; --red: #cf3428; --red-rgb: 207, 52, 40; --blue: #1d6db5; --blue-rgb: 29, 109, 181;
  --shadow-raw: 0 12px 32px -20px rgba(21, 32, 25, .3);
  --glass: rgba(255, 255, 255, .92); --glass-top: rgba(246, 248, 246, .88); --backdrop: rgba(21, 32, 25, .45);
  --sh-a: #e7eeea; --sh-b: #f5f8f6; --av-a: #d3e8dc; --av-b: #b9d6c6;
  color-scheme: light;
  --ok-bg: rgba(var(--green-rgb), .12);
  --warn-bg: rgba(var(--amber-rgb), .13);
  --no-bg: rgba(var(--red-rgb), .12);
  --r-s: 8px; --r: 12px; --r-l: 16px;
  --shadow: var(--shadow-raw);
  --f-display: "Golos Text", "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-body: "Golos Text", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --topbar-h: 62px;
}
:root[data-theme="dark"] {
  --bg: #0b100e; --bg-2: #101714; --bg-3: #151e1a; --bg-4: #1b2621;
  --line: #202c27; --line-2: #2c3a33;
  --ink: #e9f1ec; --ink-2: #b6c4bb; --muted: #7a8a81; --muted-2: #4f5d56;
  --lime: #9fd65a; --lime-2: #86bf44; --lime-rgb: 159, 214, 90; --lime-glow: rgba(159, 214, 90, .22); --lime-hover: #b1e470;
  --green: #3ed48a; --green-rgb: 62, 212, 138; --amber: #f5b942; --amber-rgb: 245, 185, 66; --red: #ff6e63; --red-rgb: 255, 110, 99; --blue: #7cc4ff; --blue-rgb: 124, 196, 255;
  --shadow-raw: 0 14px 40px -18px rgba(0, 0, 0, .7);
  --glass: rgba(16, 23, 20, .92); --glass-top: rgba(11, 16, 14, .8); --backdrop: rgba(6, 10, 8, .7);
  --sh-a: #111916; --sh-b: #18221d; --av-a: #2c4a3a; --av-b: #1b2e25;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background:
    radial-gradient(1100px 560px at 85% -10%, rgba(var(--lime-rgb), .09), transparent 60%),
    radial-gradient(800px 480px at -10% 110%, rgba(var(--green-rgb), .07), transparent 60%),
    var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(var(--lime-rgb), .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--lime-rgb), .035) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 15%, transparent 65%);
  mask-image: radial-gradient(ellipse at 50% 0%, #000 15%, transparent 65%);
}
body > * { position: relative; z-index: 1; }

h1, h2, h3, h4 { font-family: var(--f-display); margin: 0; letter-spacing: -.005em; text-wrap: balance; }
h1 { font-size: clamp(22px, 2.6vw, 28px); font-weight: 700; line-height: 1.2; }
h2 { font-size: 20px; font-weight: 600; }
h3 { font-size: 15px; font-weight: 600; }
p { margin: 0; }
a { color: var(--lime); text-decoration: none; }
button { font: inherit; color: inherit; }
svg.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.icon { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.ink2 { color: var(--ink-2); }
.small { font-size: 13px; }
.eyebrow { font-family: var(--f-mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--lime); }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

/* ---------- topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 28px;
  padding: 0 24px;
  background: var(--glass-top);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--f-display); font-weight: 800; font-size: 16px; color: var(--ink); letter-spacing: 0; }
.brand-t { display: inline-flex; align-items: center; gap: 6px; }
.brand-t small { font: 700 9.5px var(--f-mono); letter-spacing: .12em; padding: 2px 6px; border-radius: 5px; background: var(--lime); color: var(--bg); }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, var(--lime), var(--green)); display: grid; place-items: center; box-shadow: 0 0 0 1px rgba(var(--lime-rgb), .25), 0 8px 20px -8px var(--lime-glow); }
.brand-mark i { width: 10px; height: 10px; border-radius: 50%; background: var(--bg); box-shadow: inset 0 0 0 2px var(--lime); }
.nav { display: flex; gap: 4px; }
.nav-link { padding: 8px 14px; border-radius: 99px; color: var(--ink-2); font-weight: 600; font-size: 14px; transition: .2s var(--ease); }
.nav-link:hover { color: var(--ink); background: var(--bg-3); }
.nav-link.is-active { color: var(--bg); background: var(--lime); box-shadow: 0 6px 18px -8px var(--lime-glow); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn { position: relative; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; color: var(--ink-2); background: var(--bg-3); border: 1px solid var(--line); transition: .2s var(--ease); cursor: pointer; }
.icon-btn:hover { color: var(--lime); border-color: var(--line-2); transform: translateY(-1px); }
.counter { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--lime); color: var(--bg); font: 700 11px/18px var(--f-mono); text-align: center; transform: scale(0); transition: transform .3s var(--ease); }
.counter.is-on { transform: scale(1); }
.counter.bump { animation: bump .4s var(--ease); }
@keyframes bump { 0% { transform: scale(1) } 40% { transform: scale(1.45) } 100% { transform: scale(1) } }
.user-chip { display: flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 99px; background: var(--bg-3); border: 1px solid var(--line); font-size: 13px; color: var(--ink-2); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, var(--av-a), var(--av-b)); display: grid; place-items: center; font: 700 11px var(--f-mono); color: var(--lime); }

.bottomnav { display: none; }

/* ---------- page head ---------- */
.page-head { padding: 34px 0 20px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.page-head .meta { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 13px; margin-top: 8px; font-family: var(--f-mono); }
.page-head .meta b { color: var(--ink-2); font-weight: 600; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 10px; border: 1px solid transparent;
  font-weight: 700; font-size: 14px; cursor: pointer; white-space: nowrap;
  transition: transform .18s var(--ease), box-shadow .25s var(--ease), background .2s, border-color .2s, color .2s;
  text-decoration: none; position: relative; overflow: hidden;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary { background: var(--lime); color: var(--bg); box-shadow: 0 10px 24px -12px var(--lime-glow); }
.btn-primary:hover { background: var(--lime-hover); box-shadow: 0 14px 30px -12px var(--lime-glow); transform: translateY(-1px); }
.btn-ghost { background: var(--bg-3); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--line-2); background: var(--bg-4); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--lime); border-color: rgba(var(--lime-rgb), .35); }
.btn-outline:hover { background: rgba(var(--lime-rgb), .08); }
.btn-danger { background: var(--no-bg); color: var(--red); border-color: rgba(var(--red-rgb), .3); }
.btn-sm { padding: 8px 12px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 14px 24px; font-size: 15px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn .ic { width: 16px; height: 16px; }
.btn.is-done { background: var(--green); color: var(--bg); }
.btn::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(255, 255, 255, .35), transparent 40%); opacity: 0; transition: opacity .4s; pointer-events: none; }
.btn.rip::after { opacity: 1; animation: rip .5s ease-out forwards; }
@keyframes rip { to { opacity: 0; transform: scale(2.2) } }

/* ---------- chips / toggles ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 99px; font-size: 13px; font-weight: 600;
  background: var(--bg-3); border: 1px solid var(--line); color: var(--ink-2);
  cursor: pointer; user-select: none; transition: .18s var(--ease);
}
.chip:hover { border-color: var(--line-2); color: var(--ink); }
.chip.is-on { background: rgba(var(--lime-rgb), .12); border-color: rgba(var(--lime-rgb), .45); color: var(--lime); box-shadow: inset 0 0 0 1px rgba(var(--lime-rgb), .15); }
.chip .ic { width: 15px; height: 15px; }
.chip-lg { padding: 12px 16px; font-size: 14px; border-radius: 12px; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 120px; }
.chip-lg small { font-weight: 500; color: var(--muted); font-size: 12px; }
.chip-lg.is-on small { color: rgba(var(--lime-rgb), .75); }

.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; color: var(--ink-2); }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch i { width: 40px; height: 22px; border-radius: 99px; background: var(--bg-4); border: 1px solid var(--line-2); position: relative; transition: .25s var(--ease); flex: none; }
.switch i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--muted); transition: .25s var(--ease); }
.switch input:checked + i { background: rgba(var(--lime-rgb), .2); border-color: var(--lime); }
.switch input:checked + i::after { left: 20px; background: var(--lime); box-shadow: 0 0 10px var(--lime-glow); }
.switch input:checked ~ span { color: var(--ink); }

/* ---------- inputs ---------- */
.input, select.input, textarea.input {
  width: 100%; padding: 11px 14px; border-radius: 10px;
  background: var(--bg-2); border: 1px solid var(--line); color: var(--ink);
  font: inherit; transition: border-color .2s, box-shadow .2s;
}
.input:focus { outline: none; border-color: rgba(var(--lime-rgb), .6); box-shadow: 0 0 0 3px rgba(var(--lime-rgb), .12); }
.input::placeholder { color: var(--muted-2); }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field > label, .label { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.field-row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

.search { position: relative; }
.search .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search .input { padding-left: 42px; padding-right: 70px; height: 50px; font-size: 15px; border-radius: 14px; background: var(--bg-3); }
.search kbd { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font: 600 11px var(--f-mono); color: var(--muted); background: var(--bg-4); border: 1px solid var(--line-2); border-radius: 6px; padding: 3px 7px; }

/* range */
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 24px; background: transparent; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 99px; background: linear-gradient(90deg, var(--lime) var(--p, 0%), var(--bg-4) var(--p, 0%)); }
input[type=range]::-moz-range-track { height: 6px; border-radius: 99px; background: var(--bg-4); }
input[type=range]::-moz-range-progress { height: 6px; border-radius: 99px; background: var(--lime); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -7px; border-radius: 50%; background: var(--bg); border: 3px solid var(--lime); box-shadow: 0 0 0 4px rgba(var(--lime-rgb), .15), 0 4px 12px -4px var(--lime-glow); transition: transform .15s; }
input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 3px solid var(--lime); }
input[type=range]:active::-webkit-slider-thumb { transform: scale(1.15); }
.range-row { display: flex; align-items: center; gap: 14px; }
.range-row output { font-family: var(--f-mono); font-weight: 600; min-width: 64px; text-align: right; color: var(--lime); font-size: 15px; }

.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); overflow: hidden; }
.stepper button { width: 34px; height: 34px; background: transparent; border: 0; color: var(--ink-2); cursor: pointer; font-size: 18px; transition: .15s; }
.stepper button:hover { background: var(--bg-4); color: var(--lime); }
.stepper output { min-width: 40px; text-align: center; font: 600 14px var(--f-mono); }

/* ---------- badges / status ---------- */
.lvl { display: inline-flex; align-items: center; gap: 6px; font: 600 11px var(--f-mono); letter-spacing: .04em; padding: 4px 9px; border-radius: 99px; border: 1px solid transparent; }
.lvl::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.lvl-3 { color: var(--green); background: var(--ok-bg); border-color: rgba(var(--green-rgb), .25); }
.lvl-2 { color: var(--amber); background: var(--warn-bg); border-color: rgba(var(--amber-rgb), .25); }
.lvl-1 { color: var(--ink-2); background: rgba(182, 196, 187, .1); border-color: var(--line-2); }

.status { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 99px; font-size: 12.5px; font-weight: 700; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.status-ok { color: var(--green); background: var(--ok-bg); }
.status-warn { color: var(--amber); background: var(--warn-bg); }
.status-no { color: var(--red); background: var(--no-bg); }
.status-info { color: var(--blue); background: rgba(var(--blue-rgb), .12); }
.status-muted { color: var(--muted); background: var(--bg-3); }

.live { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: ping 1.9s var(--ease) infinite; }
.live.low { background: var(--amber); animation-name: ping-amber; }
.live.off { background: var(--muted-2); animation: none; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(var(--green-rgb), .6) } 70% { box-shadow: 0 0 0 8px rgba(var(--green-rgb), 0) } 100% { box-shadow: 0 0 0 0 rgba(var(--green-rgb), 0) } }
@keyframes ping-amber { 0% { box-shadow: 0 0 0 0 rgba(var(--amber-rgb), .6) } 70% { box-shadow: 0 0 0 8px rgba(var(--amber-rgb), 0) } 100% { box-shadow: 0 0 0 0 rgba(var(--amber-rgb), 0) } }

.nodata { color: var(--amber); font-size: 12.5px; display: inline-flex; align-items: center; gap: 5px; opacity: .85; }
.nodata .ic { width: 14px; height: 14px; }

/* ---------- bars ---------- */
.bar { height: 8px; border-radius: 99px; background: var(--bg-4); overflow: hidden; position: relative; }
.bar > i { display: block; height: 100%; width: var(--w, 0%); border-radius: 99px; background: linear-gradient(90deg, var(--lime-2), var(--lime)); transition: width .9s var(--ease); box-shadow: 0 0 12px var(--lime-glow); }
.bar.warn > i { background: linear-gradient(90deg, #d19a2b, var(--amber)); box-shadow: 0 0 12px rgba(var(--amber-rgb), .35); }
.bar.danger > i { background: linear-gradient(90deg, #d24c42, var(--red)); box-shadow: 0 0 12px rgba(var(--red-rgb), .35); }
.bar-lg { height: 14px; }
.bar-label { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; font-family: var(--f-mono); }
.bar-label b { color: var(--ink); }

/* ---------- panels / cards ---------- */
.panel { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-l); padding: 20px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.panel-head h2 { font-size: 16px; }
.panel.glow { box-shadow: 0 0 0 1px rgba(var(--lime-rgb), .18), 0 20px 50px -30px var(--lime-glow); }
.divider { height: 1px; background: var(--line); margin: 16px 0; }

.stat { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); position: relative; overflow: hidden; }
.stat::after { content: ""; position: absolute; right: -30px; top: -30px; width: 90px; height: 90px; border-radius: 50%; background: radial-gradient(circle, var(--lime-glow), transparent 65%); opacity: .35; }
.stat b { font: 700 26px/1 var(--f-display); color: var(--ink); font-variant-numeric: tabular-nums; }
.stat span { font-size: 12.5px; color: var(--muted); }
.stat.ok b { color: var(--green); } .stat.warn b { color: var(--amber); } .stat.no b { color: var(--red); } .stat.lime b { color: var(--lime); }
.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

/* viewfinder brackets */
.vf { position: relative; }
.vf::before {
  content: ""; position: absolute; inset: 10px; pointer-events: none; z-index: 2;
  --c: var(--lime);
  background:
    linear-gradient(var(--c), var(--c)) top left / 16px 2px no-repeat,
    linear-gradient(var(--c), var(--c)) top left / 2px 16px no-repeat,
    linear-gradient(var(--c), var(--c)) top right / 16px 2px no-repeat,
    linear-gradient(var(--c), var(--c)) top right / 2px 16px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom left / 16px 2px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom left / 2px 16px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom right / 16px 2px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom right / 2px 16px no-repeat;
  opacity: .28; transition: inset .4s var(--ease), opacity .4s var(--ease);
}
.pcard:hover .vf::before, .vf.is-hot::before { inset: 5px; opacity: 1; }

/* product card */
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); }
.pcard {
  display: flex; flex-direction: column;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-l);
  overflow: hidden; transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
  animation: rise .55s var(--ease) both; animation-delay: calc(var(--i, 0) * 40ms);
}
.pcard:hover { transform: translateY(-4px); border-color: var(--line-2); box-shadow: var(--shadow), 0 0 0 1px rgba(var(--lime-rgb), .12); }
.pcard.is-hidden { display: none; }
.pcard.is-cmp { border-color: rgba(var(--lime-rgb), .5); box-shadow: 0 0 0 1px rgba(var(--lime-rgb), .3), var(--shadow); }
.pcard-media { position: relative; aspect-ratio: 4 / 3; background: linear-gradient(110deg, var(--sh-a) 30%, var(--sh-b) 50%, var(--sh-a) 70%); background-size: 200% 100%; animation: shimmer 4s linear infinite; display: grid; place-items: center; }
.pcard-media .icon { width: 60px; height: 60px; color: rgba(var(--lime-rgb), .6); stroke-width: 1.4; transition: transform .4s var(--ease), color .3s; }
.pcard:hover .pcard-media .icon { transform: scale(1.08) translateY(-2px); color: var(--lime); }
.pcard-media .lvl { position: absolute; left: 12px; bottom: 12px; z-index: 3; }
.cmp-btn { position: absolute; top: 10px; right: 10px; z-index: 3; width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--glass); color: var(--ink-2); display: grid; place-items: center; cursor: pointer; transition: .2s var(--ease); backdrop-filter: blur(6px); }
.cmp-btn:hover { color: var(--lime); border-color: var(--lime); }
.cmp-btn.is-on { background: var(--lime); color: var(--bg); border-color: var(--lime); }
.pcard-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.pcard-brand { font: 600 11px var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.pcard-name { font-family: var(--f-body); font-weight: 800; font-size: 15px; line-height: 1.3; }
.pcard-name span { color: var(--muted); font-weight: 600; }
.pcard-specs { display: flex; flex-wrap: wrap; gap: 5px; }
.pcard-specs span { font: 500 11.5px var(--f-mono); padding: 3px 7px; border-radius: 6px; background: var(--bg-3); color: var(--ink-2); border: 1px solid var(--line); }
.pcard-specs span.nd { color: var(--amber); border-color: rgba(var(--amber-rgb), .25); }
.pcard-price { display: flex; align-items: baseline; justify-content: space-between; gap: 4px 8px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; }
.pcard-price b { font: 700 19px var(--f-display); letter-spacing: -.01em; white-space: nowrap; }
.pcard-price b i { font-style: normal; font-size: 14px; color: var(--muted); margin-left: 2px; }
.pcard-price .best { font: 600 11px var(--f-mono); color: var(--lime); }
.pcard-stock { display: flex; gap: 10px; flex-wrap: wrap; }
.sup { display: inline-flex; align-items: center; gap: 6px; font: 500 12px var(--f-mono); color: var(--ink-2); }
.pcard-actions { display: flex; gap: 8px; margin-top: 4px; }
.pcard-actions .btn { flex: 1; }

@keyframes rise { from { opacity: 0; transform: translateY(16px) } to { opacity: 1; transform: none } }
@keyframes shimmer { 0% { background-position: 200% 0 } 100% { background-position: -200% 0 } }
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- catalog layout ---------- */
.catalog { display: grid; grid-template-columns: 268px minmax(0, 1fr); gap: 24px; align-items: start; padding-bottom: 80px; }
.filters { position: sticky; top: calc(var(--topbar-h) + 16px); display: flex; flex-direction: column; gap: 6px; max-height: calc(100vh - var(--topbar-h) - 32px); overflow: auto; padding-right: 4px; }
.fgroup { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.fgroup > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; font-weight: 700; font-size: 13px; color: var(--ink); }
.fgroup > summary::-webkit-details-marker { display: none; }
.fgroup > summary .ic { width: 16px; height: 16px; color: var(--muted); transition: transform .3s var(--ease); }
.fgroup[open] > summary .ic { transform: rotate(90deg); }
.fgroup[open] > summary { margin-bottom: 12px; }
.fgroup .chips { gap: 6px; }
.fgroup .chip { padding: 6px 10px; font-size: 12.5px; }
.tree { display: flex; flex-direction: column; gap: 2px; }
.tree a { display: flex; justify-content: space-between; padding: 7px 10px; border-radius: 8px; color: var(--ink-2); font-size: 13.5px; font-weight: 600; transition: .15s; }
.tree a small { color: var(--muted); font-family: var(--f-mono); font-weight: 500; }
.tree a:hover { background: var(--bg-3); color: var(--ink); }
.tree a.is-on { background: rgba(var(--lime-rgb), .1); color: var(--lime); }
.tree .sub { padding-left: 14px; }
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar .count { font-family: var(--f-mono); font-size: 13px; color: var(--muted); }
.toolbar .count b { color: var(--lime); }
.toolbar .spacer { flex: 1; }
.sort { display: flex; gap: 4px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.sort button { padding: 6px 12px; border-radius: 8px; border: 0; background: transparent; color: var(--muted); font-weight: 600; font-size: 13px; cursor: pointer; transition: .15s; }
.sort button.is-on { background: var(--bg-4); color: var(--ink); }
.filter-toggle { display: none; }
.empty { grid-column: 1 / -1; padding: 60px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line-2); border-radius: var(--r-l); }
.empty b { display: block; color: var(--ink); font-family: var(--f-display); font-size: 18px; margin-bottom: 6px; }

/* compare bar */
.cmpbar {
  position: fixed; left: 50%; bottom: 24px; z-index: 60;
  transform: translate(-50%, 200%); opacity: 0; pointer-events: none;
  transition: transform .45s var(--ease), opacity .3s;
  display: flex; align-items: center; gap: 14px; padding: 10px 10px 10px 18px;
  background: var(--glass); border: 1px solid rgba(var(--lime-rgb), .35); border-radius: 16px;
  backdrop-filter: blur(12px); box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .8), 0 0 0 1px rgba(var(--lime-rgb), .1);
}
.cmpbar.is-on { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.cmpbar .thumbs { display: flex; }
.cmpbar .thumbs i { width: 30px; height: 30px; border-radius: 8px; background: var(--bg-4); border: 2px solid var(--bg-2); margin-left: -8px; display: grid; place-items: center; color: var(--lime); font: 700 11px var(--f-mono); }
.cmpbar .thumbs i:first-child { margin-left: 0; }

/* toast */
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 70; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast > div { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 12px; background: var(--bg-3); border: 1px solid var(--line-2); color: var(--ink); font-size: 14px; font-weight: 600; box-shadow: var(--shadow); animation: toast-in .35s var(--ease), toast-out .4s var(--ease) 2.6s forwards; }
.toast .ic { color: var(--lime); }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(.98) } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px) } }

/* modal */
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; background: var(--backdrop); backdrop-filter: blur(8px); animation: fade .25s; }
.modal-box { width: min(560px, 100%); background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 20px; padding: 24px; box-shadow: var(--shadow); animation: pop .35s var(--ease); display: flex; flex-direction: column; gap: 16px; }
@keyframes fade { from { opacity: 0 } }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.97) } }
.modal-head { display: flex; align-items: center; justify-content: space-between; }

/* ---------- tables ---------- */
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.table th, .table td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { font: 700 11px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); background: var(--bg-2); position: sticky; top: var(--topbar-h); z-index: 2; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: rgba(var(--lime-rgb), .035); }
.table td.num, .table th.num { text-align: right; font-family: var(--f-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .row-warn td { background: rgba(var(--amber-rgb), .05); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--bg-2); }
.table-wrap .table th { top: 0; }
.group-row td { background: var(--bg-3) !important; font: 700 11px var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--lime); padding: 8px 14px; }

/* ---------- product page ---------- */
.crumbs { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); padding: 22px 0 14px; }
.crumbs a { color: var(--ink-2); }
.crumbs a:hover { color: var(--lime); }
.product { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 28px; align-items: start; }
.gallery { position: sticky; top: calc(var(--topbar-h) + 16px); display: flex; flex-direction: column; gap: 10px; }
.gallery-main { aspect-ratio: 1; border-radius: var(--r-l); background: radial-gradient(circle at 50% 40%, var(--sh-b), var(--sh-a) 70%); border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; cursor: zoom-in; }
.gallery-main .icon { width: 40%; height: 40%; color: var(--lime); stroke-width: 1.2; opacity: .85; transition: transform .6s var(--ease); filter: drop-shadow(0 0 30px var(--lime-glow)); }
.gallery-main:hover .icon { transform: scale(1.1) rotate(-2deg); }
.gallery-thumbs { display: flex; gap: 8px; }
.gallery-thumbs span { width: 64px; height: 64px; border-radius: 10px; background: var(--bg-3); border: 1px solid var(--line); display: grid; place-items: center; color: var(--muted); cursor: pointer; transition: .2s; }
.gallery-thumbs span.is-on, .gallery-thumbs span:hover { border-color: var(--lime); color: var(--lime); }
.ptitle { display: flex; flex-direction: column; gap: 10px; }
.ptitle h1 { font-size: clamp(22px, 2.6vw, 30px); }
.ptitle .sku { font-family: var(--f-mono); color: var(--muted); font-size: 13px; }
.keyspecs { display: flex; flex-wrap: wrap; gap: 8px; }
.keyspecs span { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px; background: var(--bg-3); border: 1px solid var(--line); font: 600 13px var(--f-mono); }
.keyspecs .ic { width: 15px; height: 15px; color: var(--lime); }
.pricebox { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; padding: 18px 20px; border-radius: var(--r-l); background: linear-gradient(135deg, rgba(var(--lime-rgb), .1), rgba(var(--green-rgb), .04)); border: 1px solid rgba(var(--lime-rgb), .25); }
.pricebox .big { font: 800 30px/1 var(--f-display); letter-spacing: -.01em; }
.pricebox .big i { font-style: normal; font-size: 18px; color: var(--muted); }
.pricebox .win { font: 600 12px var(--f-mono); color: var(--lime); margin-top: 6px; }
.buy { display: flex; gap: 10px; align-items: center; }
.matrix th:not(:first-child), .matrix td:not(:first-child) { text-align: center; font-family: var(--f-mono); }
.matrix .best td { background: rgba(var(--lime-rgb), .05); }
.matrix .best td:first-child { color: var(--lime); font-weight: 700; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tab { padding: 10px 16px; border: 0; background: transparent; color: var(--muted); font-weight: 700; font-size: 14px; cursor: pointer; position: relative; transition: color .2s; }
.tab::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; background: var(--lime); transform: scaleX(0); transition: transform .3s var(--ease); box-shadow: 0 0 10px var(--lime-glow); }
.tab.is-on { color: var(--ink); }
.tab.is-on::after { transform: scaleX(1); }
.tabpanel { animation: fade .3s; }
.specs { display: grid; gap: 14px; }
.specs section { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.specs h3 { padding: 11px 16px; font: 700 11px var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--lime); background: var(--bg-3); }
.specs dl { margin: 0; display: grid; grid-template-columns: 1fr 1fr; }
.specs dt, .specs dd { margin: 0; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 14px; }
.specs dt { color: var(--muted); }
.specs dd { font-weight: 600; font-family: var(--f-mono); }
.specs .extra { display: none; }
.specs.show-all .extra { display: contents; }
.compat-list { display: flex; flex-direction: column; gap: 10px; }
.compat-item { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 12px 14px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); }
.compat-item .icon { width: 36px; height: 36px; color: var(--lime); }
.callout { padding: 14px 16px; border-radius: var(--r); background: var(--warn-bg); border: 1px solid rgba(var(--amber-rgb), .25); color: var(--ink-2); font-size: 13.5px; display: flex; gap: 10px; }
.callout .ic { color: var(--amber); flex: none; margin-top: 2px; }
.callout.ok { background: var(--ok-bg); border-color: rgba(var(--green-rgb), .25); } .callout.ok .ic { color: var(--green); }
.callout.info { background: rgba(var(--blue-rgb), .08); border-color: rgba(var(--blue-rgb), .25); } .callout.info .ic { color: var(--blue); }
.stickybar { position: sticky; bottom: 0; z-index: 40; margin-top: 30px; padding: 12px 16px; display: flex; align-items: center; gap: 14px; background: var(--glass); backdrop-filter: blur(12px); border: 1px solid var(--line-2); border-radius: 14px; }
.stickybar .big { font: 800 22px var(--f-display); }

/* analogs row */
.hscroll { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.hscroll > * { flex: 0 0 240px; scroll-snap-align: start; }

/* ---------- compare ---------- */
.compare-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--bg-2); }
.compare { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 860px; }
.compare th, .compare td { padding: 12px 16px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); vertical-align: top; }
.compare th:first-child, .compare td:first-child { position: sticky; left: 0; background: var(--bg-2); z-index: 2; color: var(--muted); font-weight: 600; font-size: 13px; width: 200px; }
.compare thead th { position: sticky; top: var(--topbar-h); z-index: 3; background: var(--bg-3); }
.compare thead th:first-child { z-index: 4; background: var(--bg-3); }
.compare .ccol { display: flex; flex-direction: column; gap: 8px; min-width: 200px; }
.compare .ccol .media { aspect-ratio: 16/10; border-radius: 10px; background: var(--bg-4); display: grid; place-items: center; }
.compare .ccol .media .icon { width: 44px; height: 44px; color: var(--lime); stroke-width: 1.2; }
.compare .ccol .name { font-weight: 800; font-size: 14px; }
.compare td { font-family: var(--f-mono); font-size: 13.5px; }
.compare td.win { color: var(--lime); font-weight: 700; background: rgba(var(--lime-rgb), .05); }
.compare tr.same.hide { display: none; }
.compare .add { border: 1px dashed var(--line-2); border-radius: 10px; display: grid; place-items: center; aspect-ratio: 16/10; color: var(--muted); cursor: pointer; transition: .2s; }
.compare .add:hover { border-color: var(--lime); color: var(--lime); }
.rm { background: transparent; border: 0; color: var(--muted); cursor: pointer; font-size: 12px; display: inline-flex; gap: 4px; align-items: center; padding: 0; }
.rm:hover { color: var(--red); }

/* ---------- projects ---------- */
.pgrid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.pj { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-l); padding: 18px; display: flex; flex-direction: column; gap: 12px; transition: .3s var(--ease); animation: rise .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms); position: relative; overflow: hidden; }
.pj::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--lime); opacity: .7; }
.pj.done::before { background: var(--green); } .pj.archived::before { background: var(--muted-2); } .pj.draft::before { background: var(--amber); }
.pj:hover { transform: translateY(-3px); border-color: var(--line-2); box-shadow: var(--shadow); }
.pj-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.pj-head h3 { font-size: 16px; }
.pj-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.pj-meta span { display: inline-flex; gap: 5px; align-items: center; }
.pj-meta .ic { width: 14px; height: 14px; }
.pj-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.kpi { padding: 10px 12px; background: var(--bg-3); border-radius: 10px; border: 1px solid var(--line); }
.kpi b { display: block; font: 700 16px var(--f-display); }
.kpi span { font-size: 11px; color: var(--muted); font-family: var(--f-mono); }
.pj-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: auto; }
.pj-foot .sum { font: 800 20px var(--f-display); }
.pj-foot .sum small { font: 500 12px var(--f-mono); color: var(--muted); display: block; }
.pills { display: flex; gap: 10px; flex-wrap: wrap; }
.pill { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; min-width: 180px; }
.pill .ic { width: 22px; height: 22px; color: var(--lime); }
.pill b { font: 700 18px var(--f-display); display: block; line-height: 1; }
.pill span { font-size: 12px; color: var(--muted); }
.pill .bar { width: 90px; margin-top: 6px; }
.totals { display: grid; gap: 8px; }
.totals .row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.totals .row.grand { border: 0; padding-top: 14px; font: 800 24px var(--f-display); color: var(--lime); }
.totals .row .mono { color: var(--ink); }

/* ---------- configurator ---------- */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; position: relative; margin: 24px 0 28px; }
.steps::before { content: ""; position: absolute; left: 10%; right: 10%; top: 22px; height: 2px; background: var(--line-2); }
.steps::after { content: ""; position: absolute; left: 10%; top: 22px; height: 2px; width: calc(80% * var(--p, 0)); background: linear-gradient(90deg, var(--lime-2), var(--lime)); box-shadow: 0 0 12px var(--lime-glow); transition: width .6s var(--ease); }
.step-tab { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; text-align: center; }
.step-tab i { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-3); border: 2px solid var(--line-2); font: 700 14px var(--f-mono); color: var(--muted); transition: .35s var(--ease); }
.step-tab b { font-size: 13px; font-weight: 700; color: var(--muted); }
.step-tab small { font-size: 11.5px; color: var(--muted-2); }
.step-tab.is-on i { border-color: var(--lime); color: var(--lime); box-shadow: 0 0 0 6px rgba(var(--lime-rgb), .12), 0 0 24px var(--lime-glow); background: var(--bg); transform: scale(1.08); }
.step-tab.is-on b { color: var(--ink); }
.step-tab.is-done i { background: var(--lime); border-color: var(--lime); color: var(--bg); }
.step-tab.is-done b { color: var(--ink-2); }
.step { display: none; animation: stepin .45s var(--ease); }
.step.is-on { display: flex; flex-direction: column; gap: 14px; }
@keyframes stepin { from { opacity: 0; transform: translateX(24px) } }
.cfg { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; }
.cfg-side { position: sticky; top: calc(var(--topbar-h) + 16px); display: flex; flex-direction: column; gap: 12px; }
.req-list { display: flex; flex-direction: column; gap: 6px; }
.req-list div { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.req-list div span:first-child { color: var(--muted); }
.req-list div b { font-family: var(--f-mono); font-weight: 600; }
.step-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 22px; }
.block { display: flex; flex-direction: column; gap: 12px; padding: 18px 20px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-l); }
.block h3 { font-size: 15px; display: flex; align-items: center; gap: 8px; }
.block h3 .ic { color: var(--lime); }
.block .hint { font-size: 13px; color: var(--muted); }
.result-group { margin-bottom: 18px; }
.result-group > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 10px 0; }
.result-group > summary::-webkit-details-marker { display: none; }
.result-group h3 { font-size: 15px; }
.result-group .n { font: 700 12px var(--f-mono); padding: 3px 9px; border-radius: 99px; background: var(--bg-3); }
.result { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 14px 16px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 8px; cursor: pointer; transition: .25s var(--ease); animation: rise .4s var(--ease) both; }
.result:hover { border-color: var(--line-2); transform: translateX(3px); }
.result.is-on { border-color: var(--lime); box-shadow: 0 0 0 1px rgba(var(--lime-rgb), .3), 0 14px 30px -20px var(--lime-glow); }
.result .icon { width: 40px; height: 40px; color: var(--lime); stroke-width: 1.3; }
.result .name { font-weight: 800; }
.result .why { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.result .why span { font: 500 11.5px var(--f-mono); padding: 3px 8px; border-radius: 6px; }
.result .why .ok { background: var(--ok-bg); color: var(--green); }
.result .why .warn { background: var(--warn-bg); color: var(--amber); }
.result .why .no { background: var(--no-bg); color: var(--red); }
.result .price { text-align: right; font: 800 18px var(--f-display); }
.result .price small { display: block; font: 500 11px var(--f-mono); color: var(--muted); }
.result.dim { opacity: .55; }
.score { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font: 700 12px var(--f-mono); background: conic-gradient(var(--lime) calc(var(--s) * 1%), var(--bg-4) 0); position: relative; }
.score::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--bg-2); }
.score b { position: relative; z-index: 1; }
.formula { padding: 12px 14px; border-radius: 10px; background: var(--bg-3); border: 1px solid var(--line); font: 500 12.5px var(--f-mono); color: var(--ink-2); line-height: 1.7; }
.formula b { color: var(--lime); }
.hdd-opts { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.opt { padding: 14px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); cursor: pointer; transition: .25s var(--ease); display: flex; flex-direction: column; gap: 6px; }
.opt:hover { border-color: var(--line-2); transform: translateY(-2px); }
.opt.is-on { border-color: var(--lime); background: rgba(var(--lime-rgb), .06); }
.opt b { font: 700 18px var(--f-display); }
.opt small { font: 500 12px var(--f-mono); color: var(--muted); }
.tiers { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.tier { padding: 20px; border-radius: var(--r-l); background: var(--bg-2); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; cursor: pointer; transition: .3s var(--ease); position: relative; overflow: hidden; }
.tier:hover { transform: translateY(-3px); border-color: var(--line-2); }
.tier.is-on { border-color: var(--lime); box-shadow: 0 0 0 1px rgba(var(--lime-rgb), .3), 0 24px 50px -30px var(--lime-glow); }
.tier.rec::after { content: "РЕКОМЕНДУЕМ"; position: absolute; top: 14px; right: -34px; transform: rotate(35deg); font: 700 10px var(--f-mono); letter-spacing: .12em; background: var(--lime); color: var(--bg); padding: 4px 40px; }
.tier .sum { font: 800 26px var(--f-display); }
.tier ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; color: var(--ink-2); }
.tier ul li { display: flex; justify-content: space-between; gap: 10px; }
.tier ul li span:last-child { font-family: var(--f-mono); color: var(--muted); }
.checks { display: flex; flex-direction: column; gap: 8px; }
.check { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; font-size: 13.5px; }
.check .ic { width: 18px; height: 18px; flex: none; }
.check.ok .ic { color: var(--green); } .check.warn .ic { color: var(--amber); } .check.no .ic { color: var(--red); }
.check span:last-child { margin-left: auto; font-family: var(--f-mono); font-size: 12px; color: var(--muted); }

/* ---------- admin ---------- */
.admin { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 24px; align-items: start; padding-bottom: 80px; }
.anav { position: sticky; top: calc(var(--topbar-h) + 16px); display: flex; flex-direction: column; gap: 2px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-l); padding: 8px; }
.anav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--ink-2); font-weight: 600; font-size: 13.5px; transition: .15s; cursor: pointer; }
.anav a .ic { width: 17px; height: 17px; color: var(--muted); }
.anav a:hover { background: var(--bg-3); color: var(--ink); }
.anav a.is-on { background: rgba(var(--lime-rgb), .1); color: var(--lime); } .anav a.is-on .ic { color: var(--lime); }
.anav a .n { margin-left: auto; font: 600 11px var(--f-mono); padding: 2px 7px; border-radius: 99px; background: var(--bg-4); color: var(--muted); white-space: nowrap; }
.anav a .n.warn { background: var(--warn-bg); color: var(--amber); }
.asection { display: none; animation: fade .3s; }
.asection.is-on { display: flex; flex-direction: column; gap: 18px; }
.logs { display: flex; flex-direction: column; gap: 0; }
.log { display: grid; grid-template-columns: 22px 1fr auto; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: start; position: relative; }
.log::before { content: ""; position: absolute; left: 10px; top: 32px; bottom: -8px; width: 2px; background: var(--line); }
.log:last-child::before { display: none; }
.log i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-3); border: 2px solid var(--line-2); }
.log.ok i { border-color: var(--green); background: var(--ok-bg); } .log.err i { border-color: var(--red); background: var(--no-bg); } .log.run i { border-color: var(--lime); animation: ping 1.9s infinite; }
.log b { display: block; font-size: 14px; }
.log small { color: var(--muted); font-family: var(--f-mono); font-size: 12px; }
.log .when { font: 500 12px var(--f-mono); color: var(--muted); white-space: nowrap; }
.map-row { display: grid; grid-template-columns: 1fr auto 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 8px; animation: rise .4s var(--ease) both; }
.map-row .src { font-family: var(--f-mono); font-size: 13.5px; }
.map-row .src small { display: block; color: var(--muted); font-size: 11.5px; }
.map-row .arrow { color: var(--lime); }
.link-card { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: center; padding: 16px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-l); margin-bottom: 10px; animation: rise .4s var(--ease) both; transition: .35s var(--ease); }
.link-card.out { opacity: 0; transform: translateX(40px); height: 0; padding: 0; margin: 0; overflow: hidden; }
.link-card .side { display: flex; flex-direction: column; gap: 4px; }
.link-card .side .eyebrow { font-size: 10px; }
.link-card .side b { font-size: 14px; }
.link-card .side small { font-family: var(--f-mono); color: var(--muted); font-size: 12px; }
.link-card .mid { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.link-card .conf { font: 700 12px var(--f-mono); color: var(--lime); }
.link-card .acts { display: flex; gap: 6px; }
.rule { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 12px 14px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 8px; }
.rule code { font: 500 12px var(--f-mono); color: var(--ink-2); background: var(--bg-3); padding: 3px 8px; border-radius: 6px; }

/* ---------- footer ---------- */
.foot { padding: 40px 0 100px; color: var(--muted-2); font: 500 12px var(--f-mono); text-align: center; }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .catalog { grid-template-columns: 240px 1fr; }
  .cfg { grid-template-columns: minmax(0, 1fr); } .cfg-side { position: static; }
  .admin { grid-template-columns: 200px 1fr; }
  .product { grid-template-columns: minmax(0, 1fr); } .gallery { position: static; }
}
@media (max-width: 860px) {
  .nav, .user-chip > span:not(.avatar) { display: none; }
  .topbar { gap: 14px; padding: 0 16px; }
  .container { padding: 0 16px; }
  .bottomnav { display: flex; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 60; background: var(--glass); backdrop-filter: blur(14px); border: 1px solid var(--line-2); border-radius: 18px; padding: 6px; box-shadow: var(--shadow); }
  .bottomnav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 4px; border-radius: 12px; color: var(--muted); font-size: 10.5px; font-weight: 700; transition: .2s; }
  .bottomnav a .ic { width: 20px; height: 20px; }
  .bottomnav a.is-active { color: var(--bg); background: var(--lime); }
  .catalog { grid-template-columns: 1fr; }
  .filters { position: fixed; inset: 0 auto 0 0; width: min(320px, 88vw); z-index: 70; max-height: none; padding: 16px; background: var(--bg-2); border-right: 1px solid var(--line-2); transform: translateX(-105%); transition: transform .4s var(--ease); overflow: auto; }
  .filters.is-open { transform: none; box-shadow: 40px 0 80px rgba(0, 0, 0, .6); }
  .filter-toggle { display: inline-flex; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .pcard-body { padding: 10px 12px 12px; } .pcard-price b { font-size: 17px; }
  .pcard-actions .btn-ghost { display: none; }
  .steps { grid-template-columns: repeat(5, 1fr); } .step-tab small { display: none; } .step-tab b { font-size: 11px; }
  .admin { grid-template-columns: minmax(0, 1fr); } .anav { position: static; flex-direction: row; overflow-x: auto; }
  .topbar-right .status { display: none; }
  .sort { overflow-x: auto; max-width: 100%; } .sort button { white-space: nowrap; }
  .search kbd { display: none; }
  .anav a { white-space: nowrap; } .anav a .n { display: none; }
  .cmpbar { bottom: 84px; }
  .toast { bottom: 84px; right: 12px; }
  .stickybar { bottom: 80px; }
  .foot { padding-bottom: 120px; }
  .pj-kpis { grid-template-columns: repeat(3, 1fr); }
  .product { gap: 18px; }
  .pricebox { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- additions: drawer, per-row markup, rec labels, calc, profile ---------- */
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 94vw); z-index: 85; background: var(--bg-2); border-left: 1px solid var(--line-2); box-shadow: var(--shadow); transform: translateX(105%); transition: transform .4s var(--ease); display: flex; flex-direction: column; gap: 14px; padding: 22px; overflow: auto; }
.drawer.is-open { transform: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; }
.drawer .field { margin-bottom: 4px; }
.mk { width: 66px; padding: 5px 8px; border-radius: 7px; background: var(--bg-2); border: 1px solid var(--line); color: var(--ink); font: 600 12px var(--f-mono); text-align: right; }
.mk::placeholder { color: var(--muted-2); }
.crossed { text-decoration: line-through; color: var(--muted); font: 500 12px var(--f-mono); }
.rec-label { font: 700 10px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; padding: 2px 7px; border-radius: 5px; background: rgba(var(--lime-rgb), .15); color: var(--lime); margin-left: 8px; vertical-align: middle; }
.rec-label.alt { background: var(--bg-4); color: var(--ink-2); }
.rec-label.cmp { background: var(--warn-bg); color: var(--amber); }
.sku { font: 500 11.5px var(--f-mono); color: var(--muted); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.two-wide { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
@media (max-width: 900px) { .two, .two-wide { grid-template-columns: minmax(0, 1fr); } }
.weights .field { margin-bottom: 8px; }
.weights output { color: var(--lime); }
.range-pair { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; margin-bottom: 8px; }
.range-pair .input { padding: 8px 10px; font: 600 13px var(--f-mono); }
.range-pair span { color: var(--muted); }
.profile-card { display: grid; grid-template-columns: 72px 1fr; gap: 16px; align-items: center; }
.profile-card .avatar { width: 72px; height: 72px; font-size: 22px; }
.bottomnav a { position: relative; }
.bottomnav .counter { top: 2px; right: 14px; }
.run-status { font: 700 10.5px var(--f-mono); letter-spacing: .08em; }

/* ---------- workspace / project-first ---------- */
.ctx { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: rgba(var(--lime-rgb), .07); border: 1px solid rgba(var(--lime-rgb), .28); border-radius: var(--r); margin-bottom: 16px; flex-wrap: wrap; }
.ctx .ic { color: var(--lime); }
.ctx > div { flex: 1 1 240px; }
.prog { display: flex; gap: 4px; margin-top: 4px; }
.prog i { flex: 1; height: 5px; border-radius: 99px; background: var(--bg-4); }
.prog i.on { background: var(--lime); }
.prog-lbl { display: flex; justify-content: space-between; font: 500 11px var(--f-mono); color: var(--muted); margin-top: 5px; }
.quick { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.quick a { display: flex; align-items: center; gap: 12px; padding: 16px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-l); color: var(--ink); transition: .25s var(--ease); }
.quick a:hover { transform: translateY(-2px); border-color: var(--lime); box-shadow: var(--shadow); }
.quick a .ic { width: 22px; height: 22px; color: var(--lime); }
.quick a b { display: block; font-size: 14.5px; }
.quick a span { font-size: 12.5px; color: var(--muted); }
.quick a.primary { background: var(--lime); border-color: var(--lime); color: var(--bg); }
.quick a.primary .ic, .quick a.primary span { color: inherit; opacity: .9; }
.attn { display: flex; flex-direction: column; gap: 8px; }
.attn a { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 11px 14px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; color: var(--ink); font-size: 13.5px; transition: .2s; }
.attn a:hover { border-color: var(--line-2); }
.attn a .ic { width: 18px; height: 18px; }
.attn a.warn .ic { color: var(--amber); } .attn a.no .ic { color: var(--red); } .attn a.info .ic { color: var(--blue); }
.attn a small { color: var(--muted); font-family: var(--f-mono); }
.greet { font: 500 14px var(--f-body); color: var(--muted); }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 460px) minmax(0, 1fr); }
.login-form { display: flex; flex-direction: column; justify-content: center; gap: 22px; padding: 48px 44px; background: var(--bg-2); border-right: 1px solid var(--line); }
.login-form h1 { font-size: 26px; }
.login-form .field { gap: 6px; }
.login-form .input { height: 48px; font-size: 15px; }
.login-art { position: relative; overflow: hidden; display: grid; place-items: center; padding: 40px; background: radial-gradient(900px 500px at 70% 20%, rgba(var(--lime-rgb), .14), transparent 60%), var(--bg); }
.login-art::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(var(--lime-rgb), .06) 1px, transparent 1px), linear-gradient(90deg, rgba(var(--lime-rgb), .06) 1px, transparent 1px); background-size: 40px 40px; -webkit-mask-image: radial-gradient(ellipse at 50% 50%, #000 30%, transparent 75%); mask-image: radial-gradient(ellipse at 50% 50%, #000 30%, transparent 75%); }
.scene { position: relative; width: min(560px, 100%); display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; transform: perspective(1200px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .25s var(--ease); transform-style: preserve-3d; }
.scene > * { animation: rise .6s var(--ease) both; animation-delay: calc(var(--i) * 90ms); }
.tile { background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow); }
.tile .k { font: 600 10.5px var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.tile .v { font: 700 24px/1.1 var(--f-display); margin-top: 6px; font-variant-numeric: tabular-nums; }
.tile .v small { font: 500 12px var(--f-mono); color: var(--muted); }
.t-cams { grid-column: span 3; } .t-poe { grid-column: span 3; } .t-proj { grid-column: span 4; } .t-arch { grid-column: span 2; } .t-feed { grid-column: span 6; }
.feed { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
.feed i { aspect-ratio: 16/9; border-radius: 8px; background: linear-gradient(135deg, var(--sh-a), var(--sh-b)); position: relative; overflow: hidden; display: grid; place-items: center; }
.feed i .ic { width: 22px; height: 22px; color: var(--lime); opacity: .8; }
.feed i::after { content: ""; position: absolute; left: 0; right: 0; height: 30%; top: -30%; background: linear-gradient(180deg, transparent, rgba(var(--lime-rgb), .18), transparent); animation: scan 3.2s linear infinite; animation-delay: calc(var(--d) * .7s); }
.feed i b { position: absolute; left: 6px; bottom: 5px; font: 600 9px var(--f-mono); color: var(--ink-2); display: flex; gap: 4px; align-items: center; }
.feed i b::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--red); animation: blink 1.4s infinite; }
@keyframes scan { to { top: 100% } }
@keyframes blink { 50% { opacity: .2 } }
.t-poe .bar { margin-top: 10px; height: 10px; }
.t-poe .bar > i { animation: poe 4s var(--ease) infinite alternate; }
@keyframes poe { from { width: 38% } to { width: 74% } }
.t-proj .row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.t-proj .row:last-child { border: 0; }
.t-proj .row .status { font-size: 11px; padding: 3px 8px; }
.login-foot { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: var(--muted); }
.pw { position: relative; }
.pw button { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: transparent; border: 0; color: var(--muted); cursor: pointer; padding: 6px; border-radius: 6px; }
.pw button:hover { color: var(--lime); }
.caps { font: 500 12px var(--f-mono); color: var(--amber); display: none; }
.caps.on { display: block; }
.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px) } 40%, 80% { transform: translateX(6px) } }
@media (max-width: 900px) { .login { grid-template-columns: 1fr; } .login-art { display: none; } .login-form { min-height: 100vh; border: 0; } }

/* ---------- mobile: tables become cards (no horizontal scroll) ---------- */
@media (max-width: 860px) {
  .table-wrap { overflow: visible; border: 0; background: transparent; border-radius: 0; }
  .table.rsp, .table.rsp tbody, .table.rsp tfoot { display: block; }
  .table.rsp thead { display: none; }
  .table.rsp tr { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; padding: 12px 14px; margin-bottom: 8px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); }
  .table.rsp tr.group-row { display: block; background: transparent; border: 0; padding: 10px 2px 2px; margin: 0; }
  .table.rsp tr.group-row td { padding: 0; background: transparent !important; }
  .table.rsp td { border: 0; padding: 0; text-align: left; font-family: var(--f-body); min-width: 0; }
  .table.rsp td.num { font-family: var(--f-mono); }
  .table.rsp td[data-l]::before { content: attr(data-l); display: block; font: 600 10px var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
  .table.rsp td.primary { grid-column: 1 / -1; }
  .table.rsp td.primary::before { display: none; }
  .table.rsp td:empty, .table.rsp td.icon-cell { display: none; }
  .table.rsp td.actions { grid-column: 1 / -1; display: flex; gap: 6px; justify-content: flex-end; }
  .table.rsp td.actions::before { display: none; }
  .table.rsp tfoot tr { display: flex; justify-content: space-between; align-items: baseline; background: transparent; border: 0; padding: 6px 2px; }

  /* смета: название / поставщик + количество / закуп · итого · наценка */
  #bom tr[data-price] { grid-template-columns: 1fr 1fr 1fr; grid-template-areas: "name name rm" "sup sup qty" "price sum mk"; align-items: end; }
  #bom tr[data-price] td:nth-child(1) { display: none; }
  #bom tr[data-price] td:nth-child(2) { grid-area: name; } #bom tr[data-price] td:nth-child(2)::before { display: none; }
  #bom tr[data-price] td:nth-child(3) { grid-area: sup; align-self: center; } #bom tr[data-price] td:nth-child(3)::before { display: none; }
  #bom tr[data-price] td:nth-child(4) { grid-area: qty; justify-self: end; } #bom tr[data-price] td:nth-child(4)::before { display: none; }
  #bom tr[data-price] td:nth-child(5) { grid-area: price; } #bom tr[data-price] td:nth-child(6) { grid-area: sum; } #bom tr[data-price] td:nth-child(7) { grid-area: mk; }
  #bom tr[data-price] td:nth-child(8) { grid-area: rm; justify-self: end; display: block; }
  #bom .mk { width: 100%; }

  /* сравнение: параметр сверху, значения в ряд */
  .compare-wrap { overflow: visible; border: 0; background: transparent; border-radius: 0; }
  .compare, .compare thead, .compare tbody { display: block; min-width: 0; }
  .compare tr { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .compare tr > :first-child { grid-column: 1 / -1; position: static; width: auto; padding: 0 0 2px; border: 0; font: 600 10.5px var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: transparent; }
  .compare tr > :nth-child(n + 2) { border: 0; padding: 0; font-size: 13px; }
  .compare tr > :nth-child(5) { display: none; }
  .compare thead th { position: static; background: transparent; }
  .compare thead tr > :first-child { display: none; }
  .compare thead tr { border-bottom: 2px solid var(--line-2); }
  .compare .ccol { min-width: 0; gap: 6px; }
  .compare .ccol .media { aspect-ratio: 4 / 3; }
  .compare .ccol .media .icon { width: 30px; height: 30px; }
  .compare .ccol .name { font-size: 12px; line-height: 1.25; }
  .compare .ccol .lvl { font-size: 9.5px; padding: 3px 6px; }
  .compare td.win { background: transparent; }
  .compare tr.same.hide { display: none; }
}

/* ---------- header dropdowns: current project + user ---------- */
.dd { position: relative; }
.dd-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 250px; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow); padding: 6px; display: none; z-index: 60; animation: pop .25s var(--ease); }
.dd.is-open .dd-menu { display: block; }
.dd-menu a, .dd-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border-radius: 9px; color: var(--ink); font-size: 14px; font-weight: 600; background: transparent; border: 0; cursor: pointer; text-align: left; text-decoration: none; }
.dd-menu a:hover, .dd-menu button:hover { background: var(--bg-3); }
.dd-menu .ic { width: 16px; height: 16px; color: var(--muted); }
.dd-menu .is-cur { color: var(--lime); } .dd-menu .is-cur .ic { color: var(--lime); }
.dd-menu .is-cur::after { content: "✓"; margin-left: auto; font-family: var(--f-mono); }
.dd-menu .dd-sep { height: 1px; background: var(--line); margin: 6px 4px; }
.dd-menu .dd-title { font: 600 10.5px var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 8px 12px 4px; }
.pchip { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 10px; border-radius: 10px; background: rgba(var(--lime-rgb), .08); border: 1px solid rgba(var(--lime-rgb), .3); color: var(--ink); font-weight: 700; font-size: 13px; cursor: pointer; max-width: 280px; transition: .2s; }
.pchip:hover { border-color: var(--lime); }
.pchip > .ic { color: var(--lime); } .pchip .chev { width: 14px; height: 14px; color: var(--muted); }
.pchip-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pchip-n { font: 700 11px var(--f-mono); padding: 2px 7px; border-radius: 99px; background: var(--lime); color: var(--bg); }
.user-chip { cursor: pointer; border: 1px solid var(--line); background: var(--bg-3); }
.user-chip .chev { width: 14px; height: 14px; color: var(--muted); }
@media (max-width: 860px) {
  .pchip-name, .pchip .chev, .user-chip .chev { display: none; }
  .pchip { padding: 0 8px; }
  .dd-menu { position: fixed; left: 12px; right: 12px; top: calc(var(--topbar-h) + 8px); min-width: 0; }
}
/* ---------- project items (trimmed catalog) ---------- */
.item { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 16px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-l); animation: rise .45s var(--ease) both; animation-delay: calc(var(--i, 0) * 50ms); }
.item .thumb { width: 56px; height: 56px; border-radius: 12px; background: var(--bg-3); display: grid; place-items: center; }
.item .thumb .icon { width: 28px; height: 28px; color: var(--lime); }
.item .role { font: 600 10.5px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--lime); }
.item .name { font-weight: 800; font-size: 15px; margin-top: 2px; }
.item .spec { font: 500 12px var(--f-mono); color: var(--muted); margin-top: 3px; }
.item .right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.item .sum { font: 800 17px var(--f-display); white-space: nowrap; }
.item .sum small { display: block; font: 500 11.5px var(--f-mono); color: var(--muted); text-align: right; }
.item .ctl { display: flex; gap: 6px; align-items: center; }
.items-list { display: flex; flex-direction: column; gap: 10px; }
@media (max-width: 860px) {
  .item { grid-template-columns: 44px minmax(0, 1fr); grid-template-areas: "thumb body" "right right"; }
  .item .thumb { width: 44px; height: 44px; grid-area: thumb; } .item .thumb .icon { width: 22px; height: 22px; }
  .item > div:nth-child(2) { grid-area: body; }
  .item .right { grid-area: right; flex-direction: row; justify-content: space-between; align-items: center; padding-top: 10px; border-top: 1px solid var(--line); }
  .item .sum small { text-align: left; }
}

/* ---------- language switch ---------- */
.lang { display: inline-flex; align-items: center; gap: 2px; height: 40px; padding: 3px; border-radius: 10px; background: var(--bg-3); border: 1px solid var(--line); }
.lang button { border: 0; background: transparent; color: var(--muted); font: 700 11.5px var(--f-mono); letter-spacing: .06em; padding: 0 9px; height: 100%; border-radius: 7px; cursor: pointer; transition: .15s; }
.lang button:hover { color: var(--ink); }
.lang button.is-on { background: var(--bg-2); color: var(--lime); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.lang-menu { margin: 4px 8px 6px; height: 34px; width: calc(100% - 16px); }
.lang-menu button { flex: 1; }
@media (max-width: 860px) { .topbar-right > .lang { display: none; } }

/* ---------- login illustration ---------- */
.hero-art { width: min(640px, 100%); display: flex; flex-direction: column; align-items: center; gap: 22px; position: relative; }
.cam-svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 28px 34px rgba(21, 32, 25, .16)); overflow: visible; }
.cam-svg .cam, .cam-svg .fov { transform: rotate(var(--aim, 0deg)); transition: transform .4s var(--ease); }
.cam-svg .fov { animation: breathe 5s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .55; } }
.cam-svg .scan { animation: sweep 4.5s ease-in-out infinite alternate; }
@keyframes sweep { from { transform: rotate(-24deg); } to { transform: rotate(26deg); } }
.cam-svg .ir-led { animation: ir 2.6s ease-in-out infinite; }
.cam-svg .ir-led:nth-child(2n) { animation-delay: .7s; }
.cam-svg .ir-led:nth-child(3n) { animation-delay: 1.3s; }
@keyframes ir { 0%, 100% { fill: #5a1a16; } 50% { fill: #ff5a3c; } }
.cam-svg .rec { animation: blink 1.6s infinite; }
.cam-svg .dome { animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-5px); } }
.hero-caption { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.hero-note { position: absolute; left: 6%; bottom: 18%; max-width: 220px; padding: 10px 12px; border-radius: 12px; background: var(--glass); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: 12.5px; color: var(--ink-2); animation: rise .6s var(--ease) both; animation-delay: .5s; }
.hero-note b { display: block; font-size: 13px; color: var(--ink); }
@media (max-width: 900px) {
  .login-art { display: flex; min-height: 0; padding: 20px 20px 0; order: -1; }
  .hero-art { max-width: 300px; gap: 8px; }
  .hero-caption, .hero-note { display: none; }
  .cam-svg { filter: drop-shadow(0 14px 18px rgba(21, 32, 25, .14)); }
  .login-form { min-height: 0; padding-top: 20px; }
}

.pw .eye { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: transparent; border: 0; color: var(--muted); cursor: pointer; padding: 6px; border-radius: 6px; }
.pw .eye:hover { color: var(--lime); }

/* ---- admin: dev mode, spreadsheet grid, tree editor, mapping cards ---- */
.dev-only { display: none !important; }
body.dev-on .dev-only { display: revert !important; }
body.dev-on td.dev-only, body.dev-on th.dev-only { display: table-cell !important; }
body.dev-on tr.dev-only { display: table-row !important; }
.grid-wrap { overflow: auto; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--bg-2); max-height: calc(100vh - 220px); }
.sheet-grid { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.sheet-grid th { position: sticky; top: 0; z-index: 2; background: var(--bg-3); font: 700 11px var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--line-2); cursor: pointer; user-select: none; white-space: nowrap; }
.sheet-grid th i { font-style: normal; margin-left: 4px; color: var(--lime); font-size: 9px; }
.sheet-grid th.is-sort { color: var(--ink); }
.sheet-grid td { padding: 7px 10px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); vertical-align: middle; white-space: nowrap; max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
.sheet-grid td:last-child, .sheet-grid th:last-child { border-right: 0; }
.sheet-grid tbody tr:hover td { background: rgba(var(--lime-rgb), .05); cursor: pointer; }
.sheet-grid td.num, .sheet-grid th.num { text-align: right; font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.sheet-grid .fill { font-family: var(--f-mono); font-weight: 600; font-size: 12px; padding: 2px 7px; border-radius: 6px; background: var(--bg-3); }
.sheet-grid .fill.ok { color: var(--green); background: rgba(var(--green-rgb, 46,125,79), .12); } .sheet-grid .fill.warn { color: var(--amber); background: rgba(var(--amber-rgb), .12); } .sheet-grid .fill.no { color: var(--red); background: rgba(var(--red-rgb, 200,60,60), .12); }
.tree-row { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; font-size: 13.5px; }
.tree-row:hover { background: var(--bg-3); }
.tree-row .tname { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink); flex: 1; min-width: 0; }
.tree-row .tname .ic { width: 15px; height: 15px; color: var(--lime); flex: none; }
.tree-row small { color: var(--muted); font-family: var(--f-mono); white-space: nowrap; }
.tree-row .tacts { display: flex; gap: 2px; opacity: .55; transition: .15s; }
.tree-row:hover .tacts { opacity: 1; }
.tree-row .tacts .btn { padding: 4px 6px; }
.map-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-2); margin-bottom: 10px; align-items: center; }
.map-card .dst { display: flex; flex-direction: column; gap: 6px; }
.sup-card.is-busy { border-color: rgba(var(--lime-rgb), .5); }
.spin { display: inline-block; width: 10px; height: 10px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; margin-right: 6px; animation: spin 1s linear infinite; vertical-align: -1px; }
.admin-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
@media (max-width: 860px) { .map-card { grid-template-columns: minmax(0, 1fr); } .grid-wrap { max-height: none; } .tree-row .tacts { opacity: 1; } }
@media (max-width: 860px) { .drawer { width: 100% !important; max-width: 100% !important; left: 0; right: 0; } }

/* parts of a later release stage, visible to developers only */
.feat-dev { outline: 1.5px dashed var(--amber); outline-offset: 2px; }
