/* ===== Клиенты: directory, filters, pager ===== */
.cdir-page,
.rfx-page {
    --cdir-border: #eaecf0;
    --cdir-muted: #667085;
    --cdir-ink: #101828;
    --cdir-soft: #f9fafb;
    --cdir-violet: #7c3aed;
    --cdir-violet-soft: #f4f0ff;
}

.cdir-meter {
    height: 6px;
    margin-top: 0.15rem;
    border-radius: 999px;
    background: #f2f4f7;
    overflow: hidden;
}

.cdir-meter i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--cdir-violet);
}

.cdir-meter--muted i {
    background: #98a2b3;
}

/* Filter bar chrome lives in admin-ui.css (analytics-filters-bar default). */
#adm-page .cdir-bar__search input::-webkit-search-cancel-button {
    cursor: pointer;
}

.cdir-spinner {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    border: 2px solid #e9d7fe;
    border-top-color: var(--cdir-violet);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.cdir-bar.is-loading .cdir-spinner {
    opacity: 1;
    animation: cdir-spin 0.7s linear infinite;
}

@keyframes cdir-spin {
    to { transform: rotate(360deg); }
}

.cdir-dd {
    position: relative;
    flex: 0 0 auto;
}

.cdir-dd__label {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.cdir-dd .catmgr-dd-chevron {
    display: inline-flex;
    line-height: 1;
}

.cdir-dd .cdir-dd__panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 60;
    min-width: 170px;
    max-width: 280px;
    max-height: min(60vh, 380px);
    padding: 6px;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 24px -14px rgba(15, 23, 42, 0.18);
    overflow-y: auto;
}

.cdir-dd .cdir-dd__panel.is-right {
    left: auto;
    right: 0;
}

.cdir-dd--wide .cdir-dd__panel {
    min-width: 320px;
    max-width: 360px;
}

.cdir-dd--period .cdir-dd__panel {
    min-width: 300px;
    max-height: none;
    overflow: visible;
}

.cdir-dd .catmgr-dd-option {
    gap: 7px;
    padding: 5px 7px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 400;
    color: #334155;
}

.cdir-dd .catmgr-dd-check {
    width: 15px;
    height: 15px;
    border-radius: 4px;
    border: 1.5px solid #cbd5e1;
    box-sizing: border-box;
    background: transparent;
    color: transparent;
    font-size: 8px;
    line-height: 1;
}

.cdir-dd .catmgr-dd-option.is-checked .catmgr-dd-check {
    border-color: #7c3aed;
    background: #7c3aed;
    color: #fff;
}

.cdir-dd .catmgr-dd-check i {
    display: block;
    line-height: 1;
}

.cdir-dd__text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.cdir-dd__count {
    flex-shrink: 0;
    font-size: 11px;
    font-style: normal;
    font-weight: 600;
    color: #94a3b8;
    font-variant-numeric: tabular-nums;
}

.cdir-dd__divider {
    height: 1px;
    margin: 4px 2px;
    background: #f1f5f9;
}

.cdir-range {
    padding: 8px 6px 10px;
}

.cdir-range__row {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #94a3b8;
    font-size: 12px;
}

#adm-page .cdir-range__input {
    flex: 1;
    min-width: 0;
    width: 100%;
    height: 32px;
    min-height: 32px;
    max-height: 32px;
    padding: 0 10px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    box-sizing: border-box;
    background: #f8fafc;
    box-shadow: none;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
}

#adm-page .cdir-range__input:focus {
    outline: none;
    border-color: #7c3aed;
    background: #fff;
}

#adm-page .cdir-range__input::placeholder {
    color: #94a3b8;
    font-weight: 500;
}

.cdir-range__error {
    margin: 6px 2px 0;
    font-size: 11px;
    font-weight: 600;
    color: #dc2626;
}

#adm-page .cdir-range__apply {
    width: 100%;
    height: 38px;
    margin-top: 10px;
    border-radius: 999px;
    justify-content: center;
}

