/* Дизайн-система Krisha Аналитика: компоненты ds-*. Источник — design-system/components/bundle.css, копия — src/api/static/css/ds.css; правьте систему, затем копию. */

/* ===== Сцена: обёртка превью и страниц, задаёт шрифт и цвет текста ===== */
.ds-stage { font-family: var(--font-sans); font-size: 14px; line-height: 1.45; color: var(--tx); padding: 16px; }
.ds-stage--tight { padding: 8px 16px; }
.ds-stack { display: flex; flex-direction: column; gap: 12px; }
.ds-stack--sm { gap: 8px; }
.ds-stack--xs { gap: 4px; }
.ds-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ds-cap { color: var(--faint); font-size: 11px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; margin: 0 0 6px; }

/* ===== Icon ===== */
.ds-icon { display: inline-block; width: 16px; height: 16px; flex: none; vertical-align: middle; }
.ds-icon--20 { width: 20px; height: 20px; }
/* Шкала значков: 16 — рядом с текстом и в компактных кнопках, 18 — кнопки, поля, меню, 22 — нижняя панель и круглая кнопка. */
.ds-icon--18 { width: 18px; height: 18px; }
.ds-icon--22 { width: 22px; height: 22px; }

/* ===== Logo ===== */
.ds-logo { display: block; flex: none; }
.ds-logo__bg { fill: var(--grn); }
.ds-logo__k { stroke: var(--on-grn); stroke-linecap: round; stroke-linejoin: round; fill: none; }

/* Logo: бренд в шапке меню */
.ds-brand { display: flex; align-items: center; gap: 11px; font-family: var(--font-sans); }
.ds-brand__name { font-size: 15px; font-weight: 700; letter-spacing: -.2px; line-height: 1.15; color: var(--tx); }
.ds-brand__sub { font-size: 11px; letter-spacing: .4px; color: var(--dim); }

/* ===== PageHeader ===== */
.ds-page-header { font-family: var(--font-sans); }
.ds-page-header__title { margin: 0 0 6px; font-size: 24px; line-height: 30px; font-weight: 700; letter-spacing: -.4px; color: var(--tx); }
.ds-page-header__sub { margin: 0 0 18px; font-size: 13px; color: var(--dim); }

/* ===== SectionHead ===== */
.ds-section-head { display: flex; align-items: center; gap: 10px; margin: 2px 0 12px; font-family: var(--font-sans); }
.ds-section-head__title { margin: 0; font-size: 14px; font-weight: 600; letter-spacing: .2px; color: var(--tx); }
.ds-section-head__rule { flex: 1; height: 1px; background: var(--line2); }

/* ===== NavItem ===== */
.ds-nav-group { padding: 14px 10px 4px; font-size: 10px; font-weight: 600; letter-spacing: 1px; color: var(--faint); }
.ds-nav-item {
    display: flex; align-items: center; gap: 11px; min-height: 40px; padding: 0 10px;
    border-radius: var(--radius-control, 8px); font-family: var(--font-sans); font-size: 14px; font-weight: 400;
    color: var(--dim); text-decoration: none; cursor: pointer; transition: background .15s, color .15s;
}
.ds-nav-item svg { flex: 0 0 18px; }
.ds-nav-item:hover { background: var(--panel2); color: var(--tx); }
.ds-nav-item:focus-visible { outline: 2px solid var(--grn); outline-offset: -2px; }
.ds-nav-item--active { color: var(--tx); background: var(--tint-grn); box-shadow: inset 2px 0 0 var(--grn); font-weight: 600; }
.ds-nav-item--active:hover { background: var(--tint-grn); }

/* NavItem: раскрывающийся второй уровень и пользователь внизу меню */
.ds-nav-sub > summary { list-style: none; }
.ds-nav-sub > summary::-webkit-details-marker { display: none; }
.ds-nav-sub > summary::after { content: "⌄"; margin-left: auto; color: var(--faint); transition: transform .15s; }
.ds-nav-sub[open] > summary::after { transform: rotate(180deg); }
.ds-nav-sub__items { display: flex; flex-direction: column; gap: 3px; padding-left: 14px; }
.ds-nav-foot { display: flex; align-items: center; gap: 10px; font-family: var(--font-sans); }
.ds-nav-foot__avatar { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 50%; background: var(--elev); display: flex; align-items: center; justify-content: center; font-weight: 600; color: var(--grn); }
.ds-nav-foot__who { flex: 1; min-width: 0; line-height: 1.2; }
.ds-nav-foot__name { font-size: 13px; font-weight: 600; color: var(--tx); }
.ds-nav-foot__role { font-size: 11px; color: var(--faint); }
.ds-nav-foot__logout { display: flex; align-items: center; color: var(--red); }
.ds-nav-foot__logout:focus-visible { outline: 2px solid var(--grn); outline-offset: 2px; }

/* ===== BottomNav ===== */
.ds-bottom-nav {
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); background: var(--thead);
    border-top: 1px solid var(--line); padding: 6px 4px 10px; font-family: var(--font-sans);
}
.ds-bottom-nav__item {
    min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    font: inherit; font-size: 11px; color: var(--dim); background: none; border: 0; cursor: pointer; text-decoration: none;
}
.ds-bottom-nav__item svg { flex: none; }
.ds-bottom-nav__item:focus-visible { outline: 2px solid var(--grn); outline-offset: -2px; }
.ds-bottom-nav__item--active { color: var(--grn); font-weight: 600; }
.ds-bottom-nav--fixed { display: none; }
@media (max-width: 760px) {
    .ds-bottom-nav--fixed { display: grid; position: fixed; left: 0; right: 0; bottom: 0; z-index: 990; padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
}

/* ===== Button ===== */
.ds-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 12px;
    background: var(--panel2); border: 1px solid var(--ctl-line); border-radius: var(--radius-control, 8px);
    color: var(--tx); font-family: var(--font-sans); font-size: 13px; line-height: 1; cursor: pointer;
    text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, color .15s;
}
.ds-btn:hover { background: var(--elev); }
.ds-btn:focus-visible { outline: 2px solid var(--grn); outline-offset: 2px; }
.ds-btn:active { background: var(--panel); }
.ds-btn--primary { background: var(--grn); border-color: var(--grn); color: var(--on-grn); font-weight: 600; }
.ds-btn--primary:hover { background: var(--grn-hover); border-color: var(--grn-hover); }
.ds-btn--primary:active { background: var(--grn); }
.ds-btn--ghost { background: none; border-color: transparent; color: var(--dim); }
.ds-btn--ghost:hover { background: var(--panel2); color: var(--tx); }
.ds-btn--dashed { background: none; border-style: dashed; color: var(--dim); }
.ds-btn--dashed:hover { background: var(--panel2); color: var(--tx); }
.ds-btn--icon { width: 36px; padding: 0; color: var(--dim); }
.ds-btn--icon:hover { color: var(--tx); }
.ds-btn--lg { min-height: 44px; padding: 0 16px; }
.ds-btn--block { display: flex; width: 100%; }
.ds-btn--sm { min-height: 30px; padding: 0 10px; font-size: 12px; }
.ds-btn--static { cursor: default; pointer-events: none; }
.ds-btn:disabled, .ds-btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; pointer-events: none; }
/* Иконка в плотной таблице на десктопе: компактная, чтобы не раздувать строку. */
@media (min-width: 761px) {
    .ds-btn--icon.ds-btn--sm { width: 28px; min-height: 20px; }
}
@media (max-width: 760px) {
    .ds-btn { min-height: 44px; }
    .ds-btn--icon { width: 44px; }
}

/* ===== Pagination ===== */
.ds-pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 16px; }
.ds-pagination__btn {
    padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--radius-pager, 6px);
    background: var(--panel2); color: var(--tx); font-family: var(--font-sans); font-size: 13px; cursor: pointer;
}
.ds-pagination__btn:hover { border-color: var(--grn); }
.ds-pagination__btn:focus-visible { outline: 2px solid var(--grn); outline-offset: 2px; }
.ds-pagination__btn--active { background: var(--grn); color: var(--on-grn); border-color: var(--grn); font-weight: 600; }
.ds-pagination__btn:disabled { opacity: .5; cursor: not-allowed; }
@media (max-width: 760px) { .ds-pagination__btn { min-height: 44px; } }

