/* ORBITA · Dark Nano-Glass. Свідомо одна темна тема (бренд), токени з ТЗ-1 §3.
   Layout: мобільний робочий екран запчастиста — шапка, контент, нижня навігація в зоні великого пальця;
   на десктопі контент до 1180px, кейс — дві колонки (авто | запити). */
:root {
  --bg-0: #0B0D12;
  --bg-1: #12151E;
  --bg-2: #1A1F2B;
  --glass: rgba(18, 21, 30, 0.72);
  --line: rgba(0, 242, 254, 0.14);
  --line-2: rgba(154, 164, 178, 0.18);
  --accent: #00F2FE;
  --accent-2: #4FACFE;
  --accent-bg: rgba(0, 242, 254, 0.15);
  --ok: #00E676;
  --warn: #FFB800;
  --danger: #FF3366;
  --ai-gen: #A855F7;
  --text-0: #F5F7FA;
  --text-1: #9AA4B2;
  --text-2: #6B7585;
  --font-ui: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --font-display: 'Michroma', 'Inter', system-ui, sans-serif;
  --r-1: 10px;
  --r-2: 16px;
  --tap: 48px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg-0); color: var(--text-0); font: 15px/1.45 var(--font-ui);
  background-image: radial-gradient(900px 500px at 85% -10%, rgba(0, 242, 254, 0.08), transparent 60%),
    radial-gradient(700px 400px at -10% 110%, rgba(79, 172, 254, 0.07), transparent 60%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mono { font-family: var(--font-mono); }
.muted { color: var(--text-1); }
.dim { color: var(--text-2); }
.num { font-variant-numeric: tabular-nums; }

/* ── shell ── */
.app { min-height: 100%; display: flex; flex-direction: column; }
.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: rgba(11, 13, 18, 0.82); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
  padding-block: 10px;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.top-in { max-width: 1180px; margin: 0 auto; display: flex; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; object-position: 50% 32%; transform: scale(1.0); box-shadow: 0 0 18px rgba(0, 242, 254, 0.35); }
.brand .wm { display: flex; flex-direction: column; line-height: 1.05; }
.brand .wm b { font-family: var(--font-display); font-weight: 400; letter-spacing: 0.22em; font-size: 17px; color: var(--accent); text-shadow: 0 0 14px rgba(0, 242, 254, 0.55); }
.brand .wm span { font-size: 9.5px; letter-spacing: 0.24em; color: var(--text-1); text-transform: uppercase; }
.top .spacer { flex: 1; }
.copilot { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--accent); border: 1px solid var(--line); border-radius: 999px; padding: 5px 10px; white-space: nowrap; }
.copilot i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); animation: pulse 2s infinite; }
.mode { font-size: 11px; color: var(--text-1); white-space: nowrap; }
@keyframes pulse { 50% { opacity: 0.35; } }
@media (max-width: 560px) { .copilot span, .mode { display: none; } }

/* Живий рядок ШІ-агента в шапці: маленька орбіта (супутник обертається довкола ядра), під час пошуку — швидше і з підсвіткою. */
.pulse { display: inline-flex; align-items: center; gap: 10px; min-width: 0; flex: 0 1 auto; height: 38px; padding: 0 14px 0 8px; border-radius: 999px;
  border: 1px solid var(--line); background: linear-gradient(90deg, rgba(0, 242, 254, 0.12), rgba(79, 172, 254, 0.03)); color: var(--text-0);
  font-size: 13.5px; cursor: pointer; white-space: nowrap; transition: box-shadow .2s, border-color .2s; }
.pulse:hover { border-color: rgba(0, 242, 254, 0.6); }
.pulse .pl { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.pulse .pl b { color: var(--accent); font-weight: 600; }
.pulse .pl-s { display: none; }
.orb { position: relative; width: 24px; height: 24px; flex: none; border-radius: 50%; border: 1.5px solid rgba(0, 242, 254, 0.4); }
.orb::before { content: ''; position: absolute; inset: 7.5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.orb i { position: absolute; inset: -1.5px; border-radius: 50%; animation: orbit 3s linear infinite; }
.orb i::after { content: ''; position: absolute; top: -3.5px; left: 50%; width: 7px; height: 7px; margin-left: -3.5px; border-radius: 50%; background: #e9fdff; box-shadow: 0 0 8px var(--accent), 0 0 3px #fff; }
@keyframes orbit { to { transform: rotate(360deg); } }
.pulse.run { border-color: rgba(0, 242, 254, 0.65); box-shadow: 0 0 22px rgba(0, 242, 254, 0.22); }
.pulse.run .orb i { animation-duration: 1s; }
@media (max-width: 520px) {
  .pulse { height: 34px; padding: 0 12px 0 6px; gap: 8px; font-size: 13px; }
  .pulse .pl-l { display: none; }
  .pulse .pl-s { display: inline; }
  .orb { width: 22px; height: 22px; }
  .orb::before { inset: 6.5px; }
}
@media (max-width: 380px) { .brand .wm span { letter-spacing: 0.16em; font-size: 8.5px; } .brand img { width: 38px; height: 38px; } .top-in { gap: 8px; } }

/* Телефон: без прокрутки вбік, поля 16 px (iOS не збільшує сторінку при введенні), подвійний дотик не масштабує. */
html { touch-action: manipulation; }
.app { overflow-x: clip; }
main { min-width: 0; }
@media (max-width: 1099px), (pointer: coarse) {
  input:not([type=checkbox]):not([type=radio]):not([type=range]), textarea, select { font-size: 16px !important; }
  body.kb .nav { display: none; }
}

main {
  flex: 1; width: 100%; max-width: 1180px; margin: 0 auto;
  padding-block: 16px calc(150px + env(safe-area-inset-bottom, 0px));
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  display: flex; flex-direction: column; gap: 16px;
}
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: rgba(11, 13, 18, 0.9); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--line);
  padding-block: 6px calc(6px + env(safe-area-inset-bottom, 0px));
  padding-left: max(8px, env(safe-area-inset-left, 0px)); padding-right: max(8px, env(safe-area-inset-right, 0px));
}
.nav-in { max-width: 640px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.nav button {
  min-height: 56px; border: 0; background: none; border-radius: 12px; color: var(--text-1); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11.5px; position: relative;
}
.nav button svg { width: 22px; height: 22px; }
.nav button.on { color: var(--accent); background: var(--accent-bg); }
.nav .badge { position: absolute; top: 6px; right: calc(50% - 22px); background: var(--accent); color: var(--bg-0); font-size: 10px; font-weight: 700; border-radius: 999px; min-width: 17px; padding: 0 4px; line-height: 17px; }

/* ── surfaces ── */
.glass {
  background: var(--glass); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--line-2); border-radius: var(--r-2); padding: 16px;
}
.glass.accent { border-color: var(--line); box-shadow: 0 0 0 1px rgba(0, 242, 254, 0.05), 0 18px 40px rgba(0, 0, 0, 0.35); }
.section-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
h1 { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: 17px; font-weight: 600; }
h3 { font-size: 15px; font-weight: 600; }
.eyebrow { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-1); }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.grid2 { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .grid2 { grid-template-columns: minmax(0, 1fr); } }
.grid2 > * { min-width: 0; }

/* ── controls ── */
.btn {
  min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg-2); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; font-size: 14px; white-space: nowrap;
}
.btn:hover { border-color: var(--line); }
.btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #031016; border: 0; box-shadow: 0 0 22px rgba(0, 242, 254, 0.35); }
.btn.big { min-height: var(--tap); font-size: 15px; }
.btn.ghost { background: transparent; }
.btn.warn { border-color: rgba(255, 184, 0, 0.5); color: var(--warn); background: rgba(255, 184, 0, 0.08); }
.btn.danger { border-color: rgba(255, 51, 102, 0.5); color: var(--danger); background: rgba(255, 51, 102, 0.08); }
.btn.ok { border-color: rgba(0, 230, 118, 0.5); color: var(--ok); background: rgba(0, 230, 118, 0.08); }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.primary:disabled { opacity: 1; background: var(--bg-2); color: var(--text-2); border: 1px dashed var(--line-2); box-shadow: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border-radius: 999px; font-size: 13px;
  border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.03); cursor: pointer; white-space: nowrap;
}
.chip:hover { border-color: var(--line); color: var(--accent); }
.chip.on { border-color: var(--accent); color: var(--accent); background: var(--accent-bg); }
.chip .mono { font-size: 12px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
label.f { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--text-1); }
input.in, textarea.in, select.in {
  min-height: 46px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(11, 13, 18, 0.7); padding: 10px 12px; font-size: 16px; width: 100%; /* 16px: iOS не збільшує сторінку при введенні */
}
textarea.in { min-height: 70px; resize: vertical; }
input.in:focus, textarea.in:focus, select.in:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0, 242, 254, 0.15); }
input.in.mono { font-family: var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; }

/* ── status ── */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; border: 1px solid transparent; }
.pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.g { color: var(--ok); background: rgba(0, 230, 118, 0.1); border-color: rgba(0, 230, 118, 0.3); }
.pill.a { color: var(--warn); background: rgba(255, 184, 0, 0.1); border-color: rgba(255, 184, 0, 0.3); }
.pill.r { color: var(--danger); background: rgba(255, 51, 102, 0.1); border-color: rgba(255, 51, 102, 0.3); }
.pill.n { color: var(--text-1); background: rgba(154, 164, 178, 0.08); border-color: var(--line-2); }
.pill.c { color: var(--accent); background: var(--accent-bg); border-color: var(--line); }
.pill.p { color: var(--ai-gen); background: rgba(168, 85, 247, 0.1); border-color: rgba(168, 85, 247, 0.35); }
.cs {
  font-family: var(--font-mono); font-weight: 700; font-size: 13px; padding: 4px 8px; border-radius: 8px; white-space: nowrap; font-variant-numeric: tabular-nums;
  border-left: 3px solid currentColor;
}
.cs.GREEN { color: var(--ok); background: rgba(0, 230, 118, 0.1); }
.cs.AMBER { color: var(--warn); background: rgba(255, 184, 0, 0.1); }
.cs.RED { color: var(--danger); background: rgba(255, 51, 102, 0.1); }
.oe { font-family: var(--font-mono); font-weight: 700; color: var(--accent); font-size: 14px; letter-spacing: 0.02em; }

/* ── vehicle card ── */
.veh h1 { font-size: 21px; }
.veh .kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px; font-size: 13.5px; }
.veh .kv dt { color: var(--text-1); }
.veh .kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.vin { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 15px; letter-spacing: 0.08em; background: var(--accent-bg); color: var(--text-0); padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line); cursor: pointer; }
.prs { display: flex; flex-wrap: wrap; gap: 6px; }
.prs span { font-family: var(--font-mono); font-size: 11.5px; padding: 2px 7px; border-radius: 6px; border: 1px solid var(--line-2); color: var(--text-1); }
.prs span.hit { color: var(--accent); border-color: var(--line); }
.notice { border: 1px solid rgba(255, 184, 0, 0.35); background: rgba(255, 184, 0, 0.07); color: #ffd68a; border-radius: 12px; padding: 10px 12px; font-size: 13.5px; }

/* ── case list ── */
.cases { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.case-card { cursor: pointer; display: flex; flex-direction: column; gap: 8px; text-align: left; }
.case-card:hover { border-color: var(--line); }
.plate { font-family: var(--font-mono); font-weight: 700; letter-spacing: 0.08em; background: #f4f6f8; color: #111; border-radius: 6px; padding: 2px 8px 2px 4px; font-size: 13px; display: inline-flex; gap: 6px; align-items: center; }
.plate::before { content: 'UA'; font-size: 9px; background: #1f4bb8; color: #fff; border-radius: 3px; padding: 2px 3px; }

/* ── composer ── */
.composer { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: stretch; }
.mic {
  width: 64px; border-radius: 16px; border: 1px solid rgba(168, 85, 247, 0.5); background: rgba(168, 85, 247, 0.12); color: var(--ai-gen); cursor: pointer;
  display: flex; align-items: center; justify-content: center; touch-action: none; user-select: none;
}
.mic.rec { background: var(--ai-gen); color: #fff; box-shadow: 0 0 28px rgba(168, 85, 247, 0.6); animation: pulse 1s infinite; }
.mic svg { width: 26px; height: 26px; }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line-2); overflow-x: auto; scrollbar-width: none; }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 12px; cursor: pointer; color: var(--text-1); font-weight: 600; white-space: nowrap; font-size: 13.5px; }
.tabs button.on { color: var(--accent); border-color: var(--accent); }
.tabs button .n { font-family: var(--font-mono); font-size: 11px; color: var(--text-2); margin-left: 4px; }

/* ── request / line ── */
.req-h { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: flex-start; }
.req-h .q { font-size: 15px; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.line { border-top: 1px solid var(--line-2); padding-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.line-h { display: flex; gap: 10px; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; }
.line-h .t { min-width: 0; }
.line-h .t b { font-size: 16px; }
.understood { font-size: 12.5px; color: var(--ai-gen); }
.best { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.next { font-size: 13px; color: var(--text-1); display: flex; gap: 6px; }
.next b { color: var(--text-0); font-weight: 600; }
.need {
  border: 1px solid rgba(255, 51, 102, 0.4); background: linear-gradient(90deg, rgba(255, 51, 102, 0.12), rgba(255, 120, 60, 0.05)); border-radius: 12px; padding: 12px;
  display: flex; flex-direction: column; gap: 10px; position: relative; overflow: hidden;
}
.need::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 90, 60, 0.18), transparent); transform: translateX(-100%); animation: radar 2.6s infinite; pointer-events: none; }
@keyframes radar { to { transform: translateX(100%); } }
.need .q { font-weight: 600; }
.need.soft { border-color: var(--line); background: var(--accent-bg); }
.need.soft::after { display: none; }
.kit { border: 3px double rgba(255, 184, 0, 0.55); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 10px; background: rgba(255, 184, 0, 0.04); }
.kit-h { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; align-items: center; }
.kit-tag { font-family: var(--font-mono); font-size: 11.5px; color: var(--warn); letter-spacing: 0.04em; }
.kit-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; font-size: 13.5px; }
.kit-item .why { color: var(--text-1); font-size: 12.5px; }
.vec { display: flex; gap: 6px; flex-wrap: wrap; }
.vec span { font-size: 11.5px; font-family: var(--font-mono); padding: 3px 8px; border-radius: 8px; border: 1px solid var(--line-2); color: var(--text-1); cursor: help; }
.vec span.OK { border-color: rgba(0, 230, 118, 0.35); color: var(--ok); }
.vec span.DEGRADED { border-color: rgba(255, 184, 0, 0.45); color: var(--warn); }
.vec span.EMPTY { color: var(--text-2); text-decoration: line-through; }
.vec span.PENDING, .vec span.READY { border-color: rgba(168, 85, 247, 0.45); color: var(--ai-gen); }
details.more > summary { cursor: pointer; color: var(--accent); font-size: 13px; list-style: none; }
details.more > summary::-webkit-details-marker { display: none; }

/* cross-matrix */
.matrix { display: flex; flex-direction: column; gap: 8px; }
.cand { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.025); border: 1px solid var(--line-2); }
.cand.best { border-color: var(--line); background: rgba(0, 242, 254, 0.05); }
.cand.bl { opacity: 0.55; }
.cand .nm { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; min-width: 0; }
.cand .br { font-weight: 700; }
.cand .ex { grid-column: 1 / -1; font-size: 12.5px; color: var(--text-1); overflow-wrap: anywhere; }
.cand .acts { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; }
.reasons { grid-column: 1 / -1; font-size: 12px; }
.reasons table { width: 100%; border-collapse: collapse; }
.reasons td { padding: 3px 4px; border-bottom: 1px dashed var(--line-2); vertical-align: top; }
.reasons td:last-child { text-align: right; font-family: var(--font-mono); white-space: nowrap; }
.override { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 8px; }

