:root {
  --accent: #5b2ce8;
  --accent-hover: #4a20cc;
  --accent-soft: #f0eafe;
  --bg: #f7f7f8;
  --panel: #ffffff;
  --line: #e9e9ec;
  --line-strong: #d9d9de;
  --text: #16151a;
  --muted: #8b8b93;
  --chip: #f2f2f4;
  --chip-hover: #e8e8ec;
  --green: #16a34a;
  --green-bg: #e7f7ed;
  --orange: #e08a2e;
  --orange-bg: #fdf2e3;
  --blue: #2f6fed;
  --blue-bg: #e9f0fd;
  --red: #e0483d;
  --red-bg: #fdecea;
  --radius: 12px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--panel);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.layout { display: flex; min-height: 100vh; }

/* --- сайдбар --- */
.sidebar {
  width: 240px; flex: 0 0 240px;
  background: var(--bg); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; gap: 10px; align-items: center; padding: 18px 18px 14px; }
/* Шапка кликабельна только у админа — остальным настройки закрыты сервером. */
.brand.clickable { cursor: pointer; border-radius: 10px; margin: 0 8px; padding: 18px 10px 14px; }
.brand.clickable:hover { background: var(--chip); }
.brand-logo {
  width: 34px; height: 34px; border-radius: 10px; background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px;
}
.brand-title { font-weight: 600; line-height: 1.2; }
.brand-sub { color: var(--muted); font-size: 12px; }