/* ===== Field ===== */
.ds-field { display: flex; align-items: center; gap: 6px; color: var(--dim); font-family: var(--font-sans); font-size: 13px; }
.ds-field--stack { flex-direction: column; align-items: stretch; gap: 6px; }
.ds-field__label { font-size: 11px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; color: var(--faint); }
.ds-field__input {
    min-width: 0; min-height: 36px; padding: 0 8px; background: var(--panel2); color: var(--tx);
    border: 1px solid var(--ctl-line); border-radius: var(--radius-control, 8px); font: inherit; font-size: 13px;
}
.ds-field__input::placeholder { color: var(--faint); }
.ds-field__input:hover { border-color: var(--dim); }
.ds-field__input:focus-visible { outline: 2px solid var(--grn); outline-offset: 1px; border-color: var(--grn); }
.ds-field__input:disabled { opacity: .5; cursor: not-allowed; }
.ds-field__input--num { width: 72px; }
.ds-field__input--area { padding: 8px; min-height: 85px; resize: vertical; }
.ds-field__input[aria-invalid="true"] { border-color: var(--red); }
/* Поле даты: без appearance iOS не даёт ему высоту и рисует ниже соседних полей. */
.ds-field__input[type="date"], .ds-field__input[type="time"], .ds-field__input[type="datetime-local"] {
    -webkit-appearance: none; appearance: none; display: flex; align-items: center; text-align: left;
}
.ds-field__input::-webkit-date-and-time-value { text-align: left; }
/* Поле с приставкой («от», «этаж от», «с»): рамка и фокус — у обёртки, внутренний input без своей рамки. */
.ds-field__affix {
    display: flex; align-items: center; min-width: 0; min-height: 36px; background: var(--panel2);
    border: 1px solid var(--ctl-line); border-radius: var(--radius-control, 8px); font-family: var(--font-sans);
}
.ds-field__affix > span { flex: none; padding-left: 10px; font-size: 12px; color: var(--dim); }
.ds-field__affix .ds-field__input { flex: 1; min-height: 0; border: 0; background: transparent; outline: none; }
.ds-field__affix .ds-field__input:focus-visible { outline: none; }
.ds-field__affix:hover { border-color: var(--dim); }
.ds-field__affix:focus-within { border-color: var(--grn); outline: 2px solid var(--grn); outline-offset: 1px; }
@media (max-width: 760px) {
    .ds-field__input { min-height: 44px; }
    .ds-field__input--num { width: 96px; }
    /* 16 px — iOS не увеличивает страницу при фокусе. */
    .ds-field__input { font-size: 16px; }
    .ds-field__affix { min-height: 48px; }
    .ds-field__affix > span { padding-left: 14px; }
    /* Высота — у обёртки: правило шторки (48 px у input) внутри приставки не должно раздувать её. */
    .ds-sheet .ds-field__affix input.ds-field__input, .ds-filter-bar--collapsible .ds-field__affix input.ds-field__input, .ds-field__affix input.ds-field__input { min-height: 46px; }
}

/* ===== Checkbox ===== */
.ds-checkbox { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; color: var(--dim); font-family: var(--font-sans); font-size: 13px; cursor: pointer; }
.ds-checkbox__input {
    flex: none; width: 18px; height: 18px; margin: 0; appearance: none; -webkit-appearance: none; position: relative;
    border: 2px solid var(--faint); border-radius: 4px; background: var(--panel2); cursor: pointer;
}
.ds-checkbox__input:checked { background: var(--grn); border-color: var(--grn); }
.ds-checkbox__input:checked::after { content: "✓"; position: absolute; inset: -4px 0 0; color: var(--on-grn); text-align: center; font-size: 14px; font-weight: 800; }
.ds-checkbox__input:focus-visible { outline: 2px solid var(--grn); outline-offset: 2px; }
.ds-checkbox__input:disabled { opacity: .5; cursor: not-allowed; }
@media (max-width: 760px) { .ds-checkbox { min-height: 44px; } }

/* ===== SegmentToggle ===== */
.ds-segment { display: flex; gap: 4px; }
.ds-segment__btn {
    min-width: 40px; min-height: 36px; padding: 0 14px; background: var(--panel2); border: 1px solid var(--ctl-line);
    border-radius: var(--radius-control, 8px); color: var(--tx); font-family: var(--font-sans); font-size: 13px; cursor: pointer;
}
.ds-segment__btn:hover { border-color: var(--dim); }
.ds-segment__btn:focus-visible { outline: 2px solid var(--grn); outline-offset: 2px; }
.ds-segment__btn:disabled { opacity: .5; cursor: not-allowed; }
.ds-segment__btn[aria-pressed="true"] { color: var(--grn); border-color: var(--grn); background: var(--tint-grn); }
@media (max-width: 760px) { .ds-segment__btn { min-height: 44px; flex: 1; } }

/* ===== Chip ===== */
.ds-chip {
    display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px; border-radius: var(--radius-pill, 999px);
    background: var(--panel2); color: var(--tx); border: 1px solid var(--ctl-line); font-family: var(--font-sans); font-size: 13px; cursor: pointer;
}
.ds-chip:hover { border-color: var(--dim); }
.ds-chip:focus-visible { outline: 2px solid var(--grn); outline-offset: 2px; }
.ds-chip[aria-pressed="true"] { color: var(--grn); border-color: var(--grn); background: var(--tint-grn); }
.ds-chip__count { color: var(--faint); margin-left: 4px; font-size: inherit; }
.ds-chip--pending { opacity: .55; }
@media (max-width: 760px) { .ds-chip { min-height: 44px; } }

/* ===== Tabs ===== */
.ds-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.ds-tab {
    min-height: 44px; padding: 0 16px; background: none; border: 0; border-bottom: 2px solid transparent;
    color: var(--dim); font-family: var(--font-sans); font-size: 14px; cursor: pointer; white-space: nowrap;
}
.ds-tab:hover { color: var(--tx); }
.ds-tab:focus-visible { outline: 2px solid var(--grn); outline-offset: -2px; }
.ds-tab[aria-selected="true"] { border-bottom-color: var(--grn); color: var(--tx); font-weight: 600; }
.ds-tab--warn { color: var(--amb); }
.ds-tab--warn:hover { color: var(--amb); }
.ds-tab__count { margin-left: 4px; color: var(--dim); font-weight: 400; font-size: inherit; }
@media (max-width: 760px) { .ds-tab { padding: 0 12px; } }

/* ===== TabBar ===== */
.ds-tabbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.ds-tabbar__btn {
    padding: 9px 15px; border: 1px solid var(--line); border-radius: var(--radius-tabbar, 9px);
    background: var(--panel2); color: var(--dim); font-family: var(--font-sans); font-size: 13px; font-weight: 500; cursor: pointer;
}
.ds-tabbar__btn:hover:not(.ds-tabbar__btn--active) { color: var(--tx); }
.ds-tabbar__btn:focus-visible { outline: 2px solid var(--grn); outline-offset: 2px; }
.ds-tabbar__btn--active { background: var(--grn); color: var(--on-grn); border-color: var(--grn); font-weight: 600; }
@media (max-width: 760px) { .ds-tabbar__btn { min-height: 44px; padding: 8px 13px; } }

/* ===== FilterBar ===== */
.ds-filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 10px 0 14px; }
.ds-filter-bar__grow { flex: 1; }
.ds-filter-bar__open { display: none; }
.ds-filter-bar > .ds-sheet__head { display: none; }
.ds-filter-bar.ds-sheet--open > .ds-sheet__head { display: flex; }
@media (max-width: 760px) {
    .ds-filter-bar--collapsible { display: none; }
    /* Круглая кнопка в правом нижнем углу над нижней панелью: широкая пилюля
       перекрывала цифры последней видимой карточки. Подпись остаётся в DOM
       для чтения с экрана, число активных фильтров — бейджем. */
    .ds-filter-bar__open {
        display: flex; align-items: center; justify-content: center; position: fixed; right: 16px; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 980;
        width: 56px; height: 56px; padding: 0; border: 0; border-radius: 50%; background: var(--grn); color: var(--on-grn);
        font-family: var(--font-sans); cursor: pointer; box-shadow: var(--shadow-overlay, 0 8px 28px rgba(0,0,0,.5));
    }
    .ds-filter-bar__open:focus-visible { outline: 2px solid var(--tx); outline-offset: 2px; }
    .ds-filter-bar__icon { width: 22px; height: 22px; }
    .ds-filter-bar__open-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .ds-filter-bar__count {
        position: absolute; top: -4px; right: -4px; min-width: 22px; height: 22px; padding: 0 6px; box-sizing: border-box; border-radius: 11px;
        background: var(--tx); color: var(--bg); font: 700 12px/22px var(--font-mono); text-align: center;
    }
    .ds-filter-bar__count[hidden] { display: none; }
    .ds-filter-bar__grow { display: none; }
}

