@import url('https://api.fontshare.com/v2/css?f[]=general-sans@400,500,600&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=Geist+Mono:wght@400;500;600&display=swap');

/* ===== Темы (как на asiclab.net) ===== */
:root, [data-theme="light"] {
  --bg: #F6F4FA; --side: #FFFFFF; --card: #FFFFFF; --tile: #F4F1F9;
  --shadow: 0 1px 2px rgba(30,16,60,.05); --shadow-lg: 0 1px 2px rgba(30,16,60,.05), 0 12px 32px rgba(30,16,60,.08);
  --line: #E6E1EF; --line2: #D6CFE3; --soft: #EEEAF4;
  --text: #16121F; --text2: #3A3546; --muted: #5E5A6B; --faint: #6E6A7A; --link: #6D28D9;
  --btn2: #FFFFFF; --input: #FFFFFF; --on-bg: #16121F; --on-fg: #FFFFFF; --nav-on: #F1ECFA;
  --gold: #B45309; --gold-bg: #FEF3C7; --gold-line: #F7D88A; --orange: #C2410C; --green: #15803D; --green-bg: #DCFCE7;
  --red: #B91C1C; --red-bg: #FEE2E2; --purple: #7E22CE; --purple-bg: #F3E8FF;
  --log-bg: #1A1328; --log-fg: #E6E3EE;
  --tg-bg: #EAF3FF; --tg-line: #C9E0FF; --tg-key: #FFFFFF; --tg-key-fg: #1F6FD1;
  --grad-logo: linear-gradient(to left, #6366f1, #a855f7, #f59e0b);
  --grad-text: linear-gradient(to right, #7c3aed, #d97706);
  --dot-done: #16A34A; --dot-next: #D6CFE3; --glow: 0 0 0 3px rgba(168,85,247,.25);
  /* статусы */
  --st-new-bg: #EEEBF3; --st-new: #3F3A4C; --st-diag-bg: #E0E7FF; --st-diag: #3730A3;
  --st-approve-bg: #FEF3C7; --st-approve: #92400E; --st-repair-bg: #FFEDD5; --st-repair: #9A3412;
  --st-test-bg: #F3E8FF; --st-test: #6B21A8; --st-ready-bg: #DCFCE7; --st-ready: #166534;
  --st-done-bg: #F1EFF4; --st-done: #5B5766; --st-refused-bg: #EEEBF3; --st-refused: #3F3A4C;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #100A1E; --side: rgba(255,255,255,.03); --card: rgba(255,255,255,.045); --tile: rgba(255,255,255,.06);
  --shadow: inset 0 1px 1px rgba(255,255,255,.1); --shadow-lg: inset 0 1px 1px rgba(255,255,255,.1);
  --line: rgba(255,255,255,.1); --line2: rgba(255,255,255,.16); --soft: rgba(255,255,255,.07);
  --text: #F3F2F0; --text2: #DAD8E0; --muted: #AEABB8; --faint: #9C99A8; --link: #C4B5FD;
  --btn2: rgba(255,255,255,.04); --input: rgba(255,255,255,.05); --on-bg: #F3F2F0; --on-fg: #100A1E; --nav-on: rgba(255,255,255,.08);
  --gold: #FCD34D; --gold-bg: rgba(252,211,77,.12); --gold-line: rgba(252,211,77,.3); --orange: #FDBA74; --green: #86EFAC; --green-bg: rgba(74,222,128,.15);
  --red: #FCA5A5; --red-bg: rgba(248,113,113,.16); --purple: #D8B4FE; --purple-bg: rgba(168,85,247,.2);
  --log-bg: rgba(0,0,0,.35); --log-fg: #DAD8E0;
  --tg-bg: rgba(47,143,255,.14); --tg-line: rgba(47,143,255,.3); --tg-key: rgba(255,255,255,.07); --tg-key-fg: #8CC2FF;
  --grad-logo: linear-gradient(to left, #6366f1, #a855f7, #fcd34d);
  --grad-text: linear-gradient(to right, #a855f7, #fcd34d);
  --dot-done: #86EFAC; --dot-next: rgba(255,255,255,.2); --glow: 0 0 10px rgba(168,85,247,.8);
  --st-new-bg: rgba(255,255,255,.09); --st-new: #DAD8E0; --st-diag-bg: rgba(99,102,241,.22); --st-diag: #A5B4FC;
  --st-approve-bg: rgba(252,211,77,.15); --st-approve: #FCD34D; --st-repair-bg: rgba(251,146,60,.17); --st-repair: #FDBA74;
  --st-test-bg: rgba(168,85,247,.22); --st-test: #D8B4FE; --st-ready-bg: rgba(74,222,128,.15); --st-ready: #86EFAC;
  --st-done-bg: rgba(255,255,255,.06); --st-done: #AEABB8; --st-refused-bg: rgba(255,255,255,.09); --st-refused: #DAD8E0;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font-family: 'Geist', ui-sans-serif, system-ui, sans-serif; font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: var(--link); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
input[type=checkbox] { accent-color: #A855F7; width: 18px; height: 18px; }
:focus-visible { outline: 2px solid #A855F7; outline-offset: 2px; }
.mono { font-family: 'Geist Mono', ui-monospace, monospace; }
.display, h1, h2 { font-family: 'General Sans', 'Geist', sans-serif; font-weight: 500; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: 34px; letter-spacing: -0.024em; }
h2 { font-size: 18px; letter-spacing: -0.01em; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .text2 { color: var(--text2); }
.gold { color: var(--gold); } .green { color: var(--green); } .orange { color: var(--orange); } .red { color: var(--red); }
.grad-text { background-image: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hidden { display: none !important; }

.logo { font-weight: 600; font-size: 19px; letter-spacing: -0.02em; text-decoration: none; color: var(--text); }
.logo span { background-image: var(--grad-logo); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ===== Кнопки ===== */
.btn { min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line2); background: var(--btn2); color: var(--text); font-size: 13.5px; font-weight: 500; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: #A855F7; }
.btn-primary { border: 0; background-image: linear-gradient(to right, #6366f1, #a855f7, #fcd34d); color: #06020E; font-weight: 600; padding: 0 20px; }
.btn-primary:hover { filter: brightness(1.05); }
.btn-tg { border: 0; background: #2F8FFF; color: #06020E; font-weight: 600; }
.btn-lg { min-height: 50px; font-size: 15px; }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 12.5px; }
.btn-danger { color: var(--red); }
.btn[disabled] { opacity: .5; cursor: default; }
.icon-btn { width: 36px; min-height: 36px; padding: 0; }

/* ===== Поля ===== */
.field { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); font-weight: 500; }
.input, .select, .textarea { height: 44px; padding: 0 14px; border: 1px solid var(--line2); border-radius: 10px; background: var(--input); color: var(--text); font-size: 14px; width: 100%; }
.textarea { height: auto; min-height: 90px; padding: 10px 14px; resize: vertical; line-height: 1.5; }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
[data-theme="dark"] select option { background: #160E2A; color: #F3F2F0; }
.search { border-radius: 999px; padding: 0 18px; }
.check { display: flex; gap: 10px; align-items: center; min-height: 34px; font-size: 14px; color: var(--text); font-weight: 400; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }

/* ===== Карточки ===== */
.card { background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: 16px; padding: 22px; }
.card-tight { padding: 0; overflow: hidden; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 10px; }
.row-wrap { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.between { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; }
.tile { background: var(--tile); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.tile .k { font-size: 12px; color: var(--muted); }
.tile .v { font-family: 'Geist Mono', monospace; font-size: 18px; font-weight: 500; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.kpi { display: flex; flex-direction: column; gap: 8px; padding: 18px; }
.kpi .v { font-family: 'Geist Mono', monospace; font-size: 30px; font-weight: 500; }

/* ===== Бейджи статусов ===== */
.badge { display: inline-block; padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.st-new { background: var(--st-new-bg); color: var(--st-new); } .st-diag { background: var(--st-diag-bg); color: var(--st-diag); }
.st-approve { background: var(--st-approve-bg); color: var(--st-approve); } .st-repair { background: var(--st-repair-bg); color: var(--st-repair); }
.st-test { background: var(--st-test-bg); color: var(--st-test); } .st-ready { background: var(--st-ready-bg); color: var(--st-ready); }
.st-done { background: var(--st-done-bg); color: var(--st-done); } .st-refused { background: var(--st-refused-bg); color: var(--st-refused); }
.b-ok { background: var(--green-bg); color: var(--green); } .b-bad { background: var(--red-bg); color: var(--red); }
.b-purple { background: var(--purple-bg); color: var(--purple); } .b-gold { background: var(--gold-bg); color: var(--gold); }

/* ===== Таблицы ===== */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; min-width: 900px; }
.table th { text-align: left; padding: 14px 16px; font-size: 12px; font-weight: 500; color: var(--faint); text-transform: uppercase; letter-spacing: .05em; }
.table td { padding: 14px 16px; border-top: 1px solid var(--soft); vertical-align: middle; }
.table tr.click { cursor: pointer; }
.table tr.click:hover td { background: rgba(124,58,237,.05); }
.table tr.low td { background: rgba(252,211,77,.07); }
.list-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--soft); }

/* ===== Фильтры-таблетки ===== */
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { min-height: 36px; padding: 0 15px; border-radius: 999px; border: 1px solid var(--line2); background: var(--btn2); color: var(--text2); font-size: 13px; font-weight: 500; }
.pill.on { background: var(--on-bg); color: var(--on-fg); border-color: var(--on-bg); }

/* ===== Этапы ===== */
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.steps li { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--faint); }
.steps li::before { content: ''; width: 10px; height: 10px; border-radius: 999px; background: var(--dot-next); }
.steps li.done { color: var(--text); } .steps li.done::before { background: var(--dot-done); }
.steps li.now { color: var(--text); font-weight: 600; } .steps li.now::before { background: #A855F7; box-shadow: var(--glow); }
.bars { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.bars li { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--faint); }
.bars li::before { content: ''; height: 5px; border-radius: 999px; background: var(--dot-next); }
.bars li.done { color: var(--text); } .bars li.done::before { background: var(--dot-done); }
.bars li.now { color: var(--text); font-weight: 600; } .bars li.now::before { background: linear-gradient(to right, #6366f1, #a855f7); }

/* ===== Лог / Telegram ===== */
.log { background: var(--log-bg); color: var(--log-fg); border: 1px solid var(--soft); border-radius: 12px; padding: 12px 16px; font-family: 'Geist Mono', monospace; font-size: 13px; white-space: pre-wrap; min-height: 44px; }
.tg-bubble { background: var(--tg-bg); border: 1px solid var(--tg-line); border-radius: 14px 14px 14px 4px; padding: 12px 14px; white-space: pre-line; font-size: 14px; line-height: 1.5; }
.tg-keys { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 10px; }
.tg-keys span { text-align: center; padding: 8px; border-radius: 10px; background: var(--tg-key); color: var(--tg-key-fg); font-size: 13px; font-weight: 600; }

/* ===== Каркас CRM ===== */
.shell { min-height: 100vh; display: flex; flex-wrap: wrap; }
.sidebar { flex: 1 1 220px; max-width: 100%; background: var(--side); border-right: 1px solid var(--line); padding: 20px 14px; display: flex; flex-direction: column; gap: 22px; }
.sidebar .brand { display: flex; flex-direction: column; gap: 4px; padding: 4px 8px; }
.divider { height: 1px; background: linear-gradient(to right, transparent, var(--line2), transparent); }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a { display: flex; justify-content: space-between; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 10px; font-size: 14.5px; font-weight: 500; color: var(--muted); text-decoration: none; }
.nav a:hover { background: rgba(124,58,237,.07); }
.nav a.on { background: var(--nav-on); color: var(--text); }
.nav .cnt { font-family: 'Geist Mono', monospace; font-size: 12px; font-weight: 600; color: var(--faint); }
.nav .cnt.warn { color: var(--gold); }
.side-bottom { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }
.me-box { padding: 12px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.main { flex: 999 1 560px; min-width: 0; padding: 24px 28px 56px; display: flex; flex-direction: column; gap: 20px; }
.topbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.cols { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.col-main { flex: 2 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.col-side { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }

/* Переключатель темы */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 999px; background: var(--tile); border: 1px solid var(--line); }
.seg button { min-height: 32px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 500; }
.seg button[aria-pressed="true"] { background: var(--card); color: var(--text); box-shadow: 0 1px 3px rgba(30,16,60,.12); }
[data-theme="dark"] .seg button[aria-pressed="true"] { background: rgba(255,255,255,.12); box-shadow: inset 0 1px 1px rgba(255,255,255,.15); }

/* ===== Модалка и тосты ===== */
.modal-back { position: fixed; inset: 0; background: rgba(10,6,20,.45); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; z-index: 50; overflow-y: auto; }
.modal { width: 100%; max-width: 640px; background: var(--bg); border: 1px solid var(--line); border-radius: 18px; padding: 24px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 16px; }
[data-theme="dark"] .modal { background: #160E2A; }
.toast-box { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 60; }
.toast { padding: 12px 16px; border-radius: 12px; background: var(--on-bg); color: var(--on-fg); font-size: 14px; max-width: 360px; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.toast.err { background: #B91C1C; color: #fff; }
.empty { padding: 32px; text-align: center; color: var(--muted); }

/* ===== Мобильный экран мастера ===== */
.m-wrap { max-width: 520px; margin: 0 auto; padding: 18px 16px 100px; display: flex; flex-direction: column; gap: 16px; }
.m-nav { position: fixed; left: 0; right: 0; bottom: 0; height: 72px; background: var(--side); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); z-index: 20; backdrop-filter: blur(8px); }
[data-theme="dark"] .m-nav { background: rgba(22,14,40,.95); }
.m-nav button { border: 0; background: transparent; color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 12px; font-weight: 500; }
.m-nav button.on { color: var(--text); font-weight: 600; }
.m-nav button.on svg { stroke: #A855F7; }
.big-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.big-btns .btn { min-height: 52px; border-radius: 14px; background: var(--tile); }
.hb-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; }
.hb-cell { border-radius: 12px; padding: 10px 8px; display: flex; flex-direction: column; gap: 2px; align-items: center; font-size: 12px; font-weight: 600; }

/* ===== Вход ===== */
.login-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px 16px 64px; }
.login-grid { width: 100%; max-width: 980px; display: flex; flex-wrap: wrap; gap: 24px; align-items: stretch; }
.login-hero { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 18px; padding: 12px 8px; }
.login-hero h1 { font-size: clamp(38px, 6vw, 52px); line-height: 1.05; letter-spacing: -0.03em; }
.perk { display: flex; gap: 10px; align-items: center; color: var(--text2); }
.perk::before { content: ''; width: 8px; height: 8px; border-radius: 999px; background-image: linear-gradient(135deg, #6366f1, #a855f7); flex: none; }
.login-card { flex: 1 1 400px; min-width: 0; border-radius: 20px; padding: 32px; box-shadow: var(--shadow-lg); }
.num { flex: none; width: 22px; height: 22px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-family: 'Geist Mono', monospace; font-size: 12px; font-weight: 600; background: var(--card); border: 1px solid var(--line2); }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 7px; height: 7px; border-radius: 999px; background: #A855F7; animation: pulse 1.2s ease-in-out infinite; }
.dots i:nth-child(2) { animation-delay: .2s; } .dots i:nth-child(3) { animation-delay: .4s; }
@keyframes pulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .dots i { animation: none; } }

/* ===== Кабинет ===== */
.c-header { border-bottom: 1px solid var(--line); background: var(--side); }
.c-header-in { max-width: 1240px; margin: 0 auto; padding: 14px 24px; display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; }
.tabs button { min-height: 40px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-size: 14px; font-weight: 500; }
.tabs button[aria-current="page"] { background: var(--nav-on); color: var(--text); }
.c-main { max-width: 1240px; margin: 0 auto; padding: 28px 24px 56px; display: flex; flex-direction: column; gap: 22px; }
.approve-box { background: var(--gold-bg); border: 1px solid var(--gold-line); border-radius: 18px; padding: 22px; display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; justify-content: space-between; }

@media (max-width: 720px) {
  .main { padding: 18px 16px 48px; }
  h1 { font-size: 28px; }
  .sidebar { border-right: 0; border-bottom: 1px solid var(--line); }
  .side-bottom { margin-top: 0; }
  .login-card { padding: 22px; }
  .c-header-in, .c-main { padding-left: 16px; padding-right: 16px; }
}

/* ---------- Карточка заказа по этапам ---------- */
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.log-view { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--tile); font: 13px/1.5 'Geist Mono', monospace; white-space: pre-wrap; color: var(--text2); }
.field-inline { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.field-inline .input { width: 96px; height: 36px; }

/* карта чипов */
.hb-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.hb-tab { min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line2); background: var(--btn2); color: var(--text2); font: 600 13px 'Geist Mono', monospace; display: inline-flex; align-items: center; gap: 8px; }
.hb-tab.on { background: var(--card); color: var(--text); border-color: var(--purple); box-shadow: 0 0 0 2px var(--purple-bg); }
.hb-tab-add { font-family: inherit; font-weight: 500; border-style: dashed; }
.hb-n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #e53935; color: #fff; font-size: 11px; display: inline-flex; align-items: center; justify-content: center; }
.hb-n.ok { background: #2e7d32; }
.hb-head { gap: 10px; flex-wrap: wrap; }
.hb-prog { font-size: 14px; color: var(--text2); }
.chipmap-wrap { overflow-x: auto; padding: 6px 2px 10px; }
.chipmap { display: grid; gap: 4px; min-width: calc(var(--cols) * 30px); }
.chip { aspect-ratio: 1 / 1.08; border-radius: 8px; border: 1.5px solid rgba(255,255,255,.55); background: linear-gradient(180deg, #3b8f3f, #2a6f2e); color: #fff; font: 700 10.5px 'Geist Mono', monospace; letter-spacing: -.3px; display: flex; align-items: center; justify-content: center; position: relative; padding: 0; cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .08s; }
.chip:hover { transform: scale(1.07); z-index: 1; }
.chip.bad { background: linear-gradient(180deg, #f2504b, #d32f2f); }
.chip.solder { background: linear-gradient(180deg, #f0b429, #c88a05); }
.chip.replace { background: linear-gradient(180deg, #9b5cf6, #7132d8); }
.chip[data-r]::after { content: 'П'; position: absolute; top: -5px; right: -5px; width: 15px; height: 15px; border-radius: 999px; background: #c88a05; color: #fff; font: 700 9px 'Geist', sans-serif; display: flex; align-items: center; justify-content: center; border: 1px solid #fff; }
.chip[data-r="replace"]::after { content: '↻'; background: #7132d8; font-size: 11px; }
.lg { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text2); }
.chip-dot { width: 16px; height: 16px; border-radius: 5px; background: #2f7d32; display: inline-block; border: 1px solid rgba(255,255,255,.5); }
.chip-dot.bad { background: #e53935; } .chip-dot.solder { background: #e0a010; } .chip-dot.replace { background: #7e3ff2; }
.mark { display: inline-flex; width: 16px; height: 16px; border-radius: 999px; background: #c88a05; color: #fff; font-size: 10px; align-items: center; justify-content: center; }
.mark.z { background: #7132d8; }
.chip-menu { position: fixed; z-index: 80; width: 190px; padding: 8px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line2); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 6px; }
.chip-menu-t { font: 600 12px 'Geist Mono', monospace; color: var(--muted); padding: 2px 6px; }
.chip-menu button { min-height: 44px; border-radius: 10px; border: 1px solid var(--line2); background: var(--btn2); color: var(--text); font-size: 15px; font-weight: 600; }
.chip-menu button[data-r="solder"] { border-color: #c88a05; } .chip-menu button[data-r="replace"] { border-color: #7132d8; }
.chip-menu button.on { background: var(--gold-bg); }
.chip-menu button.clear { font-weight: 500; color: var(--red); }

/* сводка до / после */
.chipmap.mini { min-width: 0; gap: 2px; width: 100%; }
.chipmap.mini .chip { border-width: 0; border-radius: 3px; box-shadow: none; cursor: default; }
.chipmap.mini .chip:hover { transform: none; }
.sum-maps { display: flex; flex-direction: column; gap: 16px; }
.sum-board { display: flex; flex-direction: column; gap: 6px; }
.sum-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.sum-pair > div { display: flex; flex-direction: column; gap: 4px; }
.mini-empty { min-height: 60px; border: 1px dashed var(--line2); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--muted); }

/* согласование: контакты клиента */
.contact-big { display: flex; flex-direction: column; gap: 18px; padding: 28px; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.contact-btn { min-height: 84px; padding: 14px 20px; border-radius: 16px; border: 1px solid var(--line2); background: var(--tile); color: var(--text); text-decoration: none; display: flex; flex-direction: column; justify-content: center; gap: 4px; font-size: 24px; font-weight: 600; }
.contact-btn.tg { background: linear-gradient(90deg, #6366f1, #a855f7); border-color: transparent; color: #fff; }

/* выравнивание и поля температуры */
.two.eq { align-items: stretch; }
.two.eq > .card { display: flex; flex-direction: column; }
.two.eq > .card > .textarea { flex: 1; min-height: 96px; }
.tiles.one { grid-template-columns: minmax(200px, 360px); }
.hb-head { display: block; }
.hb-fields { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; }
.hb-fields .field-inline .input { width: 84px; }