/* ── canvas ── */
.canvas svg { width: 100%; height: auto; max-width: 100%; display: block; }
.canvas .node { cursor: pointer; }
.canvas .node circle { fill: rgba(0, 242, 254, 0.08); stroke: var(--accent); stroke-width: 1.5; transition: fill 0.15s; }
.canvas .node:hover circle { fill: rgba(0, 242, 254, 0.22); }
.canvas .node.sel circle { fill: rgba(0, 242, 254, 0.35); stroke-width: 3; filter: drop-shadow(0 0 8px #00F2FE); }
.canvas .node.na { cursor: not-allowed; }
.canvas .node.na circle { fill: rgba(154, 164, 178, 0.06); stroke: #3a414d; stroke-dasharray: 3 3; }
.canvas text { fill: var(--text-1); font-size: 11px; font-family: var(--font-ui); }
.canvas .node.sel text { fill: var(--accent); }

/* ── scanner ── */
.viewport { position: relative; border-radius: var(--r-2); overflow: hidden; background: #000; aspect-ratio: 16 / 10; max-width: 100%; border: 1px solid var(--line); }
.viewport video, .viewport img { width: 100%; height: 100%; object-fit: cover; display: block; }
.viewport .frame { position: absolute; inset: 14% 10%; border: 2px solid var(--accent); border-radius: 14px; box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.35), 0 0 22px rgba(0, 242, 254, 0.5); }
.viewport .scanline { position: absolute; left: 10%; right: 10%; height: 2px; background: var(--accent); box-shadow: 0 0 14px var(--accent); top: 14%; animation: scan 2.2s ease-in-out infinite alternate; }
@keyframes scan { to { top: 86%; } }
.viewport .ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--text-1); font-size: 13px; text-align: center; padding: 24px; }
.frames { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.frame-btn { border: 1px solid var(--line-2); border-radius: 12px; background: var(--bg-1); padding: 0; overflow: hidden; cursor: pointer; text-align: left; }
.frame-btn:hover { border-color: var(--accent); }
.frame-btn img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; }
.frame-btn div { padding: 8px 10px; font-size: 12.5px; }
.frame-btn small { display: block; color: var(--text-2); font-size: 11px; }
.ocr-text { font-family: var(--font-mono); font-size: 20pt; line-height: 1.2; background: var(--accent-bg); border-radius: 12px; padding: 10px 14px; letter-spacing: 0.06em; overflow-wrap: anywhere; }
.ocr-text .d { color: var(--warn); text-decoration: underline wavy; }
.votes { overflow-x: auto; }
.votes table { border-collapse: collapse; font-family: var(--font-mono); font-size: 12.5px; }
.votes td { padding: 2px 3px; text-align: center; color: var(--text-1); }
.votes td.x { color: var(--danger); }
.votes td.lbl { color: var(--text-2); padding-right: 8px; text-align: left; font-family: var(--font-ui); }

/* ── offers / cart / orders ── */
.sheet-bg { position: fixed; inset: 0; background: rgba(5, 6, 9, 0.65); z-index: 40; display: flex; align-items: flex-end; justify-content: center; }
.sheet {
  width: 100%; max-width: 720px; max-height: 86vh; overflow: auto; background: var(--bg-1); border: 1px solid var(--line); border-bottom: 0; border-radius: 20px 20px 0 0;
  padding-block: 18px calc(18px + env(safe-area-inset-bottom, 0px));
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  display: flex; flex-direction: column; gap: 12px;
}
.offer { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 12px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.02); }
.offer .v { font-weight: 600; }
.offer .meta { font-size: 12.5px; color: var(--text-1); display: flex; gap: 8px; flex-wrap: wrap; }
.price { font-family: var(--font-mono); font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; }
.tbl { overflow-x: auto; }
.tbl table { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-weight: 600; color: var(--text-1); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; padding: 8px; border-bottom: 1px solid var(--line-2); }
.tbl td { padding: 8px; border-bottom: 1px solid var(--line-2); vertical-align: top; font-variant-numeric: tabular-nums; }
.steps { display: flex; gap: 4px; flex-wrap: wrap; }
.steps span { font-size: 11.5px; padding: 3px 8px; border-radius: 6px; background: rgba(255, 255, 255, 0.04); color: var(--text-2); }
.steps span.done { color: var(--accent); background: var(--accent-bg); }
.steps span.cur { color: var(--bg-0); background: var(--accent); font-weight: 700; }
.events { font-size: 12.5px; display: flex; flex-direction: column; gap: 4px; border-left: 2px solid var(--line); padding-left: 10px; }
.events .k { font-family: var(--font-mono); color: var(--accent); font-size: 11px; margin-right: 6px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.kpi { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--glass); }
.kpi b { display: block; font-family: var(--font-mono); font-size: 22px; color: var(--accent); font-variant-numeric: tabular-nums; }
.kpi span { font-size: 12px; color: var(--text-1); }
.empty { text-align: center; color: var(--text-1); padding: 28px 12px; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(84px + env(safe-area-inset-bottom, 0px)); z-index: 60;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; font-size: 13.5px; max-width: min(92vw, 520px); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.toast.err { border-color: rgba(255, 51, 102, 0.6); }
.busy { position: fixed; top: calc(70px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); z-index: 50; font-size: 12px; color: var(--accent); background: var(--bg-1); border: 1px solid var(--line); padding: 4px 12px; border-radius: 999px; }
.hero-run { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; }
@media (max-width: 640px) { .hero-run { grid-template-columns: minmax(0, 1fr); } }
.foot { font-size: 11.5px; color: var(--text-2); text-align: center; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media (max-width: 560px) {
  .kit-item { grid-template-columns: minmax(0, 1fr); }
}

/* Інтеграції: джерела каталогів у позиції і картки CRM */
.srcs { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 12px; }
.src { padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--text-1); font-size: 11.5px; }
.src.ok { border-color: rgba(0, 230, 118, 0.35); color: var(--ok); }
.src.warn { border-color: rgba(255, 184, 0, 0.4); color: var(--warn); }
.crm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.crm { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: var(--r-1); border: 1px solid var(--line-2); background: var(--bg-1); min-width: 0; }
.crm.on { border-color: var(--line); box-shadow: inset 0 0 0 1px rgba(0, 242, 254, 0.08); }
.crm .btn { align-self: flex-start; }

/* Фото / документи */
.docs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.doc { display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: var(--r-1); border: 1px solid var(--line-2); background: var(--bg-1); color: var(--text-0); font: inherit; font-size: 12.5px; text-align: left; cursor: pointer; min-width: 0; }
.doc:hover, .doc:focus-visible { border-color: var(--accent); }
.doc .thumb svg { width: 100%; height: auto; display: block; border-radius: 6px; }
label.btn input[type=file] { display: none; }

/* Підбір по авто: 3 рівні */
.tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tier-card { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: var(--r-1); border: 1px solid var(--line); background: var(--bg-1); color: var(--text-0); font: inherit; text-align: left; cursor: pointer; min-width: 0; }
.tier-card b { font-size: 20px; }
.tier-card .mk { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-1); }
.tier-card .mk .in { width: 64px; min-height: 32px; padding: 4px 8px; }
.qlines { display: flex; flex-direction: column; gap: 10px; }
.qline { display: flex; flex-direction: column; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line-2); }
.qline:first-child { border-top: 0; }
.qh { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.qopts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.qopt { display: flex; flex-direction: column; gap: 3px; padding: 9px 10px; border-radius: var(--r-1); border: 1px solid var(--line-2); background: var(--bg-1); color: var(--text-0); font: inherit; font-size: 13px; text-align: left; cursor: pointer; min-width: 0; overflow-wrap: anywhere; }
.qopt.on { border-color: var(--accent); background: var(--accent-bg); box-shadow: 0 0 0 1px var(--accent) inset; }
.qopt.off { cursor: default; opacity: .55; }
.qopt:disabled { cursor: default; }
.tier-card.on { border-color: var(--accent); background: var(--accent-bg); box-shadow: 0 0 0 1px var(--accent) inset; }
.tier-card:disabled { cursor: default; }
.qpick { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 14.5px; }
.qpick > span { overflow-wrap: anywhere; }
.qmeta { font-size: 12.5px; color: var(--text-1); }
.qmeta.dim { color: var(--text-2, var(--text-1)); opacity: .8; }
/* Робочий кошторис: усі знайдені пропозиції з галочками, рекомендація ШІ, фільтри. */
.qrec { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; font-size: 13px; }
.qrec > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.offers { display: flex; flex-direction: column; gap: 6px; }
.offer { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 10px; align-items: start; padding: 9px 10px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.02); cursor: pointer; }
.offer:hover { border-color: var(--line); }
.offer.rec { border-color: rgba(0, 230, 118, 0.35); background: rgba(0, 230, 118, 0.04); }
.offer.off { opacity: 0.55; }
.offer.off .of-p b { text-decoration: line-through; }
.offer input[type=checkbox] { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); cursor: pointer; }
.of-b { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.of-h { overflow-wrap: anywhere; }
.of-t { font-size: 12.5px; color: var(--text-1); overflow-wrap: anywhere; }
.of-m { font-size: 12px; color: var(--text-1); overflow-wrap: anywhere; }
.of-m a { white-space: nowrap; }
.of-p { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; white-space: nowrap; }
.seg { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 6px; border: 1px solid var(--line-2); color: var(--text-1); vertical-align: 1px; }
.seg.OEM { color: #d9b8ff; border-color: rgba(168, 85, 247, 0.4); }
.seg.QUALITY { color: var(--accent); border-color: var(--line); }
.of-act { gap: 6px; }
.of-act:empty { display: none; }
.qfilters { display: flex; flex-direction: column; gap: 8px; }
.qf-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.qf-row select.in { width: auto; flex: 1 1 150px; min-height: 40px; padding: 6px 10px; }
.qf-kept { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-1); white-space: nowrap; }
.qf-kept input { width: 18px; height: 18px; accent-color: var(--accent); }
.asks { gap: 10px; }
.recs { gap: 8px; padding-top: 6px; border-top: 1px solid var(--line-2); }
.checks { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: var(--r-1); border: 1px solid var(--line-2); background: var(--bg-1); }
.ck { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 6px; font-size: 13.5px; }
.ck .ic { font-weight: 700; text-align: center; }
.ck.ok .ic { color: var(--ok); }
.ck.warn .ic, .ck.block .ic { color: var(--warn); }
.ck.block { font-weight: 600; }
.ck.info .ic { color: var(--accent); }
.est-status { padding: 12px; border-radius: var(--r-1); border: 1px solid var(--line); background: var(--bg-1); gap: 10px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.intake .composer { grid-template-columns: minmax(0, 1fr) auto; }
.simple { max-width: 860px; margin: 0 auto; width: 100%; }
.qfoot { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; padding-top: 10px; border-top: 1px solid var(--line); }
@media (max-width: 620px) {
  .tiers, .qopts { grid-template-columns: 1fr; }
  .qopt { flex-direction: row; flex-wrap: wrap; align-items: baseline; column-gap: 10px; }
}
.tabs { overflow-x: auto; scrollbar-width: none; }
.tabs button { white-space: nowrap; flex: 0 0 auto; }

/* Налаштування і кабінет власника */
.setrow { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.setrow:last-of-type { border-bottom: 0; }
.setrow > .stack { flex: 1; }
.switch { display: inline-block; position: relative; flex: none; width: 44px; height: 26px; cursor: pointer; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 13px; background: var(--line-2); border: 1px solid var(--line-2); transition: background .15s; }
.switch span::after { content: ''; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--text-1); transition: transform .15s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(18px); background: #04121a; }
.switch input:disabled + span { opacity: .55; }
.kpi .dim { display: block; margin-top: 4px; }
details.dev > summary { cursor: pointer; list-style: none; }
details.dev[open] > summary { margin-bottom: 10px; }

/* Скріншот у полі підбору */
.shot { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--line, rgba(255,255,255,.12)); border-radius: 12px; background: rgba(34, 211, 238, .06); min-width: 0; }
.shot img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; flex: none; }
.shot > .stack { flex: 1 1 auto; }
body.dropping .intake, body.dropping .composer { outline: 2px dashed rgba(34, 211, 238, .7); outline-offset: 4px; }
.spin { display: inline-block; width: 12px; height: 12px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: orb-spin 0.9s linear infinite; vertical-align: -2px; margin-right: 4px; opacity: 0.8; }
@keyframes orb-spin { to { transform: rotate(360deg); } }
.notice.searching { border-color: rgba(0, 224, 255, 0.35); background: rgba(0, 224, 255, 0.07); color: #9feeff; }

/* Пошук триває: орбіта в стилі логотипа, час і етап одним рядком. */
.osearch { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-2); background: rgba(0, 242, 254, 0.05); }
.os-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; font-size: 14px; }
.os-t .dim { font-size: 12.5px; }
.os-t b { font-weight: 600; }
.os-stage { color: var(--accent); font-size: 13px; }
.os-stop { flex: none; gap: 6px; }
.os-stop svg, .hstop svg { width: 12px; height: 12px; flex: none; }
/* «Зупинити пошук» у шапці: видно лише, поки йде пошук (Дмитро, 18.10 17:41), на ПК і телефоні; на телефоні замість рядка пошуку в шапці.
   display: inline-flex перекриває атрибут hidden, тому прихований стан задано явно. */
.hstop { display: inline-flex; align-items: center; gap: 7px; flex: none; height: 38px; padding: 0 14px; border-radius: 999px; cursor: pointer; white-space: nowrap;
  border: 1px solid rgba(255, 51, 102, 0.6); background: rgba(255, 51, 102, 0.14); color: var(--danger); font: inherit; font-size: 13.5px; font-weight: 600; }
.hstop:hover { background: rgba(255, 51, 102, 0.24); }
.hstop[hidden] { display: none; }
.hstop[disabled] { opacity: 0.6; cursor: default; }
.hstop .hs-s { display: none; }
@media (max-width: 520px) { body.searching .pulse { display: none; } .hstop { height: 34px; padding: 0 12px; font-size: 13px; } }
@media (max-width: 360px) { .hstop .hs-l { display: none; } .hstop .hs-s { display: inline; } }
.lim-opts { display: flex; flex-wrap: wrap; gap: 8px; }
/* Довідка агента контролю підбору над пропозиціями позиції. */
.qc-info { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 8px; font-size: 12.5px; color: var(--text-1); line-height: 1.4; }
.qc-info > span:last-child { min-width: 0; flex: 1 1 220px; }
/* Номери, що є в постачальника без наявності: слід перевірки, не пропозиція. */
.sup-seen { display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; color: var(--text-1); line-height: 1.4; }
.sup-seen .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-2); }
.sup-seen span { overflow-wrap: anywhere; }
.os-copy { flex: none; }
@media (max-width: 520px) { .osearch { flex-wrap: wrap; } .os-t { flex-basis: calc(100% - 60px); } .os-copy { margin-left: 52px; } }
/* Скільки тривав пошук і етапи позиції (зберігаються з підбором). */
.section-h h2 .took { font-size: 13px; font-weight: 500; color: var(--text-2); white-space: nowrap; }
.qstat { flex-wrap: wrap; }
.qstat.q-miss { color: var(--text-1); }
.qstat .miss-dot { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--warn); flex: none; }
.qstat .btn.sm { min-height: 28px; padding: 3px 10px; font-size: 12px; }
.qtime { color: var(--text-2); font-size: 11.5px; font-variant-numeric: tabular-nums; margin-left: auto; }
.orbit { position: relative; width: 46px; height: 46px; flex: none; }
.orbit i { position: absolute; display: block; }
.o-core { left: 50%; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #bffcff, var(--accent) 55%, var(--accent-2)); box-shadow: 0 0 14px rgba(0, 242, 254, 0.75); animation: pulse 2.4s ease-in-out infinite; }
.o-ring, .o-path { left: 0; top: 50%; width: 46px; height: 18px; margin-top: -9px; border-radius: 50%; transform: rotate(-22deg); }
.o-ring { border: 1.5px solid rgba(0, 242, 254, 0.45); }
.o-sat { width: 6px; height: 6px; border-radius: 50%; background: #e9feff; box-shadow: 0 0 8px var(--accent); offset-path: path('M 23 0 A 23 9 0 1 1 22.99 0 Z'); offset-distance: 0%; offset-rotate: 0deg; animation: o-sat 1.8s linear infinite; left: 0; top: 0; }
@keyframes o-sat { to { offset-distance: 100%; } }

/* Крок «Специфікація запиту»: деталі з галочками перед пошуком */
.review { border-color: rgba(0, 242, 254, 0.35); }
.rv-said { margin: 0; font-size: 13px; color: var(--text-1); font-style: italic; overflow-wrap: anywhere; }
.rv-car { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 8px; }
.rv-car .f { min-width: 0; }
.rv-list { display: flex; flex-direction: column; gap: 8px; }
.rv-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 10px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.02); }
.rv-row.off { opacity: 0.5; }
.rv-check { width: 22px; height: 22px; margin-top: 9px; accent-color: var(--accent); }
.rv-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rv-name { font-weight: 600; min-height: 38px; padding-block: 6px; }
.rv-opts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) auto; gap: 6px; }
.rv-opts .in { min-height: 36px; padding: 6px 8px; font-size: 13px; width: 100%; min-width: 0; }
.rv-opts .rv-brand { grid-column: 1 / -1; }
.rv-qty { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--text-1); }
.rv-qty .in { width: 58px; }
.rv-del { border: 0; background: none; color: var(--text-2); font-size: 18px; line-height: 1; padding: 8px; min-width: 36px; min-height: 36px; cursor: pointer; border-radius: 8px; }
.rv-del:hover { color: var(--danger); background: rgba(255, 51, 102, 0.08); }
.rv-add { gap: 6px; flex-wrap: nowrap; }
.rv-add .in { flex: 1 1 auto; min-width: 0; min-height: 40px; }
.rv-go { gap: 10px; align-items: center; }
.rv-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.rv-top .rv-name { flex: 1 1 auto; min-width: 0; }
.rv-st { flex: none; font-size: 11.5px; color: var(--text-2); white-space: nowrap; }
.rv-st.rv-busy { color: var(--accent); }
.rv-st.rv-busy::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: currentColor; animation: pulse 1.2s ease-in-out infinite; vertical-align: 1px; }
.rv-st.done { color: var(--ok, #3ddc97); }
.rv-st.off { color: var(--text-2); }
.rv-hint { margin: 0; font-size: 12px; }
@media (max-width: 520px) { .rv-top { flex-wrap: wrap; } }
@media (max-width: 520px) { .rv-car { grid-template-columns: 1fr; } .rv-go .btn { width: 100%; } }

/* Живий етап пошуку по кожній позиції */
.qstat { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-1); }
.qstat.q-busy { color: var(--accent); }
.qstat .ok { color: var(--ok); font-weight: 700; }
.qstat .spin { margin-right: 0; }
.qline.waiting .qh b { color: var(--text-0); }

/* ── пропозиція: клітинки (телефон — один рядок через «·», ПК — колонки таблиці) ── */
.of-id .mono { font-size: 12.5px; }
.of-pills .pill { margin-left: 4px; font-size: 11px; padding: 1px 8px; }
.of-t:empty, .of-m > span:empty, .of-pills:empty { display: none; }
.of-m > span + span::before { content: '·'; margin: 0 6px; color: var(--text-2); }
.qcols, .side-cases, .kbd-hint { display: none; }
.nav4 .nav-in { grid-template-columns: repeat(4, 1fr); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--text-2); }
.dot.g { background: var(--ok); }
.dot.a { background: var(--warn); }
.dot.r { background: var(--danger); }
.dot.c { background: var(--accent); }