/* ===== BottomSheet ===== */
.ds-sheet-overlay { display: none; position: fixed; inset: 0; background: var(--scrim); z-index: 1119; }
.ds-sheet-overlay--open { display: block; }
.ds-sheet {
    display: none; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 14px; max-height: 82vh; overflow: auto;
    background: var(--panel); border-top: 1px solid var(--line); border-radius: 18px 18px 0 0; padding: 18px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1120; margin: 0; font-family: var(--font-sans);
}
.ds-sheet--open { display: flex; }
.ds-sheet, .ds-drawer, .ds-drawer__body { overscroll-behavior: contain; }
.ds-sheet--inline { display: flex; position: relative; left: auto; right: auto; bottom: auto; max-height: none; border: 1px solid var(--line); }
.ds-sheet__head { display: flex; justify-content: space-between; align-items: center; }
.ds-sheet__title { font-size: 17px; font-weight: 700; color: var(--tx); }

/* ===== ScopePicker ===== */
/* Телефон: город и категория — пилюли со шторкой выбора вместо нативных select, сделка — SegmentToggle. */
.ds-scope { display: flex; align-items: center; gap: 6px; min-width: 0; }
.ds-scope__pill {
    display: inline-flex; align-items: center; gap: 6px; min-width: 0; min-height: 40px; padding: 0 12px 0 14px;
    border-radius: var(--radius-pill, 999px); border: 1px solid var(--ctl-line); background: var(--panel2); color: var(--tx);
    font-family: var(--font-sans); font-size: 13px; font-weight: 600; white-space: nowrap; cursor: pointer;
}
.ds-scope__pill > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ds-scope__pill::after { content: "▾"; flex: none; color: var(--dim); font-size: 11px; }
.ds-scope__pill:hover { border-color: var(--dim); }
.ds-scope__pill:focus-visible { outline: 2px solid var(--grn); outline-offset: 2px; }
.ds-scope__pill[aria-expanded="true"] { color: var(--grn); border-color: var(--grn); background: var(--tint-grn); }
.ds-scope__pill:disabled { cursor: default; opacity: 1; }
.ds-scope__pill:disabled::after { content: none; }
.ds-scope .ds-segment { flex: 1; min-width: 0; }
.ds-scope .ds-segment__btn { padding: 0 8px; }
.ds-option-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius-panel, 12px); overflow: hidden; }
.ds-option {
    display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 0 14px;
    border: 0; border-bottom: 1px solid var(--line2); background: transparent; color: var(--tx); font-family: var(--font-sans); font-size: 14px;
    text-align: left; cursor: pointer;
}
.ds-option:last-child { border-bottom: 0; }
.ds-option:hover { background: var(--panel2); }
.ds-option:focus-visible { outline: 2px solid var(--grn); outline-offset: -2px; }
.ds-option[aria-checked="true"] { color: var(--grn); font-weight: 600; }
.ds-option[aria-checked="true"]::after { content: "✓"; }
@media (max-width: 760px) { .ds-scope__pill { min-height: 44px; } }

/* ===== Picker ===== */
/* Телефон: select в шторке заменяется полем-кнопкой; список значений — та же шторка ds-option-list, что у ScopePicker.
   iOS не даёт нативному select высоту min-height: в шторке он сжимался до ~20 px рядом с полями 44 px. */
.ds-picker { display: none; }
.ds-sheet--top { z-index: 1131; }
.ds-sheet-overlay--top { z-index: 1130; }
@media (max-width: 760px) {
    .ds-picker {
        display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 48px; padding: 0 14px;
        box-sizing: border-box; border: 1px solid var(--ctl-line); border-radius: var(--radius-control, 8px); background: var(--panel2);
        color: var(--tx); font-family: var(--font-sans); font-size: 16px; text-align: left; cursor: pointer;
    }
    .ds-picker > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .ds-picker::after { content: "▾"; flex: none; color: var(--dim); font-size: 12px; }
    .ds-picker:focus-visible { outline: 2px solid var(--grn); outline-offset: 1px; }
    .ds-picker[aria-expanded="true"] { border-color: var(--grn); }
    .ds-picker:disabled { opacity: .5; cursor: not-allowed; }
    .ds-picker-native { display: none !important; }
    /* Сортировка — не поле формы: только значок ⇅ 44×44, без рамки; выбранное видно в списке по тапу, подпись — в aria-label. */
    .ds-picker--sort {
        width: 44px; min-width: 44px; min-height: 44px; padding: 0; gap: 0; border: 0; background: transparent;
        color: var(--dim); justify-content: center; flex: none;
    }
    .ds-picker--sort::after { content: none; }
    .ds-picker--sort > svg { flex: none; width: 18px; height: 18px; }
    .ds-picker--sort > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .ds-picker--sort[aria-expanded="true"] { color: var(--grn); }
    /* Поля ввода в шторке — той же высоты, что Picker; 16 px не даёт iOS увеличивать страницу при фокусе. */
    .ds-sheet input.ds-field__input, .ds-filter-bar--collapsible input.ds-field__input { min-height: 48px; font-size: 16px; }
}

/* ===== Drawer: компактная шапка ===== */
/* Одна строка: «назад/закрыть» слева, короткий заголовок и подпись (ID) по центру, действия справа. */
.ds-drawer__bar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.ds-drawer__bar-title { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ds-drawer__bar-title > b { font-size: 14px; font-weight: 600; color: var(--tx); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-drawer__bar-title > span { font-family: var(--font-mono); font-size: 11.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-drawer__bar-actions { display: flex; gap: 8px; }

/* ===== Disclosure ===== */
/* Компактная строка-раскрывашка: подпись и краткий итог в одну строку, подробности — по тапу. */
.ds-disclosure { border: 1px solid var(--line); border-radius: var(--radius-panel, 12px); background: var(--panel); overflow: hidden; }
.ds-disclosure + .ds-disclosure { margin-top: 8px; }
.ds-disclosure__head {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; min-height: 52px;
    padding: 8px 14px; border: 0; background: transparent; color: var(--tx); font-family: var(--font-sans); text-align: left; cursor: pointer;
}
.ds-disclosure__head:focus-visible { outline: 2px solid var(--grn); outline-offset: -2px; }
.ds-disclosure__title { font-size: 14px; font-weight: 600; white-space: nowrap; }
.ds-disclosure__summary { min-width: 0; font-size: 12.5px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right; }
.ds-disclosure__head::after { content: "›"; color: var(--dim); font-size: 18px; line-height: 1; transition: transform .15s; }
.ds-disclosure__head[aria-expanded="true"]::after { transform: rotate(90deg); }
.ds-disclosure__body { padding: 0 14px 14px; display: flex; flex-direction: column; gap: 10px; }
.ds-disclosure__body[hidden] { display: none; }
.ds-disclosure--accent .ds-disclosure__title { color: var(--grn); }
.ds-disclosure--info .ds-disclosure__title { color: var(--blu); }

/* ===== Lightbox ===== */
/* Просмотр фото на весь экран: тап по миниатюре или галерее, свайп и стрелки листают, увеличение — жестом. */
.ds-lightbox { display: none; position: fixed; inset: 0; z-index: 1200; background: var(--bg); flex-direction: column; font-family: var(--font-sans); }
.ds-lightbox--open { display: flex; }
.ds-lightbox__top {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: calc(8px + env(safe-area-inset-top)) 12px 8px; color: var(--tx);
}
.ds-lightbox__count { font-family: var(--font-mono); font-size: 13px; color: var(--dim); }
.ds-lightbox__stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; touch-action: pinch-zoom; overscroll-behavior: contain; }
.ds-lightbox__img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.ds-lightbox__nav {
    position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
    border: 0; border-radius: 50%; background: var(--scrim-strong); color: var(--tx); cursor: pointer;
}
.ds-lightbox__nav--prev { left: 12px; }
.ds-lightbox__nav--next { right: 12px; }
.ds-lightbox__nav:disabled { opacity: .35; cursor: default; }
.ds-lightbox__nav:focus-visible, .ds-lightbox__close:focus-visible { outline: 2px solid var(--grn); outline-offset: 2px; }
.ds-lightbox__close {
    width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--ctl-line);
    border-radius: var(--radius-control, 8px); background: var(--panel2); color: var(--tx); cursor: pointer;
}
.ds-lightbox__thumbs { display: flex; gap: 6px; padding: 8px 12px calc(10px + env(safe-area-inset-bottom)); overflow-x: auto; }
.ds-lightbox__thumb { flex: none; width: 56px; height: 42px; padding: 0; border: 2px solid transparent; border-radius: 6px; overflow: hidden; background: var(--elev); cursor: pointer; }
.ds-lightbox__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ds-lightbox__thumb[aria-current="true"] { border-color: var(--grn); }
@media (max-width: 760px) { .ds-lightbox__nav { display: none; } }

/* ===== Card ===== */
.ds-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-card, 14px); padding: 16px; font-family: var(--font-sans); }
.ds-card__title { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--tx); }
.ds-card__sub { margin: 0 0 8px; font-size: 11px; color: var(--faint); }
.ds-card--warn { background: var(--tint-amb); border-color: var(--line-amb); }
.ds-card--inset { background: var(--panel2); border-radius: var(--radius-control, 8px); padding: 12px; }
.ds-card--accent, .ds-card--info, .ds-card--vio {
    background: var(--fill-grn); border: 0; border-left: 3px solid var(--grn); border-radius: var(--radius-control, 8px); padding: 12px;
}
.ds-card--info { background: var(--fill-blu); border-left-color: var(--blu); }
.ds-card--vio { background: var(--panel2); border-left-color: var(--vio); }
.ds-card__title--row { display: flex; align-items: center; gap: 7px; min-width: 0; }

