/* Cabventory prototype styles. Colours and type come from assets/tokens.css. */

/* ---------------------------------------------------------------- fonts */
@font-face { font-family: "Barlow"; font-weight: 400; font-style: normal; font-display: swap; src: url("assets/fonts/Barlow-Regular.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-style: normal; font-display: swap; src: url("assets/fonts/Barlow-Medium.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-style: normal; font-display: swap; src: url("assets/fonts/Barlow-SemiBold.woff2") format("woff2"); }
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 600; font-style: normal; font-display: swap; src: url("assets/fonts/BarlowSemiCondensed-SemiBold.woff2") format("woff2"); }
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 700; font-style: normal; font-display: swap; src: url("assets/fonts/BarlowSemiCondensed-Bold.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-style: normal; font-display: swap; src: url("assets/fonts/IBMPlexMono-Regular.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-style: normal; font-display: swap; src: url("assets/fonts/IBMPlexMono-Medium.woff2") format("woff2"); }

/* ----------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--cv-font-body); font-size: 16px; line-height: 24px;
  color: var(--cv-text); background: var(--cv-ground); -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.no-scroll { overflow: hidden; }
a { color: var(--cv-petrol); text-underline-offset: 3px; }
a:hover { color: var(--cv-petrol-hover); }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--cv-petrol); outline-offset: 2px; }
.sb :focus-visible, .lv :focus-visible { outline-color: var(--cv-yellow); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -80px; z-index: 200; background: var(--cv-yellow); color: var(--cv-graphite); padding: 10px 14px; border-radius: 8px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

.h1 { font: 700 40px/1.08 var(--cv-font-head); margin: 0; letter-spacing: 0.005em; }
.h2 { font: 700 26px/1.15 var(--cv-font-head); margin: 0; }
.h3 { font: 600 20px/1.2 var(--cv-font-head); margin: 0; }
.lead { font-size: 17px; line-height: 26px; color: var(--cv-text-secondary); margin: 6px 0 0; }
.eyebrow { font: 600 13px/1.2 var(--cv-font-head); letter-spacing: 0.08em; text-transform: uppercase; color: var(--cv-text-muted); margin: 0 0 8px; }
.muted { color: var(--cv-text-muted); }
.small { font-size: 14px; line-height: 20px; }
.mono { font-family: var(--cv-font-mono); font-size: 0.92em; }
.mono-strong { font-family: var(--cv-font-mono); font-weight: 500; }
.mono-id { font: 500 18px/1 var(--cv-font-mono); color: var(--cv-text-secondary); }
.block { display: block; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.strong { font-weight: 600; }
.strike { text-decoration: line-through; }
.text-dev { color: var(--cv-dev-fg); }
.text-warn { color: var(--cv-warn-fg); }
.text-ok { color: var(--cv-ok-fg); }
.ic { flex: none; }

/* -------------------------------------------------------------- controls */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: var(--cv-radius-m); border: 1px solid transparent;
  font: 600 15px/1.2 var(--cv-font-body); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background var(--cv-duration-fast) ease-out, border-color var(--cv-duration-fast) ease-out, color var(--cv-duration-fast) ease-out, transform var(--cv-duration-fast) ease-out;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--cv-petrol); color: #FFFFFF; }