@media (max-width: 760px) {
    .cdir-dd .cdir-dd__panel {
        min-width: min(300px, calc(100vw - 32px));
    }
}

/* Results */
.cdir-results {
    position: relative;
    border: 1px solid var(--cdir-border);
    border-radius: 1.25rem;
    background: #fff;
    overflow: hidden;
    transition: opacity 0.15s ease;
}

.cdir-results.is-loading {
    opacity: 0.55;
    pointer-events: none;
}

.cdir-results.is-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 3px;
    width: 40%;
    background: var(--cdir-violet);
    border-radius: 0 3px 3px 0;
    animation: cdir-progress 1s ease-in-out infinite;
}

@keyframes cdir-progress {
    0% { left: -40%; }
    100% { left: 100%; }
}

.cdir-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem 1rem;
    padding: 0.95rem 1.25rem;
    border-bottom: 1px solid var(--cdir-border);
}

.cdir-head__count {
    font-size: 0.875rem;
    color: var(--cdir-muted);
}

.cdir-head__count b {
    font-size: 1rem;
    font-weight: 800;
    color: var(--cdir-ink);
    font-variant-numeric: tabular-nums;
}

.cdir-head__note {
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    background: var(--cdir-violet-soft);
    font-size: 0.78rem;
    font-weight: 600;
    color: #5b21b6;
}

#adm-page .cdir-reset {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: auto;
    padding: 0.35rem 0.75rem;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #d92d20;
    text-decoration: none;
    transition: background 0.15s ease;
}

#adm-page .cdir-reset:hover {
    background: #fef3f2;
}

.cdir-reset svg {
    width: 14px;
    height: 14px;
}

/* Table */
.cdir-table {
    --cdir-cols: minmax(220px, 2.1fr) minmax(130px, 1.1fr) minmax(100px, 0.85fr) 120px 72px 120px 120px 28px;
}

.cdir-table--no-seg {
    --cdir-cols: minmax(220px, 2.4fr) minmax(100px, 0.9fr) 120px 72px 130px 130px 28px;
}

.cdir-row {
    display: grid;
    grid-template-columns: var(--cdir-cols);
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1.25rem;
    border-bottom: 1px solid #f2f4f7;
    color: inherit;
    text-decoration: none;
    transition: background 0.12s ease;
}

#adm-page a.cdir-row {
    color: inherit;
    text-decoration: none;
}

a.cdir-row:hover {
    background: #faf8ff;
}

a.cdir-row:last-of-type {
    border-bottom: 0;
}

.cdir-row--head {
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
    background: var(--cdir-soft);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #98a2b3;
}