/* ===== KpiTile ===== */
.ds-kpi {
    display: block; width: 100%; text-align: left; background: var(--panel); border: 1px solid var(--line);
    border-radius: var(--radius-card, 14px); padding: 15px 16px 8px; color: var(--tx); font-family: var(--font-sans); min-width: 0;
}
.ds-kpi__label { display: block; font-size: 11px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; color: var(--faint); margin-bottom: 4px; }
.ds-kpi__value { display: block; margin: 8px 0 4px; font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 27px; font-weight: 600; color: var(--tx); overflow-wrap: anywhere; }
.ds-kpi__delta { display: block; font-size: 12px; font-weight: 600; }
.ds-kpi__note { display: block; color: var(--dim); font-size: 12.5px; overflow-wrap: anywhere; }
.ds-kpi--tile { border-radius: var(--radius-panel, 12px); padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.ds-kpi--tile .ds-kpi__label { margin: 0; font-size: 12px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--dim); }
.ds-kpi--tile .ds-kpi__value { margin: 0; font-size: 22px; }
.ds-kpi--mini { background: var(--panel2); border-radius: var(--radius-control, 8px); padding: 10px 8px; text-align: center; }
.ds-kpi--mini .ds-kpi__label { display: flex; align-items: center; justify-content: center; gap: 2px; margin: 0; font-size: 11px; font-weight: 400; letter-spacing: 0; text-transform: none; }
.ds-kpi--mini .ds-kpi__value { margin: 2px 0 0; font-size: 15px; }
.ds-kpi--warn { border-color: var(--line-amb); }
.ds-kpi--warn .ds-kpi__label { color: var(--amb); }
.ds-kpi--action { cursor: pointer; }
.ds-kpi--action:hover { background: var(--panel2); }
.ds-kpi--action:focus-visible { outline: 2px solid var(--grn); outline-offset: 2px; }
.ds-kpi--action:disabled { cursor: default; background: var(--panel); }
.ds-kpi-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 760px) {
    .ds-kpi-grid { display: flex; overflow-x: auto; gap: 8px; scrollbar-width: none; }
    .ds-kpi-grid > .ds-kpi { flex: 0 0 72%; }
    .ds-kpi--tile { padding: 10px 14px; }
    .ds-kpi--tile .ds-kpi__value { font-size: 18px; }
    .ds-kpi__value { font-size: 22px; }
}

/* ===== Badge ===== */
.ds-badge { display: inline-block; font-family: var(--font-sans); font-size: 11px; font-weight: 600; letter-spacing: .3px; border-radius: var(--radius-badge, 5px); padding: 2px 8px; }
.ds-badge--grn { color: var(--grn); background: var(--fill-grn); }
.ds-badge--blu { color: var(--blu); background: var(--fill-blu); border: 1px solid var(--line-blu); }
.ds-badge--amb { color: var(--amb); background: var(--fill-amb); }
.ds-badge--red { color: var(--red); background: var(--fill-red); }
.ds-badge--dim { color: var(--dim); background: var(--fill-dim); }

/* ===== Tag ===== */
.ds-tag {
    display: inline-block; font-family: var(--font-sans); font-size: 11.5px; padding: 2px 8px; border-radius: var(--radius-pill, 999px);
    border: 1px solid var(--ctl-line); color: var(--dim); white-space: nowrap;
}
.ds-tag--lead { color: var(--tx); }
.ds-tag--fresh { border-color: var(--up); color: var(--up); }
.ds-tag--warn { border-color: var(--amb); color: var(--amb); }
.ds-tag--work { border-color: var(--grn); color: var(--grn); }
.ds-tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* ===== Num ===== */
.ds-num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.ds-num--pos { color: var(--grn); }
.ds-num--neg { color: var(--red); }
.ds-num--up { color: var(--up); }
.ds-num--down { color: var(--down); }
.ds-num--dim { color: var(--dim); }
.ds-num--strong { font-weight: 600; }

/* Num: текстовые строки (не mono) */
.ds-text { margin: 0; font-family: var(--font-sans); font-size: 13px; line-height: 1.45; color: var(--dim); }
.ds-text--sm { font-size: 12px; }
.ds-text--tx { color: var(--tx); }
.ds-text--pos { color: var(--grn); }
.ds-text--neg { color: var(--red); }
.ds-text--warn { color: var(--amb); }
.ds-text--down { color: var(--down); }
.ds-text--faint { color: var(--faint); }
.ds-text--center { text-align: center; }
.ds-text--strong { font-weight: 600; }
.ds-text--pre { white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }

/* ===== Table ===== */
.ds-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-panel, 12px); }
.ds-table { width: 100%; min-width: 700px; border-collapse: collapse; background: transparent; font-family: var(--font-sans); }
.ds-table th, .ds-table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line2); font-size: 12.5px; white-space: nowrap; }
.ds-table th { background: var(--thead); font-size: 11px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase; color: var(--faint); }
.ds-table td { color: var(--tx); }
.ds-table tbody tr:hover td { background: var(--panel2); }
.ds-table tbody tr:last-child td { border-bottom: 0; }
.ds-table .ds-table__num { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { .ds-table th, .ds-table td { padding: 8px 10px; font-size: 12px; } }

/* Table, переносы и карточки на телефоне */
.ds-table--wrap { min-width: 0; }
.ds-table--wrap th, .ds-table--wrap td { white-space: normal; overflow-wrap: normal; word-break: normal; vertical-align: top; }
.ds-table--wrap .ds-table__nowrap { white-space: nowrap; }
.ds-table__actions { align-items: center; }
.ds-table__actions--row { flex-wrap: nowrap; }
.ds-table__actions { display: flex; flex-wrap: wrap; gap: 6px; }
@media (max-width: 760px) {
    .ds-table--stack { min-width: 0; }
    .ds-table--stack thead { display: none; }
    .ds-table--stack, .ds-table--stack tbody, .ds-table--stack tr, .ds-table--stack td { display: block; }
    .ds-table--stack tbody tr { padding: 10px 12px; border-bottom: 1px solid var(--line2); }
    .ds-table--stack tbody tr:last-child { border-bottom: 0; }
    .ds-table--stack tbody tr:hover td { background: transparent; }
    .ds-table--stack td { display: block; padding: 3px 0; border-bottom: 0; white-space: normal; }
    .ds-table--stack td[data-label] { display: flex; gap: 10px; }
    .ds-table--stack td[data-label]::before { content: attr(data-label); flex: 0 0 38%; max-width: 38%; color: var(--faint); font-size: 11px; text-transform: uppercase; letter-spacing: .3px; }
    .ds-table--stack .ds-table__hide-sm { display: none; }
    .ds-table--stack-row tbody tr { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
    .ds-table--stack-row td { padding: 0; }
    .ds-table--stack-row .ds-table__full { flex: 0 0 100%; }
    .ds-table--stack td:empty { display: none; }
    .ds-table--stack .ds-table__actions, .ds-table--stack .ds-table__actions--row { width: 100%; flex-wrap: wrap; margin-top: 6px; }
    .ds-table--stack .ds-table__actions .ds-btn { flex: 1 1 40%; min-height: 44px; }
    .ds-table--stack .ds-table__actions .ds-btn--icon { flex: 0 0 44px; }
    .ds-table--stack .ds-switch--compact { min-height: 44px; }
}

/* ===== DataRow ===== */
.ds-data-list { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-panel, 12px); overflow: hidden; font-family: var(--font-sans); }
.ds-data-list__head, .ds-data-row {
    display: grid; grid-template-columns: 76px minmax(0, 2.4fr) 1fr 1fr 1.1fr .9fr 1.5fr 1.4fr 132px; gap: 14px; align-items: center; padding: 12px 16px;
}
.ds-data-list__head { background: var(--thead); color: var(--faint); font-size: 12px; letter-spacing: .3px; padding-top: 10px; padding-bottom: 10px; text-transform: uppercase; }
.ds-data-row { border-top: 1px solid var(--line2); cursor: pointer; }
.ds-data-row:hover { background: var(--panel2); }
.ds-data-row:focus-visible { outline: 2px solid var(--grn); outline-offset: -2px; }
.ds-data-row__thumb {
    width: 76px; height: 56px; border-radius: var(--radius-control, 8px); background: var(--elev); overflow: hidden;
    display: flex; align-items: center; justify-content: center; color: var(--faint); font-size: 11px;
}
.ds-data-row__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ds-data-row__obj { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ds-data-row__title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-data-row__meta { color: var(--dim); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-data-row__cell { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 13px; }
.ds-data-row__cell--profit { font-weight: 600; color: var(--grn); }
.ds-data-row__cell--dim { color: var(--dim); }
.ds-data-row__text { color: var(--dim); font-size: 12.5px; overflow-wrap: anywhere; }
.ds-data-row__warn { color: var(--amb); font-size: 12.5px; }
.ds-data-row__act { display: flex; gap: 6px; justify-content: flex-end; }
.ds-data-row__mobile { display: none; }
.ds-data-list__foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line2); color: var(--dim); font-size: 13px; }
@media (max-width: 760px) {
    .ds-data-list { background: none; border: 0; overflow: visible; display: flex; flex-direction: column; gap: 10px; }
    .ds-data-list__head { display: none; }
    .ds-data-row { grid-template-columns: 76px minmax(0, 1fr); gap: 10px 12px; padding: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-panel, 12px); }
    .ds-data-row__desktop { display: none; }
    .ds-data-row__thumb { width: 76px; height: 76px; grid-row: 1; }
    .ds-data-row__mobile { display: block; }
    .ds-data-row__line { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
    .ds-data-row__profit { font-family: var(--font-mono); font-size: 18px; font-weight: 600; color: var(--grn); }
    .ds-data-row__signal { grid-column: 1 / -1; color: var(--amb); font-size: 12.5px; }
    .ds-data-list__foot { border: 1px solid var(--line); border-radius: var(--radius-panel, 12px); background: var(--panel); }
}

/* ===== ReliabilityMeter ===== */
.ds-reliability { display: flex; flex-direction: column; gap: 5px; min-width: 0; font-family: var(--font-sans); }
.ds-meter { display: flex; gap: 3px; }
.ds-meter i { display: block; width: 22px; height: 6px; border-radius: 3px; background: var(--ctl-line); }
.ds-meter--high i.on { background: var(--grn); }
.ds-meter--mid i.on { background: var(--up); }
.ds-meter--low i.on { background: var(--amb); }
.ds-reliability__text { color: var(--dim); font-size: 12.5px; overflow-wrap: anywhere; }
.ds-reliability--row { flex-direction: row; align-items: center; gap: 6px; }

/* ===== FlowBar ===== */
.ds-flow { display: grid; grid-template-columns: 170px minmax(0, 1fr) 92px; gap: 8px 12px; align-items: center; font-family: var(--font-sans); }
.ds-flow__label { color: var(--tx); font-size: 13px; }
.ds-flow__label small { display: block; color: var(--faint); font-size: 11.5px; }
.ds-flow__bar { height: 10px; background: var(--panel2); border-radius: var(--radius-badge, 5px); overflow: hidden; }
.ds-flow__fill { display: block; height: 10px; border-radius: var(--radius-badge, 5px); background: var(--amb); }
.ds-flow__fill--in { background: var(--up); }
.ds-flow__fill--total { background: var(--grn); }
.ds-flow__value { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 13px; text-align: right; }
.ds-flow__value--total { color: var(--grn); font-weight: 600; }
@media (max-width: 760px) {
    .ds-flow { grid-template-columns: minmax(0, 1fr) 84px; grid-auto-flow: row dense; row-gap: 4px; }
    .ds-flow__label { grid-column: 1; margin-top: 6px; }
    .ds-flow__value { grid-column: 2; margin-top: 6px; }
    .ds-flow__bar { grid-column: 1 / -1; }
}

/* FlowBar, вариант «список с раскрытием»: строка региона раскрывает вложенный блок */
.ds-flow-list { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-panel, 12px); overflow: hidden; font-family: var(--font-sans); }
.ds-flow-list__row + .ds-flow-list__row { border-top: 1px solid var(--line2); }
.ds-flow-list__head { display: grid; grid-template-columns: 170px minmax(0, 1fr) 92px; gap: 12px; align-items: center; width: 100%; min-height: 44px; padding: 8px 16px; background: transparent; border: 0; color: var(--tx); font: inherit; text-align: left; cursor: pointer; }
.ds-flow-list__head:hover, .ds-flow-list__head[aria-expanded="true"] { background: var(--panel2); }
.ds-flow-list__head:focus-visible { outline: 2px solid var(--grn); outline-offset: -2px; }
.ds-flow-list__more { padding: 4px 16px 14px; background: var(--panel2); }
.ds-flow-list__more[hidden] { display: none; }
@media (max-width: 760px) {
    .ds-flow-list__head { grid-template-columns: minmax(0, 1fr) 84px; row-gap: 4px; padding: 8px 12px; }
    .ds-flow-list__head .ds-flow__bar { grid-column: 1 / -1; }
    .ds-flow-list__more { padding: 4px 12px 12px; }
}

/* ===== Tooltip ===== */
.ds-tip {
    display: inline-block; width: 16px; height: 16px; border-radius: 50%; background: var(--elev); color: var(--dim);
    font-family: var(--font-sans); font-size: 10px; font-weight: 700; text-align: center; line-height: 16px;
    cursor: help; margin-left: 4px; vertical-align: middle; flex-shrink: 0;
}
.ds-tip:hover { color: var(--tx); }
.ds-tip:focus-visible { outline: 2px solid var(--grn); outline-offset: 2px; }
.ds-tooltip {
    display: inline-block; max-width: 260px; padding: 8px 12px; background: var(--elev); color: var(--tx); border: 1px solid var(--line);
    border-radius: var(--radius-control, 8px); font-family: var(--font-sans); font-size: 12px; line-height: 1.5; box-shadow: var(--shadow-overlay, 0 8px 28px rgba(0,0,0,.5));
}

/* ===== Note ===== */
.ds-note {
    background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-note, 10px); padding: 10px 14px;
    color: var(--dim); font-family: var(--font-sans); font-size: 13px; line-height: 1.5; margin: 10px 0;
}
.ds-note--warn { background: var(--tint-amb); border-color: var(--line-amb); color: var(--amb); }
.ds-note--error { background: var(--fill-red); border-color: transparent; color: var(--red); }

/* ===== EmptyState ===== */
.ds-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 140px; padding: 16px; text-align: center; color: var(--faint); font-family: var(--font-sans); font-size: 14px; }
.ds-empty__title { color: var(--tx); font-size: 15px; font-weight: 600; }
.ds-empty__text { color: var(--dim); font-size: 13px; max-width: 420px; }