.btn--primary:hover { background: var(--cv-petrol-hover); color: #FFFFFF; }
.btn--ghost { background: #FFFFFF; border-color: var(--cv-line-strong); color: var(--cv-text); }
.btn--ghost:hover { background: var(--cv-surface-subtle); border-color: var(--cv-text-faint); color: var(--cv-text); }
.btn--danger { background: var(--cv-dev-fg); color: #FFFFFF; }
.btn--danger:hover { background: #912018; }
.btn--text { background: transparent; color: var(--cv-petrol); }
.btn--text:hover { text-decoration: underline; }
.btn--sm { padding: 0 14px; font-size: 14px; }
.btn--lg { min-height: 56px; font-size: 17px; border-radius: 10px; }
.btn--block { width: 100%; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn.is-busy { pointer-events: none; opacity: 0.75; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-row--end { justify-content: flex-end; }
.icon-btn {
  width: 44px; height: 44px; flex: none; display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: var(--cv-radius-m); background: transparent; color: var(--cv-text); cursor: pointer;
}
.icon-btn:hover { background: var(--cv-surface-subtle); }
.icon-btn--dark { color: var(--cv-dark-text); }
.icon-btn--dark:hover { background: var(--cv-dark-3); }
.link-btn {
  min-height: 44px; padding: 0; border: 0; background: none; color: var(--cv-petrol); cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
}

.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 2px 10px; border-radius: var(--cv-radius-s); font: 600 13px/1.2 var(--cv-font-body); white-space: nowrap; }
.chip__dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.chip--ok { background: var(--cv-ok-bg); color: var(--cv-ok-fg); } .chip--ok .chip__dot { background: var(--cv-ok-dot); }
.chip--dev { background: var(--cv-dev-bg); color: var(--cv-dev-fg); } .chip--dev .chip__dot { background: var(--cv-dev-dot); }
.chip--warn { background: var(--cv-warn-bg); color: var(--cv-warn-fg); } .chip--warn .chip__dot { background: var(--cv-warn-dot); }
.chip--info { background: var(--cv-info-bg); color: var(--cv-info-fg); } .chip--info .chip__dot { background: var(--cv-info-dot); }
.chip--neutral { background: #ECEFEC; color: var(--cv-text-secondary); } .chip--neutral .chip__dot { background: var(--cv-text-faint); }

.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 7px; border-radius: var(--cv-radius-s); font: 700 12px/1 var(--cv-font-head); letter-spacing: 0.06em; flex: none; }
.tag--qbms { background: var(--cv-yellow); color: var(--cv-graphite); }
.tag--bms { background: #E4E8E5; color: var(--cv-text-secondary); box-shadow: inset 0 0 0 1px var(--cv-line-strong); }

.env { display: inline-flex; align-items: center; gap: 8px; min-height: 28px; padding: 2px 10px; border-radius: 999px; background: var(--cv-ok-bg); color: var(--cv-ok-fg); font: 600 13px/1.2 var(--cv-font-body); white-space: nowrap; }
.env__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cv-ok-dot); animation: pulse 2.2s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(47, 163, 90, 0.55); } 70% { box-shadow: 0 0 0 7px rgba(47, 163, 90, 0); } 100% { box-shadow: 0 0 0 0 rgba(47, 163, 90, 0); } }

.lang { display: inline-flex; flex: none; border: 1px solid var(--cv-line-strong); border-radius: var(--cv-radius-m); overflow: hidden; background: #FFFFFF; }
.lang__btn { min-width: 44px; height: 42px; border: 0; background: #FFFFFF; color: var(--cv-text-secondary); font: 600 14px/1 var(--cv-font-body); cursor: pointer; }
.lang__btn:hover { background: var(--cv-surface-subtle); }
.lang__btn[aria-pressed="true"] { background: var(--cv-graphite); color: #FFFFFF; }
.lang__btn:focus-visible { outline-offset: -3px; }

.select { position: relative; display: block; }
.select select {
  appearance: none; -webkit-appearance: none; width: 100%; height: 44px; padding: 0 38px 0 12px;
  border: 1px solid var(--cv-line-strong); border-radius: var(--cv-radius-m); background: #FFFFFF;
  color: var(--cv-text); font: 500 15px/1.2 var(--cv-font-body); cursor: pointer;
}
.select .ic { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--cv-text-muted); }
.select--dark select { background: var(--cv-dark-3); border-color: var(--cv-dark-line); color: #FFFFFF; }
.select--dark .ic { color: var(--cv-dark-text); }

.field { position: relative; display: flex; align-items: center; }
.field--search { flex: 1 1 260px; }
.field--search > .ic { position: absolute; left: 12px; color: var(--cv-text-muted); pointer-events: none; }
.field--search input {
  width: 100%; height: 44px; padding: 0 12px 0 40px; border: 1px solid var(--cv-line-strong); border-radius: var(--cv-radius-m);
  background: #FFFFFF; color: var(--cv-text); font: 400 15px/1.2 var(--cv-font-body);
}
.field .select { min-width: 230px; }

.seg { display: inline-flex; border: 1px solid var(--cv-line-strong); border-radius: var(--cv-radius-m); overflow: hidden; flex: none; }
.seg__btn { min-width: 64px; height: 42px; padding: 0 12px; border: 0; border-right: 1px solid var(--cv-line-strong); background: #FFFFFF; color: var(--cv-text-secondary); font: 600 14px/1 var(--cv-font-body); cursor: pointer; }
.seg__btn:last-child { border-right: 0; }
.seg__btn:hover { background: var(--cv-surface-subtle); }
.seg__btn[aria-pressed="true"] { background: var(--cv-graphite); color: #FFFFFF; }
.seg__btn:focus-visible { outline-offset: -3px; }

.form { display: flex; flex-direction: column; gap: 8px; }
.lbl { display: block; margin-top: 6px; font: 600 13px/1.3 var(--cv-font-body); color: var(--cv-text-secondary); }
.input {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--cv-line-strong); border-radius: var(--cv-radius-m);
  background: #FFFFFF; color: var(--cv-text); font: 400 15px/1.4 var(--cv-font-body);
}
.input.mono { font-family: var(--cv-font-mono); font-size: 14px; }
.input:focus { border-color: var(--cv-petrol); }
.input[readonly] { background: var(--cv-surface-subtle); color: var(--cv-text-secondary); }
textarea.input { resize: vertical; }
.radios { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.radios legend { padding: 0; margin-bottom: 6px; }
.radio { position: relative; }
.radio input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.radio span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1px solid var(--cv-line-strong); border-radius: 999px; font-size: 14px; cursor: pointer; }
.radio input:checked + span { background: var(--cv-graphite); border-color: var(--cv-graphite); color: #FFFFFF; }
.radio input:focus-visible + span { outline: 3px solid var(--cv-petrol); outline-offset: 2px; }
.check { display: flex; gap: 10px; align-items: flex-start; margin-top: 8px; font-size: 14px; line-height: 20px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--cv-petrol); }

.switch { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px 0 6px; border: 1px solid var(--cv-line-strong); border-radius: 999px; background: #FFFFFF; color: var(--cv-text); font: 600 14px/1 var(--cv-font-body); cursor: pointer; }
.switch__knob { position: relative; width: 40px; height: 24px; border-radius: 12px; background: var(--cv-cabinet-grey); transition: background var(--cv-duration-base) ease-out; }
.switch__knob::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #FFFFFF; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); transition: transform var(--cv-duration-base) var(--cv-ease-out); }
.switch[aria-checked="true"] .switch__knob { background: var(--cv-ok-dot); }
.switch[aria-checked="true"] .switch__knob::after { transform: translateX(16px); }

/* ================================================================= LOGIN */
.login { position: relative; min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 20px; overflow: hidden; background: var(--cv-ground); }
.login__blobs { position: absolute; inset: 0; pointer-events: none; }
.blob { position: absolute; display: block; border-radius: 58% 42% 55% 45% / 46% 52% 48% 54%; will-change: transform, border-radius; }
.blob--1 { width: 640px; height: 600px; left: -180px; top: -200px; background: var(--cv-petrol-tint); animation: blob-a 19s ease-in-out infinite alternate; }
.blob--2 { width: 380px; height: 350px; right: -100px; bottom: -120px; background: var(--cv-yellow); animation: blob-b 23s ease-in-out infinite alternate; }
.blob--3 { width: 320px; height: 300px; right: 14%; top: -120px; background: var(--cv-cabinet-grey); opacity: 0.75; animation: blob-c 17s ease-in-out infinite alternate; }
.blob--4 { width: 190px; height: 180px; left: 9%; bottom: -70px; background: var(--cv-petrol); animation: blob-b 15s ease-in-out -4s infinite alternate; }
@keyframes blob-a {
  0% { border-radius: 58% 42% 55% 45% / 46% 52% 48% 54%; transform: translate(0, 0) rotate(0deg); }
  50% { border-radius: 42% 58% 60% 40% / 56% 44% 52% 48%; transform: translate(36px, 24px) rotate(10deg); }
  100% { border-radius: 50% 50% 38% 62% / 40% 60% 45% 55%; transform: translate(-12px, 44px) rotate(-6deg); }
}
@keyframes blob-b {
  0% { border-radius: 40% 60% 38% 62% / 55% 40% 60% 45%; transform: translate(0, 0) rotate(0deg); }
  50% { border-radius: 60% 40% 44% 56% / 44% 58% 42% 56%; transform: translate(-30px, -18px) rotate(-12deg); }
  100% { border-radius: 48% 52% 62% 38% / 52% 44% 56% 48%; transform: translate(10px, -36px) rotate(8deg); }
}
@keyframes blob-c {
  0% { border-radius: 63% 37% 47% 53% / 42% 58% 42% 58%; transform: translate(0, 0); }
  100% { border-radius: 45% 55% 62% 38% / 58% 46% 54% 42%; transform: translate(-40px, 30px); }
}

.login__card {
  position: relative; z-index: 1; width: min(1060px, 100%); display: grid; grid-template-columns: 1.05fr 1fr;
  background: #FFFFFF; border-radius: 28px; overflow: hidden;
  box-shadow: 0 40px 80px rgba(23, 32, 38, 0.16), 0 2px 6px rgba(23, 32, 38, 0.06);
  animation: card-in 0.6s var(--cv-ease-out) both;
}
@keyframes card-in { from { opacity: 0; transform: translateY(18px) scale(0.985); } }

/* left: the cabinet coming to life */
.lv { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 28px; padding: 44px 40px; background: var(--cv-graphite); color: var(--cv-dark-text); overflow: hidden; }
.lv::before { content: ""; position: absolute; width: 460px; height: 460px; right: -200px; top: -200px; background: radial-gradient(circle, rgba(47, 165, 179, 0.28), transparent 65%); pointer-events: none; }
.lv__plate { position: relative; display: flex; flex-direction: column; gap: 22px; padding: 26px 22px; border-radius: 18px; background: #222D33; border: 1px solid #33414A; overflow: hidden; box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.25); }
.lv__row { position: relative; display: flex; align-items: center; min-height: 106px; }
.lv__row--2 { min-height: 80px; }
.lv__row--3 { min-height: 36px; }
.lv__din {
  position: absolute; left: -22px; right: -22px; top: 50%; height: 16px; margin-top: -8px;
  background: repeating-linear-gradient(90deg, #5A666D 0 10px, #6B777E 10px 14px);
  border-top: 1px solid #7D888E; border-bottom: 1px solid #4A555B;
  transform-origin: left center; animation: din-in 0.7s var(--cv-ease-out) var(--d, 0ms) both;
}
@keyframes din-in { from { transform: scaleX(0); } }
.lv__mods { position: relative; display: flex; align-items: center; gap: 4px; }
.lm {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100px; padding-top: 9px;
  border-radius: 4px; background: #353C41; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05), 0 6px 10px rgba(0, 0, 0, 0.28);
  animation: drop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) calc(500ms + var(--i) * 80ms) both;
}
@keyframes drop { 0% { opacity: 0; transform: translateY(-36px); } 60% { opacity: 1; } 100% { opacity: 1; transform: none; } }
.lm--ctrl { width: 64px; background: #2B3135; }
.lm--io { width: 28px; }
.lm__led { width: 6px; height: 6px; border-radius: 50%; background: var(--cv-ok-dot); animation: led 1.6s ease-in-out calc(1.4s + var(--b, 0s)) infinite; }
@keyframes led { 50% { opacity: 0.3; } }
.lm__lbl { writing-mode: vertical-rl; font: 500 10px/1 var(--cv-font-mono); letter-spacing: 0.04em; color: var(--cv-cabinet-grey); }
.lm--ctrl .lm__lbl, .lm--psu .lm__lbl, .lm--sw .lm__lbl { writing-mode: horizontal-tb; margin-top: auto; margin-bottom: 8px; }
.lm--psu { width: 60px; height: 70px; background: #D3D8D4; }
.lm--psu .lm__lbl { color: #3B464C; }
.lm--ups { width: 44px; }
.lm--brand { width: 26px; height: 48px; padding: 0; border-radius: 5px; animation: drop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) calc(500ms + var(--i) * 80ms) both, snap 0.6s ease-out calc(1000ms + var(--i) * 80ms) both; }
.lm--p { background: var(--cv-petrol-on-dark); margin-left: 8px; }
.lm--y { background: var(--cv-yellow); margin-right: 8px; }
@keyframes snap { 0% { box-shadow: 0 0 0 0 rgba(242, 194, 0, 0.65); } 100% { box-shadow: 0 0 0 12px rgba(242, 194, 0, 0); } }
.lm--sw { width: 58px; height: 64px; background: #2B3135; }
.lm__ports { display: flex; gap: 3px; }
.lm__ports i { width: 7px; height: 5px; background: var(--cv-yellow); animation: led 0.9s steps(2) 1.6s infinite; }
.lm__ports i:nth-child(2) { animation-duration: 1.3s; }
.lm__ports i:nth-child(3) { background: #6B777E; animation: none; }
.lv__terms { position: relative; display: flex; gap: 2px; animation: fade-in 0.5s ease-out 1.1s both; }
.lv__terms i { width: 9px; height: 30px; border-radius: 2px; background: #C9D0CB; }
.lv__terms i:nth-child(5n) { background: #3A78C8; }
.lv__terms i:nth-child(11n) { background: #6FA03C; }
.lv__scan { position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--cv-yellow); box-shadow: 0 0 16px 5px rgba(242, 194, 0, 0.45); opacity: 0; animation: scan 6s ease-in-out 1.9s infinite; }
@keyframes scan { 0% { top: 0; opacity: 0; } 6% { opacity: 1; } 46% { top: calc(100% - 3px); opacity: 1; } 52% { opacity: 0; } 100% { top: calc(100% - 3px); opacity: 0; } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(10px); } }
.lv__tag { position: relative; margin: 0; font: 700 36px/1.05 var(--cv-font-head); color: #FFFFFF; animation: fade-up 0.6s var(--cv-ease-out) 1.2s both; }
.lv__feed { position: relative; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 15px; line-height: 20px; min-height: 80px; }
.lv__feed li { display: flex; align-items: center; gap: 10px; animation: feed 9s ease-out calc(2s + var(--f) * 1.4s) infinite both; }
.lv__feed li .ic { color: var(--cv-yellow); }
.lv__feed li:nth-child(2) .ic { color: #6FD39A; }
@keyframes feed { 0% { opacity: 0; transform: translateY(6px); } 6%, 86% { opacity: 1; transform: none; } 94%, 100% { opacity: 0; transform: none; } }

/* right: sign in */
.lf { display: flex; flex-direction: column; gap: 24px; min-height: 620px; padding: 34px 44px 26px; }
.lf__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lf__logo { display: flex; align-items: center; gap: 10px; }
.lf__word { font: 700 27px/1 var(--cv-font-head); letter-spacing: 0.01em; animation: word-in 0.5s var(--cv-ease-out) 0.95s both; }
@keyframes word-in { from { opacity: 0; transform: translateX(-10px); } }
.am { flex: none; overflow: visible; }
.am__tile { transform-box: fill-box; transform-origin: center; animation: tile-in 0.45s var(--cv-ease-out) 0.15s both; }
@keyframes tile-in { from { opacity: 0; transform: scale(0.6) rotate(-8deg); } }
.am__rail { transform-box: fill-box; transform-origin: left center; animation: din-in 0.45s var(--cv-ease-out) var(--d) both; }
.am__mod { transform-box: fill-box; animation: am-drop 0.5s cubic-bezier(0.34, 1.7, 0.64, 1) var(--d) both; }
@keyframes am-drop { 0% { opacity: 0; transform: translateY(-16px); } 50% { opacity: 1; } 100% { opacity: 1; transform: none; } }
.lf__body { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 16px; max-width: 420px; }
.lf__body > .env { align-self: flex-start; }
.lf__title { margin: 4px 0 0; font: 700 46px/1.04 var(--cv-font-head); }
.lf__lead { margin: 0; color: var(--cv-text-secondary); font-size: 17px; line-height: 26px; }
.lf__action { min-height: 56px; margin-top: 8px; }
.lf__note { display: flex; align-items: flex-start; gap: 10px; margin: 0; font-size: 14px; line-height: 20px; color: var(--cv-text-muted); }
.lf__note .ic { color: var(--cv-petrol); margin-top: 1px; }
.lf__help { margin: 0; padding-top: 14px; border-top: 1px solid var(--cv-line); font-size: 14px; line-height: 20px; color: var(--cv-text-muted); }
.lf__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; font-size: 13px; color: var(--cv-text-muted); }
.proto-pill { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 10px; border-radius: 999px; background: var(--cv-yellow); color: var(--cv-graphite); font: 600 12px/1.2 var(--cv-font-body); }

.sp__track { position: relative; height: 44px; border: 1px solid var(--cv-line); border-radius: 10px; background: var(--cv-surface-subtle); overflow: hidden; }
.sp__din { position: absolute; left: 0; right: 0; top: 50%; height: 10px; margin-top: -5px; background: repeating-linear-gradient(90deg, #C2C9C4 0 8px, #D7DCD8 8px 11px); }
.sp__m { position: absolute; top: 9px; left: -24px; width: 16px; height: 26px; border-radius: 4px; animation: slide 1.15s cubic-bezier(0.65, 0, 0.35, 1) infinite; }
.sp__m--p { background: var(--cv-petrol); }
.sp__m--y { background: var(--cv-yellow); animation-delay: 0.14s; }
@keyframes slide { from { left: -24px; } to { left: 100%; } }
.sp__steps { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 15px; color: var(--cv-text-muted); }
.sp__steps li { display: flex; align-items: center; gap: 10px; transition: color var(--cv-duration-base) ease-out; }
.sp__steps .ic { width: 22px; height: 22px; padding: 3px; border-radius: 50%; background: var(--cv-line); color: transparent; transition: background var(--cv-duration-base) ease-out, color var(--cv-duration-base) ease-out, transform var(--cv-duration-base) ease-out; }
.sp__steps li.is-done { color: var(--cv-text); }
.sp__steps li.is-done .ic { background: var(--cv-ok-bg); color: var(--cv-ok-fg); transform: scale(1.08); }

/* ================================================================= SHELL */
.shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; background: linear-gradient(90deg, var(--cv-graphite) 252px, var(--cv-ground) 252px); }
.sb {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 20px;
  padding: 18px 14px 20px; background: var(--cv-graphite); color: var(--cv-dark-text);
}
.sb__brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px; font: 700 22px/1 var(--cv-font-head); color: #FFFFFF; letter-spacing: 0.01em; }
.sb__close { display: none; margin-left: auto; }
.sb__site { display: flex; flex-direction: column; gap: 6px; padding: 0 8px; }
.sb__site-lbl { font: 600 12px/1 var(--cv-font-head); letter-spacing: 0.08em; text-transform: uppercase; color: var(--cv-dark-text-muted); }
.sb__nav { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.sb__link { position: relative; display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 12px; border-radius: var(--cv-radius-m); color: var(--cv-dark-text); font-weight: 500; text-decoration: none; transition: background var(--cv-duration-fast) ease-out, color var(--cv-duration-fast) ease-out; }
.sb__link:hover { background: var(--cv-dark-3); color: #FFFFFF; }
.sb__link.is-active { background: var(--cv-dark-4); color: #FFFFFF; }
.sb__link.is-active::before { content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 4px; border-radius: 0 4px 4px 0; background: var(--cv-yellow); }
.sb__badge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--cv-yellow); color: var(--cv-graphite); font: 700 12px/22px var(--cv-font-body); text-align: center; }
.sb__foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding: 0 8px; font-size: 12px; line-height: 16px; color: var(--cv-dark-text-muted); }
.sb .env { background: rgba(47, 163, 90, 0.16); color: #9FE0B5; }
.scrim { display: none; }

.mw { min-width: 0; display: flex; flex-direction: column; }
.tb {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; height: 66px; padding: 0 28px;
  background: rgba(255, 255, 255, 0.96); backdrop-filter: blur(6px); border-bottom: 1px solid var(--cv-line);
}
.tb__menu, .tb__mark { display: none; }
.tb__mark { align-items: center; }
.tb__search { position: relative; flex: 1; max-width: 520px; display: flex; align-items: center; }
.tb__search .ic { position: absolute; left: 12px; color: var(--cv-text-muted); pointer-events: none; }
.tb__search input { width: 100%; height: 44px; padding: 0 12px 0 40px; border: 1px solid var(--cv-line-strong); border-radius: var(--cv-radius-m); background: var(--cv-surface-subtle); color: var(--cv-text); font: 400 15px/1.2 var(--cv-font-body); }
.tb__search input:focus { background: #FFFFFF; }
.tb__env { margin-left: auto; }
.user { position: relative; flex: none; }
.user__btn { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 8px 0 4px; border: 0; border-radius: 10px; background: transparent; color: var(--cv-text); cursor: pointer; text-align: left; }
.user__btn:hover { background: var(--cv-surface-subtle); }
.avatar { width: 38px; height: 38px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--cv-petrol); color: #FFFFFF; font: 600 14px/1 var(--cv-font-body); }
.user__txt { display: flex; flex-direction: column; line-height: 1.2; }
.user__txt strong { font-weight: 600; font-size: 15px; }
.user__txt small { font-size: 13px; color: var(--cv-text-muted); }
.user__chev { color: var(--cv-text-muted); }
.menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; width: 270px; padding: 8px; background: #FFFFFF; border: 1px solid var(--cv-line); border-radius: 12px; box-shadow: var(--cv-shadow-raised); animation: pop-in 0.15s ease-out; }
@keyframes pop-in { from { opacity: 0; transform: translateY(-4px); } }
.menu__head { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px 12px; margin-bottom: 6px; border-bottom: 1px solid var(--cv-line); font-size: 14px; }
.menu__head span { font-size: 13px; color: var(--cv-text-muted); }
.menu__item { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 10px; border-radius: var(--cv-radius-m); color: var(--cv-text); text-decoration: none; }
.menu__item:hover { background: var(--cv-surface-subtle); color: var(--cv-text); }
main { flex: 1; padding: 28px 32px 48px; outline: none; }
.app-foot { padding: 12px 32px 24px; font-size: 13px; color: var(--cv-text-muted); }

/* ================================================================= PAGES */
.page { max-width: 1320px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.page.is-enter { animation: fade-up 0.25s var(--cv-ease-out) both; }
.page__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; }
.page__head > div:first-child { flex: 1 1 520px; min-width: 0; }
.page__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.card { min-width: 0; display: flex; flex-direction: column; gap: 16px; padding: 22px 24px; background: #FFFFFF; border: 1px solid var(--cv-line); border-radius: var(--cv-radius-xl); overflow: hidden; }
.card--flush { padding: 0; gap: 0; }
.card--soft { background: var(--cv-surface-subtle); }
.card__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; }
.card__head--pad { padding: 20px 24px 14px; }
.count { min-width: 26px; height: 26px; padding: 0 8px; border-radius: 13px; background: var(--cv-graphite); color: #FFFFFF; font: 600 13px/26px var(--cv-font-body); text-align: center; }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kpi {
  display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 14px; align-items: center; padding: 18px 20px;
  background: #FFFFFF; border: 1px solid var(--cv-line); border-radius: var(--cv-radius-xl); color: var(--cv-text); text-decoration: none;
  transition: border-color var(--cv-duration-fast) ease-out, box-shadow var(--cv-duration-fast) ease-out, transform var(--cv-duration-fast) ease-out;
}
.kpi:hover { color: var(--cv-text); border-color: var(--cv-line-strong); box-shadow: 0 8px 20px rgba(23, 32, 38, 0.08); transform: translateY(-1px); }
.kpi__ic { grid-row: 1 / span 2; width: 46px; height: 46px; display: flex; align-items: center; justify-content: center; border-radius: 12px; background: var(--cv-surface-subtle); color: var(--cv-text-secondary); }
.kpi__n { font: 700 34px/1 var(--cv-font-head); }
.kpi__l { font-weight: 600; font-size: 15px; line-height: 20px; }
.kpi__s { grid-column: 1 / -1; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--cv-line); font-size: 13px; line-height: 18px; color: var(--cv-text-muted); }
.kpi--dev .kpi__ic { background: var(--cv-dev-bg); color: var(--cv-dev-fg); } .kpi--dev .kpi__n { color: var(--cv-dev-fg); }
.kpi--warn .kpi__ic { background: var(--cv-warn-bg); color: var(--cv-warn-fg); }
.kpi--info .kpi__ic { background: var(--cv-info-bg); color: var(--cv-info-fg); }
.kpi--ok .kpi__ic { background: var(--cv-ok-bg); color: var(--cv-ok-fg); }
.kpi--neutral .kpi__ic { background: var(--cv-petrol-tint); color: var(--cv-petrol); }

.grid-2 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); gap: 20px; align-items: start; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
#cab-results { margin: 0 -24px -22px; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 21px; }
.table th { padding: 10px 16px; background: var(--cv-surface-subtle); border-top: 1px solid var(--cv-line); border-bottom: 1px solid var(--cv-line); text-align: left; white-space: nowrap; font: 600 12px/1.3 var(--cv-font-head); letter-spacing: 0.08em; text-transform: uppercase; color: var(--cv-text-muted); }
.table td { padding: 11px 16px; border-bottom: 1px solid #ECEFEC; vertical-align: middle; }
.table th:first-child, .table td:first-child { padding-left: 24px; }
.table th:last-child, .table td:last-child { padding-right: 24px; }
.card--flush > .table-wrap > .table th, .tabpanel > .table-wrap > .table th { border-top: 0; }
.table-bleed { margin: 0 -24px -22px; }
.table tbody tr:hover { background: #FAFBFA; }
.table tbody tr:last-child td { border-bottom: 0; }
.cell-link { display: flex; flex-direction: column; justify-content: center; min-height: 44px; color: var(--cv-text); text-decoration: none; }
.cell-link strong { color: var(--cv-petrol); white-space: nowrap; }
.cell-link span { font-size: 14px; color: var(--cv-text-secondary); }
.cell-link:hover strong { text-decoration: underline; }
.cell-2 { display: flex; flex-direction: column; line-height: 1.3; }

.att { list-style: none; margin: 0 -24px -22px; padding: 0; }
.att__item { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 12px 24px; border-top: 1px solid #ECEFEC; color: var(--cv-text); text-decoration: none; }
.att__item:hover { background: #FAFBFA; color: var(--cv-text); }
.att__ic { width: 36px; height: 36px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: 10px; }
.att__ic--dev { background: var(--cv-dev-bg); color: var(--cv-dev-fg); }
.att__ic--warn { background: var(--cv-warn-bg); color: var(--cv-warn-fg); }
.att__ic--info { background: var(--cv-info-bg); color: var(--cv-info-fg); }
.att__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.att__txt strong { font-weight: 600; font-size: 15px; line-height: 20px; }
.att__txt span { font-size: 13px; line-height: 18px; color: var(--cv-text-muted); }
.att__chev { color: var(--cv-text-faint); }

.empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 32px 16px; color: var(--cv-text-muted); text-align: center; }
.empty p { margin: 0; }
.empty--left { flex-direction: row; align-items: center; justify-content: flex-start; padding: 24px; text-align: left; }

/* =============================================================== CABINET */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-bottom: -10px; font-size: 14px; color: var(--cv-text-muted); }
.crumbs a { display: inline-flex; align-items: center; min-height: 32px; }
.title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.meta { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; line-height: 20px; color: var(--cv-text-secondary); }
.meta li { display: flex; align-items: center; gap: 6px; }
.meta .ic { color: var(--cv-text-faint); }
.banner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; padding: 14px 18px; border: 1px solid; border-radius: 12px; }
.banner > div { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; }
.banner span { font-size: 14px; line-height: 20px; }
.banner--dev { background: var(--cv-dev-bg); border-color: #F6C6C1; color: var(--cv-dev-fg); }
.banner--dev span { color: #7A271A; }
.banner--info { background: var(--cv-info-bg); border-color: #C6D7EE; color: var(--cv-info-fg); }
.banner--info span { color: #1B3A63; }
.cab-grid { display: grid; grid-template-columns: minmax(0, 1fr) 370px; gap: 20px; align-items: start; }

.front { display: flex; gap: 16px; align-items: stretch; padding: 0 24px 14px; }
.plate {
  --m: 1; flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 18px; padding: 24px;
  background: #E4E8E5; border: 1px solid #D3D9D5; border-radius: 14px; overflow-x: auto; overflow-y: hidden;
  box-shadow: inset 0 2px 6px rgba(23, 32, 38, 0.06);
}
.plate__row { position: relative; display: flex; align-items: center; gap: 4px; width: max-content; min-width: 100%; min-height: calc(136px * var(--m)); padding: 0 4px; }
.plate__row::before {
  content: ""; position: absolute; left: -24px; right: -24px; top: 50%; height: 18px; margin-top: -9px;
  background: repeating-linear-gradient(90deg, #AEB6B1 0 12px, #C2C9C4 12px 16px); border-top: 1px solid #9AA5AB; border-bottom: 1px solid #C9D0CB;
}
.plate__row--2 { min-height: calc(104px * var(--m)); }
.plate__row--terms { min-height: 42px; }
.terms { position: relative; display: flex; gap: 2px; }
.terms i { width: 10px; height: 34px; border-radius: 2px; background: #F6F7F5; border: 1px solid #AEB6B1; }
.terms i:nth-child(5n) { background: #3A78C8; border-color: #2F64A8; }
.terms i:nth-child(12n) { background: #6FA03C; border-color: #5A8531; }

.mod {
  position: relative; z-index: 1; flex: none; display: flex; flex-direction: column; align-items: center; gap: 8px;
  width: calc(var(--w) * var(--m) * 1px); height: calc(126px * var(--m)); padding: 10px 0 9px;
  border: 0; border-radius: 4px; background: #353C41; color: var(--cv-cabinet-grey); cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), 0 4px 8px rgba(23, 32, 38, 0.18);
  transition: transform var(--cv-duration-fast) ease-out, box-shadow var(--cv-duration-fast) ease-out;
}
.mod:hover { transform: translateY(-2px); }
.mod--ctrl, .mod--switch { background: #2B3135; }
.mod.is-light { background: #D9DEDA; color: var(--cv-text-secondary); box-shadow: inset 0 0 0 1px #AEB6B1, 0 4px 8px rgba(23, 32, 38, 0.12); }
.plate__row--2 .mod { height: calc(94px * var(--m)); }
.mod__led { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--cv-ok-dot); }
.mod.st-warn .mod__led { background: var(--cv-warn-dot); }
.mod.st-dev .mod__led { background: var(--cv-dev-dot); animation: led 1s steps(2) infinite; }
.mod__tag { font: 500 11px/1 var(--cv-font-mono); letter-spacing: 0.03em; }
.mod--io .mod__tag { writing-mode: vertical-rl; }
.mod__type { margin-top: auto; font: 600 10px/1 var(--cv-font-head); letter-spacing: 0.04em; color: #9AA5AB; white-space: nowrap; }
.mod.is-light .mod__type { color: var(--cv-text-muted); }
.mod__ports { display: flex; gap: 3px; }
.mod__ports i { width: 7px; height: 5px; background: var(--cv-yellow); }
.mod__ports i:nth-child(2n) { background: #6B777E; }
.mod.st-dev { outline: 2px solid var(--cv-dev-dot); outline-offset: 2px; }
.mod.st-dev::after { content: ""; position: absolute; inset: -5px; border: 2px solid var(--cv-dev-dot); border-radius: 8px; animation: ring 1.8s ease-out infinite; pointer-events: none; }
@keyframes ring { 0% { opacity: 0.9; transform: scale(1); } 100% { opacity: 0; transform: scale(1.22); } }
.mod.is-selected { transform: translateY(-5px); box-shadow: 0 0 0 3px var(--cv-petrol), 0 12px 20px rgba(23, 32, 38, 0.28); }
.mod.st-dev.is-selected { outline-offset: 5px; }
.mod:focus-visible { outline: 3px solid var(--cv-yellow); outline-offset: 4px; }

.door { flex: none; width: 128px; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 14px 12px; background: #DDE2DE; border: 1px solid var(--cv-cabinet-grey); border-radius: 14px; }
.door__lbl { font: 600 12px/1 var(--cv-font-head); letter-spacing: 0.08em; text-transform: uppercase; color: var(--cv-text-muted); }
.hmi { position: relative; width: 100px; display: flex; flex-direction: column; gap: 6px; padding: 8px; border: 0; border-radius: 8px; background: #2B3135; cursor: pointer; transition: transform var(--cv-duration-fast) ease-out, box-shadow var(--cv-duration-fast) ease-out; }
.hmi:hover { transform: translateY(-2px); }
.hmi__screen { height: 58px; display: flex; flex-direction: column; justify-content: center; gap: 5px; padding: 0 8px; border-radius: 4px; background: linear-gradient(160deg, #1F4E8C, #0A6A75); }
.hmi__screen i { display: block; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.55); }
.hmi__screen i:nth-child(2) { width: 60%; }
.hmi__screen i:nth-child(3) { width: 80%; }
.hmi__tag { font: 500 11px/1 var(--cv-font-mono); color: var(--cv-cabinet-grey); }
.hmi.is-selected { box-shadow: 0 0 0 3px var(--cv-petrol); }

.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; padding: 0 24px 18px; font-size: 13px; color: var(--cv-text-muted); }
.lg { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; }
.lg--ok { background: var(--cv-ok-dot); } .lg--dev { background: var(--cv-dev-dot); } .lg--warn { background: var(--cv-warn-dot); }
.legend__hint { margin-left: auto; }

.detail { position: sticky; top: 86px; gap: 12px; }
.detail__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.detail .muted { margin: -6px 0 0; font-size: 14px; }
.kv { margin: 0; display: flex; flex-direction: column; }
.kv > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; padding: 9px 0; border-top: 1px solid #ECEFEC; font-size: 15px; line-height: 21px; }
.kv dt { font-size: 14px; color: var(--cv-text-muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.kv--wide > div { grid-template-columns: 160px minmax(0, 1fr); }
.kv--box { padding: 4px 16px; background: var(--cv-surface-subtle); border-radius: 12px; }
.kv--box > div:first-child { border-top: 0; }
.callout { display: flex; gap: 12px; padding: 14px 16px; border-radius: 12px; font-size: 14px; line-height: 20px; }
.callout p { margin: 4px 0 0; }
.callout p + p { margin-top: 10px; }
.callout .ic { margin-top: 1px; }
.callout--dev { background: var(--cv-dev-bg); color: #7A271A; }
.callout--dev .ic, .callout--dev strong { color: var(--cv-dev-fg); }
.callout--dev .muted { color: #7A271A; opacity: 0.85; }
.callout--warn { background: var(--cv-warn-bg); color: #7C2D12; }
.callout--warn .ic, .callout--warn strong { color: var(--cv-warn-fg); }
.callout--info { background: var(--cv-info-bg); color: #1B3A63; }
.callout--info .ic, .callout--info strong { color: var(--cv-info-fg); }

.tabs { display: flex; gap: 4px; padding: 6px 12px 0; border-bottom: 1px solid var(--cv-line); overflow-x: auto; }
.tab { position: relative; min-height: 50px; padding: 0 14px; border: 0; background: none; color: var(--cv-text-muted); font: 600 15px/1 var(--cv-font-body); white-space: nowrap; cursor: pointer; }
.tab:hover { color: var(--cv-text); }
.tab[aria-selected="true"] { color: var(--cv-text); }
.tab[aria-selected="true"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--cv-petrol); }
.tab:focus-visible { outline-offset: -3px; }
.tabpanel { outline: none; }
.tabpanel:focus-visible { box-shadow: inset 0 0 0 3px var(--cv-petrol); }
.pad { display: flex; align-items: center; gap: 6px; margin: 0; padding: 12px 24px 18px; }

.bl-summary { padding: 20px 24px 6px; }
.bl-bar { height: 10px; border-radius: 5px; background: var(--cv-dev-bg); overflow: hidden; }
.bl-bar span { display: block; height: 100%; background: var(--cv-ok-dot); }
.bl-summary p { margin: 8px 0 0; font-size: 14px; color: var(--cv-text-secondary); }
.versions { list-style: none; margin: 0; padding: 10px 24px 22px; display: flex; flex-direction: column; gap: 10px; }
.version { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; padding: 12px 14px; border: 1px solid var(--cv-line); border-radius: 12px; }
.version.is-active { border-color: var(--cv-petrol); background: #F4F9F9; }
.version__v { width: 42px; height: 42px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: 10px; background: var(--cv-graphite); color: var(--cv-yellow); font: 700 16px/1 var(--cv-font-head); }
.version__txt { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; font-size: 14px; line-height: 20px; }

.docs { list-style: none; margin: 0; padding: 6px 24px 14px; }
.doc { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid #ECEFEC; }
.doc:last-child { border-bottom: 0; }
.doc__ic { width: 44px; height: 44px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: 10px; background: var(--cv-petrol-tint); color: var(--cv-petrol); }
.doc__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 14px; line-height: 20px; }

/* ================================================================= ROUND */
.round-layout { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 48px; align-items: start; width: 100%; max-width: 1120px; margin: 0 auto; }
.round-side { display: flex; flex-direction: column; gap: 18px; max-width: 520px; padding-top: 12px; }
.round-side .h1 { margin-top: -4px; }
.round-side .lead { margin: 0; }
.howto { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.howto li { display: flex; align-items: center; gap: 12px; }
.howto span { width: 32px; height: 32px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--cv-petrol); color: #FFFFFF; font-weight: 700; }
.round-ctrl { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 16px; background: #FFFFFF; border: 1px dashed var(--cv-line-strong); border-radius: 12px; }
.round-ctrl__lbl { width: 100%; font: 600 12px/1 var(--cv-font-head); letter-spacing: 0.08em; text-transform: uppercase; color: var(--cv-text-muted); }

.phone-wrap { display: flex; justify-content: center; }
.phone { position: relative; width: 372px; height: 770px; display: flex; flex-direction: column; overflow: hidden; background: #FFFFFF; border: 10px solid var(--cv-graphite); border-radius: 46px; box-shadow: 0 30px 60px rgba(23, 32, 38, 0.22); }
.phone__status { height: 34px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; background: var(--cv-surface-subtle); font: 600 13px/1 var(--cv-font-body); }
.phone__notch { width: 92px; height: 22px; border-radius: 12px; background: var(--cv-graphite); }
.phone__sig { display: flex; }
.ph { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; background: #FFFFFF; }
.ph__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px; background: var(--cv-surface-subtle); border-bottom: 1px solid var(--cv-line); }
.ph__app { display: flex; align-items: center; gap: 8px; font: 700 18px/1 var(--cv-font-head); }
.ph__head--cab { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 8px; }
.ph__cab { display: flex; align-items: center; gap: 8px; font: 700 20px/1.1 var(--cv-font-head); white-space: nowrap; }
.ph__meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 8px; }
.ph__room { grid-column: 1 / -1; font-size: 13px; line-height: 18px; color: var(--cv-text-muted); }
.ph__progress { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 4px; }
.ph__bar { height: 8px; border-radius: 4px; background: var(--cv-line); overflow: hidden; }
.ph__bar span { display: block; height: 100%; border-radius: 4px; background: var(--cv-petrol); transition: width 0.3s var(--cv-ease-out); }
.net { display: inline-flex; align-items: center; gap: 5px; min-height: 24px; padding: 2px 8px; border-radius: var(--cv-radius-s); font: 600 12px/1.2 var(--cv-font-body); white-space: nowrap; }
.net--off { background: var(--cv-warn-bg); color: var(--cv-warn-fg); }
.net--on { background: var(--cv-ok-bg); color: var(--cv-ok-fg); }
.ph__body { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 16px; }
.ph__body--center { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; }
.ph__body--center p { margin: 0; }
#ph-done-title:focus, #ph-cab-title:focus { outline: none; }
.ph__foot { display: flex; flex-direction: column; gap: 6px; padding: 12px 16px 16px; background: #FFFFFF; border-top: 1px solid var(--cv-line); }
.ph__foot--row { flex-direction: row; }
.ph__foot--row .btn { flex: 1; padding: 0 10px; }
.viewfinder { position: relative; width: 224px; height: 224px; margin: 14px 0 4px; display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 20px; background: var(--cv-dark-2); }
.vf__qr { color: rgba(255, 255, 255, 0.55); display: flex; }
.vf__c { position: absolute; width: 36px; height: 36px; border: 4px solid var(--cv-yellow); }
.vf__c--tl { left: 16px; top: 16px; border-right: 0; border-bottom: 0; border-top-left-radius: 12px; }
.vf__c--tr { right: 16px; top: 16px; border-left: 0; border-bottom: 0; border-top-right-radius: 12px; }
.vf__c--bl { left: 16px; bottom: 16px; border-right: 0; border-top: 0; border-bottom-left-radius: 12px; }
.vf__c--br { right: 16px; bottom: 16px; border-left: 0; border-top: 0; border-bottom-right-radius: 12px; }
.vf__line { position: absolute; left: 20px; right: 20px; top: 24px; height: 3px; background: var(--cv-yellow); box-shadow: 0 0 14px 4px rgba(242, 194, 0, 0.5); animation: vf 2.4s ease-in-out infinite; }
@keyframes vf { 0%, 100% { top: 24px; } 50% { top: calc(100% - 27px); } }

.ri-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ri { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; border: 1px solid var(--cv-line); border-radius: 12px; transition: background var(--cv-duration-base) ease-out, border-color var(--cv-duration-base) ease-out; }
.ri__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 14px; line-height: 19px; }
.ri__txt .mono { font-size: 12px; overflow-wrap: anywhere; }
.ri--ok { background: #F3FAF5; border-color: #BFE3CB; }
.ri--dev { background: #FEF3F2; border-color: #F6C6C1; }
.ri__btns { display: flex; gap: 6px; flex: none; }
.ri__btn { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--cv-line-strong); border-radius: 10px; background: #FFFFFF; cursor: pointer; }
.ri__btn--ok { color: var(--cv-ok-fg); }
.ri__btn--ok:hover { background: var(--cv-ok-bg); border-color: var(--cv-ok-dot); }
.ri__btn--dev { color: var(--cv-dev-fg); }
.ri__btn--dev:hover { background: var(--cv-dev-bg); border-color: var(--cv-dev-dot); }
.ri__state { min-width: 44px; height: 44px; flex: none; display: flex; align-items: center; justify-content: center; padding: 0 10px; border: 0; border-radius: 10px; font: 600 12px/1 var(--cv-font-body); cursor: pointer; }
.ri__state--ok { background: var(--cv-ok-dot); color: #FFFFFF; }
.ri__state--dev { background: var(--cv-dev-fg); color: #FFFFFF; }
.ri.is-new .ri__state { animation: pop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes pop { from { transform: scale(0.55); } }

.sheet-scrim { position: absolute; inset: 0; z-index: 5; background: rgba(23, 32, 38, 0.45); animation: fade-in 0.2s ease-out; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 6; max-height: 90%; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 10px 16px 16px; background: #FFFFFF; border-radius: 20px 20px 0 0; box-shadow: 0 -10px 30px rgba(23, 32, 38, 0.2); animation: sheet-up 0.28s var(--cv-ease-out); }
.sheet .h3 { margin-top: 2px; }
.sheet p { margin: 0; }
.sheet__grab { align-self: center; width: 40px; height: 5px; margin-bottom: 6px; border-radius: 3px; background: var(--cv-line-strong); }
@keyframes sheet-up { from { transform: translateY(100%); } }
.photo { display: flex; align-items: center; gap: 12px; padding: 10px; background: var(--cv-surface-subtle); border: 1px solid var(--cv-line); border-radius: 10px; animation: pop 0.3s var(--cv-ease-out); }
.photo .ic { width: 56px; height: 56px; padding: 14px; border-radius: 8px; background: var(--cv-cabinet-grey); color: var(--cv-text-muted); }
.photo span { display: flex; flex-direction: column; font-size: 14px; line-height: 20px; }
.done-check svg { display: block; animation: pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1); }
.done-check__path { stroke-dasharray: 44; stroke-dashoffset: 44; animation: draw 0.5s ease-out 0.2s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ================================================================ CHANGE */
.cr-grid { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 20px; align-items: start; }
.stack { min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.step { display: flex; gap: 12px; padding: 16px; background: #FFFFFF; border: 1.5px solid var(--cv-line); border-radius: 14px; transition: background 0.3s ease-out, border-color 0.3s ease-out; }
.step__n { width: 34px; height: 34px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: #ECEFEC; color: var(--cv-text-secondary); font: 700 15px/1 var(--cv-font-body); }
.step__txt { min-width: 0; display: flex; flex-direction: column; gap: 4px; font-size: 14px; line-height: 19px; }
.step__txt strong { font: 700 18px/1.1 var(--cv-font-head); }
.step__txt .btn { align-self: flex-start; margin-top: 6px; }
.step.is-done { background: #F3FAF5; border-color: #BFE3CB; }
.step.is-done .step__n { background: var(--cv-ok-dot); color: #FFFFFF; }
.step.is-next { border-color: var(--cv-petrol); box-shadow: 0 0 0 4px rgba(10, 106, 117, 0.08); }
.step.is-next .step__n { background: var(--cv-petrol); color: #FFFFFF; }
.step.is-wait .step__txt strong { color: var(--cv-text-secondary); }
.step.is-flash { animation: flash 1.2s ease-out; }
.step.is-flash .step__n { animation: pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes flash { 0% { box-shadow: 0 0 0 0 rgba(47, 163, 90, 0.5); } 100% { box-shadow: 0 0 0 16px rgba(47, 163, 90, 0); } }
.card > p.small { display: flex; align-items: flex-start; gap: 6px; margin: 0; }
.trail { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.trail li { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-top: 1px solid #ECEFEC; font-size: 14px; line-height: 20px; }
.trail__when { font: 400 13px/20px var(--cv-font-mono); color: var(--cv-text-muted); }

.baseline-card > .small { margin: -10px 0 0; }
.bl-stack { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.blv { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 12px; border: 1px solid var(--cv-line); border-radius: 12px; transition: opacity 0.4s ease-out, background 0.4s ease-out; }
.blv__v { width: 44px; height: 44px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: 10px; background: var(--cv-graphite); color: var(--cv-yellow); font: 700 17px/1 var(--cv-font-head); }
.blv__txt { flex: 1 1 140px; min-width: 0; display: flex; flex-direction: column; }
.blv__txt strong { font: 700 17px/1.2 var(--cv-font-head); }
.blv.is-active { background: #F4F9F9; border-color: var(--cv-petrol); }
.blv--pending { background: var(--cv-surface-subtle); border-style: dashed; border-color: var(--cv-line-strong); }
.blv--pending .blv__v { background: var(--cv-cabinet-grey); color: var(--cv-graphite); }
.blv--new .blv__v { background: var(--cv-yellow); color: var(--cv-graphite); }
.blv.is-old { opacity: 0.6; }
.blv.is-old .blv__v { background: var(--cv-text-faint); color: #FFFFFF; }
.baseline-card.is-flash .blv--new { animation: bl-in 0.8s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes bl-in { 0% { transform: translateY(-16px) scale(0.95); box-shadow: 0 0 0 0 rgba(242, 194, 0, 0.8); } 60% { box-shadow: 0 0 0 12px rgba(242, 194, 0, 0); } 100% { transform: none; } }
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; line-height: 20px; }
.checks li { display: flex; align-items: flex-start; gap: 8px; }
.checks .ic { margin-top: 2px; color: var(--cv-ok-fg); }
.checks--muted .ic { color: var(--cv-text-faint); }

.modal-scrim { position: fixed; inset: 0; z-index: 60; background: rgba(23, 32, 38, 0.5); animation: fade-in 0.2s ease-out; }
.modal {
  position: fixed; z-index: 61; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow-y: auto;
  display: flex; flex-direction: column; gap: 14px; padding: 22px 24px; background: #FFFFFF; border-radius: 18px;
  box-shadow: 0 40px 80px rgba(23, 32, 38, 0.3); animation: modal-in 0.25s var(--cv-ease-out);
}
@keyframes modal-in { from { opacity: 0; transform: translate(-50%, calc(-50% + 14px)); } }
.modal__head { display: flex; align-items: flex-start; gap: 12px; }
.modal__head > div { flex: 1; min-width: 0; }
.modal__head p { margin: 4px 0 0; }
.modal__ic { width: 44px; height: 44px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: 12px; background: var(--cv-petrol-tint); color: var(--cv-petrol); }
.modal .form > p.small { display: flex; gap: 6px; align-items: flex-start; margin: 4px 0 0; }

/* =============================================================== NOT YET */
.notyet { align-items: center; gap: 14px; padding: 48px 24px; text-align: center; }
.notyet p { margin: 0; max-width: 460px; }
.notyet .checks { text-align: left; }
.notyet__art { position: relative; width: 240px; height: 64px; }
.notyet__art .lv__din { left: 0; right: 0; animation: none; background: repeating-linear-gradient(90deg, #AEB6B1 0 10px, #C2C9C4 10px 14px); border-color: #9AA5AB #C9D0CB; }
.ny-m { position: absolute; top: 8px; width: 22px; height: 48px; border-radius: 4px; animation: ny 3s ease-in-out infinite alternate; }
.ny-m--p { left: 38%; background: var(--cv-petrol); }
.ny-m--y { left: 52%; background: var(--cv-yellow); animation-delay: -0.8s; }
@keyframes ny { from { transform: translateX(-40px); } to { transform: translateX(40px); } }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 300; max-width: calc(100vw - 32px); padding: 12px 18px;
  background: var(--cv-graphite); color: #FFFFFF; border-radius: 10px; box-shadow: var(--cv-shadow-raised);
  font-size: 15px; line-height: 21px; opacity: 0; pointer-events: none; transform: translate(-50%, 16px);
  transition: opacity var(--cv-duration-base) ease-out, transform var(--cv-duration-base) var(--cv-ease-out);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.toast:empty { display: none; }

/* ============================================================ RESPONSIVE */
@media (max-width: 1220px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2, .cab-grid, .cr-grid { grid-template-columns: minmax(0, 1fr); }
  .detail { position: static; }
}
@media (max-width: 1020px) {
  .shell { grid-template-columns: minmax(0, 1fr); background: var(--cv-ground); }
  .sb {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 50; width: 286px; height: auto;
    transform: translateX(-100%); visibility: hidden;
    transition: transform 0.25s var(--cv-ease-out), visibility 0s linear 0.25s;
  }
  .nav-open .sb { transform: none; visibility: visible; transition: transform 0.25s var(--cv-ease-out), visibility 0s; box-shadow: 20px 0 40px rgba(0, 0, 0, 0.25); }
  .sb__close { display: inline-flex; }
  .nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 45; background: rgba(23, 32, 38, 0.45); animation: fade-in 0.2s ease-out; }
  .tb { gap: 10px; padding: 0 16px 0 10px; }
  .tb__menu, .tb__mark { display: inline-flex; }
  .round-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .phone-wrap { order: -1; }
  .round-side { max-width: none; }
  .login__card { grid-template-columns: 1fr; max-width: 560px; }
  .lv { padding: 24px; gap: 16px; }
  .lv__tag, .lv__feed { display: none; }
  .lv__plate { padding: 18px 16px; gap: 14px; }
  .lv__row--1 { min-height: 86px; }
  .lv__row--1 .lm { height: 80px; }
  .lv__row--2 { min-height: 64px; }
  .lf { min-height: 0; padding: 28px 28px 22px; }
  .lf__title { font-size: 38px; }
}
@media (max-width: 860px) {
  .tb__env { display: none; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .tb__search { max-width: none; }
}
@media (max-width: 760px) {
  main { padding: 20px 16px 32px; }
  .app-foot { padding: 8px 16px 20px; }
  .h1 { font-size: 32px; }
  .lead { font-size: 16px; line-height: 24px; }
  .tb__search, .user__txt, .user__chev { display: none; }
  .tb .lang { margin-left: auto; }
  .user__btn { padding: 0 4px; }
  .kpis { gap: 10px; }
  .kpi { padding: 14px; column-gap: 10px; }
  .kpi__ic { width: 38px; height: 38px; }
  .kpi__n { font-size: 28px; }
  .kpi__l { font-size: 14px; line-height: 18px; }
  .card { padding: 18px 16px; border-radius: 14px; }
  .card--flush { padding: 0; }
  #cab-results, .att { margin: 0 -16px -18px; }
  .att__item { padding: 12px 16px; }
  .card__head--pad { padding: 16px 16px 12px; }
  .field .select, .field { width: 100%; min-width: 0; }
  .seg { width: 100%; }
  .seg__btn { flex: 1; }
  .page__actions { width: 100%; }
  .page__actions .btn { flex: 1 1 auto; }
  .front { flex-direction: column; padding: 0 12px 12px; }
  .door { width: auto; flex-direction: row; align-items: center; padding: 10px 14px; }
  .plate { --m: 0.86; padding: 16px 12px; }
  .legend { padding: 0 16px 14px; }
  .legend__hint { width: 100%; margin-left: 0; }
  .kv > div, .kv--wide > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .trail li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .table th:first-child, .table td:first-child { padding-left: 16px; }
  .table th:last-child, .table td:last-child { padding-right: 16px; }
  .tabs { padding: 4px 4px 0; }
  .bl-summary, .versions, .docs { padding-left: 16px; padding-right: 16px; }
  .pad { padding: 12px 16px 16px; }
  .empty--left { padding: 20px 16px; }

  .table--cards thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table--cards, .table--cards tbody { display: block; }
  .table--cards tr { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 12px 16px; border-bottom: 1px solid #ECEFEC; }
  .table--cards tbody tr:last-child { border-bottom: 0; }
  .table--cards td { display: block; padding: 0 !important; border: 0; }
  .table--cards td:first-child { flex-basis: 100%; }
  .table--cards td[data-label]::before { content: attr(data-label); display: block; font: 600 11px/1.4 var(--cv-font-head); letter-spacing: 0.08em; text-transform: uppercase; color: var(--cv-text-muted); }

  .phone { width: 100%; height: auto; min-height: 620px; border: 1px solid var(--cv-line); border-radius: 18px; box-shadow: none; }
  .phone__status { display: none; }
  .sheet-scrim { position: fixed; z-index: 70; }
  .sheet { position: fixed; z-index: 71; max-height: 88vh; }
  .modal { left: 0; right: 0; top: auto; bottom: 0; width: 100%; max-height: 92vh; transform: none; border-radius: 18px 18px 0 0; padding: 18px 16px 20px; animation: sheet-up 0.28s var(--cv-ease-out); }
  .toast { top: 76px; bottom: auto; transform: translate(-50%, -12px); }
  .toast.is-on { transform: translate(-50%, 0); }
  .table-bleed { margin: 0 -16px -18px; }
}
@media (max-width: 480px) {
  .login { padding: 12px; }
  .login__card { border-radius: 22px; }
  .lv { padding: 16px; }
  .lv__plate { padding: 14px 12px; }
  .lm--ctrl { width: 50px; }
  .lm--io { width: 22px; }
  .lm--psu { width: 48px; }
  .lm--sw { width: 46px; }
  .lm--ups, .lv__row--1 .lm:nth-child(n + 8) { display: none; }
  .lf { padding: 22px 18px 18px; gap: 18px; }
  .lf__word { font-size: 23px; }
  .am { width: 38px; height: 38px; }
  .lf__title { font-size: 34px; }
  .lf__foot { justify-content: flex-start; }
}

/* ======================================================== REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .lv__scan, .vf__line { display: none; }
  .done-check__path { stroke-dashoffset: 0; }
}

/* Persistent disclosure for the publicly hosted prototype. */
.demo-notice { padding: 12px 20px; background: var(--cv-yellow); color: var(--cv-graphite); font-size: 14px; line-height: 20px; }
.demo-notice a { display: inline-flex; align-items: center; min-height: 44px; color: var(--cv-graphite); font-weight: 600; }
