/* ---------- Цвета и размеры ---------- */
:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --border: #e3e6eb;
  --border-strong: #cfd4dc;
  --text: #111827;
  --text-2: #4b5563;
  --muted: #6b7280;
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-soft: #eef0ff;
  --accent-text: #ffffff;
  --success: #047857;
  --success-soft: #e7f7ef;
  --warning: #a16207;
  --warning-soft: #fdf6e3;
  --warning-border: #f3dca0;
  --danger: #c81e1e;
  --danger-soft: #fdecec;
  --danger-border: #f5c2c2;
  --info: #1d4ed8;
  --info-soft: #e8efff;
  --orange: #c2410c;
  --orange-soft: #fff0e6;
  --neutral-soft: #eef0f3;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .06);
  --shadow-lg: 0 20px 40px -12px rgba(16, 24, 40, .25);
  --radius: 12px;
  --radius-sm: 8px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1015;
    --surface: #161920;
    --surface-2: #1b1f27;
    --border: #2a2f3a;
    --border-strong: #3a4150;
    --text: #e8eaee;
    --text-2: #c2c7d0;
    --muted: #8e97a6;
    --accent: #7c83ff;
    --accent-hover: #939aff;
    --accent-soft: #23264a;
    --accent-text: #0e1015;
    --success: #34d399;
    --success-soft: #0f2a21;
    --warning: #fbbf24;
    --warning-soft: #2a2210;
    --warning-border: #4d3d12;
    --danger: #f87171;
    --danger-soft: #2d1414;
    --danger-border: #5a2323;
    --info: #7aa2ff;
    --info-soft: #152040;
    --orange: #fb923c;
    --orange-soft: #2e1a0c;
    --neutral-soft: #232833;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-lg: 0 20px 40px -12px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}

/* ---------- Основа ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 var(--font);
  font-variant-numeric: tabular-nums;
}
body.modal-open { overflow: hidden; }
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 22px; }
h2 { font-size: 17px; }
a { color: var(--accent); }
code { font-family: var(--mono); font-size: 12.5px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 5px; padding: 1px 5px; word-break: break-all; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mono { font-family: var(--mono); font-size: 13px; }
.nowrap { white-space: nowrap; }
.num { text-align: right; white-space: nowrap; }
.strong { font-weight: 600; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.boot { display: grid; place-items: center; min-height: 100vh; color: var(--muted); }

/* ---------- Кнопки и поля ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 14px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text);
  font: inherit; font-weight: 550; text-decoration: none; white-space: nowrap;
  cursor: pointer; transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.btn:hover { background: var(--surface-2); }
.btn:focus-visible, .icon-btn:focus-visible, .link-btn:focus-visible, .tab:focus-visible, .batch-head:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--neutral-soft); color: var(--text); }
.btn-outline { background: var(--surface); }
.btn-danger { color: var(--danger); }
.btn-lg { height: 42px; padding: 0 20px; font-size: 15px; }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12.5px; }
.btn-block { width: 100%; }
.btn.loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.loading::after {
  content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--accent-text); border-right-color: transparent; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.icon-btn {
  display: inline-grid; place-items: center; width: 30px; height: 30px; padding: 0;
  border: 0; border-radius: 7px; background: transparent; color: var(--muted); cursor: pointer;
}
.icon-btn:hover { background: var(--neutral-soft); color: var(--text); }
.link-btn { border: 0; background: none; padding: 0; color: var(--accent); font: inherit; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }

.input, .field input {
  height: 36px; width: 100%; padding: 0 11px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font: inherit;
}
.input:focus, .field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; font-weight: 550; color: var(--text-2); }
.form-error { margin: 0; color: var(--danger); font-size: 13px; }

/* ---------- Шапка ---------- */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--border); }
.topbar-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 24px; height: 60px;
  display: flex; align-items: center; gap: 28px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; }