/* ===== Toast ===== */
.ds-toast {
    display: none; align-items: center; flex-wrap: wrap; gap: 6px 8px; max-width: calc(100vw - 24px); padding: 10px 14px;
    background: var(--elev); border: 1px solid var(--ctl-line); border-radius: var(--radius-panel, 12px);
    box-shadow: var(--shadow-overlay, 0 8px 28px rgba(0,0,0,.5)); color: var(--tx); font-family: var(--font-sans); font-size: 13px;
    position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 1300;
}
.ds-toast--open { display: flex; }
.ds-toast--inline { display: inline-flex; position: relative; left: auto; bottom: auto; transform: none; }
.ds-toast--ok { border-left: 3px solid var(--grn); }
.ds-toast--err { border-left: 3px solid var(--red); }
.ds-toast__copy { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.ds-toast__title { display: block; margin-bottom: 3px; font-size: 12px; font-weight: 700; color: var(--tx); }
.ds-toast__text { display: block; font-size: 12px; color: var(--dim); }
.ds-toast__btn {
    min-height: 32px; padding: 0 10px; border-radius: var(--radius-pill, 999px); background: var(--panel2); border: 1px solid var(--ctl-line);
    color: var(--tx); font-family: var(--font-sans); font-size: 12.5px; cursor: pointer;
}
.ds-toast__btn:hover { border-color: var(--dim); }
.ds-toast__btn:focus-visible { outline: 2px solid var(--grn); outline-offset: 2px; }
.ds-toast__btn--on { border-color: var(--grn); color: var(--grn); }
.ds-toast__btn--undo { background: none; border: 0; color: var(--grn); font-weight: 600; }
@media (max-width: 760px) { .ds-toast:not(.ds-toast--inline) { bottom: calc(150px + env(safe-area-inset-bottom)); } }

/* ===== Drawer ===== */
.ds-scrim { display: none; position: fixed; inset: 0; background: var(--scrim); z-index: 1099; }
.ds-scrim--open { display: block; }
.ds-drawer {
    display: none; flex-direction: column; position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); z-index: 1100;
    background: var(--panel); border-left: 1px solid var(--line); color: var(--tx); font-family: var(--font-sans); box-shadow: var(--shadow-drawer, -4px 0 24px rgba(0,0,0,.5));
}
.ds-drawer--open { display: flex; }
.ds-drawer--inline { display: flex; position: relative; top: auto; right: auto; bottom: auto; width: 100%; max-width: 560px; border: 1px solid var(--line); border-radius: var(--radius-panel, 12px); }
.ds-drawer__head { padding: 22px 24px 18px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.ds-drawer__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.ds-drawer__title { margin: 0; font-size: 21px; font-weight: 600; overflow-wrap: anywhere; }
.ds-drawer__sub { margin-top: 4px; color: var(--dim); }
.ds-drawer__close { width: 40px; height: 40px; flex: none; background: var(--panel2); border: 1px solid var(--ctl-line); border-radius: var(--radius-control, 8px); color: var(--dim); cursor: pointer; }
.ds-drawer__close:hover { color: var(--tx); }
.ds-drawer__close:focus-visible { outline: 2px solid var(--grn); outline-offset: 2px; }
.ds-drawer__body { padding: 20px 24px; display: flex; flex-direction: column; gap: 22px; flex: 1; min-height: 0; overflow-y: auto; }
.ds-drawer__foot { padding: 16px 24px; border-top: 1px solid var(--line); display: flex; gap: 8px; flex-wrap: wrap; }
.ds-drawer__h { margin-bottom: 10px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 1px; color: var(--faint); text-transform: uppercase; }
.ds-drawer__photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.ds-drawer__photo { height: 96px; border-radius: var(--radius-control, 8px); background: var(--elev); overflow: hidden; display: flex; align-items: center; justify-content: center; color: var(--faint); font-size: 12px; }
.ds-drawer__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ds-drawer__big { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; }
.ds-drawer__big small, .ds-stat small { display: block; color: var(--dim); font-size: 12px; }
.ds-drawer__profit { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 30px; font-weight: 600; color: var(--grn); }
.ds-drawer__roi { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 22px; font-weight: 600; }
.ds-drawer__year { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 16px; color: var(--dim); }
.ds-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ds-stat { background: var(--panel2); border-radius: var(--radius-note, 10px); padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ds-stat b { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 18px; font-weight: 600; overflow-wrap: anywhere; }
@media (max-width: 760px) {
    .ds-drawer:not(.ds-drawer--inline) { width: 100vw; border-left: 0; }
    .ds-drawer__head, .ds-drawer__body, .ds-drawer__foot { padding-left: 16px; padding-right: 16px; }
    .ds-drawer__foot .ds-btn { min-height: 44px; }
}
/* ===== Indicator: загрузка и статус ===== */
.ds-spinner { display: inline-block; flex: none; width: 16px; height: 16px; border: 2px solid var(--line); border-top-color: var(--grn); border-radius: 50%; animation: ds-spin .6s linear infinite; }
.ds-spinner--lg { width: 22px; height: 22px; border-width: 3px; }
.ds-dot { display: inline-block; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--dim); }
.ds-dot--grn { background: var(--grn); }
.ds-dot--blu { background: var(--blu); }
.ds-dot--amb { background: var(--amb); }
.ds-dot--red { background: var(--red); }
.ds-dot--pulse { animation: ds-pulse 2s infinite; }
@keyframes ds-spin { to { transform: rotate(360deg); } }
@keyframes ds-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* ===== Gallery ===== */
.ds-gallery { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--panel2); border: 1px solid var(--line); border-radius: var(--radius-note, 10px); }
.ds-gallery__img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ds-gallery__nav {
    position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: 0; border-radius: 50%;
    background: var(--scrim-strong); color: var(--tx); font-size: 20px; cursor: pointer;
}
.ds-gallery__nav--prev { left: 8px; }
.ds-gallery__nav--next { right: 8px; }
.ds-gallery__nav:focus-visible { outline: 2px solid var(--grn); outline-offset: 2px; }
.ds-gallery__count {
    position: absolute; right: 8px; bottom: 8px; padding: 3px 9px; border-radius: var(--radius-pill, 999px);
    background: var(--scrim-strong); color: var(--tx); font-family: var(--font-mono); font-size: 12px;
}

/* ===== Facts: подпись над значением ===== */
.ds-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ds-facts--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ds-facts--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.ds-facts--auto { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; }
.ds-fact { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-family: var(--font-sans); }
.ds-fact__label { font-size: 11px; letter-spacing: .4px; text-transform: uppercase; color: var(--faint); }
.ds-fact__value { font-size: 14px; color: var(--tx); overflow-wrap: anywhere; }
@media (max-width: 520px) {
    .ds-facts, .ds-facts--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ds-facts--auto { grid-template-columns: none; }
}

/* ===== PriceHistory ===== */
.ds-history { font-family: var(--font-sans); }
.ds-history__row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line2); font-size: 13px; }
.ds-history__date { color: var(--dim); }
.ds-history__price { color: var(--tx); font-weight: 600; }
.ds-history__delta--up { color: var(--up); }
.ds-history__delta--down { color: var(--down); }
.ds-history__delta--first { color: var(--faint); }

/* ===== Modal ===== */
.ds-modal-overlay { display: none; position: fixed; inset: 0; background: var(--scrim); z-index: 1200; }
.ds-modal-overlay--open { display: block; }
.ds-modal {
    display: none; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 380px; max-width: 92vw; padding: 18px 20px; z-index: 1201;
    background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-panel, 12px); box-shadow: var(--shadow-overlay, 0 8px 28px rgba(0,0,0,.5));
    color: var(--tx); font-family: var(--font-sans);
}
.ds-modal--open { display: block; }
.ds-modal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.ds-modal__title { margin: 0; font-size: 15px; font-weight: 600; }
.ds-modal__sub { margin-bottom: 10px; color: var(--dim); font-size: 12px; }
.ds-modal__list { max-height: 240px; overflow: auto; margin-bottom: 10px; padding: 6px 0; border-top: 1px solid var(--line2); border-bottom: 1px solid var(--line2); }
.ds-modal__item { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--radius-control, 8px); font-size: 13px; cursor: pointer; }
.ds-modal__item:hover { background: var(--panel2); }
.ds-modal__item small { color: var(--faint); font-size: 11px; }
.ds-modal__empty { padding: 14px 4px; text-align: center; color: var(--dim); font-size: 13px; }
.ds-modal__row { display: flex; align-items: center; gap: 6px; }
.ds-modal__row .ds-field__input { flex: 1; }
.ds-modal__status { min-height: 16px; margin-top: 8px; color: var(--dim); font-size: 12px; }

