:root {
  --bg: #EEF1F4;
  --surface: #FFFFFF;
  --surface-2: #F6F8FA;
  --ink: #172131;
  --ink-2: #445063;
  --muted: #778193;
  --line: #DCE1E7;
  --line-2: #E9EDF1;
  --accent: #0E6A87;
  --accent-hover: #0B5870;
  --accent-soft: #E2F0F4;
  --ok: #2B7A4B;   --ok-soft: #E2F2E8;
  --warn: #9C6210; --warn-soft: #FBEFD9;
  --info: #3456A3; --info-soft: #E5EBF8;
  --bad: #AE3B32;  --bad-soft: #F8E4E1;
  --idle: #8A94A2; --idle-soft: #ECEFF2;
  --r-s: 6px;
  --r-m: 10px;
  --shadow: 0 1px 2px rgba(23, 33, 49, .06), 0 4px 16px rgba(23, 33, 49, .05);
  font-family: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); min-height: 100vh; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.boot { padding: 40px; color: var(--muted); }
.hidden { display: none !important; }
.muted { color: var(--muted); }

/* ── шапка ── */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 24px;
  padding: 0 24px; height: 56px;
  background: var(--ink); color: #fff;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; text-decoration: none; color: #fff; white-space: nowrap; }
.brand-mark { width: 26px; height: 26px; border-radius: 7px; background: var(--accent); display: grid; place-items: center; font-size: 13px; }
.nav { display: flex; gap: 4px; height: 100%; }
.nav a {
  display: flex; align-items: center; padding: 0 12px; color: #B9C2CF; text-decoration: none;
  border-bottom: 2px solid transparent; font-weight: 500;
}
.nav a:hover { color: #fff; }
.nav a.on { color: #fff; border-bottom-color: #5CC2DE; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.save-state { font-size: 12px; color: #9AA5B4; min-width: 90px; text-align: right; }
.save-state.err { color: #FFB4AA; }
.user-btn { background: transparent; border: 1px solid #3A475B; color: #DCE3EC; border-radius: var(--r-s); padding: 5px 10px; cursor: pointer; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-btn .ini { display: none; }
.user-btn:hover { border-color: #5B6A80; }
.menu { position: absolute; right: 24px; top: 52px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: var(--shadow); padding: 6px; min-width: 190px; }
.menu button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 8px 10px; border-radius: var(--r-s); cursor: pointer; }
.menu button:hover { background: var(--surface-2); }

.page { max-width: 1240px; margin: 0 auto; padding: 24px; }
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { font-size: 22px; margin-right: auto; }

/* ── кнопки и поля ── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-s);
  padding: 7px 14px; cursor: pointer; font-weight: 500; text-decoration: none; color: var(--ink);
  white-space: nowrap;
}
.btn:hover { border-color: #C3CAD3; background: var(--surface-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-hover); }
.btn.danger { color: var(--bad); }
.btn.danger:hover { border-color: var(--bad); background: var(--bad-soft); }
.btn.small { padding: 4px 10px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: default; }

input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=date], input[type=search], select, textarea {
  width: 100%; border: 1px solid var(--line); border-radius: var(--r-s); background: #fff;
  padding: 7px 10px; min-height: 36px;
}
input:hover, select:hover, textarea:hover { border-color: #C6CDD6; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { resize: vertical; min-height: 60px; }
label.f { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--ink-2); font-weight: 500; }
label.f > input, label.f > select, label.f > textarea { font-size: 14px; color: var(--ink); font-weight: 400; }
.lbl { font-size: 12.5px; color: var(--ink-2); font-weight: 500; display: block; margin-bottom: 4px; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }

.check { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; user-select: none; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; }

/* переключатель-кнопки: отдельные «таблетки», аккуратно переносятся на узком экране */
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.seg button { border: 1px solid var(--line); background: #fff; border-radius: var(--r-s); padding: 5px 10px; cursor: pointer; font-size: 13px; color: var(--ink-2); }
.seg button:hover { border-color: #BFC7D1; background: var(--surface-2); }
.seg button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.seg.tone button.on[data-value=not_started], .seg.tone button.on[data-value=not_sent] { background: var(--idle); border-color: var(--idle); }
.seg.tone button.on[data-value=in_progress] { background: var(--warn); border-color: var(--warn); }
.seg.tone button.on[data-value=sent], .seg.tone button.on[data-value=in_transit] { background: var(--info); border-color: var(--info); }
.seg.tone button.on[data-value=done], .seg.tone button.on[data-value=delivered] { background: var(--ok); border-color: var(--ok); }

/* статусы */
.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 2px 9px; font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.idle { background: var(--idle-soft); color: #5F6977; }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.info { background: var(--info-soft); color: var(--info); }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }

/* ── заказы: счётчики ── */
.counters { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-bottom: 16px; }
.counter {
  text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-m);
  padding: 12px 14px; cursor: pointer; display: flex; flex-direction: column; gap: 2px;
}
.counter b { font-size: 24px; font-weight: 600; line-height: 1.1; }
.counter span { font-size: 12.5px; color: var(--ink-2); }
.counter:hover { border-color: #BFC7D1; }
.counter.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-soft); }
.counter.zero b { color: #A9B1BC; }
.counter.hot b { color: var(--bad); }

.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.toolbar input[type=search] { max-width: 320px; }
.toolbar select { width: auto; min-width: 200px; }
.legend { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 0 0 10px; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; vertical-align: 1px; }

/* таблица */
.table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden; }
table.list { width: 100%; border-collapse: collapse; }
table.list th { text-align: left; font-weight: 500; font-size: 12.5px; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
table.list td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.list tr:last-child td { border-bottom: 0; }
table.list tbody tr { cursor: pointer; }
table.list tbody tr:hover td { background: #F8FAFB; }
.who b { display: block; font-weight: 600; }
.who small { color: var(--muted); }
.num { color: var(--muted); width: 60px; }
.empty-state { padding: 48px 20px; text-align: center; color: var(--muted); }
.empty-state .btn { margin-top: 12px; }

/* сертификат в списке: имя + три точки этапов */
.cchips { display: flex; flex-wrap: wrap; gap: 6px; }
.cchip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: var(--r-s); padding: 3px 8px 3px 9px; font-size: 12.5px; font-weight: 500; background: #fff; white-space: nowrap; }
.dots { display: inline-flex; gap: 3px; }
.d { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.d.idle { background: #C7CED7; }
.d.warn { background: #E0A43A; }
.d.info { background: #5B7FD0; }
.d.ok { background: #3C9A62; }
.legend .idle { background: #C7CED7; } .legend .warn { background: #E0A43A; } .legend .info { background: #5B7FD0; } .legend .ok { background: #3C9A62; }

.exam-soon { display: block; font-size: 12px; color: var(--warn); font-weight: 500; }
.exam-today { display: block; font-size: 12px; color: var(--bad); font-weight: 600; }

/* ── карточка клиента ── */
.back { display: inline-block; margin-bottom: 10px; color: var(--muted); text-decoration: none; font-size: 13px; }
.back:hover { color: var(--accent); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: 18px 20px; margin-bottom: 16px; }
.panel h3 { font-size: 14px; margin-bottom: 12px; }
.contact-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.contact-grid .wide { grid-column: 1 / -1; }

.order { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); margin-bottom: 18px; overflow: hidden; }
.order.flash { animation: flash 1.6s ease-out; }
@keyframes flash { from { box-shadow: 0 0 0 3px var(--accent); } to { box-shadow: 0 0 0 3px transparent; } }
.order-head { display: flex; align-items: center; gap: 16px; padding: 14px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; background: var(--surface-2); }
.order-head h2 { font-size: 17px; }
.order-head .exam { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); font-weight: 500; }
.order-head .exam input { width: 160px; }
.order-head .spacer { margin-left: auto; }
.pick { padding: 14px 20px; border-bottom: 1px solid var(--line-2); display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; }
.pick .lbl { margin: 0 6px 0 0; }
.section-title { padding: 14px 20px 4px; font-size: 13px; font-weight: 600; color: var(--ink-2); }

/* блок сертификата */
.cert { border-top: 1px solid var(--line-2); }
.cert:first-child { border-top: 0; }
.cert-head { display: grid; grid-template-columns: 170px 1fr auto; gap: 16px; align-items: center; padding: 12px 20px; cursor: pointer; }
.cert-head:hover { background: #FAFBFC; }
.cert-name { font-weight: 600; font-size: 15px; }
.cert-name small { display: block; font-weight: 400; font-size: 12px; color: var(--muted); }
.sum { display: grid; grid-template-columns: repeat(8, minmax(0, auto)); gap: 4px 18px; align-items: start; }
.sum div { min-width: 0; }
.sum dt { font-size: 11.5px; color: var(--muted); margin-bottom: 2px; white-space: nowrap; }
.sum dd { margin: 0; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toggle-btn { border: 1px solid var(--line); background: #fff; border-radius: var(--r-s); padding: 4px 10px; font-size: 12.5px; cursor: pointer; color: var(--ink-2); }
.toggle-btn:hover { border-color: var(--accent); color: var(--accent); }
.cert.open .cert-head { background: var(--accent-soft); }
.cert-body { padding: 4px 20px 20px; background: #FCFDFD; border-top: 1px solid var(--line-2); }
.stages { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.stage { padding: 16px 20px 4px 0; display: flex; flex-direction: column; gap: 12px; }
.stage + .stage { border-left: 1px solid var(--line-2); padding-left: 20px; }
.stage h4 { margin: 0; font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.stage h4 .step { width: 20px; height: 20px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 11px; }
.langs { display: flex; flex-wrap: wrap; gap: 6px; }
.lang { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 3px 10px; font-size: 12.5px; cursor: pointer; }
.lang:hover { border-color: #BFC7D1; }
.lang.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.lang-add { display: flex; gap: 6px; margin-top: 6px; }
.lang-add input { max-width: 170px; min-height: 30px; padding: 4px 8px; font-size: 13px; }
.checks { display: flex; gap: 18px; flex-wrap: wrap; }
.file-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.file-line a { font-weight: 500; overflow-wrap: anywhere; }
.upload { position: relative; overflow: hidden; }
.upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.cert-note { margin-top: 14px; }

/* оплата */
.pays { padding: 4px 20px 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pay { border: 1px solid var(--line); border-radius: var(--r-m); padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; background: #fff; }
.pay.got { border-color: #9FCDB2; background: #FBFEFC; }
.pay-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pay-head b { font-size: 14px; }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; font-weight: 500; user-select: none; }
.switch input { appearance: none; width: 36px; height: 20px; border-radius: 999px; background: #C9D0D8; position: relative; cursor: pointer; margin: 0; transition: background .15s; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked { background: var(--ok); }
.switch input:checked::after { transform: translateX(16px); }
.grid2 { display: grid; grid-template-columns: 1fr 120px; gap: 10px; }
.order-note { padding: 0 20px 18px; display: block; }

/* история */
details.history { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: 14px 20px; }
details.history summary { cursor: pointer; font-weight: 600; }
.hist { list-style: none; margin: 12px 0 0; padding: 0; }
.hist li { padding: 8px 0; border-top: 1px solid var(--line-2); font-size: 13px; display: grid; grid-template-columns: 140px 1fr; gap: 12px; }
.hist time { color: var(--muted); font-size: 12px; }
.hist .who-did { color: var(--muted); }

/* ── модальные окна ── */
.modal-back { position: fixed; inset: 0; background: rgba(23, 33, 49, .45); z-index: 50; display: grid; place-items: start center; padding: 6vh 16px; overflow-y: auto; }
.modal { background: var(--surface); border-radius: 14px; width: 100%; max-width: 620px; box-shadow: 0 20px 60px rgba(0,0,0,.2); }
.modal-head { padding: 18px 22px 0; display: flex; justify-content: space-between; align-items: center; }
.modal-head h2 { font-size: 18px; }
.modal-x { border: 0; background: none; font-size: 22px; line-height: 1; cursor: pointer; color: var(--muted); padding: 4px 8px; }
.modal-body { padding: 16px 22px; display: flex; flex-direction: column; gap: 14px; }
.modal-foot { padding: 0 22px 20px; display: flex; justify-content: flex-end; gap: 10px; }
.cert-pick { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.cert-pick .check { border: 1px solid var(--line); border-radius: var(--r-s); padding: 9px 12px; }
.cert-pick .check:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.form-err { color: var(--bad); font-size: 13px; min-height: 18px; }

/* ── вход ── */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: var(--ink); }
.login { width: 100%; max-width: 360px; background: var(--surface); border-radius: 14px; padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.login .brand { color: var(--ink); font-size: 17px; margin-bottom: 6px; }
.login .btn { justify-content: center; padding: 10px; }

/* ── уведомления ── */
#toasts { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 100; }
.toast { background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--r-s); box-shadow: var(--shadow); max-width: 380px; font-size: 13.5px; }
.toast.bad { background: var(--bad); }

/* ── адаптив ── */
@media (max-width: 1100px) {
  .counters { grid-template-columns: repeat(3, 1fr); }
  .sum { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .contact-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 820px) {
  .top { padding: 0 14px; gap: 12px; }
  .nav a { padding: 0 8px; }
  .save-state { display: none; }
  .page { padding: 16px; }
  .counters { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr 1fr; }
  .stages { grid-template-columns: 1fr; }
  .stage + .stage { border-left: 0; padding-left: 0; border-top: 1px solid var(--line-2); }
  .pays { grid-template-columns: 1fr; }
  .cert-head { grid-template-columns: 1fr auto; }
  .cert-head .sum { grid-column: 1 / -1; grid-row: 2; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  table.list thead { display: none; }
  table.list, table.list tbody, table.list tr, table.list td { display: block; }
  table.list tr { padding: 10px 14px; border-bottom: 1px solid var(--line-2); }
  table.list td { padding: 3px 0; border: 0; }
  table.list td.num { display: none; }
  .hist li { grid-template-columns: 1fr; gap: 2px; }
}
@media (max-width: 520px) {
  .brand span.t { display: none; }
  .top { gap: 8px; padding: 0 10px; }
  .nav a { padding: 0 6px; font-size: 13.5px; }
  .user-btn { width: 34px; height: 34px; padding: 0; border-radius: 50%; }
  .user-btn .full { display: none; }
  .user-btn .ini { display: inline; font-weight: 600; }
  .menu { right: 10px; }
  .contact-grid { grid-template-columns: 1fr; }
  .cert-pick { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ═══════════════ таблица по датам экзамена ═══════════════ */
:root { --c1: 196px; --c2: 150px; }
.page.wide { max-width: none; padding: 14px 20px 20px; }
.table-head { margin-bottom: 12px; }
.table-head h1 { margin-right: 8px; }
.table-head input[type=search] { width: 340px; }
.table-head select { width: auto; min-width: 190px; }
.table-head .btn:first-of-type { margin-left: auto; }

.sheet {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m);
  overflow: auto; max-height: calc(100vh - 140px);
}
table.grid { border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: 13px; }
table.grid col.col-client { width: var(--c1); }
table.grid col.col-cert { width: var(--c2); }
table.grid th, table.grid td {
  border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2);
  padding: 0; height: 34px; vertical-align: middle; background: #fff;
}
table.grid thead th {
  position: sticky; z-index: 4; background: #F1F4F7; color: var(--ink-2);
  font-weight: 500; font-size: 12px; text-align: left; padding: 0 8px; white-space: nowrap;
}
table.grid thead tr.h1 th { top: 0; height: 28px; }
table.grid thead tr.h2 th { top: 28px; height: 28px; }
table.grid thead th[rowspan] { height: 56px; font-size: 12.5px; color: var(--ink); }
table.grid thead .grp-th { font-weight: 600; color: var(--ink); background: #E7ECF1; }
table.grid .sticky-1 { position: sticky; left: 0; z-index: 2; }
table.grid .sticky-2 { position: sticky; left: var(--c1); z-index: 2; box-shadow: 1px 0 0 #CFD6DE; }
table.grid thead .sticky-1, table.grid thead .sticky-2 { z-index: 6; top: 0; }
table.grid .gstart { border-left: 2px solid #D3DAE2; }

/* строка-заголовок даты экзамена */
table.grid tbody.grp td { background: #E4EBF1; height: 42px; border-bottom: 1px solid #CDD5DE; border-top: 8px solid var(--bg); }
table.grid tbody.grp:first-of-type td { border-top: 0; }
.grp-label { position: sticky; left: 0; display: inline-flex; align-items: center; gap: 14px; padding: 0 12px; white-space: nowrap; }
.grp-toggle { border: 0; background: none; cursor: pointer; font-size: 14px; width: 22px; height: 22px; border-radius: 4px; color: var(--ink-2); }
.grp-toggle:hover { background: rgba(0,0,0,.06); }
.grp-date { font-size: 15px; font-weight: 600; }
.when { font-size: 12.5px; color: var(--muted); }
.when.soon { color: var(--warn); font-weight: 600; }
.grp-meta { font-size: 12.5px; color: var(--ink-2); }
.gs { font-weight: 600; color: var(--ink); }
.gs.all { color: var(--ok); }

/* строки клиентов */
table.grid tbody.ord tr:first-child td { border-top: 1px solid #CDD5DE; }
table.grid tbody.ord.alt td { background: #FAFBFC; }
table.grid tbody.ord.flash td { animation: cellflash 1.8s ease-out; }
@keyframes cellflash { from { background: var(--accent-soft); } }
.c-client { padding: 6px 10px !important; vertical-align: top !important; }
.cl-name { display: block; font-weight: 600; color: var(--ink); text-decoration: none; font-size: 13.5px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; }
.cl-name:hover { color: var(--accent); text-decoration: underline; }
.cl-exam { display: flex; align-items: center; gap: 4px; margin-top: 4px; font-size: 11.5px; color: var(--muted); }
table.grid .cl-exam input.cell { height: 26px; padding: 0 4px; font-size: 12px; color: var(--ink-2); }
.c-cert { padding: 0 10px !important; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nocert { padding: 0 10px !important; color: var(--muted); }
.center { text-align: center; }

/* ячейки-поля */
table.grid input.cell, table.grid select.cell {
  width: 100%; height: 33px; min-height: 0; border: 0; border-radius: 0; background: transparent;
  padding: 0 8px; font-size: 13px; color: var(--ink); box-shadow: none;
}
table.grid input.cell[type=date] { padding: 0 4px 0 8px; }
table.grid input.cell:hover, table.grid select.cell:hover { background: #F1F5F8; }
table.grid input.cell:focus, table.grid select.cell:focus { outline: 2px solid var(--accent); outline-offset: -2px; background: #fff; box-shadow: none; }
table.grid .right input.cell { text-align: right; }
table.grid select.cell { cursor: pointer; }
table.grid select.st { font-weight: 500; }
table.grid select.st-idle { background: var(--idle-soft); color: #5F6977; }
table.grid select.st-warn { background: var(--warn-soft); color: var(--warn); }
table.grid select.st-info { background: var(--info-soft); color: var(--info); }
table.grid select.st-ok { background: var(--ok-soft); color: var(--ok); }
.cell-check { width: 17px; height: 17px; accent-color: var(--ok); cursor: pointer; vertical-align: middle; }
.cell-btn {
  display: block; width: 100%; min-height: 33px; border: 0; background: transparent; text-align: left;
  padding: 0 8px; cursor: pointer; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cell-btn:hover { background: #F1F5F8; }
.cell-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.c-pay { vertical-align: top !important; }
.pay-btn { white-space: normal; padding: 6px 8px; height: 100%; }
.pay-btn.got { background: var(--ok-soft); }
.pay-btn.got:hover { background: #D5EBDD; }
.pay-btn.got b { color: var(--ok); }
.pay-line { display: block; }
.pay-sub { display: block; font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.file-link { display: block; padding: 0 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.cell-upload { position: relative; display: block; padding: 0 8px; line-height: 33px; color: var(--accent); cursor: pointer; font-size: 12.5px; }
.cell-upload:hover { background: #F1F5F8; }
.cell-upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
[data-lang-editor] .langs { margin-bottom: 4px; }

@media (max-width: 820px) {
  :root { --c1: 150px; }
  .page.wide { padding: 12px; }
  .table-head input[type=search] { width: 100%; }
  .table-head select { flex: 1; }
  .table-head .btn:first-of-type { margin-left: 0; }
  table.grid .sticky-2 { position: static; box-shadow: none; }
  .sheet { max-height: calc(100vh - 230px); }
}
/* пустая дата в ячейке не показывает «дд.мм.гггг», чтобы таблица не рябила */
table.grid input.cell[type=date][value=""]:not(:focus)::-webkit-datetime-edit { color: transparent; }

/* ── сертификаты колонками с галочками ── */
table.grid col.col-cc { width: 204px; }
table.grid thead th.cc-th { text-align: center; font-size: 12.5px; font-weight: 600; color: var(--ink); }
table.grid td.cc { vertical-align: top; padding: 5px 7px 6px; }
table.grid tbody.ord td.cc.on { background: #F4F9FB; }
table.grid tbody.ord.alt td.cc.on { background: #EFF6F8; }
.cc-top { display: flex; align-items: center; justify-content: space-between; min-height: 24px; }
td.cc:not(.on) .cc-top { justify-content: center; height: 100%; }
.tick { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; cursor: pointer; border-radius: 6px; }
.tick:hover { background: rgba(14, 106, 135, .08); }
.tick input { width: 20px; height: 20px; accent-color: var(--accent); cursor: pointer; margin: 0; }
.cc-more { border: 0; background: none; color: var(--accent); font-size: 12px; cursor: pointer; padding: 3px 4px; border-radius: 4px; }
.cc-more:hover { background: var(--accent-soft); }
.cc-row { display: grid; grid-template-columns: 54px 1fr; align-items: center; gap: 4px; margin-top: 3px; }
.cc-l { font-size: 11.5px; color: var(--muted); }
select.mini {
  width: 100%; height: 26px; min-height: 0; padding: 0 6px; font-size: 12.5px; font-weight: 500;
  border: 1px solid transparent; border-radius: 5px; cursor: pointer;
}
select.mini:hover { border-color: rgba(0,0,0,.12); }
select.mini:focus { outline: 2px solid var(--accent); outline-offset: 0; box-shadow: none; }
select.mini.st-idle { background: var(--idle-soft); color: #5F6977; }
select.mini.st-warn { background: var(--warn-soft); color: var(--warn); }
select.mini.st-info { background: var(--info-soft); color: var(--info); }
select.mini.st-ok { background: var(--ok-soft); color: var(--ok); }
.cc-inv { display: flex; justify-content: space-between; gap: 4px; font-size: 11.5px; margin-top: 5px; color: var(--ink-2); }
.cc-inv label { display: inline-flex; align-items: center; gap: 3px; cursor: pointer; white-space: nowrap; }
.cc-inv label:has(input:checked) { color: var(--ok); font-weight: 500; }
.cc-inv input { width: 14px; height: 14px; margin: 0; accent-color: var(--ok); cursor: pointer; }
.cc-sub { font-size: 11.5px; color: var(--ink-2); margin: 2px 0 0 58px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
table.grid td.c-contact { vertical-align: top; }
table.grid td.c-contact input.cell { height: 36px; }
table.grid td.c-client { min-height: 60px; }

/* окно сертификата пошире: три блока в ряд */
.modal.wide { max-width: 980px; }
.cert-modal .stages .stage:first-child { padding-top: 4px; }
.cert-modal .stage { padding-top: 4px; }

/* ── простая таблица: блок «Данные» + блок «Сертификаты» с галочками ── */
:root { --c1: 112px; }
table.grid col.col-first { width: var(--c1); }
table.grid col.col-last { width: 136px; }
table.grid col.col-ck { width: 88px; }
table.grid thead th.h1-data { z-index: 6; }
table.grid thead th.ck-th { text-align: center; font-weight: 600; color: var(--ink); white-space: normal; line-height: 1.2; }
table.grid td.c-first { position: sticky; }
table.grid td.c-first .cell { padding-right: 22px; }
.open-card { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-size: 13px; color: var(--muted); text-decoration: none; padding: 2px 4px; border-radius: 4px; opacity: 0; }
td.c-first:hover .open-card, .open-card:focus { opacity: 1; }
.open-card:hover { color: var(--accent); background: var(--accent-soft); }
table.grid td.ck { position: relative; text-align: center; height: 40px; }
table.grid tbody.ord td.ck.on { background: var(--accent-soft); }
table.grid td.ck .tick { width: 100%; height: 38px; border-radius: 0; }
table.grid td.ck .tick:hover { background: rgba(14, 106, 135, .07); }
.ck-more { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--accent); font-size: 15px; line-height: 1; cursor: pointer; padding: 3px 5px; border-radius: 4px; }
.ck-more:hover { background: rgba(14, 106, 135, .12); }
table.grid td.c-pay { vertical-align: middle; }
table.grid .pay-btn { padding: 3px 8px; }
@media (max-width: 820px) { table.grid .sticky-2 { position: static; } }

/* ── блок «Переводы»: выбор языка ── */
table.grid td.c-lang { vertical-align: middle; }
.lang-btn { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.lang-btn .caret { color: var(--muted); font-size: 11px; flex: none; }
.cell-note { display: block; padding: 0 8px; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.popover {
  position: absolute; z-index: 60; width: 250px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-m); box-shadow: 0 10px 30px rgba(23, 33, 49, .18); padding: 10px;
}
.pop-title { font-weight: 600; font-size: 13.5px; }
.pop-hint { font-size: 12px; color: var(--muted); margin: 2px 0 8px; }
.pop-list { display: flex; flex-direction: column; max-height: 300px; overflow-y: auto; }
.pop-item { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 5px; cursor: pointer; font-size: 13.5px; }
.pop-item:hover { background: var(--surface-2); }
.pop-item input { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; }
.pop-add { display: flex; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line-2); }
.pop-add input { min-height: 30px; padding: 4px 8px; font-size: 13px; }
.pay-btn .pay-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* разрыв между датами экзамена */
table.grid tbody.gap td { height: 22px; padding: 0; background: var(--bg); border: 0; border-top: 1px solid #CDD5DE; border-bottom: 1px solid #CDD5DE; }
table.grid tbody.grp td { border-top: 0; background: #DCE5EC; }
table.grid tbody.grp .grp-date { font-size: 15.5px; }

/* WhatsApp у телефона */
table.grid td.c-phone { position: relative; }
table.grid td.c-phone input.cell { padding-right: 30px; }
.wa-btn { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; color: #1E9E57; background: #E3F4EA; text-decoration: none; }
.wa-btn:hover { background: #1E9E57; color: #fff; }
.wa-btn[hidden] { display: none; }
table.grid td.c-phone .wa-btn { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); }
.phone-wrap { position: relative; display: block; }
.phone-wrap input { padding-right: 38px; }
.phone-wrap .wa-btn { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); }
.crm-soon { max-width: 640px; }
.crm-soon p { margin: 0 0 10px; color: var(--ink-2); }

/* ── телефон: дзвінок + WhatsApp ── */
.ph-btns { display: inline-flex; gap: 3px; }
table.grid td.c-phone .ph-btns { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); }
table.grid td.c-phone .ph-btns .wa-btn { position: static; transform: none; }
table.grid td.c-phone input.cell { padding-right: 60px; }
.call-btn { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; color: var(--info); background: var(--info-soft); text-decoration: none; }
.call-btn:hover { background: var(--info); color: #fff; }
.call-btn[hidden] { display: none; }
.phone-wrap .ph-btns { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); }
.phone-wrap .ph-btns .wa-btn { position: static; transform: none; }
.phone-wrap input { padding-right: 66px; }

/* ── сума і доплата ── */
table.grid td.c-sum { text-align: right; padding: 0 8px; font-weight: 600; white-space: nowrap; cursor: help; }
.warn-mark { display: inline-grid; place-items: center; width: 16px; height: 16px; margin-left: 4px; border-radius: 50%; background: var(--warn-soft); color: var(--warn); font-size: 11px; font-weight: 700; vertical-align: 1px; }
.calc { display: inline-flex; gap: 8px; }
.calc-pill { font-size: 13px; color: var(--ink-2); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; }
.calc-pill.due { border-color: #E9C98A; background: var(--warn-soft); }
.due-hint { font-size: 13px; background: var(--surface-2); border: 1px dashed var(--line); border-radius: var(--r-s); padding: 8px 10px; line-height: 1.6; }
.due-hint .btn { margin-left: 6px; vertical-align: 1px; }
.warn-text { color: var(--warn); font-size: 12.5px; }

/* ── ціни ── */
.prices-note { max-width: 820px; color: var(--ink-2); margin: -6px 0 14px; }
table.list.prices tbody tr { cursor: default; }
table.list.prices tbody tr:hover td { background: transparent; }
table.list.prices td { vertical-align: top; }
.p-title { font-weight: 600; margin-bottom: 6px; }
.p-desc { min-height: 44px; font-size: 13px; }
.p-rule { color: var(--ink-2); font-size: 13px; max-width: 260px; }
.p-price { max-width: 140px; text-align: right; font-weight: 600; margin-left: auto; display: block; }
td.right, th.right { text-align: right; }

/* ── дати курсів ── */
.course-add { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.course-add .f { min-width: 180px; }
.course-add .grow { flex: 1; min-width: 260px; }
table.list.courses tbody tr:hover td { background: transparent; }
table.list.courses td { vertical-align: middle; }
table.list.courses .c-date { max-width: 170px; }
table.list.courses tr.past td { color: var(--muted); }
table.list.courses tr.sep-row td { background: var(--surface-2); font-size: 12.5px; color: var(--muted); font-weight: 600; padding: 6px 14px; }
.group-pick { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow-y: auto; }
.group-opt { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: var(--r-s); padding: 8px 12px; cursor: pointer; }
.group-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.group-opt input { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; }
.group-opt small { display: block; color: var(--muted); font-size: 12px; }

/* ── CRM ── */
table.grid.leads td.c-exam { padding: 0 8px; white-space: nowrap; }
.exam-link { font-weight: 600; text-decoration: none; }
.exam-link:hover { text-decoration: underline; }
.link-btn { border: 0; background: none; color: var(--muted); font-size: 12px; cursor: pointer; text-decoration: underline; padding: 2px 4px; }
.link-btn:hover { color: var(--accent); }

/* Воронка */
.stage-bar{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin:0 0 12px}
.stage-chip{border:1px solid var(--line,#d8dee4);background:#fff;border-radius:999px;padding:6px 12px;font:inherit;font-size:13px;cursor:pointer;display:inline-flex;gap:6px;align-items:center}
.stage-chip b{font-weight:600;color:#5b6770}
.stage-chip:hover{border-color:#0E6A87}
.stage-chip.on{background:#0E6A87;border-color:#0E6A87;color:#fff}
.stage-chip.on b{color:#fff}
.stage-chip.t-cold{border-left:4px solid #8aa4b3}
.stage-chip.t-first_contact{border-left:4px solid #e0a526}
.stage-chip.t-thinking{border-left:4px solid #7a5cc7}
.stage-chip.t-in_group{border-left:4px solid #2f9e5b}
.stage-chip.t-not_relevant{border-left:4px solid #c25450}
.stage-arrow{color:#9aa5ad}
.stage-gap{width:14px}
.sum-vat{font-size:11px;color:#6b7780;display:block}
.p-wrap{display:inline-flex;align-items:center;gap:6px}
.p-unit{color:#6b7780;font-size:13px}
select.cell.st-bad{color:#c25450}

/* Нагадування */
.stage-chip.bell{border-color:#e0a526;background:#fff7e0}
.stage-chip.bell.on{background:#c98a00;border-color:#c98a00}
td.rm-date.over input,td.rm-note.over input{background:#fde8e7;color:#a63a36;font-weight:600}
td.rm-date.today input,td.rm-note.today input{background:#fff3cf;font-weight:600}
.rm-wrap{display:flex;align-items:center;gap:4px}
.rm-wrap .cell{flex:1;min-width:0}
.remind-done{border:1px solid #2f9e5b;color:#2f9e5b;background:#fff;border-radius:6px;width:26px;height:26px;cursor:pointer;flex:none}
.remind-done:hover{background:#2f9e5b;color:#fff}
.star{border:0;background:none;color:#c9d0d6;font-size:16px;cursor:pointer;padding:0 2px;line-height:1}
.star.on{color:#e0a526}
.star:hover{color:#e0a526}
.na-btn{border:1px solid #d8dee4;background:#fff;border-radius:6px;height:26px;padding:0 6px;cursor:pointer;flex:none;font-size:12px}
.na-btn:hover{border-color:#c25450}
td.c-first{display:table-cell}
table.grid thead tr.h3 th{top:56px;height:34px;background:#F8FAFB;padding:3px 4px}
table.grid thead tr.h3 th.sticky-1,table.grid thead tr.h3 th.sticky-2{top:56px}
.fl-in{width:100%;box-sizing:border-box;font:inherit;font-size:12px;height:26px;border:1px solid #d8dee4;border-radius:5px;padding:0 6px;background:#fff}
.fl-rng{display:flex;gap:3px}.fl-rng .fl-in{min-width:0;padding:0 2px}
#filter-info{padding:6px 2px}
td.c-first .star{position:absolute;left:4px;top:50%;transform:translateY(-50%);z-index:1}
td.c-first .cell{padding-left:22px}
.fl-rng{flex-direction:column}
table.grid thead tr.h3 th{height:auto}
table.grid td.c-first input.cell{padding-left:24px !important}
table.grid td.c-first .star{z-index:3}
@media (max-width: 820px){
  .stage-bar{flex-wrap:nowrap;overflow-x:auto;padding-bottom:6px;-webkit-overflow-scrolling:touch}
  .stage-chip{flex:none;white-space:nowrap}
  .stage-arrow{display:none}
}

/* Завислі та дашборд */
.stage-chip.stale{border-color:#c25450;background:#fdecec}
tbody.stale td.c-first{box-shadow:inset 3px 0 0 #c25450}
tbody.due td.c-first{box-shadow:inset 3px 0 0 #e0a526}
.kpis{display:flex;gap:12px;flex-wrap:wrap;margin-bottom:16px}
.kpi{background:#fff;border:1px solid #d8dee4;border-radius:10px;padding:12px 18px;min-width:150px;display:flex;flex-direction:column}
.kpi b{font-size:26px}.kpi span{color:#5b6770;font-size:13px}
.kpi.warn b{color:#c98a00}.kpi.bad b{color:#c25450}
.funnel{background:#fff;border:1px solid #d8dee4;border-radius:10px;padding:14px 18px;margin-bottom:16px;max-width:760px}
.f-row{display:flex;align-items:center;gap:12px;margin:6px 0}
.f-name{width:130px;font-size:14px}
.f-bar{flex:1;background:#eef2f5;border-radius:6px;height:16px;overflow:hidden}
.f-bar i{display:block;height:100%;background:#8aa4b3;border-radius:6px}
.f-bar i.t-warn{background:#e0a526}.f-bar i.t-info{background:#4a90c2}.f-bar i.t-ok{background:#2f9e5b}.f-bar i.t-bad{background:#c25450}
.board{display:flex;gap:10px;overflow-x:auto;align-items:flex-start;padding-bottom:12px}
.b-col{flex:0 0 200px;background:#eef2f5;border-radius:10px;padding:8px}
.b-col h3{font-size:13px;margin:2px 4px 8px;display:flex;justify-content:space-between}
.b-card{display:flex;flex-direction:column;background:#fff;border:1px solid #d8dee4;border-radius:8px;padding:7px 9px;margin-bottom:6px;text-decoration:none;color:inherit;font-size:13px}
.b-card:hover{border-color:#0E6A87}.b-card.stale{border-left:3px solid #c25450}
.b-card small{color:#6b7780}.b-empty{color:#9aa5ad;text-align:center;padding:6px;font-size:13px}
.lang-btns{display:inline-flex;gap:6px}
.lang-btns .lang-btn{border:2px solid transparent;background:#fff;border-radius:6px;padding:3px 4px;cursor:pointer;opacity:.4;line-height:0}
.lang-btns .lang-btn svg{border-radius:2px;box-shadow:0 0 0 1px rgba(0,0,0,.15)}
.lang-btns .lang-btn:hover{opacity:.8}
.lang-btns .lang-btn.on{opacity:1;border-color:#0E6A87}
td.c-lang{text-align:center}
.msg-btn{border:0;background:#eef2f5;border-radius:6px;width:24px;height:24px;cursor:pointer;color:#0E6A87;font-size:14px;line-height:1;padding:0}
.msg-btn:hover{background:#d9e6ec}
.tpl{margin-bottom:12px}.tpl-head{display:flex;gap:10px;margin-bottom:10px}.tpl-head input{flex:1;font:inherit;font-weight:600;padding:6px 8px;border:1px solid #d8dee4;border-radius:6px}
.tpl-cols{display:grid;grid-template-columns:1fr 1fr;gap:12px}.tpl textarea{width:100%;box-sizing:border-box;font:inherit}
@media (max-width:820px){.tpl-cols{grid-template-columns:1fr}}

/* Коментарі, час, пошук */
.note-btn{width:100%;text-align:left;border:0;background:transparent;font:inherit;padding:6px 8px;cursor:pointer;display:flex;gap:6px;align-items:center;min-width:0;color:inherit}
.note-btn .nt{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.note-btn:hover{background:#eef5f8}
.note-btn.big{border:1px solid #d8dee4;border-radius:8px;background:#fff;padding:8px 10px}
.nc{background:#0E6A87;color:#fff;border-radius:999px;font-size:11px;padding:1px 7px;flex:none}
.notes-list{margin-top:12px;max-height:340px;overflow:auto}
.note-item{border-top:1px solid #e6ebef;padding:8px 0}
.note-meta{font-size:12px;color:#6b7780;display:flex;gap:8px;align-items:center}
.note-text{white-space:pre-wrap;margin-top:3px}
.rm-time{max-width:84px}
.gsearch{position:relative;margin-left:auto;margin-right:12px}
.gsearch input{width:230px;height:32px;border-radius:8px;border:1px solid #3a475c;background:#222d41;color:#fff;padding:0 10px;font:inherit;font-size:13px}
.gsearch input::placeholder{color:#9fb0c3}
.gs-res{position:absolute;top:38px;right:0;width:320px;background:#fff;color:#1b2536;border:1px solid #d8dee4;border-radius:10px;box-shadow:0 10px 30px rgba(0,0,0,.18);z-index:60;overflow:hidden}
.gs-res a{display:flex;flex-direction:column;padding:8px 12px;text-decoration:none;color:inherit;border-bottom:1px solid #eef1f4}
.gs-res a:hover{background:#eef5f8}.gs-res a span{font-size:12px;color:#6b7780}
.gs-none{padding:10px 12px;color:#6b7780;font-size:13px}
@media (max-width:820px){.gsearch input{width:120px}.gs-res{width:260px}}
.top-right{margin-left:0}

/* Сортування кліком по заголовку */
table.grid thead th.sortable{cursor:pointer;user-select:none;white-space:nowrap}
table.grid thead th.sortable:hover{background:#E3EAF0;color:var(--ink)}
table.grid thead th.sorted{color:#0E6A87}
.sort-ar{font-size:10px;opacity:.45;margin-left:2px}
th.sorted .sort-ar{opacity:1}
table.grid.leads .sticky-2{left:136px}

/* Передоплата: клітинка з вибором суми */
.pre-wrap{display:flex;align-items:center;gap:3px}
.pre-wrap .pre-in{flex:1;min-width:0;font-weight:600}
.pre-more{border:0;background:#eef2f5;border-radius:6px;width:22px;height:24px;cursor:pointer;color:#5b6770;flex:none;padding:0}
.pre-more:hover{background:#d9e6ec}
.pre-sub{display:block;font-size:11px;color:#6b7780;padding:0 6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* Доплата: два варіанти */
.pay-btn .due2{display:block;font-size:12px;color:#6b7780;white-space:nowrap;line-height:1.35}
.pay-btn .due2 b{color:#1b2536}
.pay-btn .due2.on{color:#1b2536}
.pay-btn .due2.on b{color:#0E6A87}
td.c-lang .cell-btn.lang-btn{color:var(--ink);font-weight:500}

/* Сума і доплата: по дві колонки */
td.c-sum.on .sum-val{color:#0E6A87}
td.c-sum:not(.on) .sum-val{font-weight:500;color:#5b6770}
.fin-btn .pay-line{color:#5b6770}
.fin-btn.on .pay-line{color:#0E6A87;font-weight:700}
.fin-btn:hover{background:#eef7f1}

/* № ліда */
table.grid .sticky-0{position:sticky;left:0;z-index:2}
table.grid thead .sticky-0{z-index:6}
table.grid.leads .sticky-1{left:56px}
table.grid.leads thead th.h1-data{left:0}
table.grid.leads .sticky-2{left:192px}
table.grid td.c-num{text-align:right;color:#6b7780;font-variant-numeric:tabular-nums;padding:0 8px}
/* шаблони: одна колонка */ .tpl-cols{grid-template-columns:1fr}
/* без значка календаря */
input[type="date"]::-webkit-calendar-picker-indicator{display:none}
input[type="date"]{cursor:pointer}
td.c-wa .wa-sel{color:#128C7E;font-weight:500}
td.c-wa .wa-sel:disabled{color:#b5bec6}
/* під етапом: дата групи / видалити */
.st-under{display:block;border:0;background:none;font:inherit;font-size:11px;color:#2f9e5b;padding:0 8px 3px;cursor:pointer;text-align:left}
.st-under:hover{text-decoration:underline}
.st-under.del{color:#c25450}
/* швидкість */ table.grid.leads tbody.ord{content-visibility:auto;contain-intrinsic-size:auto 36px}
/* вибір прапорця */
.flag-pick{display:inline-flex;align-items:center;gap:6px;border:1px solid transparent;background:none;border-radius:6px;padding:4px 6px;cursor:pointer;line-height:0}
.flag-pick:hover{border-color:#d8dee4;background:#fff}
.flag-pick svg{border-radius:2px;box-shadow:0 0 0 1px rgba(0,0,0,.15)}
.flag-pick .caret{font-size:10px;color:#9aa5ad;line-height:1}
.flag-pick .muted{line-height:1}
.flag-pop{position:absolute;z-index:80;background:#fff;border:1px solid #d8dee4;border-radius:8px;box-shadow:0 8px 24px rgba(0,0,0,.15);padding:4px;display:flex;flex-direction:column;min-width:150px}
.flag-pop button{display:flex;align-items:center;gap:8px;border:0;background:none;font:inherit;font-size:13px;padding:6px 8px;border-radius:6px;cursor:pointer;text-align:left}
.flag-pop button:hover{background:#eef5f8}
.flag-pop svg{border-radius:2px;box-shadow:0 0 0 1px rgba(0,0,0,.15);flex:none}
/* вузька Мова */ table.grid.leads td.c-lang{padding:0 2px} table.grid.leads td.c-lang .flag-pick{padding:4px 3px;gap:3px}
/* заголовки по центру */ table.grid thead tr.h2 th, table.list thead th{text-align:center !important;font-weight:700 !important;color:var(--ink)}
/* дашборд: воронка по центру */
.funnel2{background:#fff;border:1px solid #d8dee4;border-radius:12px;padding:20px 24px;max-width:1100px;margin:0 auto}
.f2-row{display:grid;grid-template-columns:150px 1fr 60px;align-items:center;gap:14px;margin:10px 0}
.f2-name{font-size:14px;font-weight:600;text-align:right}
.f2-track{display:flex;justify-content:center;height:30px}
.f2-track i{display:block;height:100%;border-radius:6px;background:#8aa4b3}
.f2-track i.t-warn{background:#e0a526}.f2-track i.t-info{background:#4a90c2}.f2-track i.t-ok{background:#2f9e5b}.f2-track i.t-bad{background:#c25450}
.f2-n{font-size:16px}
/* поточний лід */
table.grid tbody.ord.cur td{background:#FFF4CC !important;border-top:2px solid #E0A526;border-bottom:2px solid #E0A526}
table.grid tbody.ord.cur td.c-num{box-shadow:inset 4px 0 0 #E0A526;font-weight:700;color:#1b2536}
/* швидкий набір */ table.grid.leads td{contain:paint}
/* віртуальна таблиця */ table.grid.leads tbody.ord{content-visibility:visible} table.grid.leads tbody.vpad td{padding:0;border:0;background:transparent}
/* вузькі дати */ #leads table.leads thead tr.h2 th{white-space:normal;line-height:1.15;vertical-align:middle} #leads table.leads input.cell[type=date]{padding-left:4px;padding-right:4px}
/* шаблони 2 рядки */ .tpl-cols{grid-template-columns:1fr} .tpl textarea[data-tf]{min-height:0}