.cdir-row .is-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.cdir-who {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.cdir-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 12px;
    background: color-mix(in srgb, var(--tone, #7c3aed) 12%, #fff);
    color: var(--tone, #7c3aed);
    font-size: 0.95rem;
    font-weight: 800;
}

.cdir-avatar--img {
    object-fit: cover;
    background: #f2f4f7;
}

.cdir-who__text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.cdir-who__name {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
    overflow: hidden;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--cdir-ink);
    white-space: nowrap;
    text-overflow: ellipsis;
}

.cdir-who__sub {
    overflow: hidden;
    font-size: 0.78rem;
    color: var(--cdir-muted);
    white-space: nowrap;
    text-overflow: ellipsis;
    font-variant-numeric: tabular-nums;
}

.cdir-who__sub i {
    margin: 0 0.15rem;
    font-style: normal;
    color: #d0d5dd;
}

.cdir-flag {
    flex-shrink: 0;
    padding: 0.1rem 0.45rem;
    border-radius: 6px;
    background: #fef3f2;
    font-size: 0.68rem;
    font-style: normal;
    font-weight: 700;
    color: #d92d20;
}

.cdir-cell {
    min-width: 0;
    font-size: 0.85rem;
    color: var(--cdir-ink);
}

.cdir-cell b {
    font-weight: 700;
}

.cdir-cell b.is-zero {
    font-weight: 600;
    color: #98a2b3;
}

.cdir-muted {
    font-size: 0.8rem;
    color: #98a2b3;
}

.cdir-seg {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    max-width: 100%;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--seg) 12%, #fff);
    font-size: 0.76rem;
    font-weight: 600;
    color: color-mix(in srgb, var(--seg) 70%, #101828);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cdir-seg i {
    width: 7px;
    height: 7px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--seg);
}

.cdir-devices {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.cdir-device {
    padding: 0.18rem 0.5rem;
    border-radius: 7px;
    font-size: 0.72rem;
    font-weight: 700;
}

.cdir-device--ios {
    background: #f2f4f7;
    color: #344054;
}

.cdir-device--android {
    background: #ecfdf3;
    color: #067647;
}

.cdir-device--push {
    background: #eff8ff;
    color: #175cd3;
}

.cdir-device--nopush {
    background: #fff6ed;
    color: #c4320a;
}

.cdir-last {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.cdir-last b {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.cdir-last small {
    font-size: 0.74rem;
    color: var(--cdir-muted);
}

.cdir-go {
    display: inline-flex;
    justify-content: flex-end;
    color: #d0d5dd;
    transition: color 0.12s ease, transform 0.12s ease;
}

.cdir-go svg {
    width: 18px;
    height: 18px;
}

a.cdir-row:hover .cdir-go {
    color: var(--cdir-violet);
    transform: translateX(2px);
}

.cdir-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 3.5rem 1.5rem;
    text-align: center;
}

.cdir-empty__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin-bottom: 0.4rem;
    border-radius: 16px;
    background: var(--cdir-violet-soft);
    color: var(--cdir-violet);
    font-size: 1.3rem;
}

.cdir-empty b {
    font-size: 1rem;
    color: var(--cdir-ink);
}

.cdir-empty span:last-child {
    font-size: 0.85rem;
    color: var(--cdir-muted);
}

@media (max-width: 1100px) {
    .cdir-row--head {
        display: none;
    }

    .cdir-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.6rem 1rem;
        padding: 1rem 1.1rem;
        position: relative;
    }

    .cdir-who {
        grid-column: 1 / -1;
        padding-right: 1.75rem;
    }

    .cdir-cell::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 0.15rem;
        font-size: 0.68rem;
        font-weight: 600;
        letter-spacing: 0.03em;
        text-transform: uppercase;
        color: #98a2b3;
    }

    .cdir-row .is-num {
        text-align: left;
    }

    .cdir-go {
        position: absolute;
        top: 1.6rem;
        right: 1rem;
    }
}

/* Pager */
.adm-pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1.25rem;
    border-top: 1px solid var(--cdir-border, #eaecf0);
    background: #fcfcfd;
}

.adm-pager__info {
    font-size: 0.82rem;
    font-weight: 600;
    color: #101828;
    font-variant-numeric: tabular-nums;
}

.adm-pager__info span {
    font-weight: 500;
    color: #667085;
}

.adm-pager__pages {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem;
}

#adm-page .adm-pager__btn,
.adm-pager__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.6rem;
    border: 1px solid #eaecf0;
    border-radius: 10px;
    background: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    color: #344054;
    text-decoration: none;
    font-variant-numeric: tabular-nums;
    transition: border-color 0.12s ease, color 0.12s ease, background 0.12s ease;
}

#adm-page a.adm-pager__btn:hover {
    border-color: #c4b5fd;
    color: #7c3aed;
}

#adm-page .adm-pager__btn.is-current {
    border-color: #7c3aed;
    background: #7c3aed;
    color: #fff;
}

.adm-pager__btn.is-disabled {
    opacity: 0.4;
}

.adm-pager__btn svg {
    width: 16px;
    height: 16px;
}

.adm-pager__gap {
    padding: 0 0.2rem;
    color: #98a2b3;
}