/* ── ПК і ноутбук: меню зліва, контент на всю ширину, права панель сум, щільна таблиця пропозицій ── */
@media (min-width: 1100px) {
  :root { --side-w: 220px; --top-h: 63px; }
  .top-in { max-width: none; }
  .nav { top: var(--top-h); bottom: 0; right: auto; width: var(--side-w); border-top: 0; border-right: 1px solid var(--line);
    padding: 14px 12px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; }
  .nav-in, .nav4 .nav-in { max-width: none; margin: 0; display: flex; flex-direction: column; gap: 4px; }
  .nav button { flex-direction: row; justify-content: flex-start; min-height: 46px; padding: 0 12px 0 14px; gap: 12px; font-size: 15px; font-weight: 500; }
  .nav button:hover { background: rgba(255, 255, 255, 0.04); color: var(--text-0); }
  .nav button.on:hover { background: var(--accent-bg); color: var(--accent); }
  .nav button svg { width: 20px; height: 20px; flex: none; }
  .nav .badge { position: static; transform: none; margin-left: auto; min-width: 24px; line-height: 22px; padding: 0 7px; font-size: 12px; text-align: center;
    background: rgba(0, 242, 254, 0.12); color: var(--accent); border: 1px solid rgba(0, 242, 254, 0.28); }
  .side-cases { display: flex; flex-direction: column; gap: 2px; border-top: 1px solid var(--line-2); padding-top: 12px; }
  .side-h { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-2); padding: 0 10px 6px; }
  .side-case { display: grid; grid-template-columns: 8px minmax(0, 1fr); gap: 10px; align-items: center; border: 0; background: none; color: var(--text-1);
    text-align: left; padding: 7px 10px; border-radius: 8px; cursor: pointer; font-size: 13px; }
  .side-case .sc-id { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
  .side-case .sc-car { font-size: 12.5px; color: var(--text-1); }
  .side-case .sc-car .mono { font-size: 11.5px; color: var(--text-2); }
  .side-case .sc-foreign { color: var(--warn); }
  .side-case:hover { background: rgba(255, 255, 255, 0.04); color: var(--text-0); }
  .side-case.on { background: var(--accent-bg); color: var(--text-0); }
  .side-case .mono { font-size: 13.5px; color: var(--text-0); }
  .side-case .sc-car { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  main { margin: 0 0 0 var(--side-w); width: auto; max-width: none; padding-block: 20px 40px; padding-left: 28px; padding-right: max(28px, env(safe-area-inset-right, 0px)); }
  main > * { width: 100%; max-width: 1920px; margin-inline: auto; }
  .simple { max-width: 1920px; }
  .kbd-hint { display: inline; font-size: 12.5px; }
  @media (pointer: coarse) { .kbd-hint { display: none; } }

  /* Кейс: позиції з пропозиціями + права липка панель сум (на вужчому ноутбуці панель іде під таблицею) */
  .case-desk { display: flex; flex-direction: column; gap: 16px; }
  .cd-main { min-width: 0; }

  /* «Специфікація запиту»: позиція в один рядок (на вузькому — параметри переносяться під назву) */
  .rv-row { align-items: center; padding: 6px 10px; }
  .rv-check { margin-top: 0; }
  .rv-main { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
  .rv-top { flex: 1 1 340px; }
  .rv-st { min-width: 150px; }
  .rv-opts { flex: none; grid-template-columns: 104px 138px auto 190px; }
  .rv-opts .rv-brand { grid-column: auto; }
  .rv-name { min-height: 36px; }

  /* Пропозиції — таблиця з закріпленим заголовком */
  .qcols, .offer { display: grid; grid-template-columns: 22px minmax(210px, 2.6fr) minmax(110px, 1.1fr) minmax(96px, 0.9fr) minmax(110px, 1fr) 92px; gap: 0 12px; align-items: center; }
  .offer { grid-template-rows: auto auto; }
  .offer > input { grid-column: 1; grid-row: 1 / 3; }
  .of-h { grid-column: 2; grid-row: 1; display: block; min-width: 0; line-height: 1.75; }
  .of-h .seg { margin-right: 6px; }
  .of-id { display: inline; }
  .of-t { grid-column: 2; grid-row: 2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 2px; }
  .of-v { grid-column: 3; grid-row: 1 / 3; }
  .of-s { grid-column: 4; grid-row: 1 / 3; }
  .of-d { grid-column: 5; grid-row: 1 / 3; }
  .of-p { grid-column: 6; grid-row: 1 / 3; }
  .qcols { position: sticky; top: var(--top-h); z-index: 5; padding: 8px 10px; background: var(--bg-1); border: 1px solid var(--line-2); border-radius: 8px;
    font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); }
  .qcols span:last-child { text-align: right; }
  .offers { gap: 3px; }
  .offer { padding: 7px 10px; border-radius: 8px; }
  .of-b, .of-m { display: contents; }
  .of-m > span::before, .of-m > span + span::before { content: none; }
  .of-m > span:empty { display: block; }
  .of-id { min-width: 0; overflow-wrap: anywhere; font-size: 13.5px; }
  .of-pills { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-left: 4px; vertical-align: 1px; }
  .of-pills .pill { margin-left: 0; }
  .of-t, .of-v, .of-s, .of-d { font-size: 13px; color: var(--text-1); min-width: 0; overflow-wrap: anywhere; }
  .of-v a { white-space: nowrap; }
  .qline { padding: 14px 0 10px; }
  .qh b { font-size: 16px; }
}

/* Широкий ПК: права липка панель сум поруч із таблицею */
@media (min-width: 1280px) {
  .case-desk { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 20px; align-items: start; }
  .cd-side { position: sticky; top: calc(var(--top-h) + 16px); max-height: calc(100vh - var(--top-h) - 32px); overflow-y: auto; min-width: 0; }
  .quote-side .tiers { grid-template-columns: minmax(0, 1fr); }
  .quote-side .tier-card b { font-size: 22px; }
  .quote-side .qfoot { flex-direction: column; align-items: stretch; }
  .quote-side .qfoot .btn { width: 100%; white-space: normal; text-align: center; line-height: 1.3; padding-block: 12px; height: auto; }
}
@media (min-width: 1500px) { .case-desk { grid-template-columns: minmax(0, 1fr) 330px; } }

/* Місце встановлення і номер оригіналу; «ще N» з причинами */
.qoe { font-size: 12.5px; color: var(--text-1); overflow-wrap: anywhere; }
.qoe .mono { color: var(--text-0); }
.of-fit { color: var(--text-0); }
.of-oe .mono { font-size: 12px; }
.qhid { font-size: 12.5px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.qhid .btn.sm { min-height: 28px; padding: 2px 10px; }
.hid-list { flex: 1 1 100%; display: flex; flex-direction: column; gap: 4px; margin-top: 2px; }
.hid-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 10px; padding: 6px 10px; border-radius: 8px; border: 1px dashed var(--line-2); overflow-wrap: anywhere; }
/* Номери позиції: оригінал і аналоги */
.nums{display:flex;flex-wrap:wrap;align-items:center;gap:4px 6px;margin:4px 0 2px;font-size:12px}
.nums-l{color:var(--muted,#8aa);margin-right:2px}
.num-chip{font:12px/1.3 ui-monospace,SFMono-Regular,Menlo,monospace;padding:2px 7px;border-radius:7px;border:1px solid var(--line,rgba(255,255,255,.14));background:transparent;color:inherit;cursor:pointer}
.num-chip.ok{border-color:var(--accent,#00f2fe)}
.num-chip.wait{border-style:dashed;opacity:.75}
.nums .btn.sm{min-height:26px;padding:2px 8px;font-size:12px}

/* Повна картка авто: параметр — значення, кожне значення копіюється кліком. */
.car .specs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 2px 18px; margin: 6px 0 4px; font-size: 13.5px; }
.car .specs dt { display: none; }
.car > .row > .stack:first-child { flex: 1 1 320px; }
.car .specs dd { margin: 0; display: flex; gap: 8px; align-items: baseline; min-width: 0; }
.car .specs .spec-k { flex: 0 0 104px; font-size: 12.5px; }
.car .specs dd { flex-wrap: wrap; }
.car .specs .spec-src { flex: 1 0 100%; padding-left: 112px; font-size: 11px; color: var(--text-2); line-height: 1.3; overflow-wrap: anywhere; }
.car .specs a.spec-src { text-decoration: none; }
.car .specs .spec-gap { color: var(--warn); }
/* Вартість підбору (власник ORBITA, src/server/case-cost.js): під даними авто, дрібно, з переносом на вузькому екрані. */
.case-cost { display: flex; flex-wrap: wrap; gap: 2px 14px; align-items: baseline; padding-top: 8px; border-top: 1px solid var(--line-2); font-size: 12.5px; }
.case-cost span { min-width: 0; overflow-wrap: anywhere; }
.car .spec-fault { margin: 4px 0 6px; padding: 8px 10px; border: 1px solid var(--warn); border-radius: 10px; color: var(--warn); font-size: 12.5px; line-height: 1.35; overflow-wrap: anywhere; }
.spec-v { all: unset; cursor: copy; overflow-wrap: anywhere; border-bottom: 1px dashed transparent; }
.spec-v:hover { border-bottom-color: currentColor; }

/* Налаштування: картки постачальників сіткою (ПК 3–5 колонок, телефон одна), «Де шукати» і «Ваше СТО» поруч на ПК. */
.sup-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.sup { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: var(--r-1); border: 1px solid var(--line-2); background: var(--bg-1); min-width: 0; }
.sup.on { border-color: var(--line); box-shadow: inset 0 0 0 1px rgba(0, 242, 254, 0.06); }
.sup:not(.on) .sup-st { color: var(--text-2); }
.sup-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sup-h b { font-size: 15.5px; min-width: 0; overflow-wrap: anywhere; }
.sup-st { display: flex; gap: 8px; align-items: baseline; font-size: 13px; color: var(--text-1); line-height: 1.4; }
.sup-st .dot { flex: none; transform: translateY(-1px); }
.sup .btn.sm { align-self: flex-start; }
.key-form { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.key-form .key-in, .key-in[data-secret] { -webkit-text-security: disc; }
.key-in { font-family: var(--font-mono); letter-spacing: 0.02em; }
.key-msg { font-size: 12.5px; color: var(--warn); }
.sys-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
@media (min-width: 1100px) { .sys-cols { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); } }

/* Вибір авто серед схожих номерів (номер розпізнано неточно). */
.plate-pick { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.plate-pick .plate { font-size: 11.5px; padding: 1px 6px; margin-right: 4px; }

/* ═══════════ Живий логотип ORBITA (Дмитро, 16.10 23:40): сфера з «оком», орбіта і супутник ═══════════
   Спокій — супутник летить повільно, «око» дихає. Пошук (body.searching) — швидкий супутник, орбіта світиться,
   по «оку» йде промінь. Шари перемикаються прозорістю, тож фаза не стрибає. Анімується лише transform і opacity. */
.brand { cursor: pointer; }
.lg { --s: 44px; --T: 7s; --Tf: 1.5s; position: relative; display: inline-block; width: var(--s); height: var(--s); flex: none; border-radius: 50%; }
.lg i { position: absolute; display: block; }
.lg-top { --s: 44px; }
.lg-os { --s: 46px; }
.lg-glow { inset: -20%; border-radius: 50%; background: radial-gradient(circle, rgba(0, 242, 254, 0.3), rgba(0, 242, 254, 0) 62%); opacity: 0.5; animation: lg-breathe 4.2s ease-in-out infinite var(--t, 0ms); }
@keyframes lg-breathe { 50% { opacity: 0.95; } }
.lg-sphere { inset: 8%; border-radius: 50%;
  background: radial-gradient(circle at 34% 27%, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0) 30%), radial-gradient(circle at 50% 56%, #182330 0%, #0b1118 62%, #05080c 100%);
  box-shadow: inset 0 0 0 1px rgba(154, 164, 178, 0.38), inset 0 -5px 10px rgba(0, 0, 0, 0.6), 0 0 14px rgba(0, 242, 254, 0.2); }
.lg-lens { left: 29%; top: 29%; width: 42%; height: 42%; border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle, #04161c 0 34%, #0a3a45 35% 52%, #041c22 53% 100%);
  box-shadow: 0 0 0 1.5px var(--accent), 0 0 9px rgba(0, 242, 254, 0.7), inset 0 0 5px rgba(0, 242, 254, 0.6); }
.lg-ticks { inset: 6%; border-radius: 50%; opacity: 0.8; background: repeating-conic-gradient(rgba(0, 242, 254, 0.95) 0 4deg, transparent 4deg 18deg);
  -webkit-mask: radial-gradient(circle, transparent 56%, #000 58% 74%, transparent 77%); mask: radial-gradient(circle, transparent 56%, #000 58% 74%, transparent 77%);
  animation: orbit 26s linear infinite var(--t, 0ms); }
.lg-sweep { inset: 0; border-radius: 50%; background: conic-gradient(rgba(0, 242, 254, 0.6), rgba(0, 242, 254, 0) 80deg, transparent); opacity: 0; transition: opacity 0.6s; animation: orbit 1.3s linear infinite var(--t, 0ms); }
.lg-pupil { left: 41%; top: 41%; width: 18%; height: 18%; border-radius: 50%; background: radial-gradient(circle at 38% 34%, #f0feff 0 14%, #00F2FE 24%, #046a78 62%, #012027 100%); box-shadow: 0 0 8px var(--accent); animation: lg-pupil 3.8s ease-in-out infinite var(--t, 0ms); }
@keyframes lg-pupil { 50% { transform: scale(0.8); } }
.lg-ring, .lg-orbit { left: -12%; top: 35%; width: 124%; height: 30%; transform: rotate(-18deg); }
.lg-ring { border-radius: 50%; border: 1.6px solid var(--accent); box-shadow: 0 0 5px rgba(0, 242, 254, 0.8), inset 0 0 3px rgba(0, 242, 254, 0.6); }
.lg-back { clip-path: inset(-40% -10% 50% -10%); opacity: 0.5; transition: opacity 0.6s; }
.lg-front { clip-path: inset(50% -10% -40% -10%); }
.lg-hot { clip-path: inset(50% -10% -40% -10%); border-width: 2px; box-shadow: 0 0 9px var(--accent), 0 0 18px rgba(0, 242, 254, 0.65); opacity: 0; transition: opacity 0.6s; }
.lg-orbit { transition: opacity 0.6s; }
.lg-sx, .lg-sy { left: 50%; top: 50%; width: 0; height: 0; }
.lg-sy { left: 0; top: 0; }
.lg-sat { left: -2.6px; top: -2.6px; width: 5.2px; height: 5.2px; border-radius: 50%; background: #f2feff; box-shadow: 0 0 5px #fff, 0 0 10px var(--accent); }
.lg-idle .lg-sx { animation: lg-x calc(var(--T) / 2) cubic-bezier(0.37, 0, 0.63, 1) infinite alternate var(--t, 0ms); }
.lg-idle .lg-sy { animation: lg-y calc(var(--T) / 2) cubic-bezier(0.37, 0, 0.63, 1) infinite alternate calc(var(--t, 0ms) - var(--T) * 0.75); }
.lg-idle .lg-sat { animation: lg-depth var(--T) linear infinite var(--t, 0ms); }
.lg-fast { opacity: 0; }
.lg-fast .lg-sx { animation: lg-x calc(var(--Tf) / 2) cubic-bezier(0.37, 0, 0.63, 1) infinite alternate var(--t, 0ms); }
.lg-fast .lg-sy { animation: lg-y calc(var(--Tf) / 2) cubic-bezier(0.37, 0, 0.63, 1) infinite alternate calc(var(--t, 0ms) - var(--Tf) * 0.75); }
.lg-fast .lg-sat { animation: lg-depth var(--Tf) linear infinite var(--t, 0ms); }
/* Супутник іде по еліпсу: праворуч → позаду сфери (тьмяніє) → ліворуч → попереду сфери (яскравий). */
@keyframes lg-x { from { transform: translateX(calc(var(--s) * 0.62)); } to { transform: translateX(calc(var(--s) * -0.62)); } }
@keyframes lg-y { from { transform: translateY(calc(var(--s) * -0.15)); } to { transform: translateY(calc(var(--s) * 0.15)); } }
@keyframes lg-depth { 0% { opacity: 0.9; transform: scale(1); } 10%, 40% { opacity: 0.22; transform: scale(0.7); } 50% { opacity: 0.9; transform: scale(1); } 60%, 90% { opacity: 1; transform: scale(1.3); } 100% { opacity: 0.9; transform: scale(1); } }
body.searching .lg-top .lg-fast, .lg-os .lg-fast { opacity: 1; }
body.searching .lg-top .lg-idle, .lg-os .lg-idle { opacity: 0; }
body.searching .lg-top .lg-sweep, .lg-os .lg-sweep { opacity: 1; }
body.searching .lg-top .lg-back, .lg-os .lg-back { opacity: 0.9; }
body.searching .lg-top .lg-hot, .lg-os .lg-hot { opacity: 1; animation: lg-hot 1.2s ease-in-out infinite var(--t, 0ms); }
@keyframes lg-hot { 50% { opacity: 0.4; } }
@media (max-width: 380px) { .lg-top { --s: 38px; } }

/* ═══════════ Пошук триває: станції на орбіті ═══════════ */
.osearch { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: stretch; gap: 4px; padding: 12px 14px 10px; border: 1px solid rgba(0, 242, 254, 0.3); background: linear-gradient(180deg, rgba(0, 242, 254, 0.08), rgba(0, 242, 254, 0.02)); }
.osearch::before { content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 45%; background: linear-gradient(90deg, transparent, rgba(0, 242, 254, 0.09), transparent); transform: translateX(-100%); animation: os-sheen 3.4s ease-in-out infinite var(--t, 0ms); pointer-events: none; }
@keyframes os-sheen { to { transform: translateX(330%); } }
.os-top { position: relative; display: flex; align-items: center; gap: 12px; min-width: 0; }
.os-btns { position: absolute; top: 12px; right: 14px; display: flex; align-items: center; gap: 8px; }
.os-t { padding-right: 300px; }
.os-track { position: relative; height: 44px; margin: 4px 6px 0; }
.os-track svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.os-arc { fill: none; stroke: rgba(154, 164, 178, 0.32); stroke-width: 1.5; stroke-dasharray: 1.2 1.6; vector-effect: non-scaling-stroke; }
.os-arc-lit { fill: none; stroke: var(--accent); stroke-width: 2.2; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 3px rgba(0, 242, 254, 0.9)); }
.os-st { position: absolute; z-index: 1; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; border: 1.5px solid rgba(154, 164, 178, 0.5); background: var(--bg-1); }
.os-st.part { border-color: rgba(0, 242, 254, 0.75); background: radial-gradient(circle, rgba(0, 242, 254, 0.55) 0 32%, var(--bg-1) 38%); }
.os-st.now { border-color: var(--accent); background: radial-gradient(circle, rgba(0, 242, 254, 0.4) 0 40%, var(--bg-1) 46%); box-shadow: 0 0 10px rgba(0, 242, 254, 0.55); }
.os-st.now::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 1.5px solid var(--accent); animation: os-ping 1.8s ease-out infinite var(--t, 0ms); }
@keyframes os-ping { from { transform: scale(0.65); opacity: 0.9; } to { transform: scale(2.1); opacity: 0; } }
.os-st.done { border-color: var(--accent); background: radial-gradient(circle at 40% 35%, #e2feff, var(--accent) 55%, var(--accent-2)); box-shadow: 0 0 12px rgba(0, 242, 254, 0.8); }
.os-ign { position: absolute; display: block; inset: -9px; border-radius: 50%; background: radial-gradient(circle, rgba(0, 242, 254, 0.75), transparent 65%); opacity: 0; }
.os-ign.land { animation: os-ign 1.3s ease-out var(--ld, 0ms) both; }
@keyframes os-ign { from { opacity: 1; transform: scale(0.4); } to { opacity: 0; transform: scale(2.6); } }
.os-sx { position: absolute; display: block; z-index: 2; left: 0; top: 0; width: 100%; height: 0; transform: translateX(var(--x)); pointer-events: none; }
.os-sy { position: absolute; display: block; left: 0; top: 0; transform: translateY(var(--y)); }
.os-sx.fly { animation: os-fx 1.1s cubic-bezier(0.55, 0, 0.25, 1) var(--fd) both; }
.os-sx.fly .os-sy { animation: os-fy 1.1s cubic-bezier(0.55, 0, 0.25, 1) var(--fd) both; }
@keyframes os-fx { from { transform: translateX(var(--x0)); } to { transform: translateX(var(--x)); } }
@keyframes os-fy { from { transform: translateY(var(--y0)); } 50% { transform: translateY(calc((var(--y0) + var(--y)) / 2 - 14px)); } to { transform: translateY(var(--y)); } }
.os-so { position: absolute; display: block; left: 0; top: 0; width: 0; height: 0; animation: orbit 1.4s linear infinite var(--t, 0ms); }
.os-dot { position: absolute; display: block; left: 9px; top: -3.5px; width: 7px; height: 7px; border-radius: 50%; background: #f2feff; box-shadow: 0 0 6px #fff, 0 0 12px var(--accent); }
.os-labels { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; text-align: center; }
.os-labels span { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.os-labels b { font-size: 11.5px; font-weight: 600; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.os-labels small { min-height: 14px; font-size: 11px; color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.os-labels .done b { color: var(--text-0); }
.os-labels .now b { color: var(--accent); }
.os-labels .done small, .os-labels .part small, .os-labels .now small { color: var(--accent); }
@media (max-width: 640px) {
  .os-t { flex-basis: auto; padding-right: 0; }
  .os-btns { position: static; justify-content: space-between; margin-top: 2px; }
  .os-btns .os-stop { margin-left: auto; }
  .os-copy { margin-left: 0; }
}

/* Маленька орбіта замість сірих спінерів: ядро і супутник (той самий клас .spin по всьому сайту). */
.spin { position: relative; display: inline-block; flex: none; width: 14px; height: 14px; border: 0; border-radius: 50%; animation: none; opacity: 1; vertical-align: -2px; margin-right: 4px; }
.spin::before { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(0, 242, 254, 0.38); background: radial-gradient(circle, var(--accent) 0 2px, transparent 2.6px); }
.spin::after { content: ''; position: absolute; inset: -2px; border-radius: 50%; background: radial-gradient(circle at 50% 2.6px, #f2feff 0 1.9px, rgba(0, 242, 254, 0.7) 2.5px, transparent 3.4px); animation: orbit 1.1s linear infinite var(--t, 0ms); }
.os-wait { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); font-size: 12.5px; }
.dots { display: inline-flex; gap: 2px; margin-left: 1px; }
.dots i { display: block; width: 3px; height: 3px; border-radius: 50%; background: currentColor; animation: dot 1.2s ease-in-out infinite; }
.dots i:nth-child(2) { animation-delay: 0.15s; }
.dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes dot { 0%, 70%, 100% { opacity: 0.25; transform: translateY(0); } 35% { opacity: 1; transform: translateY(-2px); } }

/* «Приземлення»: новий номер, ціна, пропозиція — плавно з'являються, рядок коротко підсвічується. */
.land { animation: land-in 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) var(--ld, 0ms) both; }
@keyframes land-in { from { opacity: 0; transform: translateY(8px) scale(0.985); } to { opacity: 1; transform: none; } }
.nums.land, .qline.land { position: relative; }
.nums.land::after, .qline.land::after { content: ''; position: absolute; inset: -4px -6px; border-radius: 12px; pointer-events: none; opacity: 0;
  background: radial-gradient(120% 140% at 0% 50%, rgba(0, 242, 254, 0.2), transparent 62%); box-shadow: inset 0 0 0 1px rgba(0, 242, 254, 0.45); animation: land-glow 1.5s ease-out var(--ld, 0ms) both; }
@keyframes land-glow { 0% { opacity: 0; } 15% { opacity: 1; } 100% { opacity: 0; } }
.qstat .ok.land { display: inline-block; animation: ok-pop 0.7s cubic-bezier(0.3, 1.6, 0.5, 1) var(--ld, 0ms) both; }
@keyframes ok-pop { from { opacity: 0; transform: scale(0); } to { opacity: 1; transform: scale(1); } }

/* ═══════════ «Підтвердити авто» перед пошуком ═══════════ */
.cgate { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 14px; border: 1px solid rgba(0, 242, 254, 0.3); background: rgba(0, 242, 254, 0.04); }
.cgate.ok { border-color: rgba(0, 230, 118, 0.35); background: rgba(0, 230, 118, 0.04); }
.rv-step { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.rv-step .dim { font-size: 12px; }
.rv-n { display: inline-grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 50%; font-size: 12px; font-weight: 700; color: #031016; background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.cgate.ok .rv-n { background: var(--ok); }
.cg-car { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cg-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 200px; }
.cg-name b { font-size: 16px; }
.cg-name .dim { font-size: 12.5px; }
.cg-ids { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.cg-ids .vin { font-size: 13px; padding: 4px 8px; overflow-wrap: anywhere; }
.cg-look { display: flex; align-items: flex-start; gap: 8px; font-size: 13.5px; color: var(--accent); }
.cg-look .spin { margin-top: 2px; }
.cg-look > span:last-child { min-width: 0; }
.askvin { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 12px; border: 1px dashed rgba(255, 184, 0, 0.5); background: rgba(255, 184, 0, 0.05); }
.askvin b { font-size: 13.5px; font-weight: 600; }
.askvin .dim { font-size: 12.5px; }
.cg-vin { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cg-vin .in { flex: 1 1 220px; min-width: 0; letter-spacing: 0.06em; text-transform: uppercase; }
.cg-err { font-size: 12.5px; color: var(--warn); }
.cg-act { gap: 8px; flex-wrap: wrap; }
.pill.pill-live::before { display: none; }
.pill-live .spin { margin: 0; }
@media (max-width: 520px) { .cg-vin .btn { flex: 1 1 auto; } .cg-act .btn.primary { width: 100%; } }

/* ═══════════ Авто в роботі: окремий пункт меню, архів, свайпи, вибір кількох ═══════════ */
.nl-s { display: none; }
.nav-live { position: absolute; top: 8px; right: calc(50% - 20px); width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.nav-live::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 1.5px solid var(--accent); animation: os-ping 1.6s ease-out infinite; }
@media (max-width: 1099px) {
  .nav-in, .nav4 .nav-in { display: flex; }
  .nav button { flex: 1 1 auto; min-width: 0; padding: 0 2px; white-space: nowrap; }
  .nl-l { display: none; }
  .nl-s { display: inline; }
  body.nav6 .nav button { font-size: 10.5px; }
}
@media (min-width: 1100px) { .nav-live { top: 50%; right: 14px; margin-top: -4px; } }
.dot.live { box-shadow: 0 0 6px var(--accent); animation: lg-breathe 1.2s ease-in-out infinite; }
.garage .section-h { align-items: center; }
.garage .section-h h1 { margin: 0; }
.g-tabs button { display: inline-flex; align-items: center; gap: 6px; }
.g-tabs svg { width: 16px; height: 16px; }
.g-tabs .num { font-size: 12px; font-weight: 500; color: var(--text-2); }
.g-tabs .on .num { color: var(--accent); }
.g-hint { margin: 0; font-size: 12px; text-align: center; }
.g-mouse { display: none; }
body:not(.touch) .g-touch { display: none; }
body:not(.touch) .g-mouse { display: inline; }
.sw { position: relative; border-radius: var(--r-2); isolation: isolate; }
.sw-card { position: relative; z-index: 2; width: 100%; height: 100%; background: var(--bg-1); touch-action: pan-y; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.2s, box-shadow 0.2s; }
.sw.drag .sw-card { transition: none; will-change: transform; }
.sw.open .sw-card { transform: translateX(-172px); }
.sw-acts { position: absolute; z-index: 1; top: 1px; right: 1px; bottom: 1px; display: flex; border-radius: var(--r-2); overflow: hidden; opacity: 0; }
.sw.reveal .sw-acts, .sw.open .sw-acts { opacity: 1; }
.sw.to-full .sw-acts { left: 1px; }
.sw.to-full .sw-acts .sw-arch, .sw.to-full .sw-acts .sw-rest { flex: 1; }
.sw-b { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; width: 86px; border: 0; font: inherit; font-size: 12px; font-weight: 600; color: #fff; cursor: pointer; }
.sw-b svg { width: 20px; height: 20px; }
.sw-acts .sw-arch, .sw-acts .sw-rest { background: #1b6f86; }
.sw-acts .sw-del { background: var(--danger); }
.sw-left { position: absolute; z-index: 1; top: 1px; bottom: 1px; left: 1px; width: 70%; display: flex; align-items: center; gap: 8px; padding-left: 18px; border-radius: var(--r-2);
  background: linear-gradient(90deg, rgba(0, 242, 254, 0.28), transparent); color: var(--accent); font-size: 13px; font-weight: 600; opacity: 0; }
.sw.drag:not(.reveal) .sw-left { opacity: 0.55; }
.sw.to-sel .sw-left { opacity: 1; }
.sw-tick { width: 20px; height: 20px; border-radius: 50%; border: 2px solid currentColor; }
.sw.sel .sw-tick { background: var(--accent); }
.cc-check { display: none; }
.selmode .case-card { padding-left: 50px; }
.selmode .cc-check { position: absolute; display: block; left: 15px; top: 50%; width: 22px; height: 22px; margin-top: -11px; border-radius: 50%; border: 2px solid rgba(154, 164, 178, 0.55); transition: transform 0.2s, background-color 0.2s, border-color 0.2s; }
.selmode .case-card.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 18px rgba(0, 242, 254, 0.18); }
.selmode .case-card.on .cc-check { border-color: var(--accent); transform: scale(1.08);
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23031016' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 14px no-repeat; }
.sw-pc { display: none; }
@media (hover: hover) and (pointer: fine) {
  .sw-pc { position: absolute; z-index: 3; right: 10px; bottom: 10px; display: flex; gap: 6px; opacity: 0; transform: translateY(4px); transition: opacity 0.15s, transform 0.15s; }
  .sw:hover .sw-pc, .sw:focus-within .sw-pc { opacity: 1; transform: none; }
  .sw-pc .sw-b { width: auto; flex-direction: row; gap: 6px; padding: 6px 10px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text-1); }
  .sw-pc .sw-b svg { width: 15px; height: 15px; }
  .sw-pc .sw-b:hover { color: var(--text-0); border-color: var(--line); }
  .sw-pc .sw-del:hover { color: var(--danger); border-color: rgba(255, 51, 102, 0.5); }
}
.selbar { position: fixed; z-index: 55; left: max(8px, env(safe-area-inset-left, 0px)); right: max(8px, env(safe-area-inset-right, 0px)); bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: center; gap: 6px; padding: 8px 8px 8px 14px; border-radius: 16px; background: rgba(26, 31, 43, 0.97); border: 1px solid var(--line); box-shadow: 0 12px 34px rgba(0, 0, 0, 0.55); }
.selbar .sb-n { flex: 1 1 auto; min-width: 0; font-size: 13px; color: var(--text-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.selbar .sb-n b { color: var(--accent); font-size: 15px; }
.selbar .btn { flex: none; gap: 6px; }
.selbar .btn svg { width: 16px; height: 16px; }
.selbar .sb-x { min-width: 34px; padding: 0; justify-content: center; }
body.has-selbar main { padding-bottom: 190px; }
@media (max-width: 420px) { .selbar { gap: 4px; padding-left: 12px; } .selbar .btn.sm { padding: 0 9px; } .selbar .sb-w { display: none; } }
@media (min-width: 1100px) { .selbar { left: calc(var(--side-w) + 28px); right: 28px; bottom: 20px; max-width: 760px; margin-inline: auto; } }
.undo { position: fixed; z-index: 61; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); display: flex; align-items: center; gap: 12px; overflow: hidden;
  max-width: calc(100vw - 24px); padding: 8px 8px 8px 16px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); box-shadow: 0 12px 34px rgba(0, 0, 0, 0.55); font-size: 14px; white-space: nowrap; }
.undo > span { overflow: hidden; text-overflow: ellipsis; }
.undo-b { flex: none; border: 0; background: none; color: var(--accent); font: inherit; font-weight: 700; padding: 8px 10px; border-radius: 10px; cursor: pointer; }
.undo-b:hover { background: var(--accent-bg); }
.undo-t { position: absolute; display: block; left: 0; bottom: 0; width: 100%; height: 2px; background: var(--accent); transform-origin: left; animation: undo-t 6s linear both; }
@keyframes undo-t { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@media (min-width: 1100px) { .undo { bottom: 24px; left: calc(50% + var(--side-w) / 2); } }

/* ── Налаштування (17.10): вкладки, «Мої постачальники», «Пошук» з розширеним пошуком і GHOST ── */
.seg { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); padding: 4px; border-radius: 14px;
  background: rgba(255, 255, 255, 0.025); border: 1px solid var(--line-2); --n: 2; }
.seg button { position: relative; z-index: 1; min-height: 40px; min-width: 0; padding: 0 10px; border: 0; border-radius: 10px; background: none; color: var(--text-1);
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap; transition: color 0.25s; }
.seg button svg { width: 16px; height: 16px; flex: none; }
.seg button:hover { color: var(--text-0); }
.seg button.on { color: var(--text-0); }
.seg-ink { position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / var(--n)); border-radius: 10px;
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.2), rgba(79, 172, 254, 0.08)); border: 1px solid rgba(0, 242, 254, 0.35);
  box-shadow: 0 0 22px rgba(0, 242, 254, 0.16), inset 0 0 14px rgba(0, 242, 254, 0.08); transform: translateX(calc(var(--i) * 100%)); }
.seg-ink.mv { animation: seg-ink 0.42s cubic-bezier(0.3, 1.25, 0.5, 1) both; }
@keyframes seg-ink { from { transform: translateX(calc(var(--from) * 100%)); } to { transform: translateX(calc(var(--i) * 100%)); } }
.set-tabs { --n: 4; max-width: 760px; }
.set-tabs button { font-size: 13.5px; }
.seg-b { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: var(--accent-bg); color: var(--accent); }
.set-tabs .t-s { display: none; }
@media (max-width: 560px) { .set-tabs .t-l, .set-tabs .seg-b { display: none; } .set-tabs .t-s { display: inline; } .set-tabs button { font-size: 13px; padding: 0 4px; } }
@media (max-width: 420px) { .set-tabs button { font-size: 11.5px; padding: 0 2px; letter-spacing: -0.01em; } }
.set-wrap { gap: 14px; }
.set-pane { gap: 14px; max-width: 980px; }

/* Мої постачальники */
.sp-sum { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; font-size: 13.5px; color: var(--text-1); }
.sp-sum b { color: var(--text-0); }
.sp-sum-i { display: inline-flex; align-items: center; gap: 6px; }
.sp-sum-i svg { width: 15px; height: 15px; color: var(--accent); }
.sp-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
@media (min-width: 1100px) { .sp-list { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } }
.sp { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: var(--r-2); background: var(--glass); border: 1px solid var(--line-2);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); transition: border-color 0.25s, box-shadow 0.25s, opacity 0.25s; min-width: 0; }
.sp.on { border-color: rgba(0, 242, 254, 0.2); }
.sp.open { border-color: rgba(0, 242, 254, 0.42); box-shadow: 0 0 0 1px rgba(0, 242, 254, 0.06), 0 18px 40px rgba(0, 0, 0, 0.35); }
@media (min-width: 1100px) { .sp.open { grid-column: 1 / -1; } }
.sp:not(.on) .sp-t b, .sp:not(.on) .sp-av { opacity: 0.55; }
.sp-h { display: flex; align-items: center; gap: 12px; min-width: 0; }
.sp-av { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; font-size: 17px; font-weight: 700; color: var(--accent);
  background: radial-gradient(120% 120% at 30% 20%, rgba(0, 242, 254, 0.22), rgba(0, 242, 254, 0.03) 60%), var(--bg-2); border: 1px solid var(--line); transition: opacity 0.25s; }
.sp.on .sp-av { box-shadow: 0 0 16px rgba(0, 242, 254, 0.18); }
.sp-av svg { width: 18px; height: 18px; }
.sp-t { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.sp-t b { font-size: 15.5px; overflow-wrap: anywhere; transition: opacity 0.25s; }
.sp-st { display: flex; gap: 8px; align-items: baseline; font-size: 13px; color: var(--text-1); line-height: 1.4; }
.sp-st .dot { flex: none; transform: translateY(-1px); }
.sp-st .dot.g { box-shadow: 0 0 8px var(--ok); }
.sp:not(.on) .sp-st { color: var(--text-2); }
.sp-ways { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.sp-way { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; letter-spacing: 0.02em; padding: 2px 8px 2px 6px; border-radius: 999px; color: var(--text-2); border: 1px dashed var(--line-2); }
.sp-way svg { width: 13px; height: 13px; }
.sp-way.ok { color: var(--ok); border: 1px solid rgba(0, 230, 118, 0.35); background: rgba(0, 230, 118, 0.07); }
.sp-way.warn { color: var(--warn); border: 1px solid rgba(255, 184, 0, 0.35); background: rgba(255, 184, 0, 0.06); }
.sp-more { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px 0 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--accent-bg);
  color: var(--accent); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: background 0.2s; }
.sp-more:hover { background: rgba(0, 242, 254, 0.22); }
.sp-more svg { width: 16px; height: 16px; transition: transform 0.3s cubic-bezier(0.3, 1.3, 0.5, 1); }
.sp.open .sp-more svg { transform: rotate(180deg); }
.sp-body { display: flex; flex-direction: column; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.sp-body .seg { max-width: 340px; }
.sp-pane { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.sp-done { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.sp-ok { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; color: #03140c; background: var(--ok); font-weight: 800; font-size: 14px; box-shadow: 0 0 16px rgba(0, 230, 118, 0.45); }
.sp-hint { font-size: 12.5px; color: var(--text-2); }
.sp-info { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.sp-links .btn { text-decoration: none; }
.sp-links .btn svg { width: 14px; height: 14px; }
.sp-filters select.in { width: auto; flex: 1 1 150px; min-height: 38px; padding: 6px 10px; }
.sp-file { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(0, 230, 118, 0.05); border: 1px solid rgba(0, 230, 118, 0.25); min-width: 0; }
.sp-file .stack { flex: 1; }
.sp-file b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-file .dim { font-size: 12.5px; }
.sp-fi { flex: none; color: var(--ok); } .sp-fi svg { width: 22px; height: 22px; display: block; }
.drop { position: relative; display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 14px; border: 1.5px dashed rgba(0, 242, 254, 0.35); background: rgba(0, 242, 254, 0.035);
  cursor: pointer; overflow: hidden; transition: border-color 0.2s, background 0.2s, transform 0.2s; }
.drop:hover, .drop.over { border-color: var(--accent); background: rgba(0, 242, 254, 0.08); }
.drop.over { transform: scale(1.01); }
.drop::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(0, 242, 254, 0.12) 50%, transparent 70%); transform: translateX(-100%); pointer-events: none; }
.drop.over::after, .drop.busy::after { animation: drop-sheen 1.3s ease-in-out infinite var(--t, 0ms); }
@keyframes drop-sheen { to { transform: translateX(100%); } }
.drop b { font-size: 14px; }
.drop .dim { font-size: 12.5px; }
.drop-ic { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: var(--accent); background: var(--accent-bg); border: 1px solid var(--line); }
.drop-ic svg { width: 22px; height: 22px; }
.drop:hover .drop-ic svg, .drop.over .drop-ic svg { animation: drop-up 0.9s ease-in-out infinite; }
@keyframes drop-up { 50% { transform: translateY(-3px); } }
.drop.busy { cursor: progress; }
.sp-eta { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; }
.sp-eta .in { width: 70px; min-height: 34px; padding: 4px 8px; }
.sp-del { align-self: flex-start; }
.sp-add { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 14px; border-radius: var(--r-2); border: 1px dashed var(--line-2); background: rgba(255, 255, 255, 0.015); transition: border-color 0.2s; }
.sp-add:focus-within { border-color: var(--line); }
.sp-add .in { flex: 1; min-width: 0; min-height: 42px; background: transparent; border-color: transparent; padding-left: 4px; }
.sp-add .in:focus { box-shadow: none; border-color: transparent; }
.sp-av-add { width: 34px; height: 34px; border-radius: 10px; }
.sp-foot { font-size: 12.5px; }

/* Пошук: 1 мої → 2 розширений → GHOST */
.srch { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: var(--r-2); background: var(--glass); border: 1px solid var(--line-2); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); min-width: 0; }
.srch-h { display: flex; align-items: center; gap: 12px; min-width: 0; }
.srch-h > .stack { flex: 1; }
.srch-h .dim { font-size: 12.5px; }
.srch-n { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-family: var(--font-display); font-size: 12px; color: var(--accent); border: 1px solid var(--line); background: var(--accent-bg); }
.srch-mine { border-color: rgba(0, 230, 118, 0.22); }
.srch-mine .srch-n { color: var(--ok); border-color: rgba(0, 230, 118, 0.35); background: rgba(0, 230, 118, 0.08); }
.srch-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip-sup { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 999px; font-size: 13px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.03); }
.srch-wide.on { border-color: rgba(0, 242, 254, 0.22); }
.lv-list { display: flex; flex-direction: column; }
.lv { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line-2); min-width: 0; transition: opacity 0.25s; }
.lv > .stack { flex: 1; }
.lv b { font-size: 14.5px; font-weight: 600; }
.lv .dim { font-size: 12.5px; }
.lv:not(.on) > .stack { opacity: 0.62; }
.lv-ic { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: #cfa8ff; background: rgba(168, 85, 247, 0.12); border: 1px solid rgba(168, 85, 247, 0.3); }
.lv-ic svg { width: 18px; height: 18px; }
.lv-ic:empty { display: none; }
.srch-note { font-size: 12.5px; color: var(--text-2); }
.switch span { transition: background 0.25s, border-color 0.25s, box-shadow 0.25s; }
.switch span::after { transition: transform 0.32s cubic-bezier(0.3, 1.4, 0.5, 1), background 0.25s; }
.switch input:checked + span { box-shadow: 0 0 14px rgba(0, 242, 254, 0.35); }
.gh-card .switch input:checked + span { background: var(--ai-gen); border-color: var(--ai-gen); box-shadow: 0 0 16px rgba(168, 85, 247, 0.5); }

/* GHOST: окрема картка з живим знаком */
.gh-card { position: relative; overflow: hidden; border-color: rgba(168, 85, 247, 0.32);
  background: radial-gradient(140% 90% at 0% 0%, rgba(168, 85, 247, 0.16), transparent 55%), radial-gradient(120% 80% at 100% 100%, rgba(0, 242, 254, 0.08), transparent 60%), var(--glass); }
.gh-card.on { border-color: rgba(168, 85, 247, 0.55); box-shadow: 0 0 0 1px rgba(168, 85, 247, 0.12), 0 18px 46px rgba(76, 29, 149, 0.28); }
.gh-card::before { content: ''; position: absolute; inset: -40% -10% auto; height: 60%; background: linear-gradient(180deg, transparent, rgba(168, 85, 247, 0.1), transparent); pointer-events: none;
  animation: gh-veil 7s ease-in-out infinite var(--t, 0ms); }
@keyframes gh-veil { 50% { transform: translateY(150%); } }
.gh-card .lv { border-top-color: rgba(168, 85, 247, 0.16); }
.gh-wm { font-family: var(--font-display); font-weight: 400; font-size: 17px; letter-spacing: 0.34em; color: #e3cfff; text-shadow: 0 0 14px rgba(168, 85, 247, 0.75); }
.gh-how b { color: #e3cfff; letter-spacing: 0.12em; font-family: var(--font-display); font-weight: 400; font-size: 11.5px; }
.gh-mark { --g: 48px; position: relative; flex: none; width: var(--g); height: var(--g); }
.gh-mark.gh-sm { --g: 36px; }
.gh-mark.gh-xs { --g: 18px; }
.gh-ring { position: absolute; left: -14%; right: -14%; top: 52%; height: 34%; margin-top: -17%; border-radius: 50%; border: 1.5px solid rgba(190, 140, 255, 0.55); transform: rotate(-16deg); }
.gh-back { z-index: 0; opacity: 0.55; }
.gh-front { z-index: 3; clip-path: inset(50% 0 0 0); box-shadow: 0 2px 10px rgba(168, 85, 247, 0.35); }
.gh-body { position: absolute; z-index: 2; left: 19%; top: 6%; width: 62%; height: 78%; overflow: visible; filter: drop-shadow(0 0 6px rgba(190, 140, 255, 0.75));
  animation: gh-float 3.2s ease-in-out infinite var(--t, 0ms); }
.gh-body path { fill: rgba(240, 230, 255, 0.94); }
.gh-eye { fill: #1b1030; animation: gh-blink 4.6s ease-in-out infinite var(--t, 0ms); transform-box: fill-box; transform-origin: center; }
@keyframes gh-float { 50% { transform: translateY(-7%); } }
@keyframes gh-blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(0.1); } }
.gh-scan { position: absolute; z-index: 2; left: 22%; right: 22%; top: 18%; height: 2px; border-radius: 2px; background: linear-gradient(90deg, transparent, var(--accent), transparent); box-shadow: 0 0 8px var(--accent); opacity: 0;
  animation: gh-scan 2.8s ease-in-out infinite var(--t, 0ms); }
@keyframes gh-scan { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: 1; } 55% { transform: translateY(calc(var(--g) * 0.55)); opacity: 1; } 70%, 100% { transform: translateY(calc(var(--g) * 0.55)); opacity: 0; } }
.gh-orbit { position: absolute; z-index: 4; inset: 0; transform: rotate(-16deg); pointer-events: none; }
.gh-sx, .gh-sy { position: absolute; display: block; width: 0; height: 0; }
.gh-sx { left: 50%; top: 52%; animation: gh-x 1.6s cubic-bezier(0.37, 0, 0.63, 1) infinite alternate var(--t, 0ms); }
.gh-sy { left: 0; top: 0; animation: gh-y 1.6s cubic-bezier(0.37, 0, 0.63, 1) infinite alternate calc(var(--t, 0ms) - 2.4s); }
.gh-sat { position: absolute; display: block; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: #e9fdff; box-shadow: 0 0 8px var(--accent), 0 0 3px #fff;
  animation: gh-depth 3.2s linear infinite var(--t, 0ms); }
@keyframes gh-x { from { transform: translateX(calc(var(--g) * 0.64)); } to { transform: translateX(calc(var(--g) * -0.64)); } }
@keyframes gh-y { from { transform: translateY(calc(var(--g) * -0.17)); } to { transform: translateY(calc(var(--g) * 0.17)); } }
@keyframes gh-depth { 0% { opacity: 0.9; } 10%, 40% { opacity: 0.15; transform: scale(0.7); } 50% { opacity: 0.9; transform: scale(1); } 60%, 90% { opacity: 1; transform: scale(1.3); } }
.gh-xs .gh-scan, .gh-xs .gh-back, .gh-xs .gh-orbit { display: none; }
.gh-xs .gh-ring { border-width: 1px; }
.gh-xs .gh-body { filter: drop-shadow(0 0 3px rgba(190, 140, 255, 0.8)); }

/* GHOST у позиції «Не знайшли» */
.gh-btn { gap: 6px; color: #e3cfff; border-color: rgba(168, 85, 247, 0.45); background: rgba(168, 85, 247, 0.1); letter-spacing: 0.12em; font-weight: 700; }
.gh-btn:hover, .gh-btn.on { border-color: var(--ai-gen); background: rgba(168, 85, 247, 0.2); box-shadow: 0 0 16px rgba(168, 85, 247, 0.3); }
.qstat.q-ghost .spin::before { background: var(--ai-gen); box-shadow: 0 0 8px var(--ai-gen); }
.qstat.q-ghost > span:not(.spin) { color: #e3cfff; }
.gp { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; padding: 12px; border-radius: 14px; border: 1px solid rgba(168, 85, 247, 0.4);
  background: radial-gradient(120% 120% at 0% 0%, rgba(168, 85, 247, 0.14), transparent 60%), var(--bg-1); }
.gp-h { display: flex; align-items: center; gap: 10px; }
.gp-h .gh-wm { font-size: 14px; }
.gp-h .dim { font-size: 12px; }
.gp-opts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
@media (min-width: 760px) { .gp-opts { grid-template-columns: repeat(2, minmax(0, 1fr)); } .gp-dims { grid-column: 1 / -1; } }
.gp-opt { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 10px 12px; margin: 0; border-radius: 12px; border: 1px solid rgba(168, 85, 247, 0.25); background: rgba(255, 255, 255, 0.02);
  color: var(--text-0); font: inherit; text-align: left; cursor: pointer; transition: border-color 0.2s, background 0.2s, transform 0.15s; }
.gp-opt:hover { border-color: rgba(168, 85, 247, 0.6); background: rgba(168, 85, 247, 0.08); }
.gp-opt:active { transform: scale(0.99); }
.gp-opt b { font-size: 14px; }
.gp-opt .dim { font-size: 12px; }
.gp-dims { cursor: default; }
.gp-row { gap: 6px; flex-wrap: wrap; }
.gp-dims .in { min-height: 38px; padding: 6px 10px; font-size: 15px; flex: 1 1 210px; min-width: 0; }
.gp-ic { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: #cfa8ff; background: rgba(168, 85, 247, 0.14); }
.gp-ic svg { width: 18px; height: 18px; }

/* Спокійна версія для «зменшити рух»: нічого не літає, лише м'яко світиться. */
@keyframes calm-pulse { 50% { opacity: 0.35; } }
@keyframes calm-in { from { opacity: 0; } to { opacity: 1; } }
/* Мої CRM і API ORBITA для CRM */
.ro-note { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; font-size: 13px; color: var(--text-1); border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.03); }
.ro-note .sp-fi { color: var(--text-2); } .ro-note .sp-fi svg { width: 18px; height: 18px; }
.sp-av-acc { color: #ffd36b; border-color: rgba(255, 184, 0, 0.3); background: rgba(255, 184, 0, 0.08); }
.sp.on .sp-av-acc { box-shadow: 0 0 16px rgba(255, 184, 0, 0.16); }
.sp-t .pill { font-size: 10.5px; vertical-align: 2px; margin-left: 4px; }
.oa-ic { flex: none; position: relative; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: var(--accent); background: var(--accent-bg); border: 1px solid var(--line); }
.oa-ic svg { width: 18px; height: 18px; }
.oa-ic-lg { width: 44px; height: 44px; border-radius: 14px; }
.oa-ic-lg svg { width: 22px; height: 22px; }
.oa-ic-lg::after { content: ''; position: absolute; inset: -5px; border-radius: 17px; border: 1px solid rgba(0, 242, 254, 0.35); opacity: 0; animation: oa-ping 3.2s ease-out infinite var(--t, 0ms); }
@keyframes oa-ping { 0% { opacity: 0.8; transform: scale(0.86); } 70%, 100% { opacity: 0; transform: scale(1.18); } }
.oa-how { display: flex; gap: 12px; align-items: flex-start; font-size: 13.5px; }
.oa-how .dim { font-size: 12.5px; line-height: 1.45; }
.oapi { position: relative; overflow: hidden; border-color: rgba(0, 242, 254, 0.22);
  background: radial-gradient(130% 90% at 100% 0%, rgba(0, 242, 254, 0.1), transparent 55%), var(--glass); }
.oapi::before { content: ''; position: absolute; right: -60px; top: -60px; width: 180px; height: 180px; border-radius: 50%; border: 1px dashed rgba(0, 242, 254, 0.18); pointer-events: none; animation: oa-orbit 40s linear infinite var(--t, 0ms); }
@keyframes oa-orbit { to { transform: rotate(360deg); } }
.oa-key { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 14px; border-radius: 12px; border: 1px solid rgba(0, 230, 118, 0.35); background: rgba(0, 230, 118, 0.06); min-width: 0; }
.oa-key code { flex: 1; min-width: 0; font-size: 13px; overflow-wrap: anywhere; color: var(--text-0); }
.oa-warn { font-size: 12.5px; color: var(--warn); }
.oa-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.oa-row .dim { font-size: 12.5px; }
.oa-guide { border-top: 1px solid var(--line-2); padding-top: 10px; }
.oa-guide > summary { cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--accent); list-style: none; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; }
.oa-guide > summary::-webkit-details-marker { display: none; }
.oa-guide > summary::after { content: '▾'; transition: transform 0.25s; }
.oa-guide[open] > summary::after { transform: rotate(180deg); }
.oa-guide[open] > .oa-steps { animation: land-in 0.35s cubic-bezier(0.2, 0.9, 0.3, 1) both; }
.oa-steps { display: flex; flex-direction: column; gap: 12px; margin: 8px 0 12px; }
.oa-steps > div { display: flex; gap: 10px; align-items: flex-start; min-width: 0; }
.oa-steps b { font-size: 14px; }
.oa-steps .dim { font-size: 12.5px; }
.oa-steps code { display: block; font-size: 12px; padding: 6px 9px; border-radius: 8px; background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line-2); overflow-x: auto; white-space: pre; max-width: 100%; }
.oa-json { white-space: pre-wrap !important; overflow-wrap: anywhere; color: var(--text-1); }
.oa-n { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-size: 11.5px; font-family: var(--font-display); color: var(--accent); border: 1px solid var(--line); background: var(--accent-bg); }
.oapi .btn svg, .sp-pane .btn svg { width: 15px; height: 15px; vertical-align: -3px; margin-right: 6px; }

@media (prefers-reduced-motion: reduce) {
  .lg .lg-fast, .lg .lg-sweep { opacity: 0 !important; }
  .lg .lg-idle { opacity: 1 !important; }
  .lg .lg-idle .lg-sx { transform: translateX(calc(var(--s) * 0.32)) !important; }
  .lg .lg-idle .lg-sy { transform: translateY(calc(var(--s) * 0.13)) !important; }
  .lg .lg-glow { animation: lg-breathe 5s ease-in-out infinite !important; }
  body.searching .lg-top .lg-hot, .lg-os .lg-hot { animation: lg-hot 2.4s ease-in-out infinite !important; }
  .osearch .os-st.now::after { inset: -3px; animation: calm-pulse 2.4s ease-in-out infinite !important; }
  .osearch .os-so { transform: none !important; }
  .osearch .os-dot { left: -3.5px; }
  .osearch::before { display: none; }
  .spin::after { background: none !important; }
  .spin::before { animation: calm-pulse 1.8s ease-in-out infinite !important; }
  .land, .offer.land, .nums.land, .qline.land { animation: calm-in 0.4s ease-out var(--ld, 0ms) both !important; }
  .nums.land::after, .qline.land::after { animation: land-glow 1.5s ease-out var(--ld, 0ms) both !important; }
  .gh-body, .gh-eye, .gh-scan, .gh-sx, .gh-sy, .gh-card::before { animation: none !important; }
  .gh-sx { transform: translateX(calc(var(--g) * 0.4)) !important; }
  .gh-sat { animation: calm-pulse 2.4s ease-in-out infinite !important; }
  .seg-ink.mv { animation: none !important; }
  .oapi::before, .oa-ic-lg::after { animation: none !important; }
}

/* ═══════════ Підбір: позиції згортаються, варіанти розгортаються дотиком; ＋/✓ — у кошторис (17.10) ═══════════ */
.qstates { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.qstates .chips { flex: 1 1 auto; min-width: 0; }
.qstates .chip .spin { margin-right: 2px; }
.qstates .chip .num { color: var(--text-2); }
.qstates .chip.on .num { color: inherit; }
.qstates > .btn { flex: none; }
.qf-top { display: flex; align-items: center; gap: 8px; }
.qf-top .chips { flex: 1 1 auto; min-width: 0; }
.qf-more { flex: none; }
.qf-more.on { color: var(--accent); }
.q-hint { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.q-hint svg { flex: none; width: 18px; height: 18px; padding: 3px; border-radius: 50%; border: 1px solid var(--line); color: var(--accent); }
.q-open { display: flex; flex-direction: column; gap: 6px; align-items: stretch; padding-top: 4px; }

.qline.pl { gap: 0; padding: 0; border: 1px solid var(--line-2); border-radius: 14px; background: rgba(255, 255, 255, 0.015); overflow: hidden; }
.qline.pl:first-child { border-top: 1px solid var(--line-2); }
.qline.pl.open { border-color: var(--line); background: rgba(0, 242, 254, 0.025); }
.qlines { gap: 8px; }
.ph { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto 18px; gap: 10px; align-items: center; width: 100%; padding: 11px 12px; border: 0; background: none; color: inherit; text-align: left; cursor: pointer; font: inherit; }
.ph:hover { background: rgba(255, 255, 255, 0.025); }
.ph-ic { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; border: 1.5px solid var(--line-2); }
.ph-ic.s-found { color: var(--ok); border-color: rgba(0, 230, 118, 0.45); background: rgba(0, 230, 118, 0.08); }
.ph-ic.s-busy { border-color: var(--line); }
.ph-ic.s-busy .spin { margin: 0; }
.ph-ic.s-miss { border-style: dashed; border-color: rgba(255, 184, 0, 0.55); }
.ph-t { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ph-t b { font-size: 15px; overflow-wrap: anywhere; }
.ph-sub { font-size: 12px; color: var(--text-1); overflow-wrap: anywhere; }
.ph-sub .mono { font-size: 11.5px; color: var(--text-0); }
.ph-r { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; text-align: right; white-space: nowrap; }
.ph-r b { font-size: 15px; }
.ph-n { font-size: 11.5px; color: var(--text-2); }
.ph-n.warn { color: var(--warn); }
.ph-st { font-size: 12.5px; color: var(--accent); display: inline-flex; align-items: center; gap: 4px; }
.ph-st.miss { color: var(--warn); }
.ph .chev { width: 18px; height: 18px; color: var(--text-2); transition: transform 0.2s ease; }
.qline.pl.open .ph .chev { transform: rotate(180deg); color: var(--accent); }
.pb { display: flex; flex-direction: column; gap: 8px; padding: 0 12px 12px; }
.pb > .nums { margin-top: 0; }
@media (max-width: 420px) { .ph { grid-template-columns: 22px minmax(0, 1fr) auto 14px; gap: 8px; padding: 10px; } .ph .chev { width: 14px; } .ph-n { max-width: 128px; white-space: normal; } .pb { padding: 0 10px 10px; } }

.ofrs { display: flex; flex-direction: column; gap: 6px; }
.ofr { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; column-gap: 10px; row-gap: 2px; align-items: center; padding: 8px 10px 8px 8px; border-radius: 12px;
  border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.02); cursor: pointer; }
.ofr:hover { border-color: var(--line); }
.ofr:focus-visible { outline-offset: 0; }
.ofr.in { border-color: rgba(0, 242, 254, 0.42); background: rgba(0, 242, 254, 0.05); }
.ofr.rec:not(.in) { border-color: rgba(0, 230, 118, 0.35); }
.ofr.open { background: rgba(255, 255, 255, 0.035); }
.ofr > .pk { grid-column: 1; grid-row: 1 / span 2; align-self: center; }
.pk { width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--line); background: transparent; color: var(--accent); display: grid; place-items: center; cursor: pointer; padding: 0; }
.pk svg { width: 16px; height: 16px; }
.pk:hover { background: var(--accent-bg); }
.ofr.in .pk { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #031016; border-color: transparent; box-shadow: 0 0 14px rgba(0, 242, 254, 0.35); }
.ofr-id { grid-column: 2; grid-row: 1; min-width: 0; overflow-wrap: anywhere; font-size: 14px; }
.ofr-id .seg { margin-right: 2px; }
.ofr-id .mono { font-size: 12.5px; }
.ofr-t { display: none; }
.ofr-m { grid-column: 2; grid-row: 2; min-width: 0; font-size: 12px; color: var(--text-1); overflow-wrap: anywhere; }
.ofr-m > span:empty, .ofr-s { display: none; }
.ofr-m > span + span::before { content: '·'; margin: 0 6px; color: var(--text-2); }
.ofr-p { grid-column: 3; grid-row: 1 / span 2; display: flex; flex-direction: column; align-items: flex-end; gap: 1px; white-space: nowrap; }
.ofr-p b { font-size: 15px; }
.ofr-p span { font-size: 11px; color: var(--text-2); }
.ofr-pl { grid-column: 2 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: 3px; }
.ofr-pl .pill { font-size: 11px; padding: 1px 8px; }
.ofr-why { font-size: 12px; color: var(--text-1); }
.ofr-x { grid-column: 1 / -1; cursor: default; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 8px; }
.ofx { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 5px 14px; margin: 0; font-size: 13px; }
.ofx dt { color: var(--text-2); }
.ofx dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.ofx dd a { white-space: nowrap; }
.ofx .num-chip { font-size: 12px; }
.ofx-act .btn { flex: 1 1 auto; }
.ofr-cols { display: none; }
@media (max-width: 380px) { .ofx { grid-template-columns: minmax(0, 1fr); gap: 1px; } .ofx dd { margin-bottom: 5px; } }
@media (min-width: 1100px) {
  .ph-only { display: none; }
  .ofr-cols, .ofr { grid-template-columns: 28px minmax(150px, 2.6fr) minmax(90px, 1.1fr) minmax(80px, 0.9fr) minmax(90px, 1fr) minmax(92px, auto); column-gap: 12px; }
  .ofr-cols { display: grid; padding: 4px 11px 2px; border: 0;
    font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); }
  .ofr-cols span:last-child { text-align: right; }
  .ofr { padding: 7px 10px; border-radius: 9px; }
  .ofr-pl { min-width: 0; }
  .ofr > .pk { width: 28px; height: 28px; }
  .ofr-m { display: contents; }
  .ofr-m > span::before, .ofr-m > span + span::before { content: none; }
  .ofr-m > span:empty, .ofr-s { display: block; }
  .ofr-t { display: block; grid-column: 2; grid-row: 2; font-size: 12.5px; color: var(--text-1); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ofr-t:empty { display: none; }
  .ofr-v, .ofr-s, .ofr-d { grid-row: 1 / span 2; font-size: 13px; color: var(--text-1); min-width: 0; overflow-wrap: anywhere; }
  .ofr-v { grid-column: 3; } .ofr-s { grid-column: 4; } .ofr-d { grid-column: 5; }
  .ofr-p { grid-column: 6; }
  .ofr-pl { grid-column: 2 / -1; }
  .ofx { grid-template-columns: max-content minmax(0, 1fr) max-content minmax(0, 1fr); }
  .ofx-act .btn { flex: none; }
  .ph { padding: 12px 14px; }
  .pb { padding: 0 14px 14px; }
}
@media (max-width: 1099px) { .ph-only { display: inline; } }

/* Права панель «Кошторис» (ПК) */
.es-list { display: flex; flex-direction: column; gap: 8px; }
.es-t { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; align-items: baseline; padding: 10px 12px; border-radius: var(--r-1); border: 1px solid var(--line-2); background: var(--bg-1);
  color: inherit; font: inherit; text-align: left; cursor: pointer; }
.es-t:hover { border-color: var(--line); }
.es-t.on { border-color: var(--accent); background: var(--accent-bg); }
.es-t.skip { opacity: 0.6; }
.es-l { display: flex; flex-direction: column; min-width: 0; }
.es-l b { font-size: 13.5px; }
.es-l .dim { font-size: 11.5px; }
.es-s { font-size: 19px; }
.es-n { grid-column: 1 / -1; font-size: 11.5px; }
.es-last { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12.5px; }

/* Телефон: кошторис над нижнім меню */
.qbar { position: fixed; z-index: 54; left: max(8px, env(safe-area-inset-left, 0px)); right: max(8px, env(safe-area-inset-right, 0px)); bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 8px; border-radius: 14px; border: 1px solid var(--line);
  background: rgba(14, 18, 26, 0.94); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45); }
.qb-sums { flex: 1 1 auto; min-width: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; border: 0; background: none; color: inherit; font: inherit; text-align: left; padding: 0; cursor: pointer; }
.qb-t { display: flex; flex-direction: column; min-width: 0; padding-left: 7px; border-left: 2px solid var(--line-2); }
.qb-t.QUALITY { border-left-color: var(--accent); }
.qb-t.OEM { border-left-color: rgba(168, 85, 247, 0.7); }
.qb-l { font-size: 10.5px; color: var(--text-2); letter-spacing: 0.02em; }
.qb-t b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qbar .btn { flex: none; }
body.has-qbar main { padding-bottom: 170px; }
body.kb .qbar { display: none; }
@media (max-width: 360px) { .qb-t b { font-size: 12px; } .qbar .btn.sm { padding: 0 9px; } }
@media (max-width: 1099px) { body.nav7 .nav button { font-size: 10px; } }

/* ═══════════ «Кошториси»: стан і мініперегляд ═══════════ */
.eb-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
@media (min-width: 1100px) { .eb-list { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } }
@media (min-width: 1700px) { .eb-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.eb { display: flex; flex-direction: column; gap: 10px; cursor: pointer; padding: 14px; }
.eb:hover { border-color: var(--line); }
.eb-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.eb-car { flex: 1 1 auto; min-width: 0; font-size: 15px; overflow-wrap: anywhere; }
.eb-h .pill .spin { margin-right: 0; }
.eb-h .pill:has(.spin)::before { display: none; }
.eb-g { display: grid; grid-template-columns: minmax(0, 1.25fr) repeat(3, minmax(0, 1fr)); gap: 4px 8px; align-items: center; font-size: 12.5px; }
.eb-c0 { font-size: 11.5px; }
.eb-tc { display: flex; flex-direction: column; min-width: 0; padding: 6px 8px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--bg-1); }
.eb-tc.QUALITY { border-color: var(--line); }
.eb-tc.OEM { border-color: rgba(168, 85, 247, 0.35); }
.eb-tc.on { border-color: var(--ok); background: rgba(0, 230, 118, 0.08); }
.eb-tc.skip { opacity: 0.45; }
.eb-l { font-size: 10.5px; color: var(--text-2); }
.eb-tc b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eb-n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-0); padding-top: 4px; }
.eb-p { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 4px 8px 0; color: var(--text-1); }
.eb-p.none { color: var(--text-2); }
.eb-p.skip { opacity: 0.45; }
.eb-more { font-size: 12px; }
.eb-f { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 12px; border-top: 1px solid var(--line-2); padding-top: 10px; }
@media (max-width: 420px) { .eb-g { grid-template-columns: minmax(0, 1.15fr) repeat(3, minmax(0, 0.95fr)); gap: 4px 5px; } .eb-n { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.25; font-size: 12px; } .eb-tc { padding: 5px 6px; } .eb-tc b { font-size: 12.5px; } .eb-p { padding: 4px 6px 0; font-size: 12px; } }

/* ═══════════ Кошторис авто: націнка, ціни для клієнта, позиції з маржею ═══════════ */
.ee-tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ee-t { display: flex; flex-direction: column; border-radius: var(--r-1); border: 1px solid var(--line); background: var(--bg-1); min-width: 0; overflow: hidden; }
.ee-t.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; background: var(--accent-bg); }
.ee-t.skip .ee-tb { opacity: 0.5; }
.ee-tb { display: flex; flex-direction: column; gap: 3px; padding: 12px; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.ee-tb b.num { font-size: 21px; }
.ee-tl { font-size: 12px; margin-top: -3px; }
.ee-tn { font-size: 11.5px; }
.ee-mg { font-size: 12px; color: var(--ok); }
.ee-mg b { font-size: 12.5px; }
.ee-sw { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-top: 1px solid var(--line-2); font-size: 12.5px; color: var(--text-1); cursor: pointer; }
.ee-sw input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }
@media (max-width: 620px) {
  .ee-tiers { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .ee-tb { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1px 10px; align-items: baseline; padding: 10px 12px; }
  .ee-tb .eyebrow { grid-column: 1; } .ee-tb b.num { grid-column: 2; grid-row: 1 / span 2; font-size: 19px; align-self: center; }
  .ee-tl { grid-column: 1; margin: 0; } .ee-tn, .ee-mg { grid-column: 1 / -1; }
}
.ee-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.ee-grid.ee-client { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fld { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--text-1); min-width: 0; }
.fld .in { width: 100%; min-width: 0; }
.in-suf { position: relative; display: block; }
.in-suf .in { padding-right: 30px; }
.in-suf i { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--text-2); pointer-events: none; }
.ee-def { font-size: 12px; }
@media (max-width: 760px) { .ee-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .ee-grid > .fld:nth-child(n + 4) { grid-column: span 1; } }
@media (max-width: 420px) { .ee-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ee-grid.ee-client { grid-template-columns: minmax(0, 1fr); } }

.ee-cols { display: none; }
.ee-rows { display: flex; flex-direction: column; }
.ee-r { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "n s" "o o" "m m"; gap: 2px 10px; padding: 10px 0; border-top: 1px solid var(--line-2); align-items: baseline; }
.ee-r:first-child { border-top: 0; }
.ee-n { grid-area: n; display: flex; flex-direction: column; min-width: 0; }
.ee-n b { overflow-wrap: anywhere; }
.ee-n .dim { font-size: 12px; }
.ee-o { grid-area: o; font-size: 13px; min-width: 0; overflow-wrap: anywhere; }
.ee-o .mono { font-size: 12px; }
.ee-o .pill { font-size: 11px; padding: 1px 8px; }
.ee-meta { grid-area: m; font-size: 12px; color: var(--text-1); }
.ee-meta > span + span::before { content: '·'; margin: 0 6px; color: var(--text-2); }
.ee-s { grid-area: s; font-size: 15px; text-align: right; white-space: nowrap; }
.ee-r.none { grid-template-areas: "n g" "o o"; }
.ee-r.none .ee-go { grid-area: g; }
.ee-tot { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: baseline; justify-content: flex-end; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13px; }
.ee-sum { font-size: 14px; }
.ee-sum b { font-size: 20px; color: var(--text-0); }
@media (min-width: 1100px) {
  .ee-cols, .ee-r { grid-template-columns: minmax(150px, 1.5fr) minmax(200px, 1.9fr) 70px 100px 76px 100px 110px; grid-template-areas: none; column-gap: 12px; }
  .ee-cols { display: grid; padding: 8px 10px; background: var(--bg-1); border: 1px solid var(--line-2); border-radius: 8px; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); }
  .ee-cols span:nth-child(n + 3) { text-align: right; }
  .ee-r { padding: 9px 10px; align-items: center; }
  .ee-n, .ee-o, .ee-s { grid-area: auto; }
  .ee-meta { display: contents; }
  .ee-meta > span::before, .ee-meta > span + span::before { content: none; }
  .ee-meta > span { text-align: right; font-size: 13px; }
  .ee-r.none { grid-template-areas: none; }
  .ee-r.none .ee-o { grid-column: 2 / 7; }
  .ee-r.none .ee-go { grid-area: auto; justify-self: end; }
}
.ee-send .qfoot { border-top: 0; padding-top: 0; }
.ee-prev { padding: 14px; border-radius: var(--r-1); border: 1px dashed var(--line); background: var(--bg-1); }
.ee-prev .tiers .tier-card { cursor: default; }
.ee-hist { display: flex; flex-direction: column; gap: 6px; }
.ee-h { font-size: 12.5px; }
.est-note { margin: 0; padding: 10px 12px; border-radius: var(--r-1); border-left: 3px solid var(--accent); background: rgba(0, 242, 254, 0.06); font-size: 14px; color: var(--text-0); white-space: pre-line; }
/* Мітка сегмента пропозиції («аналог», «оригінал») — не плутати з перемикачем .seg у налаштуваннях. */
span.seg { position: static; display: inline-block; padding: 1px 7px; border-radius: 6px; background: none; white-space: nowrap; }

/* The Orbita Ring: портал у куті не перекриває відкрите вікно, а останні рядки підбору можна прокрутити з-під нього. */
body:has(.sheet-bg) .orp { visibility: hidden; }
body.searching.has-qbar main { padding-bottom: 250px; }

/* Знак The Orbita Ring у шапці: жива орбіта шапки (lg-top) лишається, поруч напис знака; телефон — дрібніший розмір. */
.brand .om { flex: 0 1 auto; min-width: 0; }
.brand .om-orb { display: none; }
@media (max-width: 700px) { .brand .om { --h: 13px !important; } }
@media (max-width: 370px) { .brand .om { --h: 11.5px !important; } }
.brand .om-sub { font-size: 7.5px; letter-spacing: 0.42em; color: #8A94A3; }
@media (max-width: 700px) { .brand .om-sub { font-size: 6.5px; letter-spacing: 0.3em; } }
@media (max-width: 370px) { .brand .om-sub { font-size: 6px; letter-spacing: 0.26em; } }

/* ═══════════ Смуга підбору під шапкою: авто, етап, скільки знайдено, час; на телефоні в ній — портал ═══════════ */
.sstrip-w { max-width: 1180px; margin: 0 auto; }
.sstrip-w:empty { display: none; }
.sstrip { position: relative; display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 5px 10px 7px 5px; border-radius: 14px; overflow: hidden;
  border: 1px solid rgba(0, 242, 254, 0.38); background: linear-gradient(90deg, rgba(0, 242, 254, 0.11), rgba(79, 172, 254, 0.03)); box-shadow: 0 0 22px rgba(0, 242, 254, 0.12); }
.ss-orp { flex: none; width: 40px; height: 40px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px rgba(0, 242, 254, 0.3); }
body.searching .ss-orp { box-shadow: none; }
.ss-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.ss-l1 { display: flex; align-items: center; gap: 8px; min-width: 0; white-space: nowrap; }
.ss-l1 b { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.ss-l1 .plate { flex: none; font-size: 11.5px; padding: 1px 6px 1px 3px; }
.ss-more { flex: none; font-size: 11.5px; color: var(--accent); }
.ss-l2 { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 12.5px; color: var(--text-1); }
.ss-tx { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ss-dots { flex: none; display: inline-flex; gap: 4px; }
.ss-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line); }
.ss-dots i.done { background: var(--accent); box-shadow: 0 0 6px var(--accent); }
.ss-dots i.now { background: #E8FDFF; box-shadow: 0 0 8px var(--accent); animation: pulse 1.1s ease-in-out infinite; }
.ss-r { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 1px; font-size: 12px; white-space: nowrap; }
.ss-r b { font-size: 13.5px; color: var(--text-0); }
.ss-fl { font-weight: 400; color: var(--text-1); font-size: 12px; }
.ss-bar { position: absolute; left: 0; bottom: 0; height: 2px; width: var(--p, 0%); background: linear-gradient(90deg, var(--accent), #4FACFE); box-shadow: 0 0 8px var(--accent); transition: width 0.6s ease; }
.sstrip.done { border-color: rgba(255, 184, 0, 0.4); background: rgba(255, 184, 0, 0.06); box-shadow: none; padding: 6px 6px 6px 8px; }
.ss-ic { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; color: var(--warn); border: 1.5px dashed rgba(255, 184, 0, 0.6); }
.ss-btn { flex: none; }
/* Смуга вже показує пошук — живий рядок у шапці не дублює її. */
body.has-strip .pulse { display: none; }
@media (max-width: 420px) { .ss-fl { display: none; } .sstrip { gap: 8px; } .ss-l2 { font-size: 12px; } .ss-deep { display: none; } }
/* ПК: смуга — у рядку шапки над робочою частиною (ліве меню її не перекриває), портал — у лівому меню. */
@media (min-width: 1100px) {
  .ss-orp { display: none; }
  .sstrip-w { position: absolute; left: calc(var(--side-w) + 28px); right: 190px; top: 50%; transform: translateY(-50%); max-width: 860px; margin: 0; }
  .sstrip { margin: 0; padding: 5px 14px 7px; }
  .sstrip.done { padding: 4px 6px 4px 10px; }
}
/* Перехід зі смуги до пошуку чи ненайденої позиції: не під липкою шапкою. */
#quote, #quote .osearch, #quote .qline { scroll-margin-top: calc(130px + env(safe-area-inset-top, 0px)); }

/* «Шукати далі» біля ненайденої позиції і для всіх ненайдених */
.ph-r .ph-go { margin-top: 4px; min-height: 30px; padding: 0 10px; font-size: 12.5px; }
.qstates { flex-wrap: wrap; }
.qs-more .num { margin-left: 4px; opacity: 0.85; }

/* ═══════════ Основний кошторис ═══════════ */
.ee-tiers.n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .ee-tiers.n4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .ee-tiers.n4 { grid-template-columns: minmax(0, 1fr); } }
.ee-t.main { border-color: rgba(0, 242, 254, 0.45); }
.ee-t.main .eyebrow { color: var(--accent); }
.ee-base { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 0 12px 10px; font-size: 12px; }
.ee-base .chips { gap: 6px; }
.ee-base .chip { min-height: 30px; padding: 0 10px; font-size: 12.5px; }
.ee-mh { font-size: 12.5px; }
.ee-mp { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ee-mp .mp { display: inline-flex; align-items: baseline; gap: 6px; min-height: 30px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--bg-1); color: var(--text-1); font: inherit; font-size: 12px; cursor: pointer; }
.ee-mp .mp .num { color: var(--text-0); font-size: 12.5px; }
.ee-mp .mp:hover { border-color: var(--line); }
.ee-mp .mp.on { border-color: var(--accent); background: var(--accent-bg); color: var(--accent); }
@media (min-width: 1100px) { .ee-mp { margin-top: 4px; } }
.es-t.main { border-color: rgba(0, 242, 254, 0.4); }
.es-t.main .es-l b { color: var(--accent); }
.qb-sums.n4 { grid-template-columns: repeat(4, minmax(0, 1fr)) 18px; gap: 5px; }
.qb-t.MAIN { border-left-color: #E8FDFF; }
.qb-t.MAIN b { color: var(--accent); }
.qb-go { align-self: center; width: 18px; height: 18px; color: var(--text-1); }
.qb-go svg { width: 18px; height: 18px; display: block; }
@media (max-width: 380px) { .qb-sums.n4 .qb-t { padding-left: 5px; } .qb-sums.n4 .qb-t b { font-size: 11.5px; } .qb-l { font-size: 10px; } }
.eb-list.n4 .eb-g { grid-template-columns: minmax(0, 1.2fr) repeat(4, minmax(0, 1fr)); }
.eb-tc.MAIN { border-color: rgba(0, 242, 254, 0.45); }
.eb-tc.MAIN .eb-l { color: var(--accent); }
@media (max-width: 420px) { .eb-list.n4 .eb-g { grid-template-columns: minmax(0, 1fr) repeat(4, minmax(0, 0.9fr)); gap: 4px 4px; } .eb-list.n4 .eb-tc { padding: 5px 5px; } .eb-list.n4 .eb-tc b { font-size: 11.5px; } .eb-list.n4 .eb-p { padding: 4px 4px 0; font-size: 11.5px; } }
.cc-by { font-size: 12.5px; }


/* Кнопка помічника (web/feedback.js) на телефоні: над панеллю сум підбору, а не під нею. */
@media (max-width: 1099px) { body.has-qbar .fb-btn { bottom: calc(136px + env(safe-area-inset-bottom, 0px)); } }

/* Ціна з сайту — лише зі сторінки товару: повідомлення перевірки і «ціну уточнити» з посиланнями. */
.qnote { font-size: 12.5px; color: var(--accent); background: var(--accent-bg); border-radius: 10px; padding: 8px 10px; }
.qask { display: grid; gap: 6px; padding: 10px 12px; border: 1px dashed var(--line-2); border-radius: 12px; font-size: 12.5px; min-width: 0; }
.qask-l { color: var(--text-1); font-weight: 600; }
.qask ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.qask li { min-width: 0; overflow-wrap: anywhere; }
.qask a { color: var(--accent); }
.qask .btn { justify-self: start; }

/* Деталь з-за кордону: оцінка «під ключ» окремим рядком під ціною товару (ціну й суму не замінює). */
.ofr-p .ofr-lc { white-space: normal; text-align: right; max-width: 9em; line-height: 1.25; margin-top: 1px; }
@media (min-width: 1100px) { .ofr-p .ofr-lc { max-width: 15em; } }
.ofr-p .ofr-lc .lc-n { white-space: nowrap; font-size: inherit; }
.ee-o .ee-lc { display: block; font-size: 12px; margin-top: 2px; }

/* Нова версія застосунку (web/version.js): м'яка смуга над шапкою на телефоні, знизу по центру на ПК. */
.vbar {
  position: fixed; z-index: 70; left: 12px; right: 12px; top: calc(10px + env(safe-area-inset-top, 0px));
  display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 14px; border-radius: 14px;
  background: rgba(26, 31, 43, 0.94); border: 1px solid rgba(0, 242, 254, 0.35); box-shadow: 0 12px 34px rgba(0, 0, 0, 0.55), 0 0 22px rgba(0, 242, 254, 0.12);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); animation: vb-in .35s ease-out;
}
.vbar .vb-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.vbar .vb-t { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1 1 auto; font-size: 13.5px; }
.vbar .vb-t span { font-size: 12px; color: var(--text-1); }
.vbar .vb-a { display: flex; align-items: center; gap: 6px; flex: none; }
.vbar .vb-x { width: 32px; height: 32px; border: 0; border-radius: 10px; background: transparent; color: var(--text-1); cursor: pointer; font-size: 14px; }
.vbar .vb-x:hover { color: var(--text-0); background: rgba(154, 164, 178, 0.12); }
@media (max-width: 480px) { .vbar .vb-t span { display: none; } .vbar.ask { flex-wrap: wrap; } .vbar.ask .vb-t span { display: block; } .vbar.ask .vb-a { margin-left: auto; } }
@media (min-width: 1100px) { .vbar { left: 50%; right: auto; top: auto; bottom: 22px; transform: translateX(-50%); width: min(560px, calc(100vw - 340px)); animation-name: vb-up; } }
@keyframes vb-in { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }
@keyframes vb-up { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translateX(-50%); } }

/* Кошторис для клієнта (Дмитро, 18.10): три повні ціни, вибір деталь за деталлю з порадою, основний кошторис і погодження. */
.cl-tiers.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cl-tiers.n1 { grid-template-columns: minmax(0, 1fr); }
.cl-tc { transition: border-color 0.2s, background 0.2s, transform 0.2s; }
.cl-tc:not(:disabled):hover { border-color: rgba(0, 242, 254, 0.4); transform: translateY(-1px); }
.cl-tsub { font-size: 12px; margin-top: -2px; }
.cl-td { font-size: 12px; }
.cl-sub { font-size: 11.5px; color: var(--warn); }
.cl-lines { gap: 0; }
.cl-line { display: flex; flex-direction: column; gap: 10px; padding: 14px 0; border-top: 1px solid var(--line-2); min-width: 0; }
.cl-lh { display: flex; align-items: baseline; justify-content: space-between; gap: 4px 10px; flex-wrap: wrap; }
.cl-lh b { font-size: 15.5px; }
.cl-lh .dim { font-size: 12.5px; }
.cl-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 8px; }
.cl-o { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "seg seg" "b p" "d d" "st st"; gap: 3px 10px; align-items: baseline; min-width: 0;
  text-align: left; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg-1); color: var(--text-0); font: inherit; cursor: pointer;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s; }
.cl-o:not(:disabled):hover { border-color: rgba(0, 242, 254, 0.35); }
.cl-o.on { border-color: var(--accent); background: var(--accent-bg); box-shadow: 0 0 0 1px var(--accent) inset; }
.cl-o:disabled { cursor: default; }
.cl-o:disabled:not(.on) { opacity: 0.55; }
.cl-seg { grid-area: seg; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-1); }
.cl-rec { display: inline-flex; align-items: center; gap: 4px; font-style: normal; text-transform: none; letter-spacing: 0; font-size: 11.5px; font-weight: 700; color: var(--ok);
  padding: 1px 8px; border-radius: 999px; background: rgba(0, 230, 118, 0.1); border: 1px solid rgba(0, 230, 118, 0.3); }
.cl-rec svg { width: 12px; height: 12px; }
.cl-b { grid-area: b; min-width: 0; overflow-wrap: anywhere; }
.cl-b .mono { font-size: 12px; color: var(--text-1); }
.cl-p { grid-area: p; font-weight: 700; font-size: 16px; white-space: nowrap; }
.cl-d { grid-area: d; font-size: 12px; }
.cl-staff { grid-area: st; font-size: 11.5px; overflow-wrap: anywhere; }
.cl-why { margin: 0; display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; line-height: 1.45; color: var(--text-0); padding: 10px 12px; border-radius: 10px;
  background: rgba(0, 230, 118, 0.06); border: 1px solid rgba(0, 230, 118, 0.18); }
.cl-why-i { flex: none; display: inline-flex; color: var(--ok); margin-top: 2px; }
.cl-why-i svg { width: 15px; height: 15px; }
.cl-gap { margin: 0; font-size: 12.5px; color: var(--warn); }
.cl-mh { display: flex; align-items: center; justify-content: space-between; gap: 8px 10px; flex-wrap: wrap; }
.cl-ml { display: flex; flex-direction: column; }
.cl-mr { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(7.5em, auto); gap: 2px 10px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.cl-mn, .cl-mb { min-width: 0; overflow-wrap: anywhere; }
.cl-mb .dim { font-size: 12px; }
.cl-mr > b { text-align: right; }
.cl-mt { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 12px; flex-wrap: wrap; }
.cl-mt .dim { font-size: 13px; }
.cl-mt b { font-size: 26px; }
.cl-main .btn.big { align-self: flex-start; }
.cl-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-block: 10px calc(10px + env(safe-area-inset-bottom, 0px)); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  background: rgba(11, 13, 18, 0.92); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); border-top: 1px solid var(--line); }
.cl-bar > span { display: flex; flex-direction: column; min-width: 0; }
.cl-bar .dim { font-size: 12px; }
.cl-bar b { font-size: 20px; }
body.est-client .nav, body.est-client #pulse, body.est-client .sstrip-w, body.est-client .mode, body.est-client .foot { display: none !important; }
body.est-client .brand { pointer-events: none; }
body.est-client main { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
@media (max-width: 640px) {
  .cl-tiers.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .cl-tiers .cl-tc { padding: 10px 8px; gap: 2px; }
  .cl-tiers .cl-tc .eyebrow { font-size: 9.5px; letter-spacing: 0.06em; }
  .cl-tiers .cl-tc b { font-size: 16px; }
  .cl-tiers .cl-tc .cl-td { display: none; }
  .cl-mr { grid-template-columns: minmax(0, 1fr) auto; }
  .cl-mr .cl-mb { grid-column: 1; grid-row: 2; font-size: 12.5px; }
  .cl-mr > b { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  .cl-main .btn.big { align-self: stretch; }
}
@media (min-width: 1100px) {
  body.est-client main { margin-left: auto; margin-right: auto; max-width: 1080px; padding-left: max(28px, env(safe-area-inset-left, 0px)); }
  .cl-bar { left: 50%; right: auto; bottom: 20px; transform: translateX(-50%); width: min(640px, calc(100% - 56px)); border: 1px solid var(--line); border-radius: 16px; padding: 10px 14px; }
}

/* Вибір двигуна в картці авто (паливо чи код двигуна не визначились) і позиції, що його чекають */
.eng-pick { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(255, 193, 7, 0.35); background: rgba(255, 193, 7, 0.05); font-size: 13px; min-width: 0; }
.eng-look { display: flex; align-items: center; gap: 8px; color: var(--accent); }
.eng-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.eng-opts .btn { white-space: normal; text-align: left; }
.eng-own { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.eng-own select.in { width: auto; min-width: 110px; }
.eng-own input.in { flex: 1 1 160px; min-width: 0; }
.qstat .wait-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); flex: none; }

/* Хід пошуку позиції: етапи, джерела, постачальники за номерами */
.trace { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; min-width: 0; }
.trace ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.trace li { overflow-wrap: anywhere; }
.trace li > span { display: block; }
.trace li > .num { display: inline; margin-right: 6px; }
.trace-h { font-weight: 600; font-size: 12px; color: var(--text-2); margin-top: 4px; }
.trace .warn { color: var(--warn); }

/* ═══════════ Меню: лічильники (Дмитро, 19.10) ═══════════ */
.nav .badge.wait { background: var(--warn); }
.nav .badge.live { box-shadow: 0 0 8px var(--accent); animation: lg-breathe 1.2s ease-in-out infinite; }
.nav .badge.live:empty { min-width: 8px; width: 8px; height: 8px; padding: 0; }
@media (min-width: 1100px) {
  .nav .badge.wait { background: rgba(255, 184, 0, 0.12); color: var(--warn); border-color: rgba(255, 184, 0, 0.35); }
  .nav .badge.live { border-color: var(--accent); }
}
@media (prefers-reduced-motion: reduce) { .nav .badge.live { animation: none; } }

/* ═══════════ Головна: авто в роботі й кошториси на погодженні (Дмитро, 19.10) ═══════════ */
.home-b { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
/* Телефон: лічильники вже на нижньому меню, плитки лише на ПК. */
.hb-kpi { display: none; gap: 10px; }
.hb-k { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px; cursor: pointer; text-align: left; color: var(--text-1); font: inherit; }
.hb-k:hover { border-color: var(--line); }
.hb-k b { font-size: 24px; line-height: 1.1; color: var(--text-0); }
.hb-k span { font-size: 13px; }
.hb-col h2 { margin: 0; font-size: 17px; }
.hb-list { display: flex; flex-direction: column; gap: 2px; }
.hb-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; padding: 10px 8px; border: 0; border-radius: 10px;
  background: none; color: var(--text-0); font: inherit; text-align: left; cursor: pointer; }
.hb-row + .hb-row { border-top: 1px solid var(--line-2); border-radius: 0; }
.hb-row:hover { background: rgba(255, 255, 255, 0.04); border-radius: 10px; }
.hb-main { display: flex; flex-direction: column; min-width: 0; }
.hb-main b, .hb-main .dim { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-main .dim { font-size: 12.5px; }
.hb-sum { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.hb-row .plate { font-size: 13px; }
.hb-foreign { box-shadow: 0 0 0 2px var(--warn); }
@media (max-width: 359px) { .hb-row { grid-template-columns: minmax(0, 1fr) auto; } .hb-row .plate { grid-column: 1 / -1; justify-self: start; } }
@media (min-width: 1100px) {
  .home-b { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .hb-kpi { display: grid; grid-column: 1 / -1; grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Шапка: кнопка профілю стискається з трьома крапками, а не виходить за край екрана (скрін Дмитра 19.10: ім'я обрізане краєм). */
.top-in > * { min-width: 0; }
.top-in .acc-chip { flex: 0 1 auto; min-width: 40px; }
.top-in .pulse { flex: 0 1 auto; }

/* Експертний підбір (web/app.js expertPanel): хід агента і звіт з джерелом і Confidence на кожен номер. */
.xp { gap: 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(135deg, rgba(0, 242, 254, 0.06), rgba(168, 85, 247, 0.06)); min-width: 0; }
.xp-h { gap: 8px; align-items: center; justify-content: space-between; }
.xp-sub { font-size: 12.5px; }
.xp-steps { margin: 0; padding-left: 0; list-style: none; display: grid; gap: 4px; font-size: 13px; color: var(--text-1); }
.xp-steps li.on { color: var(--text-0); }
.xp-steps li.ok { color: var(--ok); }
.xp-var, .xp-ask { font-size: 12.5px; color: var(--text-1); }
.xp-ask { color: var(--warn); }
.xp-err, .xp-warn { font-size: 12.5px; color: var(--danger); }
.xp-wrap { overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
.xp-tab { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.xp-tab th { text-align: left; color: var(--text-2); font-weight: 600; padding: 4px 6px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.xp-tab td { padding: 6px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.xp-src a { white-space: nowrap; }
@media (max-width: 600px) {
  .xp-tab thead { display: none; }
  .xp-tab tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 6px 0; border-bottom: 1px solid var(--line-2); }
  .xp-tab td { border: 0; padding: 0; }
  .xp-tab td:first-child { font-weight: 600; }
  .xp-tab td:nth-child(5) { grid-row: 1; grid-column: 2; }
  .xp-tab td:nth-child(n+2):nth-child(-n+4) { grid-column: 1 / -1; }
}
/* «Експертний підбір» на формі «Що підібрати?» — окремий підбір під «Розшифрувати». */
.xp-start { gap: 6px; margin-top: 4px; padding-top: 12px; border-top: 1px dashed var(--line-2); align-items: flex-start; }
.xp-start-btn { border: 1px solid rgba(168, 85, 247, 0.55); background: linear-gradient(135deg, rgba(0, 242, 254, 0.10), rgba(168, 85, 247, 0.18)); color: var(--text-0); max-width: 100%; white-space: normal; text-align: left; }
.xp-start-p { font-weight: 500; color: var(--text-1); margin-left: 6px; font-size: 0.85em; }
/* Смужка «Не знайдено N з M» на телефоні (360–480 px): кнопки окремим рядком під номером і авто, нічого не накладається. */
@media (max-width: 480px) {
  .sstrip.done { flex-wrap: wrap; row-gap: 6px; }
  .sstrip.done .ss-main { flex: 1 1 calc(100% - 40px); }
  .sstrip.done .ss-btn { flex: 1 1 auto; min-width: 0; }
}

.est-badge{display:flex;align-items:center;justify-content:center;gap:8px;padding:14px 0 6px;font-size:12px;color:var(--tx3,#9AA4B2);text-decoration:none;opacity:.85}.est-badge:hover{opacity:1}.est-badge img{width:18px;height:18px;border-radius:5px}

.crm-flags{display:flex;flex-direction:column;gap:8px;margin:12px 0 4px;padding-top:10px;border-top:1px solid rgba(255,255,255,.08)}.crm-flag{display:flex;align-items:center;justify-content:space-between;gap:12px}.crm-flag b{font-size:13.5px;font-weight:600}.crm-flag .dim{font-size:12px}
.cl-svc{display:flex;justify-content:space-between;gap:12px;padding:8px 0;border-bottom:1px solid rgba(255,255,255,.06);font-size:14px}.cl-svc:last-of-type{border-bottom:0}