.brand-lg { font-size: 20px; }
.logo {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px;
  background: var(--accent); color: var(--accent-text); font-weight: 800;
}
.mode-badge { padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 650; letter-spacing: .02em; text-transform: uppercase; }
.mode-badge:empty { display: none; }
.mode-demo { background: #f1e8ff; color: #6b21a8; }
.mode-sandbox { background: var(--warning-soft); color: var(--warning); }
.mode-production { background: var(--success-soft); color: var(--success); }
@media (prefers-color-scheme: dark) { .mode-demo { background: #2a1840; color: #d8b4fe; } }

.tabs { display: flex; gap: 4px; align-self: stretch; }
.tab {
  display: flex; align-items: center; padding: 0 12px; color: var(--muted); text-decoration: none; font-weight: 550;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--accent); }

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.balance { display: grid; text-align: right; line-height: 1.2; }
.balance-label { font-size: 11.5px; color: var(--muted); }
.balance-value { font-weight: 700; font-size: 15px; }
.balance.error .balance-value { color: var(--danger); font-weight: 600; font-size: 13px; }
.balance.loading .balance-value { opacity: .5; }
.user { display: flex; align-items: center; gap: 10px; padding-left: 14px; margin-left: 4px; border-left: 1px solid var(--border); }
.user-login { color: var(--text-2); font-weight: 550; }

.banner { padding: 10px 24px; font-size: 13.5px; }
.banner p { max-width: 1280px; margin: 2px auto; }
.banner-danger { background: var(--danger-soft); color: var(--danger); border-bottom: 1px solid var(--danger-border); }

/* ---------- Раскладка ---------- */
.container { max-width: 1280px; margin: 0 auto; padding: 24px 24px 64px; }
.page-head { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head p { margin: 0; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.table-wrap { overflow-x: auto; }

/* ---------- Форма выплаты ---------- */
.batch-comment { padding: 18px 20px 14px; max-width: 520px; }

.editor { width: 100%; min-width: 980px; border-collapse: separate; border-spacing: 0; }
.editor th {
  text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .03em;
  padding: 8px 6px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--surface-2);
}
.editor td { padding: 6px; vertical-align: top; border-bottom: 1px solid var(--border); }
.editor tr:last-child td { border-bottom: 0; }
.editor .c-num { width: 44px; text-align: center; color: var(--muted); padding-top: 15px; }
.editor th.c-num { padding-top: 8px; }
.editor .c-name { width: 25%; }
.editor .c-phone { width: 190px; }
.editor .c-card { width: 200px; }
.editor .c-amount { width: 130px; }
.editor th.c-amount { text-align: right; padding-right: 16px; }
.editor .c-del { width: 44px; text-align: center; padding-top: 8px; }
.cell {
  width: 100%; height: 36px; padding: 0 10px;
  border: 1px solid transparent; border-radius: 7px; background: transparent;
  color: var(--text); font: inherit;
}
.cell::placeholder { color: var(--muted); opacity: .6; }
.cell:hover { border-color: var(--border); background: var(--surface-2); }
.cell:focus { outline: none; border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px var(--accent-soft); }
.cell.invalid { border-color: var(--danger); background: var(--danger-soft); }
.cell[data-field="phone"], .cell[data-field="card"] { font-family: var(--mono); font-size: 13.5px; }
.cell[data-field="amount"] { text-align: right; font-weight: 600; }
.cell-error { color: var(--danger); font-size: 12px; line-height: 1.3; padding: 3px 10px 0; }
.cell-error:empty { display: none; }

.editor-tools { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 10px 14px 14px; border-top: 1px solid var(--border); }
.hint { color: var(--muted); font-size: 12.5px; }

.paybar {
  position: sticky; bottom: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 14px 20px; border-top: 1px solid var(--border); background: var(--surface);
  border-radius: 0 0 var(--radius) var(--radius);
}
.paybar-stats { display: flex; gap: 28px; }
.stat { display: grid; }
.stat .muted { font-size: 12px; }
.stat strong { font-size: 18px; }
.paybar-actions { display: flex; gap: 8px; }

/* ---------- Подсказки ФИО ---------- */
.suggest {
  position: absolute; z-index: 40; min-width: 320px; max-width: 460px; padding: 4px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
}
.suggest-item { display: grid; gap: 1px; padding: 7px 10px; border-radius: 6px; cursor: pointer; }
.suggest-item.active, .suggest-item:hover { background: var(--accent-soft); }
.suggest-item .muted { font-size: 12.5px; }
.suggest-item .mono { font-size: 12px; }
.suggest-item.disabled { opacity: .55; cursor: default; background: none; }

/* ---------- История ---------- */
.filters { display: grid; grid-template-columns: minmax(220px, 1fr) 170px auto auto auto; gap: 10px; align-items: center; padding: 12px; margin-bottom: 16px; }
.date-field { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.date-field span { min-width: 18px; }
.date-field .input { width: 150px; }
.history-list { display: grid; gap: 12px; }
.more { display: flex; justify-content: center; margin-top: 16px; }

.batch { overflow: hidden; }
.batch-head {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto 20px; align-items: center; gap: 18px;
  padding: 14px 18px; cursor: pointer; user-select: none;
}
.batch-head:hover { background: var(--surface-2); }
.batch-name { font-weight: 650; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.batch-meta { color: var(--muted); font-size: 12.5px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.batch-chips { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--neutral-soft); color: var(--text-2); }
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip-completed { background: var(--success-soft); color: var(--success); }
.chip-active { background: var(--info-soft); color: var(--info); }
.chip-failed { background: var(--danger-soft); color: var(--danger); }
.chip-not_sent { background: var(--orange-soft); color: var(--orange); }
.chip-aborted { background: var(--neutral-soft); color: var(--muted); }
.batch-amount { text-align: right; }
.batch-amount .amount { font-weight: 700; font-size: 15px; white-space: nowrap; }
.chevron { color: var(--muted); transition: transform .2s; display: grid; }
.batch.open .chevron { transform: rotate(180deg); }

.progress { display: flex; height: 3px; background: var(--neutral-soft); }
.progress span { display: block; height: 100%; }
.seg-completed { background: var(--success); }
.seg-active { background: var(--info); }
.seg-failed { background: var(--danger); }
.seg-not_sent { background: var(--orange); }
.seg-aborted { background: var(--border-strong); }

.batch-body { border-top: 1px solid var(--border); }
.filter-note { padding: 10px 18px; background: var(--surface-2); color: var(--text-2); font-size: 13px; border-bottom: 1px solid var(--border); }
.payouts { width: 100%; min-width: 860px; border-collapse: collapse; }
.payouts th {
  text-align: left; font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .03em;
  padding: 9px 12px; background: var(--surface-2); border-bottom: 1px solid var(--border);
}
.payouts th:first-child, .payouts td:first-child { padding-left: 18px; }
.payouts td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.payouts tr:last-child td { border-bottom: 0; }
.payouts .recipient { min-width: 210px; }
.payouts .comment { color: var(--text-2); max-width: 240px; }
.payouts .err { color: var(--danger); margin-top: 4px; max-width: 300px; }
.row-actions { white-space: nowrap; text-align: right; }
.row-actions .btn-sm { margin-left: 4px; }
.batch-actions { display: flex; gap: 6px; flex-wrap: wrap; padding: 10px 12px; border-top: 1px solid var(--border); background: var(--surface-2); }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--neutral-soft); color: var(--text-2); }
.s-queued, .s-sending { background: var(--neutral-soft); color: var(--text-2); }
.s-unknown { background: var(--warning-soft); color: var(--warning); }
.s-not_sent { background: var(--orange-soft); color: var(--orange); }
.s-created, .s-in_progress { background: var(--info-soft); color: var(--info); }
.s-completed { background: var(--success-soft); color: var(--success); }
.s-error, .s-canceled { background: var(--danger-soft); color: var(--danger); }
.s-aborted { background: var(--neutral-soft); color: var(--muted); }
.st-active { background: var(--info-soft); color: var(--info); }
.st-completed { background: var(--success-soft); color: var(--success); }
.st-partial { background: var(--warning-soft); color: var(--warning); }
.st-failed { background: var(--danger-soft); color: var(--danger); }
.st-aborted { background: var(--neutral-soft); color: var(--muted); }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }

.mode-chip { padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .02em; }

.empty { padding: 48px 20px; text-align: center; color: var(--muted); }
.empty strong { display: block; color: var(--text); font-size: 15px; margin-bottom: 4px; }

/* ---------- Модальные окна ---------- */
.modal {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px;
  background: rgba(15, 18, 25, .45); animation: fade .15s ease-out;
}
.modal-card {
  width: min(560px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg);
  animation: rise .18s ease-out;
}
.modal-card.wide { width: min(720px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px 0; }
.modal-body { padding: 14px 20px; overflow-y: auto; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--border); }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } }

.notice { margin: 0 0 14px; padding: 10px 12px; border-radius: var(--radius-sm); font-size: 13.5px; }
.notice-demo { background: #f1e8ff; color: #6b21a8; }
.notice-sandbox { background: var(--warning-soft); color: var(--warning); }
.notice-production { background: var(--success-soft); color: var(--success); font-weight: 600; }
@media (prefers-color-scheme: dark) { .notice-demo { background: #2a1840; color: #d8b4fe; } }

.confirm-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 0 0 14px; }
.confirm-stats div { padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.confirm-stats dt { font-size: 12px; color: var(--muted); }
.confirm-stats dd { margin: 2px 0 0; font-weight: 700; font-size: 15px; }
.confirm-stats .total dd { color: var(--accent); font-size: 17px; }

.alert { margin: 0 0 14px; padding: 10px 12px; border-radius: var(--radius-sm); font-size: 13.5px; }
.alert p { margin: 0; }
.alert ul { margin: 6px 0 0; padding-left: 18px; }
.alert li + li { margin-top: 4px; }
.alert-danger { background: var(--danger-soft); color: var(--danger); border: 1px solid var(--danger-border); }
.alert-warning { background: var(--warning-soft); color: var(--warning); border: 1px solid var(--warning-border); }

.confirm-list { margin: 0; padding: 0; list-style: none; border: 1px solid var(--border); border-radius: var(--radius-sm); max-height: 260px; overflow-y: auto; }
.confirm-list li { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--border); }
.confirm-list li:last-child { border-bottom: 0; }
.confirm-list .idx { color: var(--muted); font-size: 12px; }
.confirm-list .name { min-width: 0; overflow-wrap: anywhere; }

.kv { display: grid; grid-template-columns: 160px 1fr; gap: 8px 14px; margin: 0 0 16px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--border); }
.timeline li { position: relative; padding: 0 0 14px 16px; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); }