/* ===== Сегменты RFM ===== */
.rfx-flash {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
    padding: 0.8rem 1rem;
    border: 1px solid #abefc6;
    border-radius: 14px;
    background: #ecfdf3;
    font-size: 0.875rem;
    font-weight: 600;
    color: #067647;
}

.rfx-flash svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.rfx-kpi-of {
    font-size: 1rem;
    font-weight: 600;
    color: #98a2b3;
}

.rfx-kpi-date {
    font-size: 1.5rem;
}

.rfx-dist {
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    border: 1px solid var(--cdir-border);
    border-radius: 1.25rem;
    background: #fff;
}

.rfx-dist__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.1rem;
}

.rfx-dist__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--cdir-ink);
}

.rfx-dist__sub {
    margin: 0.2rem 0 0;
    font-size: 0.82rem;
    color: var(--cdir-muted);
}

.rfx-recalc-icon {
    width: 16px;
    height: 16px;
}

[data-rfx-recalc-btn].is-busy .rfx-recalc-icon {
    animation: cdir-spin 0.8s linear infinite;
}

[data-rfx-recalc-btn].is-busy {
    opacity: 0.85;
    cursor: progress;
}

.rfx-bar {
    display: flex;
    gap: 3px;
    height: 14px;
    border-radius: 999px;
    overflow: hidden;
    background: #f2f4f7;
}

.rfx-bar span {
    display: block;
    height: 100%;
    background: var(--fam);
}

.rfx-bar span.is-none {
    background: #d0d5dd;
}

.rfx-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.9rem;
}

.rfx-legend__item,
#adm-page a.rfx-legend__item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--cdir-border);
    border-radius: 999px;
    font-size: 0.8rem;
    color: #344054;
    text-decoration: none;
    transition: border-color 0.12s ease;
}

#adm-page a.rfx-legend__item:hover {
    border-color: var(--fam);
}

.rfx-legend__item i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--fam, #d0d5dd);
}

.rfx-legend__item.is-none i {
    background: #d0d5dd;
}

.rfx-legend__item b {
    font-weight: 800;
    color: var(--cdir-ink);
    font-variant-numeric: tabular-nums;
}

.rfx-legend__item em {
    font-style: normal;
    font-weight: 600;
    color: #98a2b3;
}

.rfx-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.rfx-toolbar__hint {
    font-size: 0.82rem;
    color: var(--cdir-muted);
}

.rfx-family {
    margin-bottom: 1.75rem;
}

.rfx-page:not(.is-show-empty) .rfx-family.is-all-empty,
.rfx-page:not(.is-show-empty) .rfx-card.is-empty {
    display: none;
}

.rfx-family__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.85rem;
}

.rfx-family__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--fam);
}

.rfx-family__head h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    color: var(--cdir-ink);
}

.rfx-family__meta {
    font-size: 0.82rem;
    color: var(--cdir-muted);
}

.rfx-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1rem;
}

@media (min-width: 720px) {
    .rfx-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1280px) {
    .rfx-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.rfx-card,
#adm-page a.rfx-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 1.1rem 1.15rem 1.15rem;
    border: 1px solid var(--cdir-border);
    border-radius: 1.1rem;
    background: #fff;
    color: inherit;
    text-decoration: none;
    overflow: hidden;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.rfx-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: var(--seg);
}

#adm-page a.rfx-card:hover {
    border-color: color-mix(in srgb, var(--seg) 55%, #fff);
    transform: translateY(-2px);
}

.rfx-card.is-empty {
    background: #fcfcfd;
}

.rfx-card.is-empty .rfx-card__count b {
    color: #98a2b3;
}

.rfx-card__top {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
}

.rfx-card__dot {
    width: 10px;
    height: 10px;
    margin-top: 0.35rem;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--seg);
}

.rfx-card__name {
    flex: 1;
    min-width: 0;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--cdir-ink);
}