.nav { padding: 6px 10px; flex: 1; overflow-y: auto; }
.nav button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 12px; margin-bottom: 2px; border: 0; border-radius: 10px;
  background: transparent; font: inherit; color: var(--text); cursor: pointer; text-align: left;
}
.nav button:hover { background: var(--chip-hover); }
.nav button.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav button.active .nav-icon { color: var(--accent); }
.nav-icon { width: 18px; display: inline-flex; justify-content: center; color: var(--muted); }
.nav .nav-count { margin-left: auto; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.nav button.active .nav-count { color: var(--accent); }
.nav .nav-count.alert { background: var(--red); color: #fff; border-radius: 8px; padding: 1px 7px; }
.nav-group { padding: 14px 12px 6px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .6px; }
.sidebar-footer { padding: 12px 18px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--line); position: relative; }

/* --- контент --- */
.content { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 12px; padding: 22px 32px 14px;
  position: sticky; top: 0; background: var(--panel); z-index: 8;
}
.topbar h1 { font-size: 26px; margin: 0; font-weight: 700; letter-spacing: -.5px; }
.topbar .sub { color: var(--muted); font-size: 13px; margin-top: 3px; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.page { padding: 4px 32px 60px; }

/* --- кнопки --- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 0; background: var(--chip); color: var(--text);
  border-radius: 10px; padding: 10px 16px; font: inherit; letter-spacing: .2px;
  cursor: pointer; white-space: nowrap; text-decoration: none;
}
.btn:hover { background: var(--chip-hover); text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; font-weight: 500; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { background: transparent; color: var(--accent); }
.btn-ghost:hover { background: var(--accent-soft); }
.btn-outline { background: var(--panel); border: 1px solid var(--line-strong); }
.btn-outline:hover { background: var(--bg); }
.btn-danger { background: var(--red-bg); color: var(--red); }
.btn-danger:hover { background: #fbdcd9; }
.btn:disabled { opacity: .5; cursor: default; }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn-icon { width: 40px; height: 40px; padding: 0; justify-content: center; }
.icon { width: 18px; height: 18px; display: block; flex: 0 0 18px; }

/* --- панель фильтров --- */
/* Выравниваем по низу: у полей с подписью («с», «по») сверху есть строка текста,
   и при центрировании сами поля оказывались ниже поиска. */
.bar { display: flex; align-items: flex-end; gap: 12px; margin: 6px 0 16px; flex-wrap: wrap; }
/* Всё, что без подписи, — кнопки, чипы, переключатели — держим на высоте поиска. */
.bar > .btn, .bar > .chip, .bar > button, .bar > .right { align-self: center; }
.search {
  display: flex; align-items: center; gap: 12px; flex: 0 1 460px; min-width: 240px;
  border: 1px solid #e6e6ea; border-radius: 12px; padding: 0 16px; height: 48px; background: var(--panel);
}
.search:focus-within { border-color: #c9c9d1; }
/* Вес селектора должен перебивать общий input[type="text"] ниже по файлу:
   при равном весе побеждал он и рисовал вторую рамку внутри поиска. */
.search input[type="text"], .search input {
  border: 0; outline: 0; box-shadow: none; border-radius: 0;
  flex: 1; background: transparent; padding: 0;
  font-family: inherit; font-size: 15px; color: var(--text);
}
.search input[type="text"]:focus { box-shadow: none; }
.search input::placeholder { color: #b3b3bb; }
.search .icon { color: #9a9aa3; }
.bar .right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.bar select, .bar input[type="date"] { height: 48px; border-radius: 12px; }
.bar label.field { gap: 3px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chip {
  border: 1px dashed var(--line-strong); background: var(--panel); color: var(--text);
  border-radius: 12px; padding: 6px 12px; font: inherit; font-size: 13px;
  cursor: pointer; white-space: nowrap;
}
.chip:hover { border-color: var(--muted); }
.chip.active { border: 1px solid var(--accent); color: var(--accent); }
.chip .count { color: var(--muted); margin-left: 6px; font-size: 11px; }
.chip.active .count { color: var(--accent); opacity: .7; }

.list-summary { display: flex; align-items: center; gap: 16px; margin: 0 0 12px; flex-wrap: wrap; }
.list-summary-text { font-size: 17px; font-weight: 600; letter-spacing: -.3px; }
.list-summary .metric { color: var(--muted); }
.list-summary .metric b { color: var(--text); font-variant-numeric: tabular-nums; }
.list-summary .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }

.pager { display: flex; align-items: center; gap: 10px; justify-content: center; margin-top: 18px; color: var(--muted); }

/* --- таблицы --- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left; font-weight: 400; color: var(--muted); font-size: 13px;
  padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--panel);
  position: sticky; top: 0; z-index: 2;
}
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--text); }
th.active { color: var(--text); font-weight: 500; }
/* Бледный двойной шеврон — подсказка «по колонке можно сортировать».
   У активной колонки подсвечивается та половина, куда идёт сортировка. */
.sort-mark { display: inline-flex; vertical-align: middle; margin-left: 6px; color: #cfcfd6; }
.sort-mark .icon { width: 13px; height: 13px; flex: 0 0 13px; }
th.sortable:hover .sort-mark { color: var(--muted); }
.sort-mark.active { color: var(--line-strong); }
.sort-mark.active.asc svg path:first-child,
.sort-mark.active.desc svg path:last-child { stroke: var(--accent); }
td { padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfaff; }
tr.clickable { cursor: pointer; }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sub { color: var(--muted); font-size: 12px; margin-top: 3px; }
.name { font-weight: 500; }
.wrap { max-width: 320px; white-space: normal; line-height: 1.35; }
.nowrap { white-space: nowrap; }
.mono { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.empty { padding: 48px; text-align: center; color: var(--muted); }
.pos { color: var(--green); }
.neg { color: var(--red); }

/* --- метки статусов --- */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 20px; font-size: 12px; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-green { background: var(--green-bg); color: var(--green); }
.pill-orange { background: var(--orange-bg); color: var(--orange); }
.pill-gray { background: var(--chip); color: var(--muted); }
.pill-blue { background: var(--blue-bg); color: var(--blue); }
.pill-red { background: var(--red-bg); color: var(--red); }
.tag { display: inline-block; padding: 3px 9px; border-radius: 8px; font-size: 12px; background: var(--chip); color: var(--muted); margin-right: 4px; }
.tag-accent { background: var(--accent-soft); color: var(--accent); }
.tag-warn { background: var(--orange-bg); color: #8a5a1e; }
.tag-red { background: var(--red-bg); color: var(--red); }

/* --- карточки метрик --- */
.kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 22px; }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; background: var(--panel); }
.card.clickable:hover { border-color: var(--accent); }
.card .label { color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.card .value { font-size: 25px; font-weight: 600; letter-spacing: -.4px; font-variant-numeric: tabular-nums; }
.card .value.long { font-size: 19px; }
.card .hint { color: var(--muted); font-size: 12px; margin-top: 5px; }
.card.alert { border-color: #f3c9c4; background: #fffbfa; }
.card.alert .value { color: var(--red); }

.panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; margin-bottom: 22px; align-items: start; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.panel h3 { margin: 0 0 14px; font-size: 15px; font-weight: 600; }
.panel h3 .muted { font-weight: 400; font-size: 13px; }
.panel table { margin: -4px 0; }
.panel table th { padding: 6px 8px; }
.panel table td { padding: 9px 8px; }
.panel table tr:last-child td { border-bottom: 0; }

/* воронка */
.funnel { display: flex; flex-direction: column; gap: 9px; }
.funnel-row { display: grid; grid-template-columns: 170px 1fr 52px; gap: 12px; align-items: center; }
.funnel-row .t { color: var(--muted); font-size: 13px; }
.funnel-row .track { background: var(--chip); border-radius: 6px; height: 10px; overflow: hidden; }
/* display:block обязателен — у строчного элемента ширина и высота не применяются */
.funnel-row .fill { display: block; height: 100%; background: var(--accent); border-radius: 6px; }
.funnel-row .fill.green { background: var(--green); }
.funnel-row .fill.orange { background: var(--orange); }
.funnel-row .fill.red { background: var(--red); }
.funnel-row .fill.blue { background: var(--blue); }
.funnel-row .fill.gray { background: var(--line-strong); }
.funnel-row .v { text-align: right; font-variant-numeric: tabular-nums; font-weight: 500; }

/* столбики по дням */
.bars { display: flex; align-items: flex-end; gap: 3px; height: 110px; margin-top: 6px; }
/* height:100% нужен, чтобы проценты у столбиков считались от высоты графика, а не от нуля */
.bars .bar-col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; min-width: 4px; }
.bars .b1 { background: var(--accent-soft); border-radius: 3px 3px 0 0; }
.bars .b2 { background: var(--accent); border-radius: 3px 3px 0 0; }
.bars-legend { display: flex; gap: 16px; color: var(--muted); font-size: 12px; margin-top: 10px; }
.bars-legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; margin-right: 5px; }

/* прогресс укомплектованности */
.progress { background: var(--chip); border-radius: 6px; height: 8px; overflow: hidden; min-width: 70px; }
.progress i { display: block; height: 100%; background: var(--accent); }
.progress i.full { background: var(--green); }
.progress i.low { background: var(--orange); }

/* --- страница-карточка --- */
.back-link {
  display: inline-flex; align-items: center; gap: 6px; border: 0; background: none;
  font: inherit; font-weight: 500; color: var(--muted); cursor: pointer; padding: 4px 8px 4px 0;
}
.back-link:hover { color: var(--accent); }
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 22px; align-items: start; }
@media (max-width: 1150px) { .detail { grid-template-columns: 1fr; } }

.block { border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; margin-bottom: 18px; }
.block > h3 { margin: 0 0 14px; font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.block > h3 .right { margin-left: auto; font-weight: 400; }
.side-card { background: #f6f6f8; border-radius: 14px; padding: 18px 20px; margin-bottom: 18px; }
.side-card h3 { margin: 0 0 12px; font-size: 14px; font-weight: 600; }
.side-total { font-size: 24px; font-weight: 700; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }

.props { display: grid; grid-template-columns: 150px 1fr; gap: 10px 14px; font-size: 14px; }
.props dt { color: var(--muted); }
.props dd { margin: 0; word-break: break-word; }

.steps { display: flex; flex-direction: column; gap: 13px; }
.steps .step { display: flex; align-items: center; gap: 11px; color: var(--muted); }
.steps .step .mark {
  width: 24px; height: 24px; border-radius: 50%; background: #e3e3e7; color: #fff;
  display: flex; align-items: center; justify-content: center; flex: 0 0 24px;
}
.steps .step.done { color: var(--text); }
.steps .step.done .mark { background: var(--accent); }
.steps .step .icon { width: 14px; height: 14px; flex: 0 0 14px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tabs button {
  border: 0; background: none; font: inherit; padding: 11px 16px; cursor: pointer;
  color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs button:hover { color: var(--text); }
.tabs button.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 500; }
.tabs .count { font-size: 12px; opacity: .7; margin-left: 5px; }

.note { white-space: pre-wrap; line-height: 1.45; background: var(--bg); border-radius: 10px; padding: 14px 16px; }
.warn-box { background: var(--orange-bg); color: #8a5a1e; padding: 11px 14px; border-radius: 10px; margin-bottom: 16px; }
.err-box { background: var(--red-bg); color: #a3372e; padding: 11px 14px; border-radius: 10px; margin-bottom: 16px; }
.info-box { background: var(--blue-bg); color: #24519f; padding: 11px 14px; border-radius: 10px; margin-bottom: 16px; }

/* --- поля и формы --- */
input[type="date"], input[type="text"], input[type="number"], input[type="time"],
input[type="datetime-local"], select, textarea {
  border: 1px solid var(--line-strong); border-radius: 10px; padding: 9px 12px; font: inherit;
  background: var(--panel); color: var(--text); max-width: 100%;
}
select {
  appearance: none; -webkit-appearance: none;
  padding-right: 34px; cursor: pointer;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%238b8b93" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"><path d="m8 9 4-4 4 4"/><path d="m16 15-4 4-4-4"/></svg>');
  background-repeat: no-repeat; background-position: right 10px center; background-size: 15px 15px;
}
select::-ms-expand { display: none; }

/* У поля даты родной значок браузера выбивается из набора — гасим его и кладём свой.
   Сам значок оставляем кликабельным: он и открывает календарь. */
input[type="date"] {
  padding-right: 34px;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%238b8b93" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="5" width="18" height="16" rx="3"/><path d="M3 10h18M8 3v4M16 3v4"/></svg>');
  background-repeat: no-repeat; background-position: right 10px center; background-size: 16px 16px;
}
input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: 0; cursor: pointer; margin: 0; padding: 0; width: 20px;
}
input:focus, select:focus, textarea:focus {
  outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
label.field { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); }
label.field > span { font-size: 12px; }
label.field input, label.field select, label.field textarea { color: var(--text); font-size: 14px; }
label.check { display: flex; align-items: center; gap: 9px; font-size: 14px; cursor: pointer; padding: 7px 0; }
label.check input { width: 17px; height: 17px; accent-color: var(--accent); margin: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 4px 0 18px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

/* --- боковая панель редактирования --- */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(16, 14, 32, .3); z-index: 30; display: flex; justify-content: flex-end; }
.drawer {
  width: 520px; max-width: 100%; background: var(--panel); height: 100%;
  overflow-y: auto; padding: 22px 26px 32px; box-shadow: -8px 0 30px rgba(0,0,0,.1);
}
.drawer h2 { margin: 0 0 2px; font-size: 20px; font-weight: 700; letter-spacing: -.3px; }
.drawer .close { float: right; border: 0; background: none; font-size: 26px; cursor: pointer; color: var(--muted); line-height: 1; }
.drawer-actions { display: flex; gap: 10px; padding-top: 6px; position: sticky; bottom: -32px; background: var(--panel); padding-bottom: 4px; }
.drawer-actions .right { margin-left: auto; }

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: #16151a; color: #fff; padding: 12px 18px; border-radius: 12px; z-index: 60;
  box-shadow: 0 8px 24px rgba(0,0,0,.22); max-width: 80vw;
}
.toast.error { background: var(--red); }

.loading { padding: 60px; text-align: center; color: var(--muted); }

/* --------------------------------------------------------------- вход и аккаунт */

.auth-screen {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  background: var(--bg); padding: 24px; z-index: 50;
}
.auth-box {
  width: 100%; max-width: 380px; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 14px;
}
.auth-brand { display: flex; align-items: center; gap: 12px; }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-title { font-size: 22px; font-weight: 600; margin-top: 6px; }
.auth-hint { color: var(--muted); font-size: 13px; line-height: 1.5; }
.auth-input {
  width: 100%; padding: 12px 14px; font-size: 16px; color: var(--text);
  border: 1px solid var(--line-strong); border-radius: 10px; background: var(--panel);
}
.auth-input:focus { outline: none; border-color: var(--accent); }
.auth-code { letter-spacing: 8px; text-align: center; font-size: 22px; font-variant-numeric: tabular-nums; }
.auth-err { color: var(--red); font-size: 13px; line-height: 1.45; }
.auth-submit { justify-content: center; padding: 12px; font-size: 15px; }
.auth-back { justify-content: center; color: var(--muted); font-size: 13px; }

.account {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  background: none; border: none; cursor: pointer; padding: 6px; margin: -6px;
  border-radius: 10px; font: inherit; color: inherit;
}
.account:hover { background: var(--chip); }
.account-chevrons { flex: none; display: flex; color: var(--muted); }

/* Выпадает вбок от сайдбара: снизу места нет, карточка и так прижата к краю окна. */
.account-menu {
  position: absolute; left: calc(100% - 10px); bottom: 6px; z-index: 30; width: 268px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 10px 34px rgba(0, 0, 0, .14); overflow: hidden;
}
.account-menu-head {
  display: flex; align-items: center; gap: 12px; padding: 16px;
  border-bottom: 1px solid var(--line);
}
.account-menu-head .account-name { font-size: 15px; font-weight: 600; }
.account-avatar.big { width: 42px; height: 42px; font-size: 15px; }
.account-menu-list { padding: 6px; }
.account-menu-item {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 10px 10px; border: none; background: none; cursor: pointer;
  font: inherit; font-size: 14px; color: var(--text); border-radius: 8px;
}
.account-menu-item:hover { background: var(--chip); }
.account-menu-icon { display: flex; color: var(--muted); flex: none; }
.account-avatar {
  width: 30px; height: 30px; flex: none; border-radius: 50%; background: var(--accent-soft);
  color: var(--accent); display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600;
}
.account-who { min-width: 0; flex: 1; }
.account-name { color: var(--text); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-role { color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.footer-db { margin-top: 10px; font-size: 11px; opacity: .8; }


/* --- кнопка «Фильтры» с выпадающей панелью дат --- */
.filter-wrap { position: relative; }
.bar > .filter-wrap { align-self: center; }
/* Ровняем по поиску: у него высота 48 и скругление 12, кнопка должна совпасть. */
.bar .filter-wrap > .btn { height: 48px; border-radius: 12px; padding: 0 18px; }
.btn.btn-active { border-color: var(--accent); color: var(--accent); }
.btn .count {
  background: var(--accent); color: #fff; border-radius: 10px;
  padding: 1px 7px; font-size: 11px; font-variant-numeric: tabular-nums;
}
.filter-menu {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 20; width: 360px; max-width: calc(100vw - 48px);
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 10px 34px rgba(0, 0, 0, .14); padding: 16px;
  display: flex; flex-direction: column; gap: 12px; align-items: flex-start;
}
.filter-menu-row { display: flex; gap: 12px; width: 100%; }
/* min-width: 0 обязателен: иначе поле даты не сжимается ниже своей родной ширины
   и вылезает за край панели. */
.filter-menu-row label.field { flex: 1 1 0; min-width: 0; }
.filter-menu-row input[type="date"] {
  width: 100%; min-width: 0; height: 42px; border-radius: 10px;
}

.filter-menu-block { width: 100%; }
.filter-menu-title { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); margin-bottom: 8px; }
.filter-menu-block .chips { margin-bottom: 0; max-height: 168px; overflow-y: auto; }