/* ---------- Уведомления ---------- */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 60; display: grid; gap: 8px; max-width: min(420px, calc(100vw - 32px)); }
.toast {
  padding: 11px 14px; border-radius: 10px; background: #1f2430; color: #fff; box-shadow: var(--shadow-lg); font-size: 13.5px;
  animation: rise .18s ease-out; transition: opacity .3s, transform .3s;
}
.toast-success { background: #065f46; }
.toast-error { background: #9b1c1c; }
.toast.hide { opacity: 0; transform: translateY(6px); }

/* ---------- Вход ---------- */
.login-screen { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-card { width: min(380px, 100%); display: grid; gap: 14px; padding: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); }
.login-card p { margin: 0; }

/* ---------- Выплата сотрудникам ---------- */
.picker-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 0 20px 14px; }
.picker-bar .input { flex: 1 1 320px; }
.empty-inline { display: grid; gap: 6px; justify-items: start; padding: 22px 20px; border-top: 1px solid var(--border); color: var(--text-2); }
.empty-inline strong { color: var(--text); font-size: 15px; }
.editor-pay .c-person { min-width: 190px; padding: 10px 8px; }
.editor-pay .c-card-masked { padding: 12px 8px; font-size: 13px; }
.editor-pay .cell-error[data-error] { padding: 3px 0 0; }
.editor-pay tr.row-invalid td { background: var(--danger-soft); }

/* ---------- Реестр сотрудников ---------- */
.page-head > .btn { margin-left: auto; align-self: center; }
.filters-emp { grid-template-columns: minmax(220px, 1fr) 220px auto; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.check input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.staff-table td { vertical-align: middle; }
.list-foot { padding: 10px 18px; border-top: 1px solid var(--border); }
.kind-chip { padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 650; background: var(--neutral-soft); color: var(--text-2); }
.empty p { margin: 4px 0 14px; }

.emp-form { display: grid; gap: 14px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-error { color: var(--danger); font-size: 12px; }
.field-error:empty { display: none; }
.field input.invalid { border-color: var(--danger); background: var(--danger-soft); }
.field input:disabled { background: var(--surface-2); color: var(--muted); }
.emp-form .hint, .emp-form .alert { margin: 0; }
.changes summary { cursor: pointer; color: var(--text-2); font-weight: 550; }
.changes .timeline { margin-top: 12px; }

.picker-filters { display: grid; grid-template-columns: 1fr 220px; gap: 10px; margin-bottom: 12px; }
.picker-list { max-height: 50vh; overflow-y: auto; margin-top: 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.picker-item { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 12px; border-bottom: 1px solid var(--border); cursor: pointer; }
.picker-item:last-child { border-bottom: 0; }
.picker-item:hover { background: var(--surface-2); }
.picker-item input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.picker-item.is-added { cursor: default; opacity: .6; }
.picker-main { display: grid; min-width: 0; }
.picker-side { text-align: right; }
.empty-note { margin: 0; padding: 16px; text-align: center; }

/* ---------- Узкие экраны ---------- */
@media (max-width: 1140px) {
  .topbar-inner { height: auto; flex-wrap: wrap; gap: 8px 16px; padding: 10px 24px 0; }
  .tabs { order: 3; width: 100%; height: 40px; overflow-x: auto; }
  .tab { white-space: nowrap; }
}
@media (max-width: 900px) {
  .topbar-inner { padding: 10px 16px 0; }
  .topbar-right { gap: 6px; }
  .user { padding-left: 8px; }
  .container { padding: 16px 16px 48px; }
  .filters-emp { grid-template-columns: 1fr 1fr; }
  .filters-emp #emp-q { grid-column: 1 / -1; }
  .filters { grid-template-columns: 1fr 1fr; }
  .filters #f-q { grid-column: 1 / -1; }
  .batch-head { grid-template-columns: minmax(0, 1fr) auto 20px; gap: 10px; }
  .batch-chips { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; }
  .batch-head > .badge { display: none; }
  .banner { padding: 10px 16px; }
}
@media (max-width: 560px) {
  .balance-label { display: none; }
  .user-login { display: none; }
  .filters { grid-template-columns: 1fr; }
  .date-field .input { width: 100%; }
  .paybar-stats { gap: 18px; }
  .paybar-actions { width: 100%; }
  .paybar-actions .btn-primary { flex: 1; }
  .form-grid, .picker-filters, .filters-emp { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 8px; }
}