.rfx-card__arrow {
    display: inline-flex;
    color: #d0d5dd;
    transition: color 0.12s ease, transform 0.12s ease;
}

.rfx-card__arrow svg {
    width: 18px;
    height: 18px;
}

#adm-page a.rfx-card:hover .rfx-card__arrow {
    color: var(--seg);
    transform: translateX(2px);
}

.rfx-card__desc {
    display: -webkit-box;
    margin: -0.2rem 0 0;
    overflow: hidden;
    font-size: 0.78rem;
    line-height: 1.45;
    color: var(--cdir-muted);
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.rfx-card__count {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    margin-top: 0.15rem;
}

.rfx-card__count b {
    font-size: 1.7rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--cdir-ink);
    font-variant-numeric: tabular-nums;
}

.rfx-card__count span {
    font-size: 0.82rem;
    color: var(--cdir-muted);
}

.rfx-card__count em {
    margin-left: auto;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--seg) 12%, #fff);
    font-size: 0.75rem;
    font-style: normal;
    font-weight: 700;
    color: color-mix(in srgb, var(--seg) 70%, #101828);
}

.rfx-card__meter {
    height: 6px;
    border-radius: 999px;
    background: #f2f4f7;
    overflow: hidden;
}

.rfx-card__meter i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--seg);
}

.rfx-rules {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.rfx-rule {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.55rem;
    border-radius: 8px;
    background: #f2f4f7;
    font-size: 0.74rem;
    font-weight: 700;
    color: #344054;
}

.rfx-rule span {
    font-weight: 500;
    color: var(--cdir-muted);
}

/* Segment detail */
.rfx-hero {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    margin-bottom: 1rem;
    padding: 1.4rem 1.5rem;
    border: 1px solid var(--cdir-border);
    border-radius: 1.25rem;
    background:
        radial-gradient(120% 160% at 100% 0%, color-mix(in srgb, var(--seg) 14%, transparent) 0%, transparent 60%),
        #fff;
    overflow: hidden;
}

.rfx-hero::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--seg);
}

.rfx-hero__main {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    min-width: 0;
    flex: 1 1 420px;
}

.rfx-hero__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    border-radius: 16px;
    background: color-mix(in srgb, var(--seg) 14%, #fff);
    color: color-mix(in srgb, var(--seg) 80%, #101828);
    font-size: 1.35rem;
}

.rfx-hero__text {
    min-width: 0;
}

.rfx-hero__family {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--cdir-muted);
}

.rfx-hero__family i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--fam);
}

.rfx-hero__title {
    margin: 0.25rem 0 0;
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: var(--cdir-ink);
}

.rfx-hero__desc {
    max-width: 720px;
    margin: 0.45rem 0 0;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--cdir-muted);
}

.rfx-hero__count {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
}

.rfx-hero__count b {
    font-size: 2.3rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
    color: color-mix(in srgb, var(--seg) 80%, #101828);
    font-variant-numeric: tabular-nums;
}

.rfx-hero__count span {
    margin-top: 0.35rem;
    font-size: 0.82rem;
    color: var(--cdir-muted);
}

@media (max-width: 640px) {
    .rfx-hero__count {
        align-items: flex-start;
        text-align: left;
    }
}

.rfx-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

@media (min-width: 900px) {
    .rfx-stats {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

.rfx-stat {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 0.95rem 1.05rem;
    border: 1px solid var(--cdir-border);
    border-radius: 1rem;
    background: #fff;
    min-width: 0;
}

.rfx-stat__label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--cdir-muted);
}

.rfx-stat__value {
    overflow: hidden;
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--cdir-ink);
    white-space: nowrap;
    text-overflow: ellipsis;
    font-variant-numeric: tabular-nums;
}

.rfx-stat__sub {
    font-size: 0.75rem;
    color: var(--cdir-muted);
}