@media (prefers-reduced-motion: reduce) {
    .ds-btn, .ds-nav-item { transition: none; }
    .ds-spinner, .ds-dot--pulse { animation: none; }
}

/* этап 2: FilterBar — группы полей, шторка, выбранные значения, поле средней ширины */
.ds-field__input--md { width: 140px; }
.ds-filter-bar__group { display: contents; }
.ds-filter-bar__label { display: none; }
.ds-filter-bar__pair { display: contents; }
.ds-filter-bar__sheet-only { display: none; flex-wrap: wrap; gap: 8px; }
.ds-filter-bar__chips { display: none; }
@media (max-width: 760px) {
    .ds-filter-bar__chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
    .ds-filter-bar__chips:empty { display: none; }
}
.ds-sheet .ds-filter-bar__group { display: flex; flex-direction: column; gap: 6px; }
.ds-sheet .ds-filter-bar__label { display: block; font-size: 11px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; color: var(--faint); }
.ds-sheet .ds-filter-bar__pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ds-sheet .ds-filter-bar__sheet-only { display: flex; }
.ds-sheet .ds-filter-bar__inline-only { display: none; }
.ds-sheet .ds-filter-bar__group .ds-field__input { width: 100%; }

/* этап 2: Table — сортировка по заголовку, строка-ссылка, главная и вторая строка ячейки */
.ds-table th.ds-table__sort { cursor: pointer; user-select: none; }
.ds-table th.ds-table__sort:hover { background: var(--elev); }
.ds-table__sort--asc::after { content: " ▲"; font-size: 10px; color: var(--grn); }
.ds-table__sort--desc::after { content: " ▼"; font-size: 10px; color: var(--grn); }
.ds-table .ds-table__row--link { cursor: pointer; }
.ds-table__main { display: block; max-width: 300px; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.ds-table__sub { display: block; max-width: 300px; overflow: hidden; text-overflow: ellipsis; font-size: 11.5px; font-weight: 400; color: var(--dim); }
.ds-table td.ds-table__cell--clip { max-width: 260px; }

/* этап 2: KpiTile — сетка плиток по ширине экрана */
.ds-kpi-grid--auto { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* этап 2: Map — контейнер Leaflet, подпись, всплывающее окно и панель управления */
.ds-map { position: relative; height: 480px; margin-bottom: 12px; border-radius: var(--radius-control, 8px); overflow: hidden; background: var(--panel2); font-family: var(--font-sans); }
.ds-map__note {
    position: absolute; left: 8px; bottom: 8px; z-index: 1000; padding: 4px 8px; border-radius: var(--radius-pager, 6px);
    background: var(--panel); border: 1px solid var(--line); color: var(--dim); font-size: 12px;
}
.ds-map .leaflet-popup-content-wrapper, .ds-map .leaflet-popup-tip { background: var(--elev); color: var(--tx); }
.ds-map .leaflet-popup-content { margin: 10px 12px; font-size: 12px; line-height: 1.5; }
.ds-map__popup { min-width: 200px; }
.ds-map__popup a { color: var(--blu); }
.ds-map__control {
    max-width: min(260px, calc(100vw - 64px)); padding: 6px; background: var(--panel); border: 1px solid var(--line);
    border-radius: var(--radius-note, 10px); color: var(--tx); box-shadow: var(--shadow-overlay, 0 8px 28px rgba(0,0,0,.5));
}
.ds-map__control-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.ds-map__control-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ds-map__control-hint { margin-top: 6px; font-size: 12px; }
@media (max-width: 760px) {
    .ds-map__control { max-width: calc(100vw - 70px); }
}

/* этап 2: RangeBand — полоса «среди похожих», легенда к ней и штрих в ячейке */
.ds-band { position: relative; display: block; width: 200px; height: 20px; }
.ds-band--fluid { width: 100%; max-width: 100%; }
.ds-band__track { position: absolute; top: 6px; height: 8px; border-radius: 4px; background: var(--ctl-line); }
.ds-band__pred { position: absolute; top: 3px; width: 2px; height: 14px; background: var(--tx); }
.ds-band__self { position: absolute; top: 5px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--grn); }
.ds-band-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; font-family: var(--font-sans); font-size: 12px; color: var(--dim); }
.ds-band-legend__item { display: inline-flex; align-items: center; gap: 6px; }
.ds-band-legend__swatch { display: inline-block; flex: none; }
.ds-band-legend__swatch--track { width: 28px; height: 8px; border-radius: 4px; background: var(--ctl-line); }
.ds-band-legend__swatch--pred { width: 2px; height: 14px; background: var(--tx); }
.ds-band-legend__swatch--self { width: 10px; height: 10px; border-radius: 50%; background: var(--grn); }
.ds-inline-bar { display: inline-block; vertical-align: middle; margin-left: 8px; height: 6px; border-radius: 3px; background: var(--amb); }

/* этап 2: Chip, Button, Table — скрытый атрибут и ссылка-название */
.ds-chip[hidden], .ds-btn[hidden] { display: none; }
.ds-table a.ds-table__main { color: var(--tx); text-decoration: none; }
/* этап 3: hidden — атрибут hidden скрывает и компоненты с собственным display */
.ds-btn[hidden], .ds-chip[hidden], .ds-tab[hidden], .ds-kpi[hidden], .ds-note[hidden], .ds-tag[hidden], .ds-badge[hidden], .ds-field[hidden], .ds-card[hidden], .ds-empty[hidden], .ds-tabbar[hidden], .ds-tabs[hidden], .ds-segment[hidden], .ds-section-head[hidden] { display: none; }

/* этап 3: Button — опасное действие */
.ds-btn--danger, .ds-btn--danger:hover { color: var(--red); }

/* этап 3: Card — выбираемая карточка (провайдер, вариант) и Checkbox — радио */
.ds-card--pick { cursor: pointer; }
.ds-card--selected { background: var(--tint-grn); border-color: var(--grn); }
.ds-radio__input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--grn); cursor: pointer; }
.ds-radio__input:focus-visible { outline: 2px solid var(--grn); outline-offset: 2px; }

/* этап 3: Table — сортировка по заголовку и выбранная строка */
.ds-table__sort { all: unset; box-sizing: border-box; cursor: pointer; min-height: 44px; display: inline-flex; align-items: center; gap: 4px; }
.ds-table__sort:focus-visible { outline: 2px solid var(--grn); outline-offset: 2px; }
.ds-table th[aria-sort] { color: var(--tx); }
.ds-table tbody tr.ds-table__row--selected td { background: var(--tint-grn); }

/* этап 3: Num — предупреждающее число; Table — кликабельная строка */
.ds-num--warn { color: var(--amb); }
.ds-table tbody tr.ds-table__row--click { cursor: pointer; }

/* этап 3: Modal — форма и нижняя панель действий */
.ds-modal__form { display: flex; flex-direction: column; gap: 10px; }
.ds-modal__foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }

/* этап 3: Card — график и опасный вариант; KpiTile — дельта вверх/вниз */
.ds-card--chart { position: relative; }
.ds-card--danger { background: var(--fill-red); border: 0; border-left: 3px solid var(--red); border-radius: var(--radius-control, 8px); padding: 12px; }
.ds-chart-overlay { position: absolute; inset: 0; z-index: 10; display: flex; align-items: center; justify-content: center; gap: 8px; border-radius: inherit; background: color-mix(in srgb, var(--panel) 82%, transparent); color: var(--dim); font-family: var(--font-sans); font-size: 13px; }
.ds-kpi__delta--up { color: var(--up); }
.ds-kpi__delta--down { color: var(--down); }
.ds-kpi__delta .ds-text { font-weight: 400; }