.rfx-conditions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem 0.9rem;
    margin-bottom: 1rem;
    padding: 0.85rem 1.1rem;
    border: 1px dashed #d0d5dd;
    border-radius: 1rem;
}

.rfx-conditions__title {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--cdir-muted);
}

/* Dark */
html.dark .cdir-results,
html.dark .rfx-dist,
html.dark .rfx-card,
html.dark #adm-page a.rfx-card,
html.dark .rfx-hero,
html.dark .rfx-stat {
    border-color: #1f2937;
    background-color: #111827;
}

html.dark .rfx-hero {
    background:
        radial-gradient(120% 160% at 100% 0%, color-mix(in srgb, var(--seg) 18%, transparent) 0%, transparent 60%),
        #111827;
}

html.dark .cdir-row--head,
html.dark .adm-pager,
html.dark .rfx-card.is-empty {
    background: #0b1220;
}

html.dark .cdir-row,
html.dark .cdir-head,
html.dark .adm-pager {
    border-color: #1f2937;
}

html.dark a.cdir-row:hover {
    background: rgba(124, 58, 237, 0.08);
}

html.dark .cdir-who__name,
html.dark .cdir-cell,
html.dark .cdir-head__count b,
html.dark .cdir-empty b,
html.dark .adm-pager__info,
html.dark .rfx-dist__title,
html.dark .rfx-family__head h3,
html.dark .rfx-card__name,
html.dark .rfx-card__count b,
html.dark .rfx-legend__item b,
html.dark .rfx-hero__title,
html.dark .rfx-stat__value {
    color: #f2f4f7;
}

html.dark .cdir-meter,
html.dark .rfx-bar,
html.dark .rfx-card__meter,
html.dark .rfx-rule,
html.dark .cdir-device--ios {
    background: rgba(255, 255, 255, 0.06);
}

html.dark .rfx-rule,
html.dark .cdir-device--ios,
html.dark .rfx-legend__item {
    color: #d0d5dd;
}

html.dark .rfx-legend__item,
html.dark .rfx-conditions {
    border-color: #344054;
}

html.dark .cdir-seg,
html.dark .rfx-card__count em {
    background: color-mix(in srgb, var(--seg) 18%, transparent);
    color: color-mix(in srgb, var(--seg) 55%, #fff);
}

html.dark .cdir-avatar:not(.cdir-avatar--img) {
    background: color-mix(in srgb, var(--tone, #7c3aed) 20%, transparent);
}

html.dark #adm-page .adm-pager__btn {
    border-color: #344054;
    background: #111827;
    color: #d0d5dd;
}

html.dark #adm-page .adm-pager__btn.is-current {
    border-color: #7c3aed;
    background: #7c3aed;
    color: #fff;
}

html.dark .cdir-head__note {
    background: rgba(124, 58, 237, 0.16);
    color: #d6bbfb;
}

html.dark .rfx-hero__count b {
    color: color-mix(in srgb, var(--seg) 60%, #fff);
}

html.dark .cdir-bar__search,
html.dark #adm-page .cdir-bar .cdir-dd .catmgr-tb-dd-btn,
html.dark #adm-page .cdir-range__input,
html.dark .cdir-dd .cdir-dd__panel {
    border-color: #344054;
    background: #111827;
    color: #d0d5dd;
}

html.dark #adm-page .cdir-bar__search input {
    color: #f2f4f7;
}

html.dark #adm-page .cdir-bar .cdir-dd .catmgr-tb-dd-btn.is-active {
    border-color: #6d28d9;
    background: rgba(124, 58, 237, 0.16);
    color: #d6bbfb;
}

html.dark .cdir-dd .catmgr-dd-option {
    color: #d0d5dd;
}

html.dark .cdir-dd .catmgr-dd-option:hover {
    background: rgba(124, 58, 237, 0.12);
}

html.dark .cdir-dd .catmgr-dd-option.is-checked {
    color: #d6bbfb;
}

html.dark .cdir-dd__divider {
    background: #1f2937;
}