/* этап 3: Chip — вариант-галочка (label с input) и недоступная ячейка */
.ds-chip--check { position: relative; justify-content: center; user-select: none; }
.ds-chip--check input { position: absolute; opacity: 0; pointer-events: none; }
.ds-chip--check:has(input:checked) { color: var(--grn); border-color: var(--grn); background: var(--tint-grn); }
.ds-chip--check:has(input:focus-visible) { outline: 2px solid var(--grn); outline-offset: 2px; }
.ds-chip--na, .ds-chip--na:hover { opacity: .35; background: none; border-style: dashed; border-color: var(--ctl-line); color: var(--dim); cursor: not-allowed; }

/* этап 3: MultiSelect — кнопка с выпадающим списком галочек и поиском */
.ds-multi { position: relative; width: 100%; min-width: 0; font-family: var(--font-sans); }
.ds-multi__trigger {
    position: relative; width: 100%; min-height: 36px; padding: 0 24px 0 8px; text-align: left; background: var(--panel2);
    border: 1px solid var(--ctl-line); border-radius: var(--radius-control, 8px); color: var(--dim); font: inherit; font-size: 13px;
    cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ds-multi__trigger::after { content: "▾"; position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font-size: 10px; color: var(--dim); pointer-events: none; }
.ds-multi__trigger:hover { background: var(--elev); color: var(--tx); }
.ds-multi__trigger:focus-visible { outline: 2px solid var(--grn); outline-offset: 2px; }
.ds-multi__trigger--set { color: var(--tx); border-color: var(--grn); }
.ds-multi__panel {
    position: absolute; left: 0; top: calc(100% + 4px); z-index: 60; min-width: 100%; max-width: 320px; padding: 8px;
    background: var(--elev); border: 1px solid var(--line); border-radius: var(--radius-note, 10px); box-shadow: var(--shadow-overlay, 0 8px 28px rgba(0,0,0,.5));
}
.ds-multi__panel--end { left: auto; right: 0; }
.ds-multi__panel--menu { min-width: 220px; max-height: 320px; overflow-y: auto; }
.ds-multi__search { width: 100%; margin-bottom: 6px; }
.ds-multi__list { max-height: 260px; overflow-y: auto; }
.ds-multi__opt { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: var(--radius-pager, 6px); color: var(--tx); font-size: 13px; cursor: pointer; }
.ds-multi__opt:hover { background: var(--panel2); }
.ds-multi__opt span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-multi__sep { margin: 6px 0; border: 0; border-top: 1px solid var(--line2); }
.ds-multi__hint { display: flex; align-items: center; gap: 8px; padding: 10px 8px; color: var(--dim); font-size: 13px; }
.ds-multi__hint--err { flex-wrap: wrap; color: var(--tx); }
.ds-multi[data-ms-state="loading"] .ds-multi__trigger { opacity: .65; }
@media (max-width: 760px) {
    .ds-multi__trigger { min-height: 44px; }
    .ds-multi__panel { max-width: none; }
    .ds-multi__opt { padding: 11px 8px; font-size: 14px; }
}

/* этап 3: Switch — переключатель с подписью */
.ds-switch { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; background: var(--panel2); border: 1px solid var(--ctl-line); border-radius: var(--radius-note, 10px); color: var(--dim); font-family: var(--font-sans); font-size: 13px; cursor: pointer; }
.ds-switch--compact { min-height: 30px; padding: 0 6px; background: none; border-color: transparent; gap: 6px; font-size: 12px; }
.ds-switch__input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ds-switch__track { position: relative; flex: none; width: 40px; height: 24px; border-radius: 12px; background: var(--line); }
.ds-switch__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--tx); transition: transform .2s; }
.ds-switch__input:checked + .ds-switch__track { background: var(--grn); }
.ds-switch__input:checked + .ds-switch__track::after { transform: translateX(16px); background: var(--on-grn); }
.ds-switch__input:focus-visible + .ds-switch__track { outline: 2px solid var(--grn); outline-offset: 2px; }
.ds-switch[hidden] { display: none; }

/* этап 3: GroupCard — карточка группы (ЖК, дом, здание) с полосой разброса ₸/м² */
.ds-group-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: 12px; }
.ds-group-grid__full { grid-column: 1 / -1; min-width: 0; }
.ds-group { display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: 16px 18px; cursor: pointer; }
.ds-group:hover, .ds-group:focus-visible { border-color: var(--ctl-line); outline: none; }
.ds-group__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.ds-group__name { font-size: 17px; font-weight: 700; overflow-wrap: anywhere; }
.ds-group__meta { font-size: 12px; color: var(--dim); }
.ds-group__count { text-align: right; flex: none; }
.ds-group__count b { display: block; font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 20px; font-weight: 600; }
.ds-group__count span { font-size: 11px; color: var(--faint); }
.ds-group__row { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--dim); }
.ds-group__row b { color: var(--tx); font-weight: 600; }
.ds-group__foot { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid var(--line2); color: var(--dim); font-size: 13px; }
.ds-group__foot b { color: var(--tx); font-weight: 500; }
.ds-range { position: relative; height: 10px; margin: 6px 0; border-radius: var(--radius-badge, 5px); background: var(--elev); }
.ds-range__fill { position: absolute; top: 0; height: 10px; min-width: 4px; border-radius: var(--radius-badge, 5px); background: color-mix(in srgb, var(--grn) 35%, var(--elev)); }
.ds-range__median { position: absolute; top: -3px; width: 2px; height: 16px; background: var(--grn); }

/* этап 3: ListingCard — карточка объявления вместо строки таблицы на телефоне */
.ds-lcard-list { display: flex; flex-direction: column; gap: 10px; }
.ds-lcard { display: flex; flex-direction: column; gap: 4px; padding: 12px; cursor: pointer; color: var(--tx); }
.ds-lcard__top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ds-lcard__price { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 18px; font-weight: 600; }
.ds-lcard__sub { display: flex; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--dim); }
.ds-lcard__spec { font-size: 13px; }
.ds-lcard__addr { font-size: 12px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-lcard__fav { margin: -10px -10px -10px 0; }

/* этап 3: Chip — активный фильтр с крестиком */
.ds-chip--removable { gap: 4px; min-height: 32px; padding: 0 2px 0 12px; background: var(--tint-grn); border-color: var(--grn); color: var(--grn); cursor: default; }
.ds-chip__x { min-width: 32px; min-height: 32px; padding: 0; background: transparent; border: 0; color: inherit; font-size: 17px; line-height: 1; cursor: pointer; }
.ds-chip__x:focus-visible { outline: 2px solid var(--grn); outline-offset: -2px; border-radius: var(--radius-pill, 999px); }
.ds-chips { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 760px) { .ds-chip--removable { min-height: 44px; } .ds-chip__x { min-height: 44px; } }

/* этап 3: Pagination — номера с пропусками и переход на страницу */
.ds-pagination { align-items: center; }
.ds-pagination__gap { padding: 0 2px; color: var(--faint); }
.ds-pagination__jump { display: inline-flex; align-items: center; gap: 6px; margin-left: 10px; color: var(--dim); font-family: var(--font-sans); font-size: 13px; }
.ds-pagination__jump .ds-field__input { width: 72px; text-align: center; }
@media (max-width: 760px) { .ds-pagination__jump { margin-left: 0; width: 100%; justify-content: center; } }

/* этап 3: Badge — мелкий и после числа */
.ds-badge--xs { margin: 0 4px; padding: 1px 5px; font-size: 9px; font-weight: 700; letter-spacing: .5px; }
.ds-badge--after { margin-left: 6px; font-size: 11.5px; }

/* этап 3: Table — строки групп и сортируемый заголовок */
.ds-table th.ds-table__th-sort { cursor: pointer; user-select: none; }
.ds-table th.ds-table__th-sort:hover { color: var(--tx); text-decoration: underline; }
.ds-table tbody tr.ds-table__row--group td { padding: 9px 16px; background: color-mix(in srgb, var(--blu) 5%, transparent); border-top: 1px solid var(--line2); font-size: 12.5px; cursor: pointer; }
.ds-table tbody tr.ds-table__row--group:hover td { background: color-mix(in srgb, var(--blu) 10%, transparent); }
.ds-table tbody tr.ds-table__row--sub td { padding-left: 32px; background: color-mix(in srgb, var(--blu) 3%, transparent); }
.ds-table tbody tr.ds-table__row--sub:hover td { background: color-mix(in srgb, var(--blu) 7%, transparent); }
.ds-table__meta { color: var(--dim); font-family: var(--font-mono); font-size: 11.5px; font-weight: 400; }
