/* EcoStat — общая тема (все страницы); тёмная тема отключена */
html {
    color-scheme: light only;
}

html,
body.app-body {
    background-color: #f8f9fb;
    color: #111827;
}

:root {
    color-scheme: light;
    --bg: #f8f9fb;
    --bg-gradient-end: #f1f4f8;
    --surface: #ffffff;
    --text: #111827;
    --muted: #6b7280;
    --accent: #169873;
    --accent-rgb: 22, 152, 115;
    /* Canonical breakpoints (documentation; use in @media) */
    --bp-xs: 480px;
    --bp-sm: 640px;
    --bp-md: 768px;
    --bp-lg: 1024px;
    --bp-xl: 1280px;
    /* Typography scale */
    --text-2xs: 10px;
    --text-xs: 11px;
    --text-sm: 12px;
    --text-base: 13px;
    --text-md: 14px;
    --text-lg: 16px;
    --text-xl: 18px;
    --text-2xl: 22px;
    --accent-hover: #117a5c;
    --accent-muted: rgba(22, 152, 115, 0.12);
    --border: #d1e9e2;
    --shadow: 0 1px 3px rgba(15, 42, 32, 0.06), 0 4px 12px rgba(15, 42, 32, 0.04);
    --radius: 12px;
    --radius-sm: 8px;
    --success: #059669;
    --success-bg: #ecfdf5;
    --danger: #dc2626;
    --danger-bg: #fef2f2;
    --header-h: 3.25rem;
    /* Единая колонка контента (шапка + основной столбец приложения) */
    --content-max: min(100%, 1400px);
    --content-pad-inline: clamp(1rem, 3vw, 2rem);

    /* Кнопки: единая палитра и радиусы */
    --btn-radius: var(--radius-sm);
    --btn-radius-pill: 999px;
    --btn-font-weight: 600;
    --btn-transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease,
        box-shadow 0.15s ease, transform 0.05s ease;
    --btn-focus-ring: 0 0 0 3px var(--accent-muted);

    --btn-primary-bg: var(--accent);
    --btn-primary-bg-hover: var(--accent-hover);
    --btn-primary-text: #ffffff;

    --btn-secondary-bg: #6b7280;
    --btn-secondary-bg-hover: #4b5563;
    --btn-secondary-text: #ffffff;

    --btn-neutral-bg: var(--surface);
    --btn-neutral-bg-hover: #f4faf7;
    --btn-neutral-text: var(--text);
    --btn-neutral-border: var(--border);

    --btn-glass-bg: rgba(255, 255, 255, 0.6);
    --btn-glass-bg-hover: rgba(255, 255, 255, 0.75);
    --btn-glass-border: rgba(255, 255, 255, 0.4);
    --btn-glass-text: var(--text);
    --btn-glass-shadow-hover: 0 6px 20px rgba(0, 0, 0, 0.1);

    --btn-accent-soft-bg: rgba(22, 152, 115, 0.22);
    --btn-accent-soft-bg-hover: rgba(22, 152, 115, 0.32);
    --btn-accent-soft-border: rgba(22, 152, 115, 0.35);
    --btn-accent-soft-border-hover: rgba(22, 152, 115, 0.45);
    --btn-accent-soft-text: #0e6e52;
    --btn-accent-soft-text-hover: #0a5640;

    --btn-glass-muted-bg: rgba(255, 255, 255, 0.45);
    --btn-glass-muted-bg-hover: rgba(255, 255, 255, 0.7);
    --btn-glass-muted-border: rgba(255, 255, 255, 0.55);
    --btn-glass-muted-text: #374151;

    --btn-icon-size: 36px;
    --btn-icon-bg: rgba(255, 255, 255, 0.92);
    --btn-icon-bg-hover: rgba(255, 255, 255, 0.75);
    --btn-icon-border: rgba(209, 213, 219, 0.95);
    --btn-icon-border-hover: rgba(255, 255, 255, 0.55);
    --btn-icon-text: var(--muted);
    --btn-icon-text-hover: #111827;

    /* Dashboard megaplan — палитра и шаги (карты, таблицы, табы; не заменяют --accent) */
    --ds-color-primary: var(--accent);
    --ds-color-secondary: #f97316;
    --ds-color-tertiary: #8b5cf6;
    --ds-color-success: #22c55e;
    --ds-color-danger: #ef4444;
    --ds-color-warning: #f59e0b;
    --ds-bg-light: #f9fafb;
    --ds-bg-dark: #111827;
    --ds-border: #e5e7eb;
    --ds-text-muted: #6b7280;
    --ds-gap-xs: 4px;
    --ds-gap-sm: 8px;
    --ds-gap-md: 12px;
    --ds-gap-lg: 16px;
    --ds-gap-xl: 24px;
    --ds-gap-2xl: 32px;
    --ds-radius-sm: 4px;
    --ds-radius-md: 8px;
    --ds-radius-lg: 12px;
    --ds-font-xs: 12px;
    --ds-font-sm: 14px;
    --ds-font-base: 16px;
    --ds-font-lg: 18px;
    --ds-font-xl: 20px;
    --ds-font-2xl: 24px;
    --ds-bp-mobile-max: 479px;
    --ds-bp-tablet-min: 640px;
    --ds-bp-desktop-min: 1024px;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body.app-body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
    font-size: 1rem;
    line-height: 1.55;
    color: var(--text);
    background: #f8f9fb;
    background-attachment: fixed;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}

.site-header__inner {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 0.65rem 1rem;
    flex-wrap: wrap;
}

.site-header__user {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.site-header__user-line {
    display: inline-flex;
    align-items: baseline;
    gap: 0.35rem;
    max-width: 100%;
    font-size: 0.78rem;
    line-height: 1.35;
}

.site-header__user-prefix {
    flex-shrink: 0;
    white-space: nowrap;
}

.site-header__user-email {
    min-width: 0;
    max-width: min(18rem, 42vw);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.site-header__toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.15rem 0.35rem;
    flex-shrink: 0;
    max-width: 100%;
    font-size: 0.78rem;
    font-weight: 600;
}

.site-header__toolbar-link {
    color: var(--text);
    text-decoration: none;
    white-space: nowrap;
}

.site-header__toolbar-link:hover {
    color: var(--accent);
    text-decoration: underline;
}

.site-header__toolbar-sep {
    color: var(--muted);
    user-select: none;
}

.site-header__logout-form {
    margin: 0;
    flex-shrink: 0;
    margin-left: auto;
}

.site-header__logout-btn {
    height: 30px;
    padding: 0 12px;
    font-size: 0.8125rem;
}

@media (max-width: 640px) {
    .site-header__inner {
        row-gap: 0.4rem;
    }

    .site-header__user {
        flex: 1 1 100%;
        order: 3;
    }

    .site-header__toolbar {
        order: 4;
        flex: 1 1 100%;
    }

    .site-header__logout-form {
        order: 2;
    }

    .site-header__user-email {
        max-width: min(14rem, 55vw);
    }
}

.site-brand {
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: -0.02em;
    color: var(--text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.site-brand:hover {
    color: var(--accent);
}

.site-brand__dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #0f9b72);
    flex-shrink: 0;
}

.wrap {
    width: 100%;
    max-width: var(--content-max);
    margin-left: auto;
    margin-right: auto;
    padding: 1.5rem var(--content-pad-inline) 3rem;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: minmax(220px, 250px) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.wrap-main {
    min-width: 0;
}

@media (max-width: 640px) {
    .wrap {
        width: 100%;
    }
}

.container {
    max-width: var(--content-max);
    padding-left: 24px;
    padding-right: 24px;
}

.nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
    padding: 0.75rem;
    margin-bottom: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    position: sticky;
    top: calc(var(--header-h) + 0.9rem);
}

.nav a {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.6rem 0.75rem;
    border-radius: 0.7rem;
    background: transparent;
    border: 1px solid transparent;
    display: block;
}

.nav__link.is-active,
.nav-dropdown-wrap__main.is-active {
    color: var(--accent);
    background: var(--accent-muted);
    border-color: rgba(22, 152, 115, 0.2);
}

.nav a:hover {
    background: var(--accent-muted);
    color: var(--accent);
}

.nav-dropdown-wrap {
    position: relative;
    display: block;
    border-radius: 0.7rem;
    outline: none;
}

.nav-dropdown-wrap:focus-visible {
    box-shadow: var(--btn-focus-ring);
}

.nav-dropdown-wrap__main {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.4rem 0.75rem;
    border-radius: 0.7rem;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
}

.nav-dropdown-wrap:hover .nav-dropdown-wrap__main,
.nav-dropdown-wrap:focus-within .nav-dropdown-wrap__main {
    background: var(--accent-muted);
    color: var(--accent);
}

.nav-dropdown-wrap__menu {
    display: none;
    position: absolute;
    top: calc(100% + 0.2rem);
    left: 0.25rem;
    padding-top: 0.2rem;
    min-width: 15rem;
    padding-bottom: 0.35rem;
    padding-left: 0;
    padding-right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    z-index: 60;
}

.nav-dropdown-wrap:hover .nav-dropdown-wrap__menu,
.nav-dropdown-wrap:focus-within .nav-dropdown-wrap__menu {
    display: block;
}

.nav-dropdown-wrap__item {
    display: block;
    padding: 0.45rem 0.9rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    border-radius: 0;
    background: transparent;
    border: 0;
}

.nav-dropdown-wrap__item:hover {
    background: var(--accent-muted);
    color: var(--accent);
}

.nav__client-search {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    margin: 0;
    margin-top: 0.25rem;
    padding: 0;
}

.channel-chip {
    --channel-color: #374151;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.78rem;
    border: 1px solid color-mix(in srgb, var(--channel-color) 28%, transparent);
    color: var(--channel-color);
    background: color-mix(in srgb, var(--channel-color) 14%, white);
    white-space: nowrap;
}

.channel-chip__dot {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

.channel-chip__service-icon,
.channel-chip .service-icon {
    margin-right: 0;
    flex-shrink: 0;
}

.channel-chip--seo { color: #0e9f6e; background: rgba(14, 159, 110, 0.14); border-color: rgba(14, 159, 110, 0.25); }
.channel-chip--email { color: #0f766e; background: rgba(15, 118, 110, 0.14); border-color: rgba(15, 118, 110, 0.25); }
.channel-chip--ref { color: #1d4ed8; background: rgba(29, 78, 216, 0.12); border-color: rgba(29, 78, 216, 0.24); }
.channel-chip--ads { color: #b45309; background: rgba(180, 83, 9, 0.14); border-color: rgba(180, 83, 9, 0.25); }
.channel-chip--direct { color: #6d28d9; background: rgba(109, 40, 217, 0.12); border-color: rgba(109, 40, 217, 0.24); }
.channel-chip--other { color: #374151; background: rgba(55, 65, 81, 0.12); border-color: rgba(55, 65, 81, 0.22); }

.admin-global-client-search {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.5rem;
    margin: 0;
    max-width: 100%;
}

.admin-global-client-search__icon {
    display: inline-flex;
    color: var(--muted);
    flex-shrink: 0;
}

.admin-global-client-search__input {
    flex: 1 1 10rem;
    min-width: 7rem;
    max-width: 16rem;
    padding: 0.4rem 0.55rem;
    font-size: 0.875rem;
    font-family: inherit;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
}

.admin-global-client-search__input:focus {
    outline: none;
    box-shadow: var(--btn-focus-ring);
    border-color: var(--accent);
}

.admin-global-client-search__submit {
    flex-shrink: 0;
    padding: 0.4rem 0.85rem;
    font-size: 0.8125rem;
    font-weight: 600;
    font-family: inherit;
    border-radius: var(--radius-sm);
    border: 1px solid var(--accent);
    background: var(--accent);
    color: #fff;
    cursor: pointer;
    transition: var(--btn-transition);
}

.admin-global-client-search__submit:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

.inbox-client-profile-section {
    margin-top: 1.25rem;
}

.inbox-client-profile-section__title {
    margin: 0 0 0.5rem;
    font-size: 1rem;
    font-weight: 600;
}

.inbox-client-profile-session {
    margin-bottom: 1rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.5);
}

.inbox-client-profile-session__head {
    margin: 0 0 0.25rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.inbox-client-profile-session__range {
    margin: 0 0 0.5rem;
    font-size: 0.8125rem;
}

.inbox-client-profile-session__table {
    margin: 0;
}

@media (max-width: 768px) {
    .wrap {
        display: block;
    }

    .nav {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
        overflow-x: visible;
        padding-bottom: 0.45rem;
        margin-right: calc(-1 * var(--content-pad-inline));
        margin-left: calc(-1 * var(--content-pad-inline));
        padding-left: var(--content-pad-inline);
        padding-right: var(--content-pad-inline);
        gap: 0.35rem 0.45rem;
        margin-bottom: 1rem;
    }

    .nav > * {
        flex-shrink: 0;
    }

    .nav > .nav__client-search {
        flex: 1 1 100%;
        margin-left: 0;
        margin-top: 0.25rem;
        justify-content: flex-start;
    }

    .admin-global-client-search__input {
        max-width: none;
        min-width: 0;
    }

    .admin-global-client-search__submit {
        min-height: 44px;
        padding: 0 1rem;
    }
}

@media (max-width: 768px) {
    .nav a,
    .nav-dropdown-wrap__main {
        min-height: 44px;
        padding: 0.5rem 0.85rem;
        display: inline-flex;
        align-items: center;
    }

    .nav-dropdown-wrap__item {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .site-header__logout-btn {
        min-height: 44px;
        padding: 0 1rem;
    }

    .site-header__toolbar-link {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }
}

.table-scroll {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0.35rem 0;
}

.table-scroll table.data {
    min-width: 34rem;
    width: 100%;
}

/* Страница «Каналы»: таблица на узком экране скроллится по горизонтали. */
.channels-list__scroll {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0.25rem 0 0;
}

.channels-list__table {
    min-width: 32rem;
    width: 100%;
}

@media (max-width: 640px) {
    .channels-list__scroll {
        overflow-x: auto;
        margin: 0;
    }

    .channels-list__table {
        min-width: 56rem;
        width: max-content;
    }

    .channels-list__table thead {
        display: table-header-group;
    }

    .channels-list__table tbody tr {
        display: table-row;
        margin-bottom: 0;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .channels-list__table tbody td {
        display: table-cell;
        align-items: initial;
        justify-content: initial;
        gap: 0;
        padding: 0.5rem 0.65rem;
        border: 0;
        max-width: none !important;
        font-size: 0.86rem;
        white-space: nowrap;
    }

    .channels-list__table tbody td::before {
        content: none;
    }

    .channels-list__table tbody td.channels-list__actions {
        flex-wrap: nowrap;
        justify-content: initial;
        padding-top: 0.5rem;
        border-top: 0;
        margin-top: 0;
    }

    .channels-list__table tbody td.channels-list__actions::before {
        content: none;
    }
}

.dashboard-today-kpis {
    margin-bottom: 1rem;
}

.dashboard-today-kpis__heading {
    margin: 0 0 0.25rem;
    font-size: 1.05rem;
    font-weight: 600;
}

.dashboard-today-kpis__subtitle {
    margin: 0 0 0.75rem;
    font-size: 0.8125rem;
}

/* KPI: см. .conv-kpi-bar (единый блок) */

.dashboard-period-kpis__types-label {
    margin: 0.85rem 0 0.4rem;
    font-size: 0.8125rem;
}

.dashboard-period-toolbar {
    margin: 0 0 0.45rem;
}

.dashboard-period-toolbar__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.45rem;
    margin-bottom: 0.35rem;
    padding-bottom: 0.2rem;
    border-bottom: 1px solid rgba(203, 213, 225, 0.45);
}

.dashboard-period-toolbar__label {
    font-size: 0.75rem;
    font-weight: 600;
    flex: 0 0 auto;
}

.dashboard-period-toolbar__pills {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
}

.dashboard-period-toolbar__pill {
    font-size: 11px;
    line-height: 1;
    min-height: 26px;
    padding: 5px 9px;
    border-radius: 999px;
    white-space: nowrap;
}

.dashboard-period-toolbar__pill.button-secondary.active,
.dashboard-period-toolbar__pill.active {
    border-color: var(--accent, #169873);
    color: var(--accent, #169873);
    background: var(--accent-muted, rgba(22, 152, 115, 0.12));
    font-weight: 600;
    box-shadow: 0 0 0 1px rgba(22, 152, 115, 0.35), 0 2px 10px rgba(22, 152, 115, 0.12);
}

.dashboard-period-toolbar__pill.button-secondary.active:hover,
.dashboard-period-toolbar__pill.active:hover {
    color: var(--accent, #169873);
    border-color: var(--accent-hover, #117a5c);
    background: var(--accent-muted, rgba(22, 152, 115, 0.16));
}

.dashboard-period-toolbar__custom-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0 0;
    border-top: none;
    min-width: 0;
}

.dashboard-period-toolbar__custom-wrap--active {
    border-left: 2px solid var(--accent, #169873);
    padding-left: 0.42rem;
    margin-left: -0.42rem;
}

.dashboard-period-toolbar__custom-label {
    font-size: 0.73rem;
    white-space: nowrap;
}

.dashboard-period-toolbar__date {
    font: inherit;
    font-size: 0.78rem;
    line-height: 1.1;
    min-height: 28px;
    padding: 0.22rem 0.38rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: inherit;
    min-width: 118px;
}

.dashboard-period-toolbar__err {
    font-size: 0.72rem;
    flex: 1 1 100%;
}


/* Аналитика: воронка и пояснение по центру */
.admin-analytics-funnel-centered__title {
    text-align: center;
    width: 100%;
}

.admin-analytics-funnel-centered__row {
    justify-content: center;
}

.admin-analytics-funnel-centered__note {
    text-align: center;
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
}

.admin-dashboard-funnel-row {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    justify-content: center;
    gap: 6px;
    margin: 0 0 18px;
}

.admin-funnel-step {
    box-sizing: border-box;
    text-align: center;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    flex: 1 1 108px;
    min-width: 92px;
    max-width: 200px;
    padding: 12px 8px;
}

.funnel-step-sep {
    align-self: center;
    font-size: 1rem;
    line-height: 1;
    user-select: none;
}

@media (max-width: 640px) {
    .admin-dashboard-funnel-row {
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
    }

    .funnel-step-sep {
        display: none;
    }

    .admin-funnel-step {
        flex: none;
        max-width: none;
        width: 100%;
    }
}

/* Admin analytics UI-001: pyramid + metrics */
.admin-analytics-funnel__title {
    margin: 0;
    font-size: 1.05rem;
}

.admin-analytics-funnel__grid {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(240px, 340px);
    gap: 18px;
    align-items: start;
}

.admin-funnel-pyramid {
    display: grid;
    gap: 12px;
    padding: 10px 4px;
}

.admin-funnel-pyramid__level {
    position: relative;
    margin-left: auto;
    margin-right: auto;
    width: var(--w, 100%);
    min-height: 58px;
    border: 1px solid rgba(148, 163, 184, 0.34);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(241, 245, 249, 0.9));
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    display: grid;
    align-content: center;
    justify-items: center;
    padding: 10px 12px;
    cursor: default;
    transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
    clip-path: polygon(0 0, 100% 0, 94% 100%, 6% 100%);
}

.admin-funnel-pyramid__level:hover {
    transform: translateY(-2px);
    border-color: rgba(22, 152, 115, 0.44);
    box-shadow: 0 16px 32px rgba(30, 64, 175, 0.2);
}

.admin-funnel-pyramid__level[data-step='visits'] {
    background: linear-gradient(135deg, rgba(219, 234, 254, 0.95), rgba(147, 197, 253, 0.95));
}

.admin-funnel-pyramid__level[data-step='users'] {
    background: linear-gradient(135deg, rgba(199, 210, 254, 0.95), rgba(129, 140, 248, 0.94));
}

.admin-funnel-pyramid__level[data-step='conversions'] {
    background: linear-gradient(135deg, rgba(254, 215, 170, 0.95), rgba(251, 146, 60, 0.9));
}

.admin-funnel-pyramid__level[data-step='target_conversions'] {
    background: linear-gradient(135deg, rgba(254, 205, 211, 0.95), rgba(244, 63, 94, 0.86));
}

.admin-funnel-pyramid__label {
    font-size: 12px;
    color: rgba(15, 23, 42, 0.8);
    line-height: 1.1;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.admin-funnel-pyramid__value {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-top: 4px;
}

.admin-funnel-pyramid__tooltip {
    position: absolute;
    top: 50%;
    left: calc(100% + 10px);
    transform: translateY(-50%);
    background: rgba(17, 24, 39, 0.96);
    color: #fff;
    border-radius: 10px;
    padding: 10px 12px;
    min-width: 160px;
    max-width: 240px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.12s ease;
    z-index: 3;
}

.admin-funnel-pyramid__level:hover .admin-funnel-pyramid__tooltip {
    opacity: 1;
}

.admin-analytics-metrics__title {
    margin: 2px 0 10px;
    font-size: 1rem;
}

.admin-analytics-metrics__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.admin-analytics-metric {
    position: relative;
    border: 1px solid rgba(148, 163, 184, 0.32);
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.92));
    border-radius: 14px;
    padding: 12px 12px 14px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.admin-analytics-metric:hover,
.admin-analytics-metric:focus-within {
    transform: translateY(-1px);
    border-color: rgba(22, 152, 115, 0.42);
    box-shadow: 0 14px 30px rgba(30, 64, 175, 0.16);
}

.admin-analytics-metric__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.admin-analytics-metric__label {
    font-size: 12px;
    color: var(--muted);
    font-weight: 700;
    letter-spacing: 0.02em;
}

.admin-analytics-metric__help {
    width: 24px;
    height: 24px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: #eef2ff;
    color: #0a5640;
    font-weight: 800;
    font-size: 13px;
    line-height: 1;
    padding: 0;
    cursor: help;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.12s ease, background 0.12s ease, color 0.12s ease, box-shadow 0.12s ease;
}

.admin-analytics-metric__help:hover {
    border-color: rgba(22, 152, 115, 0.45);
    background: #d1efe6;
    color: #0e6e52;
}

.admin-analytics-metric__help:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(22, 152, 115, 0.22);
}

.admin-analytics-metric__value {
    margin-top: 6px;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.admin-analytics-metric__hint {
    position: absolute;
    top: 10px;
    right: calc(100% + 8px);
    width: min(20rem, 68vw);
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.96);
    color: #f8fafc;
    font-size: 12px;
    line-height: 1.4;
    box-shadow: 0 14px 30px rgba(2, 6, 23, 0.28);
    opacity: 0;
    pointer-events: none;
    transform: translateY(2px);
    transition: opacity 0.12s ease, transform 0.12s ease;
    z-index: 4;
}

.admin-analytics-metric:hover .admin-analytics-metric__hint,
.admin-analytics-metric:focus-within .admin-analytics-metric__hint {
    opacity: 1;
    transform: translateY(0);
}

.metric-help {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    vertical-align: middle;
}

.metric-help__label {
    white-space: nowrap;
}

.metric-help__trigger {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.55);
    background: #f1f5f9;
    color: #0f172a;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: help;
}

.metric-help__trigger:hover {
    border-color: rgba(22, 152, 115, 0.48);
    background: #dff5ee;
    color: #0a5640;
}

.metric-help__trigger:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(22, 152, 115, 0.22);
}

.metric-help__tooltip {
    position: absolute;
    left: 0;
    top: calc(100% + 8px);
    width: min(21rem, 80vw);
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.96);
    color: #f8fafc;
    font-size: 12px;
    line-height: 1.35;
    box-shadow: 0 10px 24px rgba(2, 6, 23, 0.28);
    opacity: 0;
    pointer-events: none;
    transform: translateY(2px);
    transition: opacity 0.12s ease, transform 0.12s ease;
    z-index: 10;
}

.metric-help:hover .metric-help__tooltip,
.metric-help:focus-within .metric-help__tooltip {
    opacity: 1;
    transform: translateY(0);
}

.admin-analytics-scroll-x {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.admin-analytics-scroll-x .chart-container {
    min-width: 560px;
}

@media (max-width: 1023px) {
    .admin-analytics-funnel__grid {
        grid-template-columns: 1fr;
    }

    .admin-funnel-pyramid__tooltip {
        left: 50%;
        top: calc(100% + 8px);
        transform: translate(-50%, 0);
    }

    .admin-analytics-metric__hint {
        right: auto;
        left: 0;
        top: calc(100% + 8px);
        width: min(22rem, 82vw);
    }
}

@media (max-width: 640px) {
    .admin-analytics-scroll-x .chart-container {
        min-width: 520px;
    }
}

.dashboard-conversion-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

@media (max-width: 640px) {
    .dashboard-conversion-cards {
        grid-template-columns: 1fr;
    }
}

.dashboard-conversion-cards__card {
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    box-sizing: border-box;
}

.integration-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
    margin: 0 0 1rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}

.integration-tabs__tab {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.85rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--muted);
    text-decoration: none;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    border: 1px solid transparent;
    margin-bottom: -1px;
}

.integration-tabs__tab:hover {
    color: var(--accent);
    background: var(--accent-muted);
}

.integration-tabs__tab--active {
    color: var(--accent);
    background: var(--surface);
    border-color: var(--border);
    border-bottom-color: var(--surface);
}

.integration-tabs__panel {
    margin-bottom: 1.25rem;
}

.dashboard-traffic {
    margin-bottom: 1rem;
}

.dashboard-saas .chart-container {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    height: 320px;
    min-height: 240px;
    position: relative;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.dashboard-traffic__title {
    font-size: 1rem;
    margin: 0 0 0.35rem;
}

.dashboard-traffic__period {
    font-size: 0.8125rem;
    margin: 0 0 0.75rem;
}

.dashboard-traffic__grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.dashboard-traffic__metric {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.dashboard-traffic__metric-value {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.dashboard-traffic__metric-label {
    font-size: 0.75rem;
    color: var(--muted);
    font-weight: 500;
}

.dashboard-traffic__pages-table {
    font-size: 0.85rem;
}

h1 {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin: 0 0 0.5rem;
    line-height: 1.25;
}

h2 {
    font-size: 16px;
    font-weight: 600;
    margin: 1.35rem 0 0.65rem;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

p {
    font-size: 14px;
    font-weight: 400;
    margin: 0 0 0.75rem;
    line-height: 1.5;
}

.small {
    font-size: 12px;
    font-weight: 400;
    color: #6b7280;
}

.text-success {
    color: var(--success);
}

.text-danger {
    color: var(--danger);
}

.card,
.dash-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    padding: 1.35rem 1.4rem;
    margin-bottom: 1.25rem;
    animation: fadeInUp 0.4s ease;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover,
.dash-card:hover {
    transform: translateY(-2px);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 16px;
    border-radius: var(--btn-radius-pill);
    background: var(--btn-glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--btn-glass-border);
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    line-height: 1;
    color: var(--btn-glass-text);
    cursor: pointer;
    text-decoration: none;
    margin: 0;
    box-sizing: border-box;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease,
        color 0.2s ease;
}

.button:hover {
    transform: translateY(-1px);
    box-shadow: var(--btn-glass-shadow-hover);
}

.button:active {
    transform: scale(0.98);
}

.button:focus-visible {
    outline: none;
    box-shadow: var(--btn-focus-ring);
}

.button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.button-primary,
.button.button-primary {
    background: var(--btn-accent-soft-bg);
    border-color: var(--btn-accent-soft-border);
    color: var(--btn-accent-soft-text);
}

.button-primary:hover,
.button.button-primary:hover {
    background: var(--btn-accent-soft-bg-hover);
    border-color: var(--btn-accent-soft-border-hover);
    color: var(--btn-accent-soft-text-hover);
}

.button-secondary,
.button.button-secondary {
    background: var(--btn-glass-muted-bg);
    border-color: var(--btn-glass-muted-border);
    color: var(--btn-glass-muted-text);
}

.button-secondary:hover,
.button.button-secondary:hover {
    background: var(--btn-glass-muted-bg-hover);
    color: var(--text);
}

/* Сегментированные «чипы» (дашборд, входящие): единый компактный glass-стиль */
.segmented {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: stretch;
    padding: 3px;
    border-radius: var(--btn-radius-pill);
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.35);
    gap: 2px;
    box-sizing: border-box;
}

.segmented button,
.segmented a.dash-preset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 4px 10px;
    margin: 0;
    border: none;
    border-radius: var(--btn-radius-pill);
    background: transparent;
    font-size: 12px;
    font-weight: 500;
    font-family: inherit;
    color: #374151;
    cursor: pointer;
    box-shadow: none;
    line-height: 1.2;
    box-sizing: border-box;
    text-decoration: none;
}

.segmented a.dash-preset {
    -webkit-appearance: none;
    appearance: none;
}

.segmented button:hover,
.segmented a.dash-preset:hover {
    background: rgba(0, 0, 0, 0.04);
}

.segmented button:focus-visible,
.segmented a.dash-preset:focus-visible {
    outline: none;
    box-shadow: var(--btn-focus-ring);
}

.segmented button.active,
.segmented a.dash-preset.active,
.segmented .active {
    background: #fff;
    color: #111;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Ссылки внутри .card не наследуют accent от .card a */
.card .segmented a.dash-preset {
    color: #374151;
    font-weight: 500;
}

.card .segmented a.dash-preset:hover {
    color: #374151;
    text-decoration: none;
}

.card .segmented a.dash-preset.active {
    color: #111;
    font-weight: 600;
}

.kpi {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 0.65rem;
}

.kpi-item {
    display: inline-flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    padding: 12px 16px;
    animation: fadeInUp 0.4s ease;
    transition: transform 0.2s ease;
}

.kpi-item:hover {
    transform: translateY(-2px);
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.04);
    border-radius: 999px;
}

::-webkit-scrollbar-thumb {
    background: rgba(107, 114, 128, 0.35);
    border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(107, 114, 128, 0.5);
}

table.data {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

table.data th,
table.data td {
    border: 1px solid var(--border);
    padding: 0.55rem 0.75rem;
    text-align: left;
}

table.data th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.table-sort-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    width: 100%;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.table-sort-btn__icon {
    color: var(--muted);
    font-size: 0.75rem;
    line-height: 1;
}

.table-sort-btn:hover .table-sort-btn__icon,
.table-sort-btn:focus-visible .table-sort-btn__icon {
    color: var(--accent);
}

table.data th.is-col-order-enabled {
    position: relative;
    user-select: none;
}

.col-order-handle {
    margin-left: auto;
    padding-left: 0.25rem;
    color: var(--muted);
    font-size: 0.74rem;
    line-height: 1;
    cursor: grab;
    opacity: 0.8;
}

.table-sort-btn:hover .col-order-handle,
.table-sort-btn:focus-visible .col-order-handle {
    color: var(--accent);
    opacity: 1;
}

.table-col-controls__chart-wrap {
    width: 100%;
    margin-top: 8px;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px;
    background: #fff;
}

.table-col-controls__chart-host {
    position: relative;
    width: 100%;
    min-height: 280px;
}

.table-col-controls__chart-canvas {
    width: 100%;
    height: 280px;
}

.table-col-controls__chart-hint {
    margin: 8px 0 0;
    font-size: 12px;
}

table.data.is-col-order-dragging th.col-order-drop-target {
    background: color-mix(in srgb, var(--accent) 12%, #f9fafb);
    box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent) 55%, #ffffff);
}

.table-col-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    justify-content: flex-end;
    margin: 0.35rem 0 0.25rem;
    position: relative;
}

.table-col-controls__panel {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 220px;
    max-width: min(320px, 90vw);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    box-shadow: var(--shadow);
    z-index: 30;
    padding: 0.55rem 0.65rem;
}

.table-col-controls__list {
    display: grid;
    gap: 0.3rem;
    max-height: 260px;
    overflow: auto;
}

.table-col-controls__item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.82rem;
    font-weight: 500;
    margin: 0;
    cursor: pointer;
}

.table-col-controls__item input[type='checkbox'] {
    width: auto;
    margin: 0;
}

.table-col-controls__actions {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
}

.table-col-controls__actions .button {
    width: 100%;
}

table.data th.col-order-hidden-cell,
table.data td.col-order-hidden-cell {
    display: none;
}

@media (max-width: 640px) {
    .table-sort-btn {
        gap: 0.25rem;
    }

    .col-order-handle {
        font-size: 0.68rem;
    }
}

table.data tbody tr:nth-child(even) td {
    background: rgba(249, 250, 251, 0.65);
}

table.data tbody td {
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

table.data tr:hover td {
    background: #fafbfc;
}

.flash {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.flash.ok {
    background: var(--success-bg);
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.flash.err {
    background: var(--danger-bg);
    color: #991b1b;
    border: 1px solid #fecaca;
}

.flash.flash-pending {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #e5e7eb;
}

label {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    margin: 0.85rem 0 0.35rem;
    color: #374151;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
    width: 100%;
    max-width: 28rem;
    padding: 0.55rem 0.65rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font: inherit;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-muted);
}

textarea {
    min-height: 6rem;
    max-width: 100%;
}

.btn {
    display: inline-block;
    margin-top: 0;
    padding: 0.55rem 1.15rem;
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    border: 1px solid transparent;
    border-radius: var(--btn-radius);
    font: inherit;
    font-weight: var(--btn-font-weight);
    cursor: pointer;
    text-decoration: none;
    transition: var(--btn-transition);
}

.btn:hover {
    background: var(--btn-primary-bg-hover);
}

.btn:focus-visible {
    outline: none;
    box-shadow: var(--btn-focus-ring);
}

.btn:active {
    transform: scale(0.98);
}

.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* Вертикальный ритм сабмита в простых карточках (не кабинет SaaS). */
.card form .btn {
    margin-top: 1rem;
}

.btn-secondary {
    background: var(--btn-secondary-bg);
    color: var(--btn-secondary-text);
}

.btn-secondary:hover {
    background: var(--btn-secondary-bg-hover);
}
.btn-danger {
    background: var(--danger);
    color: #fff;
    border-color: transparent;
}
.btn-danger:hover {
    background: #b91c1c;
}
.btn.btn-primary {
    /* alias: same as .btn */
}
.btn--sm {
    padding: 5px 12px;
    font-size: var(--text-sm);
    height: 30px;
}
.btn--danger-outline {
    background: transparent;
    color: var(--danger);
    border: 1px solid var(--danger);
}
.btn--danger-outline:hover {
    background: rgba(220, 38, 38, 0.06);
}

/* Channel progress bar (visits page) */
.channel-bar {
    width: 60px;
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    overflow: hidden;
    flex-shrink: 0;
}
.channel-bar__fill {
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
    transition: width 0.3s ease;
}
.channel-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}
.channel-table-num {
    text-align: right;
    white-space: nowrap;
}
.channel-table-num--head {
    text-align: right;
}
.channel-visits-cell {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: flex-end;
}
.tq-preset-submit {
    width: 100%;
}
@media (max-width: 640px) {
    .channel-bar {
        width: 40px;
    }
}

/* Bot registry */
.bot-registry-muted {
    color: var(--muted);
    font-size: var(--text-sm);
    margin-top: 8px;
}
.bot-registry-table tr.off {
    opacity: 0.45;
}
.bot-registry-table code {
    font-size: var(--text-sm);
}


.code {
    background: #f3f4f6;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem;
    overflow-x: auto;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.85rem;
    white-space: pre-wrap;
    word-break: break-all;
}


.guest-lead {
    color: var(--muted);
    margin: 0 0 1rem;
    font-size: 0.95rem;
}

.form-hint {
    font-size: 0.85rem;
    color: var(--muted);
    margin-top: 0.5rem;
}

.form-hint a,
.card a {
    color: var(--accent);
    font-weight: 600;
}

.form-hint a:hover,
.card a:hover {
    text-decoration: underline;
}

/* Установщик (install/index.php) */
.install-wrap {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 1.5rem var(--content-pad-inline) 3rem;
}

.install-card h2 {
    margin-top: 0;
}

.steps {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    margin-bottom: 1.25rem;
    padding: 0.75rem 1rem;
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.steps strong {
    font-weight: 700;
}

.ok { color: var(--success); }
.err { color: var(--danger); }
.muted { color: var(--muted); font-size: 0.9rem; }
.info { color: var(--success); }

.card.err {
    border-color: rgba(252, 165, 165, 0.6);
    background: rgba(254, 242, 242, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.toolbar form {
    display: inline-block;
    margin-right: 0.75rem;
    margin-bottom: 0.5rem;
    vertical-align: middle;
}

button:not(.btn):not(.btn-secondary):not(.button):not(.icon-button):not(.dash-preset):not(.dash-chart-mode):not(
        .dash-day-chart-mode
    ):not(.dashboard-period-toolbar__pill):not(.inbox-email-modal__close) {
    background: var(--btn-neutral-bg);
    color: var(--btn-neutral-text);
    font: inherit;
    font-weight: var(--btn-font-weight);
    cursor: pointer;
    transition: var(--btn-transition);
}

button:not(.btn):not(.btn-secondary):not(.button):not(.icon-button):not(.dash-preset):not(.dash-chart-mode):not(
        .dash-day-chart-mode
    ):not(.dashboard-period-toolbar__pill):not(.inbox-email-modal__close):hover {
    background: var(--btn-neutral-bg-hover);
}

button:not(.btn):not(.btn-secondary):not(.button):not(.icon-button):not(.dash-preset):not(.dash-chart-mode):not(
        .dash-day-chart-mode
    ):not(.dashboard-period-toolbar__pill):not(.inbox-email-modal__close):focus-visible {
    outline: none;
    box-shadow: var(--btn-focus-ring);
}

/* Страница «установщик отключен» */
.page-simple {
    max-width: 28rem;
    margin: 4rem auto;
    padding: 2rem;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    text-align: center;
}

.page-simple h1 {
    font-size: 1.35rem;
}

.page-simple a {
    color: var(--accent);
    font-weight: 600;
}

/* Входящие: панель синхронизации и таблица */
.inbox-sync-card {
    margin-bottom: 1.25rem;
}

.inbox-sync-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 0.75rem;
}

.inbox-sync-form {
    display: inline-block;
    margin: 0;
}

.inbox-sync-hint {
    margin: 0.65rem 0 0;
    font-size: 0.9rem;
    line-height: 1.45;
}

.inbox-last-sync {
    margin: 0.85rem 0 0;
    padding-top: 0.85rem;
    border-top: 1px solid var(--border);
    font-size: 0.9rem;
    line-height: 1.45;
}

.inbox-last-sync__label {
    font-weight: 600;
    color: var(--text);
    margin-right: 0.35rem;
}

.inbox-progress-card {
    margin-bottom: 1.25rem;
}

.inbox-mail-card__title {
    margin: 0 0 0.85rem;
    font-size: 1.05rem;
}

.inbox-mail-table-wrap {
    margin: 0 -0.25rem;
    overflow-x: auto;
}

table.data.inbox-mail-table {
    font-size: 0.875rem;
    min-width: 100%;
}

table.data.inbox-mail-table th.data-col-num,
table.data.inbox-mail-table td.data-col-num {
    width: 3.25rem;
    text-align: right;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
    font-size: 0.82rem;
}

table.data.inbox-mail-table th.data-col-action,
table.data.inbox-mail-table td.data-col-action {
    width: 5.5rem;
    white-space: nowrap;
    text-align: right;
}

.inbox-filter-card {
    margin-bottom: 1.25rem;
}

.inbox-filter-card__title {
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
}

.inbox-filter-period-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin-bottom: 0.85rem;
}

.inbox-filter-period-head .inbox-filter-presets {
    margin-bottom: 0;
}

.inbox-filter-period-label {
    margin: 0;
    font-size: 0.9rem;
}

.inbox-filter-card .inbox-filter-presets.segmented {
    margin-bottom: 0;
}

.inbox-filter-custom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
}

.inbox-filter-custom input[type="date"] {
    margin: 0 0.15rem;
}

.btn-link {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    color: var(--accent);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.btn-link:hover {
    color: var(--accent-hover);
}

.btn-link:focus-visible {
    outline: none;
    border-radius: 2px;
    box-shadow: var(--btn-focus-ring);
}

/* Икон-кнопки (дашборд и др.): тот же радиус/бордер, что у glass-кнопок */
.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--btn-icon-size);
    height: var(--btn-icon-size);
    min-width: var(--btn-icon-size);
    min-height: var(--btn-icon-size);
    padding: 0;
    margin: 0;
    border-radius: var(--btn-radius-pill);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    border: 1px solid var(--btn-icon-border);
    background: var(--btn-icon-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--btn-icon-text);
    font-family: inherit;
    box-shadow: none;
    opacity: 1;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease,
        box-shadow 0.2s ease;
}

.icon-button svg {
    display: block;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    fill: none;
}

.icon-button svg path {
    stroke: currentColor;
}

.icon-button:hover {
    background: var(--btn-icon-bg-hover);
    border-color: var(--btn-icon-border-hover);
    color: var(--btn-icon-text-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.icon-button:active {
    transform: scale(0.98);
}

.icon-button:focus-visible {
    outline: none;
    box-shadow: var(--btn-focus-ring);
}

.inbox-utm-cell {
    font-size: 0.8rem;
    max-width: 7rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

table.data.inbox-mail-table--wide {
    min-width: 56rem;
}

.inbox-client-profile-dl {
    margin: 0;
    display: grid;
    grid-template-columns: minmax(6rem, 9rem) 1fr;
    gap: 0.35rem 0.75rem;
    font-size: 0.92rem;
}

.inbox-client-profile-dl dt {
    margin: 0;
    font-weight: 600;
    color: var(--muted);
}

.inbox-client-profile-dl dd {
    margin: 0;
    word-break: break-word;
}

.inbox-client-profile-geo {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr));
    gap: 0.5rem;
}

.inbox-client-profile-geo__item {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.5rem 0.6rem;
    background: color-mix(in srgb, var(--surface) 88%, #eef4ff);
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.inbox-client-profile-geo__label {
    font-size: 0.75rem;
    color: var(--muted);
}

.inbox-client-profile-geo__value {
    font-size: 0.92rem;
    font-weight: 600;
}

.inbox-email-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    padding: 1rem;
    overflow-y: auto;
}

.inbox-email-modal[hidden] {
    display: none !important;
}

.inbox-email-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}

.inbox-email-modal__panel {
    position: relative;
    z-index: 1;
    width: min(42rem, calc(100% - 2rem));
    margin: 8vh auto 2rem;
    max-height: min(85vh, 40rem);
    overflow: auto;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.25rem 1.35rem 1.5rem;
}

.inbox-email-modal__close {
    position: absolute;
    top: 0.65rem;
    right: 0.75rem;
    border: none;
    background: transparent;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: var(--muted);
}

.inbox-email-modal__close:hover {
    color: var(--text);
}

.inbox-email-modal__heading {
    margin: 0 2rem 0.35rem 0;
    font-size: 1.2rem;
    padding-right: 0.5rem;
}

.inbox-email-modal__meta {
    margin: 0 0 0.75rem;
    font-size: 0.88rem;
}

.inbox-email-modal__label {
    margin: 0 0 0.35rem;
    font-weight: 600;
    font-size: 0.95rem;
}

.email-view-body__html {
    max-width: 100%;
    overflow-x: auto;
    line-height: 1.45;
}

.email-view-body__html img {
    max-width: 100%;
    height: auto;
}

.email-view-attachments {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-subtle, #e8e8e8);
}

.email-view-attachments__title {
    margin: 0 0 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.email-view-attachments__list {
    margin: 0;
    padding-left: 1.25rem;
}

.inbox-email-modal__body {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text);
}

.inbox-email-modal__err {
    margin: 0.75rem 0 0;
}

/* Профиль клиента в модалке: длинные URL в колонке «Метка / страница» не ломают таблицу. */
.inbox-email-modal .table-scroll {
    max-width: 100%;
    overflow-x: auto;
}

.inbox-email-modal table.data {
    table-layout: fixed;
    width: 100%;
}

.inbox-email-modal table.data th:nth-child(1),
.inbox-email-modal table.data td:nth-child(1) {
    width: 9.25rem;
}

.inbox-email-modal table.data th:nth-child(2),
.inbox-email-modal table.data td:nth-child(2) {
    width: 5.5rem;
}

.inbox-email-modal table.data th:nth-child(3),
.inbox-email-modal table.data td:nth-child(3) {
    word-break: break-word;
    overflow-wrap: anywhere;
}

/* —— Дашборд лидов —— */
.dashboard-page-head {
    max-width: var(--content-max);
    margin: 0 auto 0.75rem;
    padding: 0 var(--content-pad-inline);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.dashboard-page-head__title {
    margin: 0;
    flex: 1 1 auto;
    min-width: 0;
    font-size: 1.35rem;
    letter-spacing: -0.02em;
}

.dashboard-mail-refresh,
.dashboard-data-refresh {
    margin: 0;
    flex-shrink: 0;
}

.dashboard-data-refresh {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.dashboard-data-refresh__status {
    font-size: 0.8rem;
    line-height: 1.2;
    white-space: nowrap;
}

.global-dash-mail-sync {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin: 0 0 1rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid rgba(17, 24, 39, 0.08);
}

.dash-mail-sync-bar {
    display: flex;
    align-items: center;
    gap: 0.65rem 1rem;
    flex-wrap: wrap;
    justify-content: flex-end;
    flex: 0 1 auto;
    min-width: 0;
}

.dash-mail-sync-bar__meta {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.35;
    color: var(--text);
}

.dash-mail-sync-bar__label {
    color: var(--muted);
    margin-right: 0.25rem;
}

.dash-mail-sync-bar__time {
    font-weight: 500;
}

.dash-mail-sync-bar__empty {
    font-weight: 400;
}

@media (max-width: 640px) {
    .global-dash-mail-sync {
        flex-wrap: nowrap;
        width: 100%;
        max-width: 100%;
        justify-content: flex-end;
        min-width: 0;
    }

    .dash-mail-sync-bar {
        flex: 1 1 auto;
        width: auto;
        max-width: 100%;
        min-width: 0;
        flex-wrap: nowrap;
        justify-content: flex-end;
        align-items: center;
        gap: 0.35rem 0.5rem;
    }

    .dash-mail-sync-bar__meta {
        flex: 1 1 auto;
        min-width: 0;
        margin: 0;
        display: flex;
        flex-wrap: nowrap;
        align-items: baseline;
        gap: 0.2rem 0.35rem;
        font-size: 0.8125rem;
    }

    .dash-mail-sync-bar__time {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        min-width: 0;
    }

    .dashboard-data-refresh {
        flex-shrink: 0;
    }
}

.dashboard-leads {
    max-width: var(--content-max);
    margin: 0 auto 1rem;
    padding: 0 var(--content-pad-inline);
}

.dashboard-leads-status {
    max-width: var(--content-max);
    margin: 0 auto 0.35rem;
    padding: 0 var(--content-pad-inline);
    min-height: 1.25rem;
}

.dashboard-kpi__label {
    font-size: 0.78rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.dashboard-kpi__num {
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text);
}

.dashboard-kpi__row2 {
    font-size: 0.9rem;
}

.dashboard-filters__row {
    margin-bottom: 0.35rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.4rem;
    align-items: center;
}

.dashboard-filters__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
    gap: 0.45rem 0.65rem;
    align-items: end;
    margin-top: 0.35rem;
}

.dashboard-filters__grid > * {
    min-width: 0;
}

.dashboard-filters__grid label {
    font-size: 0.8125rem;
}

@media (max-width: 640px) {
    .dashboard-filters__grid {
        grid-template-columns: 1fr;
    }
}

.dashboard-chart-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.dashboard-chart-host {
    position: relative;
}

.data--dense th,
.data--dense td {
    padding: 0.35rem 0.5rem;
    font-size: 0.9rem;
}

.card--compact {
    padding: 0.65rem 1rem;
    margin-bottom: 1.5rem;
}

.dashboard-tech {
    max-width: var(--content-max);
    margin: 0 auto 2rem;
}

.dashboard-tech__title {
    margin: 0 0 0.35rem;
    font-size: 0.95rem;
}

.dashboard-tech__meta {
    margin: 0;
    font-size: 0.85rem;
}

.inbox-client-filter-banner {
    margin: 0 0 0.75rem;
    padding: 0;
}

/* —— Дашборд: SaaS-лейаут (только под .dashboard-saas) —— */
.dashboard-saas {
    font-size: 14px;
    color: #111;
}

.dashboard-saas.admin-page--fluid {
    min-width: 0;
    max-width: 100%;
    overflow-x: clip;
}

.dashboard-saas .container {
    box-sizing: border-box;
    width: 100%;
    max-width: var(--content-max);
    margin-inline: auto;
    padding-block: 24px;
    padding-inline: 24px;
}

#admin-analytics-root.dashboard-leads,
#dashboard-leads-root.dashboard-leads {
    min-width: 0;
    max-width: 100%;
}

.dashboard-saas .dashboard-page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    max-width: none;
    margin: 0 0 24px;
    padding: 0;
    width: 100%;
}

.dashboard-saas .dashboard-page-head__title {
    margin: 0;
}

.dashboard-saas .dashboard-page-head .dash-mail-sync-bar {
    margin: 0;
    padding: 0;
    justify-content: flex-end;
}

.dashboard-saas .dashboard-leads {
    max-width: none;
    margin: 0 0 24px;
    padding: 0;
}

.dashboard-saas .dashboard-leads-status {
    max-width: none;
    margin: 0 0 12px;
    padding: 0;
}

.admin-fullscreen-loader {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(17, 24, 39, 0.35);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.admin-fullscreen-loader[hidden] {
    display: none;
}

.admin-fullscreen-loader__panel {
    width: min(440px, 92vw);
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 14px;
    background: var(--surface, #fff);
    box-shadow: 0 20px 55px rgba(15, 23, 42, 0.18);
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.admin-fullscreen-loader__infinity-wrap {
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 0 0 14px;
}

.admin-fullscreen-loader__infinity {
    width: min(200px, 56vw);
    height: auto;
    display: block;
}

.admin-fullscreen-loader__infinity-track {
    stroke: var(--border, #e5e7eb);
}

.admin-fullscreen-loader__infinity-progress {
    stroke: var(--accent, #169873);
    stroke-dasharray: 24 76;
    stroke-dashoffset: 0;
    animation: admin-loader-infinity-march 1.35s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
    .admin-fullscreen-loader__infinity-progress {
        animation-duration: 2.8s;
    }
}

@keyframes admin-loader-infinity-march {
    to {
        stroke-dashoffset: -100;
    }
}

.admin-fullscreen-loader__title {
    margin: 0;
    font-weight: 600;
    color: var(--text, #111827);
}

.dashboard-saas .dashboard-tech {
    max-width: none;
    margin: 0 auto 2rem;
}

.dashboard-saas h1 {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin: 0 0 0.35rem;
    color: #111;
}

.dashboard-saas h2 {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.3;
    margin: 0 0 12px;
    color: #111;
}

.dashboard-saas .dash-card h2:first-child,
.dashboard-saas .card--compact h2:first-child {
    margin-top: 0;
}

.dashboard-saas .text-muted {
    color: #777;
}

.dashboard-saas .dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

@media (max-width: 1024px) {
    .dashboard-saas .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-saas .dash-span-12,
    .dashboard-saas .dash-span-8,
    .dashboard-saas .dash-span-4 {
        grid-column: 1 / -1;
    }
}

.dashboard-saas .dash-span-12 {
    grid-column: 1 / -1;
}

.dashboard-saas .dash-span-8 {
    grid-column: 1;
    min-width: 0;
}

.dashboard-saas .dash-span-4 {
    grid-column: 2;
    min-width: 0;
}

/* Сетка 12 колонок там, где нужны dash-span-4/6/8 (карточка клиента и т.д.) */
.dashboard-saas .dashboard-grid.dashboard-grid--legacy-12 {
    grid-template-columns: repeat(12, 1fr);
}

.dashboard-saas .dashboard-grid.dashboard-grid--legacy-12 .dash-span-12 {
    grid-column: span 12;
}

.dashboard-saas .dashboard-grid.dashboard-grid--legacy-12 .dash-span-8 {
    grid-column: span 8;
}

.dashboard-saas .dashboard-grid.dashboard-grid--legacy-12 .dash-span-6 {
    grid-column: span 6;
}

.dashboard-saas .dashboard-grid.dashboard-grid--legacy-12 .dash-span-4 {
    grid-column: span 4;
}

@media (max-width: 1024px) {
    .dashboard-saas .dashboard-grid.dashboard-grid--legacy-12 .dash-span-12,
    .dashboard-saas .dashboard-grid.dashboard-grid--legacy-12 .dash-span-8,
    .dashboard-saas .dashboard-grid.dashboard-grid--legacy-12 .dash-span-6,
    .dashboard-saas .dashboard-grid.dashboard-grid--legacy-12 .dash-span-4 {
        grid-column: 1 / -1;
    }
}

.dashboard-saas .dashboard-section {
    margin-bottom: 24px;
}

.dashboard-saas .form-leads-page__filters-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
    align-items: flex-end;
    margin-top: 16px;
}

.dashboard-saas .admin-filter-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
    align-items: flex-end;
    margin-top: 16px;
}

.dashboard-saas .admin-filter-grid > * {
    min-width: 0;
}

@media (max-width: 768px) {
    .dashboard-saas .admin-filter-grid {
        flex-direction: column;
        align-items: stretch;
    }
}

.dashboard-saas .form-leads-page__field {
    display: block;
    font-size: 13px;
}

.dashboard-saas .form-leads-page__field--actions {
    display: flex;
    align-items: flex-end;
}

/* Первичные кнопки (.btn) в кабинете: без лишнего отступа сверху (сетка/родитель задаёт интервалы). */
.dashboard-saas .btn {
    margin-top: 0;
}

/* Формы внутри карточек кабинета: без наследия margin-top от .card form .btn */
.dashboard-saas .card form .btn {
    margin-top: 0;
}

.dashboard-saas .form-leads-page .fl-client-profile-btn {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit;
    color: var(--accent, #169873);
    cursor: pointer;
    text-decoration: underline;
    text-align: left;
}

.fl-messenger-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px 4px 8px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--fl-messenger-color, #64748b) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--fl-messenger-color, #94a3b8) 28%, transparent);
    font-weight: 700;
    font-size: 13px;
    line-height: 1.2;
    color: #0f172a;
    white-space: nowrap;
}

.fl-messenger-chip__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 16px;
    line-height: 1;
}

.fl-messenger-chip__icon .service-icon {
    margin-right: 0;
}

.service-icon {
    width: 18px;
    height: 18px;
    display: inline-block;
    vertical-align: middle;
    object-fit: contain;
    margin-right: 6px;
}

.service-icon-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    vertical-align: middle;
}

.badge--keyword .service-icon {
    margin-right: 0;
    vertical-align: middle;
    flex-shrink: 0;
    display: block;
    width: 14px;
    height: 14px;
}

.fl-messenger-chip__label {
    letter-spacing: 0.01em;
}

.dashboard-saas .form-leads-page .fl-client-profile-btn:hover {
    opacity: 0.88;
}

/* Таблица лидов / лендинг-демо: визуально скрыть последние цифры номера */
.fl-phone-tail-blur {
    display: inline-block;
    filter: blur(4px);
    -webkit-filter: blur(4px);
    user-select: none;
    vertical-align: baseline;
    margin-left: 0.04em;
}

.fl-steps-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 6px;
    border-radius: 4px;
    background: #ecfdf5;
    color: #047857;
    font-size: 0.72rem;
    font-weight: 500;
    vertical-align: middle;
}

.adr-lead-row--duplicate {
    opacity: 0.55;
}

.adr-badge--duplicate {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 6px;
    border-radius: 4px;
    background: #f3f4f6;
    color: #9ca3af;
    font-size: 0.72rem;
    font-weight: 500;
}

.dashboard-saas .kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

@media (max-width: 1024px) {
    .dashboard-saas .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .dashboard-saas .kpi-grid {
        grid-template-columns: 1fr;
    }
}

.dashboard-saas .container > .conv-kpi-bar .conv-kpi-bar__card {
    min-height: 72px;
    padding: 14px 12px;
    box-sizing: border-box;
}

.dashboard-saas .dashboard-traffic .top-pages {
    min-width: 0;
}

.dashboard-saas .top-pages td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dashboard-saas .conversions-table {
    font-size: 13px;
}

.dashboard-saas .conversions-table td {
    white-space: nowrap;
}

.dashboard-saas table.dash-channels-table {
    width: 100%;
    table-layout: fixed;
}

.dashboard-saas table.dash-channels-table thead th:nth-child(1) {
    width: 30%;
}

.dashboard-saas table.dash-channels-table thead th:nth-child(2) {
    width: 20%;
}

.dashboard-saas table.dash-channels-table thead th:nth-child(3) {
    width: 20%;
}

.dashboard-saas table.dash-channels-table thead th:nth-child(4) {
    width: 15%;
}

.dashboard-saas table.dash-channels-table thead th:nth-child(5) {
    width: 15%;
}

.dashboard-saas .dash-card,
.dashboard-saas .card {
    padding: 20px;
    box-sizing: border-box;
}

.dashboard-saas .dash-card a {
    color: var(--accent);
    font-weight: 600;
}

.dashboard-saas .dash-card a:hover {
    text-decoration: underline;
}

.dashboard-saas .card--compact {
    padding: 16px 20px;
}

.dashboard-saas table.data,
.dashboard-saas .dash-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    border-radius: 8px;
    overflow: hidden;
}

.dashboard-saas table.data th,
.dashboard-saas .dash-table th {
    text-align: left;
    font-weight: 500;
    color: #6b7280;
    padding: 10px;
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(249, 250, 251, 0.85);
    vertical-align: top;
}

.dashboard-saas table.data td,
.dashboard-saas .dash-table td {
    text-align: left;
    padding: 10px;
    border: none;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    vertical-align: top;
}

.dashboard-saas table.data tbody tr:nth-child(even) td,
.dashboard-saas .dash-table tbody tr:nth-child(even) td {
    background: rgba(249, 250, 251, 0.45);
}

.dashboard-saas table.data.data--dense th,
.dashboard-saas table.data.data--dense td,
.dashboard-saas .dash-table.data--dense th,
.dashboard-saas .dash-table.data--dense td {
    padding: 10px;
    font-size: 13px;
}

.dashboard-saas table.data tr:hover td,
.dashboard-saas .dash-table tr:hover td {
    background: rgba(0, 0, 0, 0.02);
}

.dashboard-saas .chart,
.dashboard-saas .dashboard-chart-host.chart,
.dashboard-saas .admin-analytics-chart-host,
.dashboard-saas .admin-analytics-day-chart-host,
.admin-analytics-report-chart {
    position: relative;
    width: 100%;
    max-width: 100%;
    min-height: clamp(240px, 48vw, 320px);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(22, 152, 115, 0.06) 0%, rgba(22, 152, 115, 0.01) 100%);
    border: 1px solid rgba(22, 152, 115, 0.14);
    padding: 0.35rem;
}

@media (max-width: 640px) {
    .dashboard-saas .chart,
    .dashboard-saas .dashboard-chart-host.chart,
    .dashboard-saas .admin-analytics-chart-host,
    .dashboard-saas .admin-analytics-day-chart-host,
    .admin-analytics-report-chart {
        min-height: 260px;
    }
}

.dashboard-saas .dashboard-chart-head {
    margin-bottom: 12px;
}

.dashboard-saas .dashboard-filters.dash-card {
    padding: 12px 14px;
    margin-bottom: 12px;
}

.dashboard-saas .dashboard-filters {
    font-size: 12px;
    line-height: 1.35;
}

.dashboard-saas .dashboard-filters__row {
    margin-bottom: 6px;
    gap: 0.2rem 0.35rem;
    font-size: 12px;
}

.dashboard-saas .dashboard-filters__grid {
    margin-top: 4px;
    gap: 0.35rem 0.5rem;
    grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr));
}

.dashboard-saas .dashboard-filters__grid > * {
    min-width: 0;
}

.dashboard-saas .dashboard-filters__grid .dash-filter-field--full {
    grid-column: 1 / -1;
}

.dashboard-saas .dashboard-filters__grid .dash-filter-channels select.dash-channels {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.dashboard-saas .dashboard-filters__grid label {
    font-size: 12px;
    margin: 0;
}

@media (max-width: 768px) {
    .dashboard-saas .dashboard-filters__grid {
        grid-template-columns: 1fr;
    }
}

/* Кнопки «Применить» / фильтры в блоке дашборда — тот же компактный ритм, что у .segmented */
.dashboard-saas [data-dash-custom-apply],
.dashboard-saas .dash-apply-filters,
.dashboard-saas [data-fl-custom-apply],
.dashboard-saas #fl-filters-apply,
.dashboard-saas .dash-apply-range {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
    min-height: 30px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    height: auto;
    box-sizing: border-box;
}

.dashboard-saas .dashboard-filters .segmented button,
.dashboard-saas .dashboard-filters .segmented a.dash-preset {
    font-size: 12px;
    font-weight: 500;
}

.dashboard-saas .dashboard-filters input[type='text'],
.dashboard-saas .dashboard-filters input[type='date'],
.dashboard-saas .dashboard-filters select {
    max-width: 100%;
    padding: 0.28rem 0.45rem;
    font-size: 12px;
    border-radius: 6px;
}

.dashboard-saas .dashboard-filters .button,
.dashboard-saas .dashboard-filters .btn {
    padding: 0.28rem 0.65rem;
    font-size: 12px;
    min-height: 0;
}

.dashboard-saas .dashboard-filters .dash-range-note {
    margin: 6px 0 0;
    font-size: 12px;
}

.dashboard-saas .dashboard-kpi__row2 {
    margin-top: 4px;
}

@media (max-width: 640px) {
    .dashboard-saas .container {
        padding-block: 16px;
        padding-inline: 12px;
        max-width: 100%;
    }

    .dashboard-saas .dashboard-grid {
        grid-template-columns: 1fr;
        margin-bottom: 16px;
    }

    .dashboard-saas .dash-span-12,
    .dashboard-saas .dash-span-8,
    .dashboard-saas .dash-span-4 {
        grid-column: 1 / -1;
        min-width: 0;
    }
}

@media (max-width: 768px) {
    .dashboard-traffic .button,
    .dashboard-traffic .btn {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        padding: 0 1rem;
    }

    .dashboard-saas .segmented button,
    .dashboard-saas .segmented a.dash-preset,
    .dashboard-saas .dash-chart-mode {
        min-height: 44px;
        padding: 8px 14px;
        font-size: 13px;
    }

    .dashboard-saas [data-dash-custom-apply],
    .dashboard-saas .dash-apply-filters,
    .dashboard-saas [data-fl-custom-apply],
    .dashboard-saas #fl-filters-apply,
    .dashboard-saas .dash-apply-range {
        min-height: 44px;
        padding: 8px 14px;
    }

    .dashboard-saas .dashboard-filters .button,
    .dashboard-saas .dashboard-filters .btn {
        min-height: 44px;
        padding: 0.4rem 0.85rem;
    }

    /* Периодный тулбар оставляем компактным даже на мобильном */
    .dashboard-saas .dashboard-period-toolbar .dashboard-period-toolbar__pill,
    .dashboard-saas .dashboard-period-toolbar .btn,
    .dashboard-saas .dashboard-period-toolbar .button {
        min-height: 26px;
        height: auto;
        padding: 5px 9px;
        font-size: 11px;
        line-height: 1;
    }

    .dashboard-saas .dashboard-period-toolbar__date {
        min-height: 28px;
        font-size: 12px;
        padding: 0.22rem 0.38rem;
    }

    .dashboard-saas .dashboard-period-toolbar__custom-wrap {
        flex-wrap: wrap;
        gap: 0.3rem 0.35rem;
    }

    .dashboard-saas .icon-button,
    .dashboard-mail-refresh__btn,
    .dashboard-data-refresh__btn {
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
    }
}

/* --- Публичный лендинг (главная для гостя) --- */
body.landing-page {
    background: #ffffff;
    scroll-padding-top: 4.5rem;
}

.landing-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
}

.landing-header__inner {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 0.5rem var(--content-pad-inline);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    flex-wrap: nowrap;
}

.landing-header__burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}

.landing-header__burger:hover {
    background: rgba(15, 23, 42, 0.06);
}

.landing-header__burger:focus-visible {
    outline: 2px solid rgba(22, 152, 115, 0.45);
    outline-offset: 2px;
}

.landing-header__burger-bar {
    display: block;
    width: 1.15rem;
    height: 2px;
    border-radius: 1px;
    background: currentColor;
    transition: transform 0.22s ease, opacity 0.2s ease;
}

.landing-header.is-nav-open .landing-header__burger-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.landing-header.is-nav-open .landing-header__burger-bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.landing-header.is-nav-open .landing-header__burger-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.landing-header__nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    font-size: 0.8rem;
    font-weight: 500;
    flex: 1;
    min-width: 0;
}

.landing-header__nav-sections {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.65rem;
}

.landing-header__nav-auth {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 1rem;
    margin-left: auto;
}

.landing-header__nav-anchor {
    color: var(--text);
    text-decoration: none;
    padding: 0.2rem 0;
    border-bottom: 1px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.landing-header__nav-anchor:hover {
    color: var(--accent);
    border-bottom-color: rgba(22, 152, 115, 0.35);
}

.landing-header__nav-auth .landing-header__nav-login,
.landing-header__nav-auth .landing-header__nav-cta {
    font-size: 0.88rem;
}

.landing-header__nav a.landing-header__nav-login,
.landing-header__nav a.landing-header__nav-cta {
    color: var(--accent);
    text-decoration: none;
}

.landing-header__nav a.landing-header__nav-login:hover,
.landing-header__nav a.landing-header__nav-cta:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

#hero,
#features,
#demo,
#integrations,
#pricing {
    scroll-margin-top: 4.5rem;
}

.landing-footer {
    border-top: 1px solid var(--border);
    background: linear-gradient(180deg, #fafbfc 0%, #fff 28%);
    color: var(--text);
}

.landing-footer__inner {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 2rem var(--content-pad-inline) 1.25rem;
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.5rem 2rem;
    align-items: start;
}

.landing-footer__brand {
    display: inline-block;
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: -0.03em;
    color: var(--accent);
    text-decoration: none;
}

.landing-footer__brand:hover {
    color: var(--accent-hover);
}

.landing-footer__tagline {
    margin: 0.45rem 0 0;
    font-size: 0.82rem;
    line-height: 1.5;
    color: var(--muted);
    max-width: 22rem;
}

.landing-footer__heading {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.55rem;
}

.landing-footer__links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.landing-footer__links a {
    font-size: 0.84rem;
    color: var(--text);
    text-decoration: none;
    transition: color 0.15s ease;
}

.landing-footer__links a:hover {
    color: var(--accent);
}

.landing-footer__bar {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 0.85rem var(--content-pad-inline) 1.35rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    justify-content: space-between;
    align-items: center;
    font-size: 0.72rem;
    color: var(--muted);
    border-top: 1px solid rgba(226, 232, 240, 0.9);
}

.landing-footer__copy {
    font-weight: 500;
    color: var(--muted);
}

.landing-footer__note {
    opacity: 0.95;
}

@media (max-width: 1024px) {
    .landing-header__burger {
        display: inline-flex;
        margin-left: auto;
    }

    .landing-header__inner {
        flex-wrap: wrap;
        row-gap: 0;
    }

    .landing-header-brand {
        flex: 1;
        min-width: 0;
    }

    .landing-header__nav {
        flex-basis: 100%;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        padding: 0;
        margin: 0;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 0;
        flex-wrap: nowrap;
        pointer-events: none;
        transition:
            max-height 0.32s ease,
            opacity 0.22s ease,
            padding 0.22s ease,
            margin 0.22s ease;
        border-top: 1px solid transparent;
    }

    .landing-header.is-nav-open .landing-header__nav {
        max-height: min(78vh, 32rem);
        opacity: 1;
        visibility: visible;
        padding: 0.75rem 0 0.25rem;
        margin-top: 0.4rem;
        pointer-events: auto;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        border-top-color: var(--border);
    }

    .landing-header__nav-sections {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        width: 100%;
    }

    .landing-header__nav-anchor {
        padding: 0.55rem 0;
        border-bottom: 1px solid rgba(226, 232, 240, 0.85);
    }

    .landing-header__nav-anchor:last-of-type {
        border-bottom: none;
    }

    .landing-header__nav-auth {
        margin-left: 0;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
        padding-top: 0.65rem;
        margin-top: 0.35rem;
        border-top: 1px solid rgba(226, 232, 240, 0.95);
    }

    .landing-header__nav-auth .landing-header__nav-login,
    .landing-header__nav-auth .landing-header__nav-cta {
        text-align: center;
        padding: 0.5rem 0.75rem;
        border-radius: 10px;
    }

    .landing-header__nav-auth .landing-header__nav-cta {
        background: var(--accent);
        color: #fff !important;
        text-decoration: none !important;
    }

    .landing-header__nav-auth .landing-header__nav-cta:hover {
        filter: brightness(1.05);
        text-decoration: none !important;
    }

    body.landing-page.landing-nav-open {
        overflow: hidden;
        touch-action: none;
    }
}

@media (max-width: 768px) {
    .landing-footer__inner {
        grid-template-columns: 1fr;
    }
}

.landing-main {
    width: 100%;
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 1.25rem var(--content-pad-inline) 2.5rem;
    box-sizing: border-box;
}

.landing-hero {
    margin-bottom: 1.75rem;
    animation: fadeInUp 0.45s ease-out both;
}

.landing-hero__inner {
    max-width: 48rem;
}

.landing-hero__title {
    margin: 0 0 0.65rem;
    font-size: clamp(1.45rem, 3.5vw, 1.85rem);
    font-weight: 600;
    line-height: 1.25;
    color: var(--text);
}

.landing-hero__lead {
    margin: 0 0 0.75rem;
    color: var(--text);
}

.channels-dnd {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.75rem;
    margin: 0 0 0.85rem;
    background: color-mix(in srgb, var(--surface) 92%, #eef4ff);
}

.channels-dnd__hint {
    font-size: 0.84rem;
    margin-bottom: 0.55rem;
}

.channels-dnd__board {
    display: grid;
    grid-template-columns: minmax(18rem, 1.15fr) minmax(16rem, 1fr);
    gap: 0.75rem;
}

.channels-dnd__lane {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    padding: 0.65rem;
}

.channels-dnd__title {
    margin: 0 0 0.45rem;
    font-size: 0.95rem;
}

.channels-dnd__cards {
    display: grid;
    gap: 0.45rem;
    max-height: 16.5rem;
    overflow: auto;
}

.channels-dnd__card {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.45rem 0.55rem;
    font-size: 0.86rem;
    cursor: grab;
    background: #fff;
    touch-action: none;
}

.channels-dnd__card.is-dragging {
    opacity: 0.45;
}

.channels-dnd__card-ghost {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.95;
    box-shadow: 0 16px 35px rgba(15, 23, 42, 0.22);
}

.channels-dnd__meta {
    font-size: 0.78rem;
    margin-top: 0.2rem;
}

.channels-dnd__targets {
    display: grid;
    gap: 0.45rem;
    max-height: 16.5rem;
    overflow: auto;
}

.channels-dnd__target {
    appearance: none;
    border: 1px dashed var(--border);
    background: #fff;
    border-radius: 10px;
    padding: 0.5rem 0.6rem;
    text-align: left;
    font-size: 0.86rem;
    cursor: pointer;
}

.channels-dnd__target.is-drop-over {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 12%, #fff);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 50%, #fff);
}

table.channels-list__table tbody tr[draggable='true'] {
    cursor: grab;
}

table.channels-list__table tbody tr.is-dragging {
    opacity: 0.45;
}

table.channels-list__table tbody tr.is-drop-over {
    outline: 2px dashed var(--accent);
    outline-offset: -2px;
    background: color-mix(in srgb, var(--accent) 10%, #fff);
}

@media (max-width: 1024px) {
    .channels-dnd__board {
        grid-template-columns: 1fr;
    }
    .channels-dnd__cards,
    .channels-dnd__targets {
        max-height: 13rem;
    }
}

.landing-hero__audience {
    margin: 0;
    font-size: 0.95rem;
}

.landing-auth-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
    align-items: start;
}

@media (max-width: 768px) {
    .landing-auth-grid {
        grid-template-columns: 1fr;
    }
}

.landing-auth-col h2 {
    margin-top: 0;
    font-size: 1.15rem;
}

/* ─── EcoStat Landing v2 ────────────────────────────────────────────────── */

.landing-header-brand {
    gap: 0.6rem;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}
.landing-header-brand span { color: var(--text); }

/* Логотип-блок в герое */
.landing-logo-block {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1.75rem;
}

.landing-logo-mark {
    flex-shrink: 0;
    filter: drop-shadow(0 4px 12px rgba(22, 152, 115, 0.30));
}

.landing-logo-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.landing-logo-text__main {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--accent);
    line-height: 1;
}

.landing-logo-text__sub {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--muted);
    letter-spacing: 0.01em;
}

/* Герой */
.landing-hero__title {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.15;
    margin: 0 0 0.75rem;
    color: var(--text);
}

.landing-hero__title-accent {
    color: var(--accent);
}

/* Бейджи */
.landing-hero__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.25rem;
}

.landing-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    background: rgba(22, 152, 115, 0.10);
    border: 1px solid rgba(22, 152, 115, 0.25);
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 500;
    white-space: nowrap;
}

/* Секция фич */
.landing-features {
    margin: 2.5rem 0 2rem;
}

.landing-features__title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 1.25rem;
    letter-spacing: -0.02em;
}

.landing-features__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    gap: 1rem;
}

.landing-feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.25rem 1.15rem;
    box-shadow: var(--shadow);
    transition: box-shadow 0.18s ease, border-color 0.18s ease, transform 0.15s ease;
}

.landing-feature-card:hover {
    border-color: rgba(22, 152, 115, 0.35);
    box-shadow: 0 4px 20px rgba(22, 152, 115, 0.10), 0 1px 4px rgba(0,0,0,0.04);
    transform: translateY(-2px);
}

.landing-feature-card__icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(22, 152, 115, 0.10);
    border-radius: 10px;
    color: var(--accent);
    margin-bottom: 0.9rem;
    flex-shrink: 0;
}

.landing-feature-card__title {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 0.45rem;
    letter-spacing: -0.01em;
}

.landing-feature-card__desc {
    font-size: 0.82rem;
    color: var(--muted);
    line-height: 1.5;
    margin: 0;
}

/* ─── lp-hero ─── */
.lp-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    padding: 3.5rem 0 2.5rem;
    width: 100%;
    max-width: none;
    margin: 0 auto;
}

.lp-logo-block {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.lp-logo-mark {
    flex-shrink: 0;
    filter: drop-shadow(0 3px 10px rgba(22,152,115,0.25));
}

.lp-logo-text {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    min-width: 0;
}

.lp-logo-text .lp-logo-name {
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--accent);
    line-height: 1.1;
}

.lp-logo-tagline {
    font-size: 0.74rem;
    font-weight: 500;
    color: var(--muted);
    letter-spacing: 0.01em;
    line-height: 1.3;
    max-width: 16rem;
}

.lp-hero__kicker {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: none;
    color: var(--muted);
    margin-bottom: 0.5rem;
}

.lp-hero__title {
    font-size: clamp(1.75rem, 3.5vw, 2.6rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.12;
    margin: 0 0 1rem;
    color: var(--text);
}

.lp-hero__em {
    font-style: normal;
    color: var(--accent);
}

.lp-hero__desc {
    font-size: 1rem;
    color: var(--muted);
    line-height: 1.6;
    margin: 0 0 1rem;
    max-width: 38rem;
}

.lp-hero__bullets {
    margin: 0 0 1.5rem;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.42rem;
    max-width: 38rem;
}

.lp-hero__bullets li {
    position: relative;
    padding-left: 1.1rem;
    font-size: 0.88rem;
    color: var(--text);
    line-height: 1.45;
}

.lp-hero__bullets li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.48em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
}

.lp-hero__actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.lp-btn-primary {
    padding: 0.7rem 1.6rem;
    font-size: 0.95rem;
}

.lp-btn-ghost {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    letter-spacing: -0.01em;
    transition: color 0.15s;
}
.lp-btn-ghost:hover { color: var(--accent-hover); text-decoration: underline; }

/* Mockup */
.lp-hero__visual { display: flex; justify-content: flex-end; }

.lp-mockup {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.07), 0 1px 4px rgba(0,0,0,0.04);
    width: 100%;
    max-width: 380px;
    overflow: hidden;
}

.lp-mockup__bar {
    padding: 10px 14px;
    background: #f8f9fb;
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 6px;
    align-items: center;
}
.lp-mockup__bar span {
    width: 10px; height: 10px; border-radius: 50%;
    background: #e5e7eb;
    display: block;
}
.lp-mockup__bar span:nth-child(1) { background: #fca5a5; }
.lp-mockup__bar span:nth-child(2) { background: #fcd34d; }
.lp-mockup__bar span:nth-child(3) { background: #86efac; }

.lp-mockup__body { padding: 1rem 1.15rem 1.15rem; }

.lp-mockup__kpi-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.lp-kpi {
    background: #f8f9fb;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.5rem 0.4rem;
    text-align: center;
}
.lp-kpi--accent {
    background: rgba(22,152,115,0.08);
    border-color: rgba(22,152,115,0.25);
}
.lp-kpi__val {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
}
.lp-kpi--accent .lp-kpi__val { color: var(--accent); }
.lp-kpi__label {
    font-size: 0.6rem;
    color: var(--muted);
    margin-top: 2px;
}

.lp-mockup__chart {
    background: linear-gradient(180deg, #fafbfc 0%, #f4f6f8 100%);
    border-radius: 10px;
    padding: 0.45rem 0.55rem 0.55rem;
    margin-bottom: 0.75rem;
    border: 1px solid var(--border);
}

.lp-mockup__chart--live {
    position: relative;
    overflow: hidden;
}

.lp-mockup__chart-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.lp-mockup__chart-title {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.02em;
}

.lp-mockup__chart-badge {
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fff;
    background: var(--accent);
    padding: 0.14rem 0.42rem;
    border-radius: 999px;
    animation: lpHeroBadgePulse 2.2s ease-in-out infinite;
}

.lp-mockup__chart--live svg.lp-hero-chart {
    width: 100%;
    height: auto;
    display: block;
    min-height: 88px;
    transform-origin: 50% 100%;
    animation: lpHeroChartLift 5s ease-in-out infinite alternate;
}

.lp-hero-chart__line {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: lpHeroChartDraw 4.8s cubic-bezier(0.45, 0, 0.2, 1) infinite;
}

.lp-hero-chart__area {
    opacity: 0;
    animation: lpHeroAreaFade 4.8s ease-out infinite;
}

.lp-hero-chart__dots .lp-hero-chart__dot {
    fill: #fff;
    stroke: var(--accent);
    stroke-width: 2;
    opacity: 0;
    animation: lpHeroDotPop 4.8s ease-out infinite;
    transform-box: fill-box;
    transform-origin: center;
}

.lp-hero-chart__dots .lp-hero-chart__dot:nth-child(1) { animation-delay: 0.05s; }
.lp-hero-chart__dots .lp-hero-chart__dot:nth-child(2) { animation-delay: 0.35s; }
.lp-hero-chart__dots .lp-hero-chart__dot:nth-child(3) { animation-delay: 0.65s; }
.lp-hero-chart__dots .lp-hero-chart__dot:nth-child(4) { animation-delay: 0.95s; }
.lp-hero-chart__dots .lp-hero-chart__dot:nth-child(5) { animation-delay: 1.25s; }
.lp-hero-chart__dots .lp-hero-chart__dot:nth-child(6) { animation-delay: 1.55s; }
.lp-hero-chart__dots .lp-hero-chart__dot:nth-child(7) { animation-delay: 1.85s; }

.lp-hero-chart__dot--pulse {
    fill: var(--accent);
    stroke: #fff;
    stroke-width: 2;
    opacity: 1;
    transform-box: fill-box;
    transform-origin: center;
    animation: lpHeroEndPulse 1.6s ease-in-out infinite !important;
}

/* JS: один раз дорисовка, дальше монотонный рост вверх без сброса цикла */
svg.lp-hero-chart.lp-hero-chart--js-grow {
    animation: none;
    will-change: transform;
}

svg.lp-hero-chart.lp-hero-chart--js-grow .lp-hero-chart__line {
    animation: none;
    stroke-dashoffset: 100;
}

svg.lp-hero-chart.lp-hero-chart--js-grow .lp-hero-chart__area {
    animation: none;
    opacity: 0;
}

svg.lp-hero-chart.lp-hero-chart--js-grow .lp-hero-chart__dots .lp-hero-chart__dot:not(.lp-hero-chart__dot--pulse) {
    animation: none;
    opacity: 0;
    transform: scale(1);
}

svg.lp-hero-chart.lp-hero-chart--js-grow.lp-hero-chart--dots-in .lp-hero-chart__dots .lp-hero-chart__dot:not(.lp-hero-chart__dot--pulse) {
    opacity: 1;
    transition: opacity 0.5s ease;
}

.lp-mockup__chart--live::after {
    content: "";
    position: absolute;
    inset: auto 0.35rem 0.4rem 35%;
    height: 42%;
    background: linear-gradient(105deg, transparent 0%, rgba(22, 152, 115, 0.12) 48%, transparent 88%);
    animation: lpHeroScan 2.8s ease-in-out infinite;
    pointer-events: none;
    border-radius: 6px;
}

.lp-mockup--live .lp-kpi__val {
    font-variant-numeric: tabular-nums;
}

@keyframes lpHeroChartDraw {
    0%, 10% { stroke-dashoffset: 100; }
    42%, 72% { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: 0; }
}

@keyframes lpHeroAreaFade {
    0%, 28% { opacity: 0; }
    44%, 80% { opacity: 1; }
    100% { opacity: 1; }
}

@keyframes lpHeroDotPop {
    0%, 34% { opacity: 0; transform: scale(0.35); }
    48%, 86% { opacity: 1; transform: scale(1); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes lpHeroEndPulse {
    0%,
    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 0 transparent);
    }
    50% {
        transform: scale(1.28);
        filter: drop-shadow(0 0 6px rgba(78, 203, 168, 0.95));
    }
}

@keyframes lpHeroChartLift {
    0% { transform: translateY(5px) scaleY(0.92); }
    100% { transform: translateY(0) scaleY(1); }
}

@keyframes lpHeroScan {
    0%, 100% { opacity: 0.35; transform: translateX(-6%); }
    50% { opacity: 0.85; transform: translateX(6%); }
}

@keyframes lpHeroBadgePulse {
    0%, 100% { opacity: 1; filter: brightness(1); }
    50% { opacity: 0.88; filter: brightness(1.08); }
}

@media (prefers-reduced-motion: reduce) {
    .lp-mockup__chart--live svg.lp-hero-chart,
    .lp-hero-chart__line,
    .lp-hero-chart__area,
    .lp-hero-chart__dots .lp-hero-chart__dot,
    .lp-hero-chart__dot--pulse,
    .lp-mockup__chart-badge,
    .lp-mockup__chart--live::after {
        animation: none !important;
    }

    .lp-hero-chart__line {
        stroke-dashoffset: 0 !important;
    }

    .lp-hero-chart__area {
        opacity: 1 !important;
    }

    .lp-hero-chart__dots .lp-hero-chart__dot,
    .lp-hero-chart__dot--pulse {
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
    }

    svg.lp-hero-chart.lp-hero-chart--js-grow,
    svg.lp-hero-chart.lp-hero-chart--js-grow .lp-hero-chart__line,
    svg.lp-hero-chart.lp-hero-chart--js-grow .lp-hero-chart__area,
    svg.lp-hero-chart.lp-hero-chart--js-grow .lp-hero-chart__dots .lp-hero-chart__dot {
        animation: none !important;
        transition: none !important;
    }
}

.lp-mockup__channels {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.lp-ch {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.72rem;
    color: var(--muted);
}
.lp-ch b { color: var(--text); margin-left: auto; font-size: 0.72rem; }
.lp-ch__dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* ─── lp-features ─── */
.lp-features {
    padding: 2.5rem 0 2rem;
    width: 100%;
    max-width: none;
    margin: 0 auto;
    border-top: 1px solid var(--border);
}

.lp-features__head {
    margin-bottom: 1.75rem;
}

.lp-features__title {
    font-size: clamp(1.15rem, 2.6vw, 1.5rem);
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.035em;
    margin: 0 0 0.4rem;
    line-height: 1.2;
}

.lp-features__sub {
    font-size: 0.9rem;
    color: var(--muted);
    margin: 0;
    line-height: 1.55;
}

@media (max-width: 640px) {
    .lp-features {
        padding: 1.6rem 0 1.35rem;
    }

    .lp-features__head {
        margin-bottom: 1.05rem;
    }
}

/* Горизонтальная «лента» карточек: вертикальный скролл страницы двигает ряд (2 блока — возможности + интеграции) */
.lp-hscroll {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    position: relative;
    box-sizing: border-box;
}

.lp-hscroll-tall {
    position: relative;
}

.lp-hscroll-sticky {
    position: sticky;
    top: 4.75rem;
    z-index: 3;
    min-height: min(88vh, 56rem);
    display: flex;
    align-items: center;
    padding: 0.5rem 0 1rem;
    box-sizing: border-box;
}

.lp-hscroll-clip {
    width: 100%;
    overflow: hidden;
}

.lp-features__grid.lp-features__grid--hscroll,
.lp-ecosystem__grid.lp-ecosystem__grid--hscroll {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 1rem;
    width: max-content;
    max-width: none;
    margin: 0;
    padding: 0.35rem 0.75rem 0.35rem max(0.75rem, env(safe-area-inset-left, 0px));
    padding-right: max(0.75rem, env(safe-area-inset-right, 0px));
    background: none;
    border: none;
    border-radius: 0;
    overflow: visible;
    box-sizing: border-box;
    will-change: transform;
}

.lp-hscroll-card {
    flex: 0 0 min(92vw, 36rem);
    width: min(92vw, 36rem);
    max-width: min(92vw, 36rem);
    box-sizing: border-box;
}

@media (min-width: 640px) {
    .lp-hscroll-card {
        flex: 0 0 min(calc(50vw - 1.5rem), 28rem);
        width: min(calc(50vw - 1.5rem), 28rem);
        max-width: min(calc(50vw - 1.5rem), 28rem);
    }
}

@media (min-width: 1024px) {
    .lp-hscroll-card {
        flex: 0 0 min(calc(33.333vw - 1.2rem), 24rem);
        width: min(calc(33.333vw - 1.2rem), 24rem);
        max-width: min(calc(33.333vw - 1.2rem), 24rem);
    }
}

@media (min-width: 1200px) {
    .lp-hscroll-card {
        flex: 0 0 min(calc(25vw - 1rem), 20rem);
        width: min(calc(25vw - 1rem), 20rem);
        max-width: min(calc(25vw - 1rem), 20rem);
    }
}

@media (min-width: 1280px) {
    .lp-hscroll-card {
        flex: 0 0 min(calc(20vw - 0.9rem), 18.5rem);
        width: min(calc(20vw - 0.9rem), 18.5rem);
        max-width: min(calc(20vw - 0.9rem), 18.5rem);
    }
}

@media (min-width: 1280px) {
    .lp-hscroll-card {
        flex: 0 0 min(calc(16.666vw - 0.85rem), 17rem);
        width: min(calc(16.666vw - 0.85rem), 17rem);
        max-width: min(calc(16.666vw - 0.85rem), 17rem);
    }
}

.lp-hscroll .lp-feat {
    min-height: 13.5rem;
    padding: 1.35rem 1.35rem 1.2rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: 0 10px 40px rgba(15, 23, 42, 0.07);
}

.lp-hscroll .lp-ecosystem__card {
    min-height: 13rem;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(15, 23, 42, 0.07);
}

.lp-hscroll--static .lp-hscroll-tall {
    min-height: 0 !important;
}

.lp-hscroll--static .lp-hscroll-sticky {
    position: relative;
    top: auto;
    z-index: auto;
    min-height: 0;
    padding: 0;
}

.lp-hscroll--static .lp-hscroll-clip {
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding-bottom: 0.35rem;
}

.lp-hscroll--static .lp-features__grid.lp-features__grid--hscroll,
.lp-hscroll--static .lp-ecosystem__grid.lp-ecosystem__grid--hscroll {
    transform: none !important;
    will-change: auto;
}

.lp-hscroll--static .lp-hscroll-card {
    scroll-snap-align: start;
}

@media (max-width: 768px) {
    .lp-hscroll-sticky {
        top: 4.35rem;
        min-height: min(90vh, 48rem);
        padding-top: 0.35rem;
    }
}

.lp-feat {
    background: #fff;
    padding: 1.2rem 1.2rem 1.1rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    transition: background 0.15s;
    min-height: 9.5rem;
    box-sizing: border-box;
}
.lp-feat:hover { background: #fafffe; }

.lp-feat__icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(22,152,115,0.10);
    border-radius: 9px;
    color: var(--accent);
    margin-top: 1px;
}

.lp-feat__body { flex: 1; min-width: 0; }

.lp-feat__title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 0.3rem;
    letter-spacing: -0.01em;
}

.lp-feat__desc {
    font-size: 0.8rem;
    color: var(--muted);
    line-height: 1.52;
    margin: 0;
}

.lp-feat__hints {
    margin: 0.45rem 0 0;
    padding-left: 1rem;
    font-size: 0.72rem;
    color: var(--muted);
    line-height: 1.45;
}

.lp-feat__hints li {
    margin-bottom: 0.2rem;
}

.lp-feat__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.55rem;
}

.lp-feat__tag {
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 0.14rem 0.4rem;
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.05);
    border: 1px solid rgba(15, 23, 42, 0.08);
}

/* ─── lp-ecosystem (интеграции / синхронизация) ─── */
.lp-ecosystem {
    padding: 2.5rem 0 2.25rem;
    width: 100%;
    max-width: none;
    margin: 0 auto;
    border-top: 1px solid var(--border);
}

.lp-ecosystem__head {
    margin-bottom: 1.5rem;
    max-width: 52rem;
}

.lp-ecosystem__title {
    font-size: clamp(1.1rem, 2.5vw, 1.45rem);
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.03em;
    margin: 0 0 0.5rem;
    line-height: 1.25;
}

.lp-ecosystem__lead {
    font-size: 0.9rem;
    color: var(--muted);
    line-height: 1.55;
    margin: 0;
}

@media (max-width: 640px) {
    .lp-ecosystem {
        padding: 1.6rem 0 1.35rem;
    }

    .lp-ecosystem__head {
        margin-bottom: 1.05rem;
    }
}

.lp-ecosystem__card {
    margin: 0;
    padding: 1.15rem 1.15rem 1.05rem;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
    transition: border-color 0.15s, box-shadow 0.15s;
    min-height: 10.5rem;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}
.lp-ecosystem__card:hover {
    border-color: rgba(22, 152, 115, 0.35);
    box-shadow: 0 8px 28px rgba(22, 152, 115, 0.08);
}

.lp-ecosystem__card-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 0.35rem;
    letter-spacing: -0.02em;
}

.lp-ecosystem__card-text {
    font-size: 0.8rem;
    color: var(--muted);
    line-height: 1.52;
    margin: 0;
    flex: 1;
}

.lp-ecosystem__bullets {
    margin: 0.45rem 0 0;
    padding-left: 1rem;
    font-size: 0.72rem;
    color: var(--muted);
    line-height: 1.45;
    flex: 1;
}

.lp-ecosystem__bullets li {
    margin-bottom: 0.22rem;
}

.lp-ecosystem__card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.65rem;
}

.lp-ecosystem__tag {
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 0.14rem 0.4rem;
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.05);
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.lp-ecosystem__tag--accent {
    color: #0f5132;
    background: rgba(22, 152, 115, 0.12);
    border-color: rgba(22, 152, 115, 0.28);
}

.lp-ecosystem__fine {
    font-size: 0.72rem;
    color: var(--muted);
    line-height: 1.5;
    margin: 1.25rem 0 0;
    max-width: 48rem;
    opacity: 0.92;
}

/* ─── lp-pricing ─── */
.lp-pricing {
    padding: 2.75rem 0 3rem;
    width: 100%;
    max-width: none;
    margin: 0 auto;
    border-top: 1px solid var(--border);
}

.lp-pricing__head {
    margin-bottom: 1.75rem;
    max-width: 48rem;
}

.lp-pricing__title {
    font-size: clamp(1.15rem, 2.6vw, 1.5rem);
    font-weight: 700;
    letter-spacing: -0.035em;
    margin: 0 0 0.45rem;
    color: var(--text);
    line-height: 1.2;
}

.lp-pricing__lead {
    font-size: 0.9rem;
    color: var(--muted);
    line-height: 1.55;
    margin: 0;
}

.lp-pricing__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    align-items: stretch;
}

.lp-price-card {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 1.15rem 1.1rem 1.2rem;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
    min-height: 100%;
}

.lp-price-card--featured {
    border-color: rgba(22, 152, 115, 0.55);
    box-shadow:
        0 0 0 1px rgba(22, 152, 115, 0.12),
        0 16px 40px rgba(22, 152, 115, 0.14);
    position: relative;
    z-index: 1;
}

.lp-price-card--lux {
    background: linear-gradient(165deg, #fff 0%, #f6fffb 48%, #fff 100%);
    border-color: rgba(22, 152, 115, 0.22);
}

.lp-price-card__badge {
    display: inline-block;
    align-self: flex-start;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    background: rgba(15, 23, 42, 0.06);
    padding: 0.2rem 0.45rem;
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

.lp-price-card__badge--accent {
    color: #0f5132;
    background: rgba(22, 152, 115, 0.18);
}

.lp-price-card__name {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 0 0 0.2rem;
    color: var(--text);
}

.lp-price-card__tagline {
    font-size: 0.76rem;
    color: var(--muted);
    line-height: 1.4;
    margin: 0 0 0.85rem;
    min-height: 2.2em;
}

.lp-price-card__price {
    margin: 0 0 0.9rem;
    line-height: 1;
}

.lp-price-card__amount {
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--text);
}

.lp-price-card--featured .lp-price-card__amount {
    color: var(--accent);
}

.lp-price-card__currency {
    font-size: 1rem;
    font-weight: 700;
    margin-left: 0.1rem;
    color: var(--text);
}

.lp-price-card__period {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--muted);
    margin-left: 0.15rem;
}

.lp-price-card__list {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
    flex: 1;
    font-size: 0.78rem;
    color: var(--muted);
    line-height: 1.45;
}

.lp-price-card__list li {
    position: relative;
    padding-left: 1rem;
    margin-bottom: 0.45rem;
}

.lp-price-card__list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.45em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.85;
}

.lp-price-card__list strong {
    color: var(--text);
    font-weight: 600;
}

.lp-price-card__cta {
    width: 100%;
    margin-top: auto;
    text-align: center;
    font-size: 0.82rem;
    padding: 0.55rem 0.75rem;
}

.lp-price-card__cta--accent {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.lp-price-card__cta--accent:hover {
    filter: brightness(1.05);
}

.lp-pricing__fine {
    font-size: 0.72rem;
    color: var(--muted);
    line-height: 1.5;
    margin: 1.35rem 0 0;
    max-width: 52rem;
    opacity: 0.92;
}

@media (max-width: 1024px) {
    .lp-pricing__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .lp-pricing__grid {
        grid-template-columns: 1fr;
    }
    .lp-price-card--featured {
        order: -1;
    }
}

/* Сетка карточек «как тарифы»: возможности и интеграции */
.lp-plank-grid {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    align-items: stretch;
}

.lp-plank-grid--integrations {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 1024px) {
    .lp-plank-grid,
    .lp-plank-grid--integrations {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .lp-plank-grid,
    .lp-plank-grid--integrations {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }
}

.lp-price-card--plank {
    min-height: 0;
    padding: 1.2rem 1.1rem 1.15rem;
    box-shadow: 0 6px 26px rgba(15, 23, 42, 0.055);
}

.lp-price-card--plank .lp-price-card__tagline {
    min-height: 0;
    margin-bottom: 0.72rem;
    font-size: 0.78rem;
    line-height: 1.42;
}

.lp-price-card--plank .lp-price-card__list {
    margin-bottom: 0.45rem;
    flex: 1;
    font-size: 0.76rem;
}

.lp-price-card--plank .lp-ecosystem__card-tags {
    margin-top: auto;
    padding-top: 0.55rem;
}

@media (max-width: 640px) {
    .lp-price-card--plank {
        padding: 1rem 0.95rem 1rem;
    }

    .lp-price-card--plank .lp-price-card__name {
        font-size: 0.98rem;
    }
}

/* ─── lp-showcase (интерактивная витрина лендинга) ─── */
.lp-showcase {
    padding: 2.75rem 0 3rem;
    width: 100%;
    max-width: none;
    margin: 0 auto;
    border-top: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(22, 152, 115, 0.03) 0%, transparent 42%);
}

.lp-showcase__head {
    margin-bottom: 2rem;
    max-width: 52rem;
}

.lp-showcase__title {
    font-size: clamp(1.25rem, 2.8vw, 1.65rem);
    font-weight: 700;
    letter-spacing: -0.035em;
    margin: 0 0 0.5rem;
    color: var(--text);
}

.lp-showcase__lead {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--muted);
}

.lp-showcase__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.1rem;
    align-items: stretch;
}

.lp-viz-card {
    position: relative;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.25rem 1.2rem 1.35rem;
    background: #fff;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
    opacity: 0;
    transform: translateY(14px);
    transition:
        opacity 0.55s cubic-bezier(0.2, 0.8, 0.2, 1),
        transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1),
        box-shadow 0.25s ease,
        border-color 0.25s ease;
}
.lp-viz-card:nth-child(1) { transition-delay: 0.02s; }
.lp-viz-card:nth-child(2) { transition-delay: 0.1s; }
.lp-viz-card:nth-child(3) { transition-delay: 0.18s; }

.lp-showcase--in .lp-viz-card {
    opacity: 1;
    transform: translateY(0);
}

.lp-viz-card:hover {
    border-color: rgba(22, 152, 115, 0.35);
    box-shadow: 0 10px 36px rgba(22, 152, 115, 0.12), 0 4px 16px rgba(15, 23, 42, 0.06);
}

.lp-viz-card__eyebrow {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.35rem;
}

.lp-viz-card__title {
    font-size: 1.02rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 0.45rem;
    color: var(--text);
}

.lp-viz-card__text {
    font-size: 0.82rem;
    line-height: 1.55;
    color: var(--muted);
    margin: 0 0 1rem;
}

/* Воронка — ширина «ступеней» */
.lp-demo-funnel {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    align-items: center;
}

.lp-demo-funnel__tier {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 0;
    max-width: 100%;
    min-height: 34px;
    padding: 0 0.65rem;
    border-radius: 10px;
    background: linear-gradient(90deg, #169873, #3dc49a);
    color: #fff;
    font-size: 0.72rem;
    box-sizing: border-box;
    transition: width 1.05s cubic-bezier(0.2, 0.85, 0.2, 1);
    transition-delay: var(--delay, 0s);
    overflow: hidden;
    white-space: nowrap;
}
@media (max-width: 480px) {
    .lp-demo-funnel__tier {
        white-space: normal;
        min-height: 40px;
    }
}
.lp-demo-funnel__tier strong {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.lp-demo-funnel__tier span {
    opacity: 0.92;
}
.lp-demo-funnel__tier--accent {
    background: linear-gradient(90deg, #117a5c, #169873);
    box-shadow: 0 4px 14px rgba(22, 152, 115, 0.35);
}

.lp-showcase--in .lp-demo-funnel__tier {
    width: var(--tw);
}

/* Каналы — сегменты */
.lp-demo-channels__stack {
    display: flex;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(22, 152, 115, 0.2);
    margin-bottom: 0.75rem;
}

.lp-demo-channels__seg {
    border: none;
    margin: 0;
    padding: 0.55rem 0.25rem;
    font-size: 0.68rem;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    font-family: inherit;
    transition: filter 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
    min-width: 0;
}
.lp-demo-channels__seg:nth-child(1) { background: var(--accent); }
.lp-demo-channels__seg:nth-child(2) { background: #ea580c; }
.lp-demo-channels__seg:nth-child(3) { background: #2563eb; }
.lp-demo-channels__seg:nth-child(4) { background: #64748b; }

.lp-demo-channels__seg:hover,
.lp-demo-channels__seg:focus-visible {
    filter: brightness(1.08);
    z-index: 1;
    outline: none;
}

.lp-demo-channels__stack.is-dim .lp-demo-channels__seg:not(.is-active) {
    opacity: 0.38;
    filter: saturate(0.65);
}

.lp-demo-channels__seg.is-active {
    box-shadow: inset 0 -3px 0 rgba(255, 255, 255, 0.55);
    transform: scaleY(1.03);
}

.lp-demo-channels__legend {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    font-size: 0.76rem;
    color: var(--muted);
}

.lp-demo-channels__legend li {
    display: flex;
    align-items: center;
    padding: 0;
    margin: 0;
    border-radius: 0;
    background: none;
    transition: transform 0.15s ease;
}

.lp-demo-channels__legend li.is-active {
    transform: translateY(-1px);
}

.lp-demo-ch-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.32rem 0.7rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: -0.015em;
    line-height: 1.2;
    color: #0f172a;
    border: 1px solid var(--c);
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    transition:
        box-shadow 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease;
}

@supports (color: color-mix(in srgb, white 50%, black)) {
    .lp-demo-ch-chip {
        border-color: color-mix(in srgb, var(--c) 38%, #e2e8f0);
        background: color-mix(in srgb, var(--c) 13%, #fff);
        color: color-mix(in srgb, var(--c) 72%, #0f172a);
    }
}

.lp-demo-channels__legend li.is-active .lp-demo-ch-chip {
    border-color: var(--c);
    box-shadow:
        0 0 0 2px var(--c),
        0 6px 18px rgba(15, 23, 42, 0.12);
}

/* Живая лента + график (единая сетка с витриной) */
.lp-showcase__live {
    margin-top: 2.25rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(22, 152, 115, 0.18);
}

.lp-showcase__live-head {
    margin-bottom: 1.25rem;
    max-width: 42rem;
}

.lp-showcase__live-title {
    font-size: clamp(1rem, 2.2vw, 1.2rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin: 0 0 0.4rem;
    color: var(--text);
}

.lp-showcase__live-lead {
    margin: 0;
    font-size: 0.86rem;
    line-height: 1.55;
    color: var(--muted);
}

.lp-live-desk {
    display: grid;
    grid-template-columns: minmax(200px, 0.38fr) minmax(0, 1fr);
    gap: 1rem 1.25rem;
    align-items: stretch;
}

.lp-live-desk__main {
    position: relative;
    min-width: 0;
    border-radius: 14px;
    overflow: hidden;
}

.lp-live-desk__main.is-drawer-open .lp-live-table-wrap {
    opacity: 0.94;
}

.lp-live-desk__viz {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem 1rem 0.85rem;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: linear-gradient(165deg, #fff 0%, #f8fdfb 55%, #fff 100%);
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
    min-height: 200px;
}

.lp-live-ads {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    width: 100%;
    flex: 1;
    justify-content: center;
    min-height: 0;
}

.lp-live-ads__eyebrow {
    margin: 0;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}

.lp-live-ads__viewport {
    position: relative;
    flex: 1;
    min-height: 7.25rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #fff;
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.lp-live-ads__list {
    list-style: none;
    margin: 0;
    padding: 0;
    height: 100%;
    min-height: 7.25rem;
}

.lp-live-ads__item {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    padding: 0.45rem 0.55rem;
    border-left: 3px solid var(--ad, #169873);
    opacity: 0;
    transform: translateY(10px);
    transition:
        opacity 0.42s ease,
        transform 0.42s ease;
    pointer-events: none;
}

.lp-live-ads__item.is-active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Демо-макеты объявлений (разные визуальные типы) */
.lp-mock-ad {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    border-radius: 10px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    background: linear-gradient(165deg, #fff 0%, #f8fafc 100%);
    padding: 0.55rem 0.6rem 0.5rem;
    font-size: 0.62rem;
    line-height: 1.35;
    color: var(--text);
    text-align: left;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
}

.lp-mock-ad__pill {
    display: inline-block;
    font-size: 0.52rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 0.2rem;
}

.lp-mock-ad__pill--muted {
    color: #94a3b8;
}

.lp-mock-ad__url {
    display: block;
    font-size: 0.58rem;
    color: #15803d;
    margin-bottom: 0.15rem;
    word-break: break-all;
}

.lp-mock-ad__hl {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    color: #1d4ed8;
    line-height: 1.25;
    margin-bottom: 0.15rem;
}

.lp-mock-ad__hl--sm {
    font-size: 0.66rem;
    color: var(--text);
}

.lp-mock-ad__desc {
    margin: 0;
    font-size: 0.58rem;
    color: var(--muted);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.lp-mock-ad__desc--tight {
    font-size: 0.55rem;
    -webkit-line-clamp: 3;
}

.lp-mock-ad__src {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.52rem;
    font-weight: 600;
    color: var(--ad, #169873);
    letter-spacing: 0.01em;
}

/* Поиск: текстовое объявление */
.lp-mock-ad--search .lp-mock-ad__url {
    color: var(--ad, #15803d);
}

.lp-mock-ad--search .lp-mock-ad__hl {
    color: #1e40af;
}

/* Товарное */
.lp-mock-ad--shopping {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 0.5rem;
    padding: 0.45rem;
}

.lp-mock-ad__shop-visual {
    flex: 0 0 2.75rem;
    border-radius: 8px;
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 40%, #169873 100%);
    min-height: 2.75rem;
}

.lp-mock-ad__shop-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.lp-mock-ad__shop-name {
    font-size: 0.62rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.25;
}

.lp-mock-ad__shop-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.45rem;
}

.lp-mock-ad__price {
    font-size: 0.78rem;
    font-weight: 800;
    color: #0f172a;
}

.lp-mock-ad__price-old {
    font-size: 0.55rem;
    color: #94a3b8;
    text-decoration: line-through;
}

.lp-mock-ad__stars {
    font-size: 0.55rem;
    color: #ca8a04;
    letter-spacing: 0.06em;
}

.lp-mock-ad__shop-meta {
    font-size: 0.5rem;
    color: var(--muted);
}

/* Видео */
.lp-mock-ad--video {
    padding: 0;
    overflow: hidden;
}

.lp-mock-ad__video-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    max-height: 4.5rem;
    background: linear-gradient(120deg, #1e293b 0%, #334155 35%, #0f172a 100%);
}

.lp-mock-ad__play {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.lp-mock-ad__play::after {
    content: "";
    position: absolute;
    left: 56%;
    top: 50%;
    transform: translate(-50%, -50%);
    border-style: solid;
    border-width: 0.32rem 0 0.32rem 0.52rem;
    border-color: transparent transparent transparent #0f172a;
}

.lp-mock-ad__video-cap {
    padding: 0.45rem 0.55rem 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

/* Медийный баннер */
.lp-mock-ad--banner {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.lp-mock-ad__ban-art {
    height: 2.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(110deg, var(--ad, #7b68ee) 0%, #4c1d95 55%, #312e81 100%);
}

.lp-mock-ad__ban-logo {
    font-size: 0.85rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.03em;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.25);
}

.lp-mock-ad__ban-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.4rem 0.55rem;
    background: #fff;
}

.lp-mock-ad__ban-txt {
    font-size: 0.58rem;
    font-weight: 600;
    color: var(--text);
    flex: 1;
    min-width: 0;
}

.lp-mock-ad__cta {
    flex-shrink: 0;
    font-size: 0.52rem;
    font-weight: 700;
    padding: 0.22rem 0.45rem;
    border-radius: 6px;
    background: var(--ad, #7b68ee);
    color: #fff;
}

.lp-mock-ad--banner .lp-mock-ad__src {
    padding: 0 0.55rem 0.45rem;
    margin-top: 0;
    background: #fff;
}

/* Приложение */
.lp-mock-ad--app {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    padding: 0.5rem 0.55rem;
}

.lp-mock-ad__app-icon {
    flex-shrink: 0;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 9px;
    background: linear-gradient(145deg, #169873, #0f5132);
    color: #fff;
    font-weight: 800;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lp-mock-ad__app-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.08rem;
}

.lp-mock-ad__app-name {
    font-size: 0.64rem;
    font-weight: 700;
    color: var(--text);
}

.lp-mock-ad__app-sub {
    font-size: 0.52rem;
    color: var(--muted);
}

.lp-mock-ad__app-btn {
    flex-shrink: 0;
    font-size: 0.52rem;
    font-weight: 700;
    padding: 0.28rem 0.42rem;
    border-radius: 8px;
    background: #0077ff;
    color: #fff;
    text-align: center;
}

.lp-mock-ad--app .lp-mock-ad__src {
    flex-basis: 100%;
    width: 100%;
    margin-top: 0.1rem;
}

/* Карусель */
.lp-mock-ad--carousel .lp-mock-ad__car-strip {
    display: flex;
    gap: 0.28rem;
    margin-bottom: 0.25rem;
}

.lp-mock-ad__car-strip span {
    flex: 1;
    height: 2.1rem;
    border-radius: 6px;
    background: linear-gradient(135deg, #ccfbf1, #169873);
    opacity: 0.85;
}

.lp-mock-ad__car-strip span:nth-child(2) {
    background: linear-gradient(135deg, #fef3c7, #ea580c);
    opacity: 1;
}

.lp-mock-ad__car-strip span:nth-child(3) {
    background: linear-gradient(135deg, #e0e7ff, #6366f1);
}

.lp-mock-ad__dots {
    display: flex;
    justify-content: center;
    gap: 0.2rem;
    margin-bottom: 0.25rem;
}

.lp-mock-ad__dots i {
    width: 0.28rem;
    height: 0.28rem;
    border-radius: 50%;
    background: #cbd5e1;
    font-style: normal;
}

.lp-mock-ad__dots i:nth-child(2) {
    background: var(--ad, #0d9488);
    transform: scale(1.15);
}

/* Лид-форма */
.lp-mock-ad--lead {
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
}

.lp-mock-ad__lead-title {
    font-size: 0.66rem;
    font-weight: 700;
    color: var(--text);
}

.lp-mock-ad__field {
    display: block;
    height: 0.55rem;
    border-radius: 4px;
    background: linear-gradient(90deg, #e2e8f0, #f1f5f9);
}

.lp-mock-ad__lead-btn {
    align-self: flex-start;
    font-size: 0.55rem;
    font-weight: 700;
    padding: 0.22rem 0.55rem;
    border-radius: 6px;
    background: var(--ad, #169873);
    color: #fff;
    margin-top: 0.05rem;
}

/* Натив / статья */
.lp-mock-ad--native {
    display: grid;
    grid-template-columns: 1fr 2.6rem;
    gap: 0.45rem;
    align-items: start;
    padding: 0.45rem;
}

.lp-mock-ad__nat-pub {
    display: block;
    font-size: 0.5rem;
    color: #64748b;
    margin-bottom: 0.12rem;
}

.lp-mock-ad__nat-thumb {
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 6px;
    background: linear-gradient(200deg, #f1f5f9, #94a3b8);
}

/* Быстрые ссылки */
.lp-mock-ad--sitelinks .lp-mock-ad__links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin: 0.25rem 0 0.15rem;
}

.lp-mock-ad__links span {
    font-size: 0.52rem;
    font-weight: 600;
    color: #1d4ed8;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.lp-live-ads__foot {
    margin: 0;
    font-size: 0.65rem;
    color: var(--muted);
    line-height: 1.35;
}

@media (prefers-reduced-motion: reduce) {
    .lp-live-ads__item {
        transition: opacity 0.2s ease;
    }

    .lp-live-ads__item:not(.is-active) {
        transform: none;
    }

    .lp-live-ads__item.is-active {
        transform: none;
    }
}

.lp-live-drawer {
    position: absolute;
    inset: 0 0 0 auto;
    width: min(100%, 320px);
    max-width: 100%;
    background: #fff;
    border-left: 1px solid var(--border);
    box-shadow: -12px 0 32px rgba(15, 23, 42, 0.08);
    transform: translateX(100%);
    transition: transform 0.42s cubic-bezier(0.25, 0.85, 0.35, 1);
    z-index: 3;
    display: flex;
    flex-direction: column;
    pointer-events: none;
}

.lp-live-drawer.is-open {
    transform: translateX(0);
    pointer-events: auto;
}

.lp-live-drawer__inner {
    padding: 0.85rem 0.95rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    height: 100%;
    overflow: auto;
}

.lp-live-drawer__eyebrow {
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}

.lp-live-drawer__title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
}

.lp-live-drawer__meta {
    font-size: 0.76rem;
    color: var(--muted);
    line-height: 1.45;
}

.lp-live-drawer__meta strong {
    color: var(--text);
    font-weight: 600;
}

.lp-live-drawer__section {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 0.25rem 0 0.2rem;
}

.lp-live-drawer__timeline {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.lp-live-drawer__timeline li {
    position: relative;
    padding-left: 0.85rem;
    font-size: 0.74rem;
    line-height: 1.4;
    color: var(--text);
}

.lp-live-drawer__timeline li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.35em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
}

.lp-live-drawer__deal {
    margin-top: auto;
    padding-top: 0.5rem;
    border-top: 1px dashed var(--border);
    font-size: 0.72rem;
    color: var(--muted);
}

.lp-live-drawer__deal strong {
    color: var(--accent);
}

.lp-live-row--click {
    animation: lpLiveRowClick 0.28s ease;
}

@keyframes lpLiveRowClick {
    0% {
        transform: scale(1);
        background: transparent;
    }
    45% {
        transform: scale(0.992);
        background: rgba(22, 152, 115, 0.12);
    }
    100% {
        transform: scale(1);
        background: transparent;
    }
}

.lp-live-table-wrap {
    border-radius: 14px;
    border: 1px solid var(--border);
    background: #fff;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
    overflow: hidden;
    min-width: 0;
    transition: opacity 0.35s ease;
}

.lp-live-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.8rem;
}

.lp-live-table thead th {
    text-align: left;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid var(--border);
    padding: 0.55rem 0.75rem;
    white-space: nowrap;
}

.lp-live-table tbody td {
    padding: 0.55rem 0.75rem;
    vertical-align: middle;
    border-bottom: 1px solid rgba(226, 232, 240, 0.85);
    color: var(--text);
}

.lp-live-table tbody tr:last-child td {
    border-bottom: none;
}

.lp-live-table tbody tr:nth-child(even) td {
    background: rgba(248, 250, 252, 0.65);
}

.lp-live-table__name {
    font-weight: 600;
    letter-spacing: -0.02em;
    max-width: 9.5rem;
}

.lp-live-table__contact {
    font-variant-numeric: tabular-nums;
    font-size: 0.76rem;
    color: var(--muted);
    word-break: break-all;
}

.lp-live-table__ch {
    width: 1%;
    white-space: nowrap;
}

.lp-live-table__time {
    font-variant-numeric: tabular-nums;
    font-size: 0.74rem;
    color: var(--muted);
    text-align: right;
    width: 4.2rem;
}

.lp-live-ch {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.2;
    color: #0f172a;
    border: 1px solid var(--ch);
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

@supports (color: color-mix(in srgb, white 50%, black)) {
    .lp-live-ch {
        border-color: color-mix(in srgb, var(--ch) 40%, #e2e8f0);
        background: color-mix(in srgb, var(--ch) 12%, #fff);
        color: color-mix(in srgb, var(--ch) 70%, #0f172a);
    }
}

.lp-live-row--enter {
    animation: lp-live-row-in 0.45s cubic-bezier(0.2, 0.85, 0.35, 1) forwards;
}

@keyframes lp-live-row-in {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.lp-live-row--flash td {
    animation: lp-live-row-flash 0.65s ease;
}

@keyframes lp-live-row-flash {
    0% {
        background-color: rgba(22, 152, 115, 0.14);
    }
    100% {
        background-color: transparent;
    }
}

@media (max-width: 1024px) {
    .lp-live-desk {
        grid-template-columns: 1fr;
    }

    .lp-live-desk__viz {
        min-height: 158px;
    }

    .lp-live-drawer {
        width: 100%;
        left: 0;
        right: 0;
        top: auto;
        bottom: 0;
        height: min(56vh, 360px);
        transform: translateY(110%);
        border-left: none;
        border-top: 1px solid var(--border);
        border-radius: 14px 14px 0 0;
        box-shadow: 0 -10px 36px rgba(15, 23, 42, 0.12);
    }

    .lp-live-drawer.is-open {
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .lp-live-table thead th:nth-child(2),
    .lp-live-table tbody td:nth-child(2) {
        display: none;
    }
}

/* Метрики-ленточка */
.lp-demo-spark-wrap {
    margin: 0;
    padding: 0.5rem 0 0;
}

.lp-demo-spark {
    width: 100%;
    height: auto;
    display: block;
    max-height: 120px;
}

.lp-demo-spark__line {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    transition: stroke-dashoffset 1.35s cubic-bezier(0.2, 0.85, 0.2, 1);
    transition-delay: 0.12s;
}

.lp-showcase--in .lp-demo-spark__line {
    stroke-dashoffset: 0;
}

.lp-demo-spark__fill {
    opacity: 0;
    transition: opacity 0.8s ease 0.35s;
}
.lp-showcase--in .lp-demo-spark__fill {
    opacity: 1;
}

.lp-demo-spark-cap {
    font-size: 0.68rem;
    color: var(--muted);
    margin: 0.35rem 0 0;
    text-align: right;
}

/* Метрики-ленточка */
.lp-showcase__metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 2rem;
    padding-top: 1.75rem;
    border-top: 1px dashed rgba(22, 152, 115, 0.25);
}

.lp-metric-tile {
    border-radius: 14px;
    padding: 0.85rem 0.9rem;
    background: linear-gradient(145deg, #fff, #f6fdfb);
    border: 1px solid var(--border);
    text-align: center;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.lp-showcase--in .lp-metric-tile:nth-child(1) { transition-delay: 0.2s; }
.lp-showcase--in .lp-metric-tile:nth-child(2) { transition-delay: 0.28s; }
.lp-showcase--in .lp-metric-tile:nth-child(3) { transition-delay: 0.36s; }
.lp-showcase--in .lp-metric-tile:nth-child(4) { transition-delay: 0.44s; }

.lp-showcase--in .lp-metric-tile {
    opacity: 1;
    transform: translateY(0);
}

.lp-metric-tile__label {
    display: block;
    font-size: 0.68rem;
    color: var(--muted);
    margin-bottom: 0.35rem;
    line-height: 1.35;
}

.lp-metric-tile__value {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--accent);
}

@media (max-width: 1024px) {
    .lp-showcase__grid {
        grid-template-columns: 1fr;
    }
    .lp-showcase__metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .lp-showcase__metrics {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lp-viz-card,
    .lp-metric-tile {
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
    .lp-demo-funnel__tier {
        transition: none !important;
        width: var(--tw) !important;
    }
    .lp-demo-spark__line {
        transition: none !important;
        stroke-dashoffset: 0 !important;
    }
    .lp-demo-spark__fill {
        transition: none !important;
        opacity: 1 !important;
    }
    .lp-live-row--enter {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
    .lp-live-row--click {
        animation: none !important;
    }
    .lp-live-row--flash td {
        animation: none !important;
    }
}

/* ─── lp-auth-section ─── */
.lp-auth-section {
    padding: 2rem 0 3rem;
    width: 100%;
    max-width: none;
    margin: 0 auto;
    display: flex;
    justify-content: center;
}

.lp-auth-card {
    width: 100%;
    max-width: 380px;
}

.lp-auth-card__title {
    margin-top: 0;
    font-size: 1.1rem;
    font-weight: 700;
}

/* Nav CTA */
.landing-header__nav-cta {
    display: inline-block;
    background: var(--accent);
    color: #fff !important;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    transition: background 0.15s;
    text-decoration: none !important;
}
.landing-header__nav-cta:hover { background: var(--accent-hover); }

/* Responsive */
@media (max-width: 1024px) {
    .lp-hero {
        grid-template-columns: 1fr;
        padding: 2rem 0 1.5rem;
        gap: 2rem;
    }
    .lp-hero__visual { justify-content: flex-start; }
    .lp-mockup { max-width: 100%; }
}

@media (max-width: 640px) {
    .lp-hero__title { font-size: 1.6rem; }
    .lp-mockup__kpi-row { grid-template-columns: repeat(2, 1fr); }
}

/* Кнопка «Войти» в шапке лендинга */
.landing-header__nav-login {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--accent);
    text-decoration: none;
    transition: color 0.15s;
    line-height: inherit;
}
.landing-header__nav-login:hover { color: var(--accent-hover); text-decoration: underline; }

/* ─── Modal system (login / register / forgot) ─── */

body.lp-modal-open { overflow: hidden; }

/* ── Backdrop ── */
.lp-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(0.75rem, 3vw, 1.5rem);
    box-sizing: border-box;
    /* Фон страницы размывается */
    background: rgba(8, 16, 12, 0.38);
    backdrop-filter: blur(22px) saturate(1.6);
    -webkit-backdrop-filter: blur(22px) saturate(1.6);
    /* Начальное состояние — скрыт */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.lp-modal-backdrop--open { opacity: 1; pointer-events: all; }

/* ── Keyframes ── */

/* Появление модала: снизу + scale */
@keyframes lp-fade-in {
    0%   { opacity: 0; transform: translateY(20px) scale(0.96); }
    100% { opacity: 1; transform: translateY(0)    scale(1);    }
}
/* Уход при закрытии: вниз */
@keyframes lp-fade-out {
    0%   { opacity: 1; transform: translateY(0)    scale(1);    }
    100% { opacity: 0; transform: translateY(12px) scale(0.97); }
}
/* Переключение — приход: только opacity + лёгкий scale */
@keyframes lp-switch-in {
    0%   { opacity: 0; transform: scale(0.97); }
    100% { opacity: 1; transform: scale(1);    }
}
/* Переключение — уход: только opacity + лёгкий scale */
@keyframes lp-switch-out {
    0%   { opacity: 1; transform: scale(1);    }
    100% { opacity: 0; transform: scale(0.97); }
}

/* ── Сам модал ── */
.lp-modal {
    /* Геометрия */
    position: relative;
    width: 100%;
    max-width: 420px;
    max-height: calc(100dvh - 2rem);
    box-sizing: border-box;
    overflow-y: auto;
    overscroll-behavior: contain;
    /* Внешний вид */
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.85) inset,
        0 20px 60px rgba(0, 0, 0, 0.16),
        0 4px 12px rgba(0, 0, 0, 0.06);
    padding: clamp(1.5rem, 4vw, 2.25rem)
             clamp(1.25rem, 4vw, 2rem)
             clamp(1.25rem, 3vw, 1.75rem);
    /* По умолчанию скрыт (JS снимает hidden) */
}
.lp-modal[hidden] { display: none !important; }

/* Классы, которые JS вешает и снимает */
.lp-modal--in {
    animation: lp-fade-in 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.lp-modal--out {
    animation: lp-fade-out 0.22s cubic-bezier(0.4, 0, 1, 1) both;
    pointer-events: none;
}
.lp-modal--switch-in {
    animation: lp-switch-in 0.26s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.lp-modal--switch-out {
    animation: lp-switch-out 0.20s cubic-bezier(0.4, 0, 1, 1) both;
    pointer-events: none;
}

/* Кнопка × */
.lp-modal__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: #f3f4f6;
    color: #4b5563;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    z-index: 2;
    flex-shrink: 0;
}
.lp-modal__close:hover { background: #e5e7eb; color: #111827; border-color: #d1d5db; }

/* Кнопка «← Назад» */
.lp-modal__back {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 0.75rem;
    transition: color 0.15s;
}
.lp-modal__back:hover { color: var(--accent); }

/* Логотип */
.lp-modal__logo {
    display: flex;
    justify-content: center;
    margin-bottom: 0.9rem;
    filter: drop-shadow(0 2px 8px rgba(22,152,115,0.25));
}

.lp-modal__title {
    font-size: clamp(1.15rem, 3vw, 1.35rem);
    font-weight: 700;
    letter-spacing: -0.035em;
    color: var(--text);
    text-align: center;
    margin: 0 0 0.2rem;
}

.lp-modal__sub {
    font-size: 0.82rem;
    color: var(--muted);
    text-align: center;
    margin: 0 0 1.4rem;
}

/* Hint рядом с label */
.lp-modal__hint {
    font-size: 0.72rem;
    font-weight: 400;
    color: var(--muted);
}

/* Форма */
.lp-modal__form { display: flex; flex-direction: column; }

.lp-modal__field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-bottom: 0.85rem;
}

.lp-modal__field label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: 0.01em;
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
}

.lp-modal__field input {
    background: #f9fafb;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.65rem 0.85rem;
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--text);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
    width: 100%;
    box-sizing: border-box;
    -webkit-appearance: none;
}
.lp-modal__field input::placeholder { color: #b0b7c0; }
.lp-modal__field input:focus {
    border-color: var(--accent);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(22, 152, 115, 0.15);
}

.lp-modal__submit {
    width: 100%;
    padding: 0.72rem;
    font-size: 0.95rem;
    border-radius: 10px;
    margin-top: 0.2rem;
    letter-spacing: -0.01em;
}

/* Футер со ссылками-кнопками */
.lp-modal__footer {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem 0.6rem;
    margin-top: 1rem;
    font-size: 0.78rem;
    color: var(--muted);
}
.lp-modal__link {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.15s;
}
.lp-modal__link:hover { color: var(--accent-hover); text-decoration: underline; }

.lp-modal__fineprint {
    margin: 0.85rem 0 0;
    font-size: 0.72rem;
    color: var(--muted);
    text-align: center;
    line-height: 1.45;
}
.lp-modal__fineprint a {
    color: var(--accent);
    font-weight: 600;
}

/* ── Мобильный sheet (снизу) ── */
@keyframes lp-sheet-in {
    from { opacity: 0; transform: translateY(100%); }
    to   { opacity: 1; transform: translateY(0);    }
}
@keyframes lp-sheet-out {
    from { opacity: 1; transform: translateY(0);   }
    to   { opacity: 0; transform: translateY(72%); }
}
@media (max-width: 480px) {
    .lp-modal-backdrop { align-items: flex-end; padding: 0; }
    .lp-modal {
        max-width: 100%;
        border-radius: 22px 22px 0 0;
        padding: 1.5rem 1.25rem 2rem;
        max-height: 92dvh;
    }
    /* На мобиле: открытие и закрытие — sheet-анимации */
    .lp-modal--in  { animation-name: lp-sheet-in;  }
    .lp-modal--out { animation-name: lp-sheet-out; }
    /* Переключение на мобиле остаётся fade */
}

/* ── Без анимаций (accessibility) ── */
@media (prefers-reduced-motion: reduce) {
    .lp-modal-backdrop { transition: none; }
    .lp-modal--in,
    .lp-modal--out,
    .lp-modal--switch-in,
    .lp-modal--switch-out { animation: none; }
}

/* ============================================================
   Dashboard redesign alignment (opiumdev/dashboard.html style)
   ============================================================ */

body.app-body {
    background:
        radial-gradient(1100px 520px at 0% -10%, rgba(22, 152, 115, 0.16) 0%, rgba(22, 152, 115, 0) 62%),
        radial-gradient(900px 420px at 100% -20%, rgba(37, 99, 235, 0.12) 0%, rgba(37, 99, 235, 0) 60%),
        linear-gradient(180deg, #f3f6fb 0%, #edf2f7 100%);
}

.site-header {
    background: rgba(255, 255, 255, 0.76);
    border-bottom: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.site-header__inner {
    min-height: 58px;
}

.wrap {
    max-width: min(100%, 1700px);
    grid-template-columns: minmax(230px, 270px) minmax(0, 1fr);
    gap: 1.15rem;
    padding-top: 1.15rem;
}

.nav {
    padding: 0.8rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.8));
    border: 1px solid rgba(209, 231, 242, 0.9);
    border-radius: 18px;
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.08);
    gap: 0.3rem;
}

.nav a,
.nav-dropdown-wrap__main {
    min-height: 40px;
    padding: 0.55rem 0.75rem;
    border-radius: 0.75rem;
    font-size: 0.84rem;
    letter-spacing: 0.01em;
    display: flex;
    align-items: center;
}

.nav a:hover,
.nav-dropdown-wrap:hover .nav-dropdown-wrap__main,
.nav-dropdown-wrap:focus-within .nav-dropdown-wrap__main {
    color: #0b6a51;
    background: rgba(22, 152, 115, 0.14);
}

.nav__link.is-active,
.nav-dropdown-wrap__main.is-active {
    color: #0b6a51;
    background: rgba(22, 152, 115, 0.18);
    border-color: rgba(22, 152, 115, 0.25);
    box-shadow: inset 0 0 0 1px rgba(22, 152, 115, 0.08);
}

.nav-dropdown-wrap__menu {
    border-radius: 12px;
    border: 1px solid #d6e5ef;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.15);
}

.wrap-main {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.56));
    border: 1px solid rgba(209, 231, 242, 0.9);
    border-radius: 14px;
    padding: 1rem 1rem 1.15rem;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
}

.dash-mail-sync-bar,
.dashboard-page-head {
    margin-top: 0.15rem;
}
.dashboard-page-head.ph {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.ph-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}
.btn.btn-p {
    height: 34px;
    border-radius: 10px;
    padding: 0 12px;
    border: 1px solid rgba(150, 196, 220, 0.45);
    background: rgba(255, 255, 255, 0.95);
    color: #0f172a;
    font-size: 12px;
    font-weight: 600;
}
.btn.btn-p:hover {
    background: rgba(245, 251, 255, 1);
}

.dashboard-saas .container {
    max-width: none;
    padding: 0.4rem;
}

.dashboard-saas .dashboard-page-head__title {
    font-size: clamp(1.35rem, 2.5vw, 1.95rem);
    letter-spacing: -0.03em;
}

.card,
.dash-card {
    border-radius: 12px;
    border: 1px solid rgba(217, 233, 242, 0.95);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.76));
}

.dashboard-traffic__grid,
.conv-kpi-bar {
    gap: 0.6rem;
}

.dashboard-kpi__num,
.dashboard-traffic__metric-value {
    font-size: clamp(1.25rem, 2.1vw, 1.65rem);
    letter-spacing: -0.03em;
}

.dashboard-period-toolbar,
.dash-period-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.dashboard-period-toolbar .button,
.dash-period-controls .button,
.dashboard-period-toolbar .btn,
.dash-period-controls .btn {
    height: 34px;
    border-radius: 999px;
    font-size: 0.78rem;
    padding: 0 0.8rem;
}

@media (max-width: 1024px) {
    .dashboard-page-head.ph {
        flex-direction: column;
        align-items: flex-start;
    }
    .ph-right {
        width: 100%;
        justify-content: flex-start;
    }
}

.dashboard-saas .chart,
.dashboard-saas .dashboard-chart-host.chart,
.dashboard-saas .admin-analytics-chart-host,
.dashboard-saas .admin-analytics-day-chart-host,
.admin-analytics-report-chart {
    border-radius: 14px;
    border: 1px solid rgba(150, 196, 220, 0.45);
    background:
        linear-gradient(180deg, rgba(22, 152, 115, 0.08) 0%, rgba(22, 152, 115, 0.01) 65%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.64));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), 0 8px 20px rgba(15, 23, 42, 0.08);
}

.dashboard-saas table.data th {
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #5c6776;
    background: linear-gradient(180deg, rgba(247, 252, 255, 0.95), rgba(238, 247, 252, 0.88));
    border-bottom: 1px solid rgba(188, 220, 236, 0.8);
}

.dashboard-saas table.data td {
    font-size: 0.86rem;
    border-top-color: rgba(203, 226, 238, 0.6);
}

.dashboard-saas table.data tbody tr {
    transition: background 0.14s ease;
}

.dashboard-saas table.data tbody tr:nth-child(odd) td {
    background: rgba(255, 255, 255, 0.42);
}

.dashboard-saas table.data tbody tr:nth-child(even) td {
    background: rgba(248, 252, 255, 0.58);
}

.dashboard-saas table.data tbody tr:hover td {
    background: rgba(22, 152, 115, 0.1);
}

.admin-analytics-chart-host,
.admin-analytics-day-chart-host {
    position: relative;
}

.admin-analytics-chart-host::before,
.admin-analytics-day-chart-host::before {
    content: '';
    position: absolute;
    inset: 10px;
    border-radius: 12px;
    pointer-events: none;
    border: 1px dashed rgba(148, 163, 184, 0.2);
}

.dashboard-chart-head {
    padding: 0.15rem 0.1rem 0.45rem;
    border-bottom: 1px solid rgba(203, 226, 238, 0.7);
    margin-bottom: 0.7rem;
}

.dashboard-chart-head h2 {
    margin-bottom: 0;
}

#channels-action-feedback {
    margin: 0 0 0.75rem;
}

.channels-page .channels-list__table td:first-child,
.channels-page .channels-list__table th:first-child {
    min-width: 11rem;
}

.channels-page .channels-dnd__target .channel-chip,
.channels-page .channels-list__table .channel-chip {
    font-size: 0.76rem;
}

@media (max-width: 1024px) {
    .wrap {
        grid-template-columns: minmax(210px, 240px) minmax(0, 1fr);
    }
}

@media (max-width: 1024px) {
    .wrap {
        display: block;
    }

    .nav {
        position: static;
        margin-bottom: 0.9rem;
    }

    .wrap-main {
        border-radius: 16px;
        padding: 0.8rem 0.75rem 0.9rem;
    }
}

@media (max-width: 640px) {
    .site-header__inner {
        padding: 0 14px;
    }

    .wrap {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
        padding-top: 0.75rem;
    }

    .nav {
        border-radius: 14px;
        padding: 0.55rem;
    }

    .nav a,
    .nav-dropdown-wrap__main {
        min-height: 42px;
        width: calc(50% - 0.28rem);
        justify-content: center;
    }

    .nav > .nav__client-search {
        flex: 1 1 100%;
    }

    .wrap-main {
        border-radius: 14px;
        padding: 0.65rem 0.55rem 0.75rem;
    }

    .card,
    .dash-card {
        border-radius: 12px;
        padding: 0.85rem 0.8rem;
    }
}

.dashboard-page-head__subtitle {
    margin: 0.2rem 0 0;
    font-size: 0.9rem;
}

.dashboard-redesign__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    margin: 0 0 0.55rem;
    font-size: 0.78rem;
    color: var(--muted);
}

.dashboard-redesign__legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.dashboard-redesign__legend-item i {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    display: inline-block;
    background: var(--accent);
}

.dashboard-redesign__legend-item:last-child i {
    background: #dc2626;
}

.dashboard-infographics {
    margin-bottom: 1rem;
    padding: 0.8rem;
    border-radius: 14px;
    border: 1px solid rgba(150, 196, 220, 0.5);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.5));
}

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

.dashboard-infographics__card {
    border-radius: 12px;
    border: 1px solid rgba(209, 231, 242, 0.95);
    background: rgba(255, 255, 255, 0.75);
    padding: 0.55rem 0.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.dashboard-infographics__label {
    font-size: 0.72rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.dashboard-infographics__value {
    font-size: 1.2rem;
    letter-spacing: -0.02em;
}

.dashboard-infographics__types,
.dashboard-infographics__channels {
    margin-top: 0.65rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.dashboard-infographics__types span,
.dashboard-infographics__channel {
    border-radius: 999px;
    border: 1px solid rgba(209, 231, 242, 0.95);
    background: rgba(255, 255, 255, 0.7);
    padding: 0.22rem 0.5rem;
    font-size: 0.75rem;
}
.dashboard-infographics__channel.channel-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--channel-color, #334155);
    border-color: color-mix(in srgb, var(--channel-color, #334155) 30%, transparent);
    background: color-mix(in srgb, var(--channel-color, #334155) 12%, white);
}

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

.cabinet-overview__tile {
    display: block;
    text-decoration: none;
    border-radius: 12px;
    border: 1px solid rgba(150, 196, 220, 0.5);
    background: linear-gradient(180deg, rgba(22, 152, 115, 0.08), rgba(22, 152, 115, 0.02));
    padding: 0.75rem;
}

.cabinet-overview__tile-title {
    display: block;
    color: #0f172a;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.cabinet-overview__tile-sub {
    color: #475569;
    font-size: 0.82rem;
}

@media (max-width: 1024px) {
    .dashboard-infographics__cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .dashboard-infographics__cards,
    .cabinet-overview__grid {
        grid-template-columns: 1fr;
    }
}

/* ===== Unified component catalog ===== */
.ui-kpi-card,
.conv-kpi-bar__card,
.dashboard-infographics__card {
    border-radius: 12px;
    border: 1px solid rgba(209, 231, 242, 0.95);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.72));
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.05);
}

.ui-chart-card,
.dashboard-traffic.card,
.admin-analytics-root .dash-card {
    border-radius: 16px;
    border: 1px solid rgba(188, 220, 236, 0.92);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(247, 251, 255, 0.68));
}

.ui-table-card,
.channels-page.card,
.dashboard-traffic__top-pages {
    border-radius: 8px;
    border: 1px solid rgba(203, 226, 238, 0.92);
    background: rgba(255, 255, 255, 0.82);
}

.ui-funnel-card {
    border-radius: 14px;
    border: 1px solid rgba(198, 229, 220, 0.92);
    background: linear-gradient(180deg, rgba(236, 253, 245, 0.75), rgba(255, 255, 255, 0.82));
}

.ui-channel-badge,
.channel-chip {
    border-radius: 999px;
    font-weight: 600;
}

.kpi.bl {
    display: grid;
    grid-template-rows: auto auto auto auto;
    align-content: start;
    gap: 0.18rem;
    min-height: 112px;
}

.kpi-lbl {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}

.kpi-val {
    font-size: clamp(1.25rem, 2.2vw, 1.7rem);
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.kpi-delta {
    display: inline-flex;
    align-items: center;
    font-size: 0.78rem;
    font-weight: 600;
}

.kpi-delta.up {
    color: #059669;
}

.kpi-delta.down {
    color: #dc2626;
}

.kpi-note {
    font-size: 0.74rem;
    color: var(--muted);
}

.kpi-delta.is-empty,
.kpi-note.is-empty {
    visibility: hidden;
}

/* ===== KPI visual polish (close to reference) ===== */
.dashboard-period-kpis {
    background:
        radial-gradient(1200px 280px at 0% 0%, rgba(22, 152, 115, 0.12), rgba(22, 152, 115, 0)),
        linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 251, 255, 0.82));
}

.conv-kpi-bar--n3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.form-leads-summary-block {
    margin-bottom: var(--ui-gap, 16px);
}
.form-leads-summary-block .dashboard-today-kpis__heading {
    margin: 0 0 6px;
}

/* ===== Open sidebar navigation (template-like) ===== */
.nav--open-sidebar {
    gap: 0.4rem;
}

.nav-group {
    border: 1px solid rgba(201, 224, 236, 0.92);
    background: rgba(248, 252, 255, 0.74);
    border-radius: 12px;
    padding: 0.2rem;
}

.nav__link--group-title {
    margin-bottom: 0.2rem;
}

.nav-group__items {
    display: grid;
    gap: 0.12rem;
    padding: 0.1rem 0.2rem 0.2rem;
}

.nav-group__item {
    display: block;
    border-radius: 9px;
    font-size: 0.79rem;
    color: #344256;
    text-decoration: none;
    padding: 0.42rem 0.55rem;
}

.nav-group__item:hover {
    background: rgba(22, 152, 115, 0.12);
    color: #0b6a51;
}

.nav-group__item.is-active {
    background: rgba(22, 152, 115, 0.17);
    color: #0b6a51;
    font-weight: 600;
}

/* hide legacy dropdown in open-sidebar mode */
.nav--open-sidebar .nav-dropdown-wrap__menu {
    display: none !important;
}

/* ===== CR + ? tooltip clarity ===== */
.metric-help {
    gap: 0.34rem;
}

.metric-help__label {
    display: inline-block;
    margin-right: 0.08rem;
}

.table-sort-btn .metric-help {
    pointer-events: none;
}

.table-sort-btn .metric-help__trigger {
    width: 16px;
    height: 16px;
    font-size: 10px;
}

@media (max-width: 1024px) {
    .nav--open-sidebar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.4rem;
    }

    .nav--open-sidebar > .nav__link,
    .nav--open-sidebar > .nav-group {
        width: 100%;
    }

    .nav-group {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    .nav--open-sidebar {
        grid-template-columns: 1fr;
    }

    .nav--open-sidebar .nav__link {
        width: 100%;
        justify-content: flex-start;
    }

    .nav__client-search {
        grid-column: 1 / -1;
    }
}

/* ===== Sidebar + Topbar (dashboard.html style) ===== */
.app-shell {
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    min-height: 100vh;
}

.sb-wrap {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 0.9rem 0.8rem;
    background: linear-gradient(180deg, #0f172a, #111827);
    color: #e5e7eb;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    z-index: 60;
}

.sb-logo {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.sb-logo-name {
    font-weight: 700;
    letter-spacing: 0.01em;
}

.sb-logo-badge {
    margin-left: auto;
    font-size: 0.62rem;
    padding: 0.14rem 0.34rem;
    border-radius: 999px;
    color: #0f172a;
    background: #4ecba8;
    font-weight: 700;
}

.sb-nav {
    overflow: auto;
    padding-right: 0.2rem;
}

.sb-section {
    margin: 0.55rem 0 0.35rem;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
    font-weight: 700;
}

.nb {
    display: flex;
    align-items: center;
    min-height: 38px;
    border-radius: 10px;
    color: #e5e7eb;
    text-decoration: none;
    padding: 0.42rem 0.6rem;
    font-size: 0.84rem;
    margin: 0.12rem 0;
}

.nb:hover {
    background: rgba(78, 203, 168, 0.14);
    color: #d1fae5;
}

.nb.on {
    background: rgba(78, 203, 168, 0.2);
    color: #d1fae5;
    font-weight: 600;
}

.sb-bot {
    margin-top: auto;
}

.user {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.78rem;
}

.ava {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: #1f2937;
    color: #e5e7eb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.66rem;
    font-weight: 700;
}

.u-name {
    font-weight: 600;
}

.u-email {
    color: #94a3b8;
    font-size: 0.72rem;
}

.wrap {
    padding: 0.85rem 1rem 1rem;
    display: block;
    max-width: none;
}

.topbar {
    display: grid;
    grid-template-columns: auto auto 1fr auto auto;
    align-items: center;
    gap: 0.55rem 0.6rem;
    min-height: 52px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(209, 231, 242, 0.95);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    padding: 0.45rem 0.6rem;
    margin-bottom: 0.75rem;
}

.ham {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #fff;
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.ham span {
    width: 14px;
    height: 2px;
    background: #334155;
    margin: 0 auto;
}

.tb-title {
    font-weight: 700;
    color: #0f172a;
    margin-right: 0.35rem;
    white-space: nowrap;
}

.tb-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: min(100%, 420px);
    justify-self: end;
    min-width: 0;
    min-height: 38px;
    background: #f8fafc;
    border: 1px solid #d7e2ea;
    border-radius: 999px;
    padding: 0.22rem 0.32rem 0.22rem 0.56rem;
}
.topbar .admin-global-client-search {
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.45rem;
    width: 100%;
}

.tb-search svg {
    width: 18px;
    height: 18px;
    color: #6b7280;
    flex-shrink: 0;
}

.tb-search .admin-global-client-search__input {
    flex: 1 1 auto;
    width: auto;
    border: none;
    background: transparent;
    box-shadow: none;
    max-width: none;
    min-width: 0;
    font-size: 0.84rem;
    line-height: 1.2;
    color: #0f172a;
    padding: 0;
}
.tb-search .admin-global-client-search__input::placeholder {
    color: #94a3b8;
}

.tb-search .admin-global-client-search__submit {
    flex: 0 0 auto;
    margin-left: auto;
    min-height: 28px;
    padding: 0 0.62rem;
    font-size: 0.72rem;
    white-space: nowrap;
    border-radius: 999px;
    border: 1px solid var(--accent);
    background: var(--accent);
    color: #fff;
    font-weight: 600;
}

@media (max-width: 768px) {
    .topbar .admin-global-client-search__submit {
        min-height: 28px;
        padding: 0 0.62rem;
    }
}

.tb-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.tb-icon--avatar {
    width: 30px;
    height: 30px;
}
.tb-ava {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    font-size: 10px;
}

@media (max-width: 1024px) {
    .app-shell {
        grid-template-columns: 1fr;
    }
    .sb-wrap {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: 270px;
        transform: translateX(-100%);
        transition: transform 0.2s ease;
    }
    body.sb-open .sb-wrap {
        transform: translateX(0);
    }
    .topbar {
        grid-template-columns: auto 1fr auto;
        grid-template-areas:
            "ham title avatar"
            "search search search"
            "logout logout logout";
        row-gap: 0.5rem;
    }
    .ham { grid-area: ham; }
    .tb-title { grid-area: title; }
    .tb-search { grid-area: search; }
    .tb-search {
        width: 100%;
        justify-self: stretch;
    }
    .site-header__logout-form { grid-area: logout; }
    .tb-icon--avatar { grid-area: avatar; justify-self: end; }
    .site-header__logout-btn {
        width: 100%;
        min-height: 34px;
    }
}

@media (min-width: 1024px) {
    .ham {
        display: none;
    }
}

@media (max-width: 768px) {
    .topbar {
        grid-template-columns: auto 1fr auto;
        grid-template-areas:
            "ham title avatar"
            "search search search"
            "logout logout logout";
        padding: 0.5rem;
    }
    .tb-title {
        font-size: 0.95rem;
        margin-right: 0;
    }
    .tb-search .admin-global-client-search__submit {
        min-width: 58px;
        padding: 0 0.45rem;
    }
}

/* Глобальный мобильный anti-overflow */
@media (max-width: 768px) {
    html,
    body {
        max-width: 100%;
        overflow-x: hidden;
    }

    .app-shell,
    .wrap,
    .wrap-main,
    .dashboard-saas,
    .dashboard-saas .container {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .wrap {
        padding: 0.55rem 0.5rem 0.7rem;
    }

    .wrap-main {
        padding: 0.6rem 0.55rem 0.75rem;
        border-radius: 10px;
    }

    .dashboard-saas .dash-card,
    .dashboard-saas .card,
    .dashboard-saas .dashboard-grid,
    .dashboard-saas .dashboard-traffic__grid,
    .dashboard-saas .dashboard-today-kpis__grid {
        min-width: 0;
        max-width: 100%;
    }

    .dashboard-saas .table-scroll,
    .dashboard-saas .admin-analytics-scroll-x {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
    }

    .dashboard-saas .table-scroll table,
    .dashboard-saas .table-scroll table.data {
        min-width: 0;
        width: 100%;
    }
}






/* Rich attribution drill-down drawer */
.attribution-drawer[hidden] { display: none !important; }
.attribution-drawer { position: fixed; inset: 0; z-index: 10050; }
.attribution-drawer__backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.46); backdrop-filter: blur(5px); }
.attribution-drawer__panel { position: absolute; top: 0; right: 0; width: min(820px, 100%); height: 100%; overflow: auto; background: #fcfdfc; color: #10201b; box-shadow: -28px 0 80px rgba(15, 23, 42, 0.20); padding: 30px; }
.attribution-drawer__close { position: sticky; top: 0; float: right; width: 38px; height: 38px; border: 0; border-radius: 999px; background: rgba(22, 152, 115, 0.10); color: var(--accent); font-size: 26px; line-height: 1; cursor: pointer; z-index: 1; transition: background .16s, transform .16s; }
.attribution-drawer__close:hover { background: rgba(22, 152, 115, 0.16); transform: scale(1.04); }
.attribution-drawer__head { margin-bottom: 20px; padding-right: 46px; }
.attribution-drawer__eyebrow { display: inline-flex; margin-bottom: 8px; color: var(--accent); font-size: 12px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.attribution-drawer__head h2 { margin: 0 0 7px; font-size: clamp(24px, 3vw, 34px); line-height: 1.12; letter-spacing: -0.035em; }
.attribution-drawer__body { display: grid; gap: 16px; }
.attribution-card, .attribution-technical { border: 1px solid rgba(22, 152, 115, 0.14); border-radius: 24px; background: #ffffff; padding: 19px; box-shadow: 0 18px 42px rgba(15, 23, 42, 0.07); }
.attribution-card h3 { margin: 0 0 15px; font-size: 17px; letter-spacing: -0.015em; color: #13231e; }
.attribution-card--summary { background: linear-gradient(180deg, #ffffff, #f8fbfa); border-color: rgba(22, 152, 115, 0.18); }
.attribution-card--contact { background: #f8fcfb; border-color: rgba(22, 152, 115, 0.22); border-left: 3px solid rgba(22, 152, 115, 0.55); }
.attribution-card--crm { background: #f8fdfb; border-color: rgba(22, 152, 115, 0.20); border-left: 3px solid rgba(22, 152, 115, 0.45); }
.attribution-crm-deals { margin: 14px 0 0; padding: 12px; border-radius: 16px; background: #f1f7f5; border: 1px solid rgba(22, 152, 115, 0.10); }
.attribution-crm-deals__title { font-size: 12px; font-weight: 800; color: #60746d; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.04em; }
.attribution-crm-deal { font-size: 13px; padding: 6px 0; border-bottom: 1px solid rgba(22, 152, 115, 0.08); color: #13231e; }
.attribution-crm-deal:last-of-type { border-bottom: none; }
.attribution-crm-deals__total { margin-top: 8px; font-size: 13px; font-weight: 700; color: #127e60; padding-top: 8px; border-top: 1px solid rgba(22, 152, 115, 0.14); }
.attribution-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 15px; }
.attribution-chip { display: inline-flex; align-items: center; min-height: 30px; padding: 6px 11px; border-radius: 999px; background: rgba(22, 152, 115, 0.08); color: #127e60; font-size: 12px; font-weight: 800; }
.attribution-chip--primary { background: var(--accent); color: #fff; box-shadow: 0 10px 24px rgba(22, 152, 115, .18); }
.attribution-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.attribution-grid--compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.attribution-kv { min-width: 0; padding: 11px 12px; border-radius: 16px; background: #f7faf9; border: 1px solid rgba(22, 152, 115, 0.08); transition: background .16s, border-color .16s; }
.attribution-kv:hover { background: #f1f7f5; border-color: rgba(22, 152, 115, 0.16); }
.attribution-kv span { display: block; color: #60746d; font-size: 12px; margin-bottom: 4px; }
.attribution-kv strong { display: block; overflow-wrap: anywhere; font-size: 13px; font-weight: 800; color: #13231e; }
.attribution-kv--keyword-badge strong {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    overflow-wrap: normal;
    word-break: normal;
    max-width: 100%;
}
.attribution-drawer .badge--keyword,
.attribution-drawer .badge--keyword-paid {
    max-width: min(100%, 480px);
    flex-wrap: nowrap;
}
.attribution-kv a, .attribution-timeline a { color: var(--accent); text-decoration: none; font-weight: 800; }
.attribution-kv a:hover, .attribution-timeline a:hover { text-decoration: underline; }
.attribution-subcard { margin: 0 0 14px; padding: 14px; border-radius: 18px; background: #f7faf9; border: 1px solid rgba(22, 152, 115, 0.12); }
.attribution-subcard h4 { margin: 0 0 12px; color: #127e60; font-size: 14px; font-weight: 900; }
.attribution-yandex-card { background: #f8fbfa; }
.attribution-empty { padding: 14px; border-radius: 16px; background: rgba(22, 152, 115, 0.08); color: #127e60; font-weight: 800; margin-bottom: 12px; }
.attribution-touch-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.attribution-touch { border-radius: 18px; padding: 14px; background: #f8fbfa; border: 1px solid rgba(22, 152, 115, .10); }
.attribution-touch h4 { margin: 0 0 8px; font-size: 13px; color: #60746d; }
.attribution-touch p { margin: 0 0 4px; font-size: 17px; font-weight: 900; color: #127e60; }
.attribution-touch small { color: #60746d; overflow-wrap: anywhere; }
.attribution-timeline { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 0; }
.attribution-timeline li { position: relative; display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; padding: 0 0 18px; }
.attribution-timeline li:not(:last-child)::before { content: ''; position: absolute; left: 9px; top: 20px; bottom: 0; width: 2px; background: linear-gradient(rgba(22, 152, 115, .32), rgba(22,152,115,0)); }
.attribution-timeline__dot { width: 20px; height: 20px; border-radius: 999px; background: var(--accent); box-shadow: 0 0 0 6px rgba(22, 152, 115, 0.12); margin-top: 2px; }
.attribution-timeline li.is-conversion .attribution-timeline__dot { background: #0f766e; box-shadow: 0 0 0 6px rgba(15, 118, 110, 0.13); }
.attribution-timeline__meta { color: #60746d; font-size: 12px; font-weight: 800; margin-bottom: 4px; }
.attribution-timeline__url, .attribution-timeline__ref { overflow-wrap: anywhere; font-size: 13px; }
.attribution-timeline__ref { color: #60746d; margin-top: 3px; }
.attribution-technical summary { cursor: pointer; font-weight: 900; color: #127e60; }
.attribution-skeleton { display: grid; gap: 14px; }
.attribution-skeleton div { height: 112px; border-radius: 22px; background: linear-gradient(90deg, rgba(22, 152, 115, .08), rgba(22, 152, 115, .16), rgba(22, 152, 115, .08)); background-size: 220% 100%; animation: attribution-shimmer 1.2s infinite linear; }
.attribution-drawer__error { margin: 16px 0 0; padding: 14px; border-radius: 16px; background: rgba(220, 38, 38, .10); color: #b91c1c; font-weight: 800; }
.attribution-channel-chip { vertical-align: middle; max-width: 100%; }
.attribution-kv .attribution-channel-chip { display: inline-flex; }

/* ── Journey path cards ── */
.adr-journey { display: flex; flex-direction: column; margin-bottom: 14px; }
.adr-journey__line { width: 2px; height: 10px; background: linear-gradient(rgba(22,152,115,.28), rgba(22,152,115,.08)); margin: 0 0 0 14px; flex-shrink: 0; }
.adr-journey__card { width: 100%; border-radius: 10px; padding: 7px 11px; border: 1.5px solid rgba(22,152,115,.13); background: #f8fbfa; display: flex; flex-direction: column; gap: 4px; box-sizing: border-box; }
.adr-journey__card--first      { border-color: rgba(22,152,115,.22); background: #f2faf7; }
.adr-journey__card--assist     { border-color: rgba(180,83,9,.18); background: #fdfaf5; }
.adr-journey__card--last       { border-color: rgba(22,152,115,.18); background: #f5fbf9; }
.adr-journey__card--conversion { border-color: rgba(15,118,110,.35); background: #edf8f5; }
.adr-journey__card-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 20px; }
.adr-journey__card-badge { font-size: 10px; font-weight: 700; border-radius: 999px; padding: 1px 7px; white-space: nowrap; letter-spacing: .02em; text-transform: uppercase; }
.adr-journey__card-badge--first      { background: rgba(22,152,115,.14); color: #127e60; }
.adr-journey__card-badge--assist     { background: rgba(180,83,9,.12); color: #92400e; }
.adr-journey__card-badge--last       { background: rgba(22,152,115,.12); color: #127e60; }
.adr-journey__card-badge--conversion { background: rgba(15,118,110,.18); color: #0f5132; }
.adr-journey__card-right { display: flex; align-items: center; gap: 6px; }
.adr-journey__card-pages { font-size: 10.5px; color: #9ca3af; font-weight: 500; }
.adr-journey__card-time { font-size: 10.5px; color: #9ca3af; font-weight: 500; white-space: nowrap; }
.adr-journey__card-channel { display: flex; align-items: center; line-height: 1; }
.adr-journey__card-channel .channel-chip { font-size: 12px; padding: 2px 7px; }
.adr-journey__card-channel .channel-chip__dot { width: 7px; height: 7px; }
.adr-journey__card-channel .service-icon { width: 13px; height: 13px; }
.adr-journey__utms { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 1px; }
.adr-journey__utm-tag { display: inline-flex; align-items: center; gap: 3px; border-radius: 5px; border: 1px solid rgba(99,102,241,.18); background: rgba(99,102,241,.06); padding: 1px 5px; }
.adr-journey__utm-key { font-size: 9.5px; color: #818cf8; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.adr-journey__utm-val { font-size: 10.5px; color: #4338ca; font-weight: 600; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adr-journey__unknown { font-size: 12px; color: #6d28d9; font-weight: 700; }
.adr-journey__kw { margin-left: 6px; display: inline-flex; vertical-align: middle; }
.adr-journey__kw .badge--keyword,
.adr-journey__kw .badge--keyword-paid { font-size: 10.5px; padding: 1px 6px; max-width: 180px; }
.adr-journey__kw .badge--keyword__text { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: middle; }
.adr-journey__kw .badge--keyword__prefix { font-size: 10px; }
.attribution-row-btn { white-space: nowrap; padding: 6px 11px; font-size: 12px; border-color: rgba(22, 152, 115, .24) !important; color: #127e60 !important; background: rgba(22, 152, 115, .06) !important; }
.attribution-row-btn:hover { background: rgba(22, 152, 115, .10) !important; }

#admin-form-leads-root tr.fl-row-clickable { cursor: pointer; }
#admin-form-leads-root tr.fl-row-clickable:hover td { background: rgba(22, 152, 115, 0.06); }
.admin-global-client-search { position: relative; }
.admin-global-client-search__message { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 10; padding: 8px 10px; border-radius: 12px; background: #ffffff; color: #127e60; border: 1px solid rgba(22,152,115,.18); box-shadow: 0 10px 26px rgba(15,23,42,.10); font-size: 12px; font-weight: 700; }
@keyframes attribution-shimmer { from { background-position: 220% 0; } to { background-position: -220% 0; } }
@media (max-width: 768px) {
  .attribution-drawer__panel { padding: 18px; }
  .attribution-grid, .attribution-grid--compact, .attribution-touch-row { grid-template-columns: 1fr; }
  .attribution-card, .attribution-technical { border-radius: 18px; padding: 15px; }
}

/* Unified premium analytics dashboard design system */
:root {
    --ui-brand: #169873;
    --ui-brand-hover: #117a5c;
    --ui-brand-soft: rgba(22, 152, 115, 0.09);
    --ui-brand-ring: rgba(22, 152, 115, 0.22);
    --ui-ink: #10201b;
    --ui-ink-soft: #52645e;
    --ui-bg: #f5f7f6;
    --ui-surface: #ffffff;
    --ui-surface-2: #f9fbfa;
    --ui-line: rgba(22, 152, 115, 0.14);
    --ui-line-strong: rgba(15, 23, 42, 0.10);
    --ui-radius: 22px;
    --ui-radius-md: 16px;
    --ui-radius-sm: 12px;
    --ui-shadow: 0 18px 48px rgba(15, 23, 42, 0.075);
    --ui-shadow-soft: 0 10px 28px rgba(15, 23, 42, 0.055);
    --ui-pad: clamp(16px, 2vw, 24px);
    --ui-gap: clamp(14px, 1.6vw, 22px);
    --accent: var(--ui-brand);
    --accent-hover: var(--ui-brand-hover);
    --accent-muted: var(--ui-brand-soft);
    --border: var(--ui-line);
    --radius: var(--ui-radius-md);
    --shadow: var(--ui-shadow-soft);
}

body.app-body {
    color: var(--ui-ink);
    background:
        radial-gradient(900px 360px at 12% -12%, rgba(22, 152, 115, 0.08), transparent 56%),
        linear-gradient(180deg, #fbfcfb 0%, var(--ui-bg) 44%, #eef3f1 100%);
}

body.app-body a { color: var(--ui-brand); }
body.app-body a:hover { color: var(--ui-brand-hover); }
.text-muted, .muted { color: var(--ui-ink-soft) !important; }

.app-shell { background: transparent; }
.wrap-main, .dashboard-saas .container { min-width: 0; }
.dashboard-saas .container, .container { width: 100%; max-width: min(1440px, 100%); }

.sb-wrap {
    background: linear-gradient(180deg, #101b17, #0a120f) !important;
    border-right: 1px solid rgba(255,255,255,0.08);
    box-shadow: 18px 0 48px rgba(15, 23, 42, 0.12);
}
.sb-logo, .user { color: #f7fbfa; }
.sb-nav .nb, .sb-nav a.nb, .nav a, .nav-dropdown-wrap__main {
    transition: background .16s ease, color .16s ease, border-color .16s ease, transform .16s ease;
}
.sb-nav .nb:hover, .sb-nav .nb.on {
    background: rgba(22, 152, 115, 0.16) !important;
    color: #eafff8 !important;
    border-color: rgba(22, 152, 115, 0.30) !important;
}
.topbar {
    background: rgba(255, 255, 255, 0.82) !important;
    border: 1px solid rgba(22, 152, 115, 0.12) !important;
    border-radius: var(--ui-radius) !important;
    box-shadow: var(--ui-shadow-soft) !important;
    backdrop-filter: blur(16px);
}
.tb-title, .dashboard-page-head__title {
    letter-spacing: -0.045em;
    color: var(--ui-ink);
}
.dashboard-page-head,
.ph {
    margin-bottom: var(--ui-gap) !important;
    padding: clamp(16px, 2vw, 24px) !important;
    border: 1px solid rgba(22, 152, 115, 0.12);
    border-radius: var(--ui-radius);
    background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(249,251,250,0.86));
    box-shadow: var(--ui-shadow-soft);
}
.dashboard-page-head__title { font-size: clamp(24px, 3vw, 38px) !important; line-height: 1.1 !important; margin: 0 0 6px !important; font-weight: 800 !important; }
.dashboard-page-head__subtitle, .dashboard-page-head p { line-height: 1.55; }

.card,
.dash-card,
.dashboard-section,
.ui-chart-card,
.ui-table-card,
.dashboard-traffic,
.dashboard-period-kpis,
.integration-tabs__panel,
.channels-page.card,
.form-leads-page__section,
.dashboard-leads > section,
.admin-analytics-root > section,
.admin-analytics-card,
.admin-report-card,
.inbox-list-main .card {
    border: 1px solid var(--ui-line) !important;
    border-radius: var(--ui-radius) !important;
    background: var(--ui-surface) !important;
    box-shadow: var(--ui-shadow-soft) !important;
    padding: var(--ui-pad) !important;
}
.card:hover,
.dash-card:hover,
.ui-chart-card:hover,
.ui-table-card:hover,
.conv-kpi-bar__card:hover {
    border-color: rgba(22, 152, 115, 0.22) !important;
    box-shadow: var(--ui-shadow) !important;
}
.dashboard-section + .dashboard-section,
.card + .card,
.dashboard-leads > section + section { margin-top: var(--ui-gap); }

.conv-kpi-bar,
.dashboard-traffic__grid,
.dashboard-grid,
.admin-analytics-grid {
    gap: var(--ui-gap) !important;
}
.admin-analytics-kpi-card,
.dashboard-traffic__metric {
    border: 1px solid rgba(22, 152, 115, 0.12) !important;
    border-radius: var(--ui-radius-md) !important;
    background: linear-gradient(180deg, #fff, #f9fbfa) !important;
    box-shadow: none !important;
    padding: 16px !important;
}
.dashboard-saas .container > .conv-kpi-bar .conv-kpi-bar__card {
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-sm) !important;
    background: var(--surface) !important;
    box-shadow: none !important;
    padding: 14px 12px !important;
    min-height: 72px !important;
}
.dashboard-saas .container > .conv-kpi-bar .conv-kpi-bar__label {
    font-size: var(--text-xs) !important;
    line-height: 1.35 !important;
    letter-spacing: 0.04em !important;
    text-transform: uppercase;
    font-weight: 600 !important;
    color: var(--muted) !important;
}
.dashboard-saas .container > .conv-kpi-bar .conv-kpi-bar__value {
    color: var(--text) !important;
    font-size: var(--text-2xl) !important;
    font-weight: 700 !important;
    letter-spacing: -0.02em !important;
}
.conv-kpi-bar__delta--up {
    color: var(--ui-brand) !important;
}

button,
.btn,
.button,
.button-secondary,
.admin-global-client-search__submit,
.dashboard-period-toolbar__pill,
.dashboard-period-toolbar button,
.integration-tabs__tab,
.fl-tab,
.table-col-controls__toggle,
.table-col-controls__reset,
.table-sort-btn,
.dash-apply-filters,
.icon-button {
    border-radius: 999px !important;
    font-family: inherit;
    font-weight: 750 !important;
    transition: transform .14s ease, box-shadow .14s ease, background .14s ease, color .14s ease, border-color .14s ease;
}
.btn:not(.btn-secondary),
.button:not(.button-secondary),
.admin-global-client-search__submit,
.dash-apply-filters {
    border-color: var(--ui-brand) !important;
    background: var(--ui-brand) !important;
    color: #fff !important;
    box-shadow: 0 10px 24px rgba(22, 152, 115, 0.18);
}
.btn:not(.btn-secondary):hover,
.button:not(.button-secondary):hover,
.admin-global-client-search__submit:hover,
.dash-apply-filters:hover {
    background: var(--ui-brand-hover) !important;
    transform: translateY(-1px);
}
.button-secondary,
.btn-secondary,
.dashboard-period-toolbar__pill,
.fl-tab,
.table-col-controls__toggle,
.table-col-controls__reset {
    background: #fff !important;
    color: var(--ui-ink) !important;
    border: 1px solid rgba(22, 152, 115, 0.16) !important;
    box-shadow: none !important;
}
.dashboard-period-toolbar__pill.active,
.dashboard-period-toolbar__pill.is-active,
.button-secondary--active,
.button.button-secondary.active,
.button.button-secondary.is-active,
.button-secondary.active,
.button-secondary.is-active,
.visits-chart-metric-switcher .button.button-secondary[aria-pressed="true"],
.fl-tab--active,
.integration-tabs__tab[aria-selected="true"] {
    background: rgba(22, 152, 115, 0.16) !important;
    color: var(--ui-brand) !important;
    border-color: rgba(22, 152, 115, 0.48) !important;
    box-shadow: inset 0 0 0 1px rgba(22, 152, 115, 0.34) !important;
    font-weight: 800 !important;
}
button:focus-visible,
.btn:focus-visible,
.button:focus-visible,
input:focus,
select:focus,
textarea:focus {
    outline: none !important;
    border-color: var(--ui-brand) !important;
    box-shadow: 0 0 0 4px var(--ui-brand-ring) !important;
}

input,
select,
textarea,
.dashboard-period-toolbar__date,
.admin-global-client-search__input,
.form-leads-page input,
.form-leads-page select {
    border: 1px solid rgba(22, 152, 115, 0.16) !important;
    border-radius: var(--ui-radius-sm) !important;
    background: #fff !important;
    color: var(--ui-ink) !important;
    min-height: 40px;
}
.dashboard-period-toolbar,
.dashboard-period-toolbar__custom,
.form-leads-page__filters,
.admin-analytics-filterbar,
.table-col-controls {
    gap: 10px !important;
}

.table-scroll,
.admin-analytics-scroll-x,
.channels-list__scroll {
    border: 1px solid rgba(22, 152, 115, 0.12);
    border-radius: var(--ui-radius-md);
    overflow: auto;
    background: #fff;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}
table.data,
.data {
    width: 100%;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    background: #fff;
    color: var(--ui-ink);
}
table.data th,
table.data td,
.data th,
.data td {
    border-bottom: 1px solid rgba(15, 23, 42, 0.065) !important;
    padding: 12px 14px !important;
    vertical-align: middle;
}
table.data th,
.data th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: rgba(249, 251, 250, 0.96) !important;
    color: var(--ui-ink-soft) !important;
    font-size: 11px !important;
    line-height: 1.35;
    letter-spacing: .07em;
    text-transform: uppercase;
    font-weight: 850 !important;
    backdrop-filter: blur(10px);
}
table.data tbody tr,
.data tbody tr { transition: background .14s ease; }
table.data tbody tr:hover,
.data tbody tr:hover { background: rgba(22, 152, 115, 0.045) !important; }
table.data tbody tr:last-child td,
.data tbody tr:last-child td { border-bottom: 0 !important; }
.table-sort-btn { color: inherit !important; }

.channel-chip,
.ui-channel-badge,
.attribution-chip,
.kpi-delta,
.flash,
.dashboard-leads-status {
    border-radius: 999px !important;
}
.flash.ok, .flash.success { background: rgba(22, 152, 115, 0.10) !important; color: #127e60 !important; border-color: rgba(22, 152, 115, 0.22) !important; }
.flash.err, .flash.error { background: rgba(220, 38, 38, 0.08) !important; color: #b91c1c !important; border-color: rgba(220, 38, 38, 0.18) !important; }

.inbox-email-modal__panel,
.lp-modal,
.attribution-drawer__panel {
    border-radius: var(--ui-radius) 0 0 var(--ui-radius);
}
.inbox-email-modal__panel {
    border: 1px solid rgba(22, 152, 115, 0.14);
    box-shadow: var(--ui-shadow);
}
.admin-fullscreen-loader,
.fullscreen-loader,
.analytics-loading,
.attribution-skeleton div {
    border-radius: var(--ui-radius-md) !important;
}

canvas { max-width: 100%; }
.ui-chart-card canvas,
.dashboard-traffic canvas,
.admin-analytics-root canvas {
    filter: saturate(.95);
}

@media (max-width: 1024px) {
    .dashboard-page-head,
    .ph { grid-template-columns: 1fr !important; align-items: stretch !important; }
    .ph-right { justify-content: flex-start !important; width: 100%; }
    .dashboard-period-toolbar { width: 100%; }
}

@media (max-width: 768px) {
    :root { --ui-pad: 14px; --ui-gap: 12px; --ui-radius: 18px; }
    .dashboard-saas .container,
    .container { padding-left: 10px !important; padding-right: 10px !important; }
    .dashboard-page-head,
    .ph,
    .card,
    .dash-card,
    .dashboard-section,
    .ui-chart-card,
    .ui-table-card { padding: 14px !important; }
    .dashboard-page-head__title { font-size: 24px !important; }
    .conv-kpi-bar__value { font-size: 28px !important; }
    .dashboard-period-toolbar:not(.dashboard-page-head .dashboard-period-toolbar),
    .dashboard-period-toolbar__custom:not(.dashboard-page-head .dashboard-period-toolbar__custom) {
        flex-direction: column;
        align-items: stretch !important;
    }
    .dashboard-period-toolbar:not(.dashboard-page-head .dashboard-period-toolbar) .dashboard-period-toolbar__pill,
    .dashboard-period-toolbar:not(.dashboard-page-head .dashboard-period-toolbar) button,
    .dashboard-period-toolbar:not(.dashboard-page-head .dashboard-period-toolbar) input,
    .dashboard-period-toolbar:not(.dashboard-page-head .dashboard-period-toolbar) select {
        width: 100%;
    }
    .table-scroll,
    .admin-analytics-scroll-x,
    .channels-list__scroll { margin-left: -2px; margin-right: -2px; }
    table.data th,
    table.data td,
    .data th,
    .data td { padding: 10px 11px !important; }
}

/* Premium analytics platform final visual unification */
:root {
    --platform-sidebar-bg: #08120f;
    --platform-sidebar-bg-2: #101d18;
    --platform-sidebar-line: rgba(255, 255, 255, 0.08);
    --platform-sidebar-text: #dce9e4;
    --platform-sidebar-muted: #7f968d;
    --platform-chart-grid: rgba(22, 152, 115, 0.12);
    --platform-chart-tooltip: rgba(13, 20, 18, 0.94);
}

.sb-wrap {
    padding: 18px 14px !important;
    background:
        radial-gradient(420px 260px at 0% 0%, rgba(22, 152, 115, 0.18), transparent 62%),
        linear-gradient(180deg, var(--platform-sidebar-bg-2), var(--platform-sidebar-bg)) !important;
}
.sb-logo {
    min-height: 48px;
    padding: 0 2px 16px !important;
    border-bottom: 1px solid var(--platform-sidebar-line);
    margin-bottom: 18px !important;
}
.sb-logo svg {
    filter: drop-shadow(0 14px 24px rgba(22, 152, 115, 0.24));
}
.sb-logo-name {
    font-size: 18px !important;
    font-weight: 850 !important;
    letter-spacing: -0.035em;
}
.sb-logo-badge {
    margin-left: auto;
    padding: 4px 8px !important;
    border-radius: 999px;
    background: rgba(110, 224, 189, 0.18) !important;
    color: #9ff0d7 !important;
    border: 1px solid rgba(110, 224, 189, 0.20);
    font-size: 10px !important;
    font-weight: 900 !important;
}
.sb-section {
    margin: 18px 10px 8px !important;
    color: var(--platform-sidebar-muted) !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    letter-spacing: .105em !important;
    text-transform: uppercase;
}
.sb-nav {
    gap: 3px !important;
}
.sb-nav .nb {
    position: relative;
    display: flex !important;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 9px 10px !important;
    border: 1px solid transparent !important;
    border-radius: 13px !important;
    color: var(--platform-sidebar-text) !important;
    font-size: 14px !important;
    font-weight: 720 !important;
    letter-spacing: -0.01em;
    opacity: .84;
}
.sb-nav .nb::before {
    content: attr(data-nav-icon);
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 26px;
    border-radius: 9px;
    background: rgba(255,255,255,.055);
    color: #8ee8ca;
    border: 1px solid rgba(255,255,255,.06);
    font-size: 13px;
    line-height: 1;
}
.sb-nav .nb:hover {
    opacity: 1;
    transform: translateX(2px);
    background: rgba(255, 255, 255, 0.055) !important;
    border-color: rgba(110, 224, 189, 0.14) !important;
}
.sb-nav .nb.on {
    opacity: 1;
    color: #f7fffc !important;
    background: linear-gradient(135deg, rgba(22, 152, 115, .28), rgba(22, 152, 115, .12)) !important;
    border-color: rgba(110, 224, 189, .22) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 14px 30px rgba(0,0,0,.18);
}
.sb-nav .nb.on::before {
    background: var(--accent);
    color: #fff;
    border-color: rgba(255,255,255,.16);
    box-shadow: 0 10px 22px rgba(22, 152, 115, .26);
}
.sb-bot {
    border-top: 1px solid var(--platform-sidebar-line);
    padding-top: 14px !important;
}
.user {
    padding: 10px !important;
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 16px;
    background: rgba(255,255,255,.035);
}
.ava {
    background: linear-gradient(135deg, #263650, #169873) !important;
    color: #fff !important;
}
.u-name { font-weight: 850 !important; color: #f7fffc !important; }
.u-email { color: #a5b8b1 !important; }

.ui-chart-card,
.dashboard-traffic,
.admin-analytics-root [data-by-channels-chart],
.admin-analytics-root [data-by-days-chart],
.table-col-controls__chart-wrap {
    position: relative;
}
.ui-chart-card::after,
.dashboard-traffic::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    background: radial-gradient(520px 160px at 12% 0%, rgba(22, 152, 115, 0.08), transparent 64%);
}
.dashboard-redesign__legend,
.dashboard-infographics__channels,
.table-col-controls__chart-wrap,
.admin-chart-toolbar,
.chart-mode-tabs {
    border: 1px solid rgba(22, 152, 115, .12) !important;
    border-radius: var(--ui-radius-md) !important;
    background: rgba(249, 251, 250, .72) !important;
    padding: 10px !important;
}
.dashboard-redesign__legend-item i,
.dashboard-infographics__channel .channel-chip__dot,
.channel-chip__dot {
    box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 13%, transparent);
}
.table-col-controls__chart-canvas,
.dashboard-traffic canvas,
.admin-analytics-root canvas {
    min-height: 280px;
}

.table-scroll,
.explorer-channel-table,
#visits-channel-table,
#conv-channel-table,
.admin-analytics-scroll-x,
.channels-list__scroll {
    scrollbar-width: thin;
    scrollbar-color: rgba(22, 152, 115, .44) rgba(22, 152, 115, .08);
}
.table-scroll::-webkit-scrollbar,
.explorer-channel-table::-webkit-scrollbar,
#visits-channel-table::-webkit-scrollbar,
#conv-channel-table::-webkit-scrollbar,
.admin-analytics-scroll-x::-webkit-scrollbar,
.channels-list__scroll::-webkit-scrollbar { height: 10px; width: 10px; }
.table-scroll::-webkit-scrollbar-thumb,
.explorer-channel-table::-webkit-scrollbar-thumb,
#visits-channel-table::-webkit-scrollbar-thumb,
#conv-channel-table::-webkit-scrollbar-thumb,
.admin-analytics-scroll-x::-webkit-scrollbar-thumb,
.channels-list__scroll::-webkit-scrollbar-thumb { background: rgba(22, 152, 115, .42); border-radius: 999px; }
.table-scroll::-webkit-scrollbar-track,
.explorer-channel-table::-webkit-scrollbar-track,
#visits-channel-table::-webkit-scrollbar-track,
#conv-channel-table::-webkit-scrollbar-track,
.admin-analytics-scroll-x::-webkit-scrollbar-track,
.channels-list__scroll::-webkit-scrollbar-track { background: rgba(22, 152, 115, .06); border-radius: 999px; }

@media (max-width: 768px) {
    .sb-wrap { width: min(305px, 82vw) !important; }
    .sb-nav .nb { min-height: 46px; font-size: 15px !important; }
    .topbar { position: sticky; top: 8px; z-index: 35; }
    .table-col-controls__chart-canvas,
    .dashboard-traffic canvas,
    .admin-analytics-root canvas { min-height: 240px; }
}

/* Premium analytics lightweight sidebar refinement */
.sb-wrap {
    padding: 20px 16px !important;
    background:
        radial-gradient(360px 220px at -20% 0%, rgba(22, 152, 115, 0.10), transparent 62%),
        linear-gradient(180deg, #0d1714, #08110f) !important;
    box-shadow: 14px 0 36px rgba(15, 23, 42, 0.08) !important;
}
.sb-logo {
    border-bottom: 0 !important;
    padding-bottom: 12px !important;
    margin-bottom: 14px !important;
}
.sb-logo svg {
    width: 30px;
    height: 30px;
    filter: none !important;
}
.sb-logo-name {
    font-size: 17px !important;
    font-weight: 800 !important;
}
.sb-logo-badge {
    background: rgba(22, 152, 115, 0.12) !important;
    color: #9fdcc9 !important;
    border: 0 !important;
    box-shadow: none !important;
}
.sb-section {
    margin: 18px 8px 7px !important;
    color: rgba(220, 233, 228, 0.48) !important;
    font-size: 10px !important;
    letter-spacing: .13em !important;
}
.sb-nav {
    gap: 1px !important;
}
.sb-nav .nb {
    min-height: 38px;
    gap: 9px;
    padding: 8px 10px !important;
    border: 0 !important;
    border-radius: 11px !important;
    background: transparent !important;
    color: rgba(220, 233, 228, 0.72) !important;
    font-size: 14px !important;
    font-weight: 640 !important;
    opacity: 1;
    box-shadow: none !important;
}
.sb-nav .nb::before {
    width: 5px;
    height: 5px;
    flex: 0 0 5px;
    content: '';
    border: 0;
    border-radius: 999px;
    background: rgba(220, 233, 228, 0.18);
    color: transparent;
    box-shadow: none;
}
.sb-nav .nb:hover {
    transform: none;
    background: rgba(255, 255, 255, 0.035) !important;
    color: rgba(247, 255, 252, 0.92) !important;
    border: 0 !important;
}
.sb-nav .nb:hover::before {
    background: rgba(110, 224, 189, 0.60);
}
.sb-nav .nb.on {
    background: rgba(22, 152, 115, 0.10) !important;
    color: #f7fffc !important;
    border: 0 !important;
    box-shadow: inset 2px 0 0 #169873 !important;
}
.sb-nav .nb.on::before {
    background: #6ee0bd;
    box-shadow: 0 0 0 4px rgba(22, 152, 115, .12);
}
.sb-bot {
    border-top: 0 !important;
    padding-top: 12px !important;
}
.user {
    padding: 8px 10px !important;
    border: 0 !important;
    border-radius: 14px;
    background: rgba(255,255,255,.025) !important;
    box-shadow: none !important;
}
.ava {
    box-shadow: none !important;
}
.u-name {
    font-weight: 760 !important;
}
.u-email {
    color: rgba(220, 233, 228, 0.54) !important;
}
@media (max-width: 768px) {
    .sb-wrap { padding: 18px 14px !important; }
    .sb-nav .nb { min-height: 42px; }
}

/* Interactive conversion donut charts */
.conversion-donut-section {
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}
.conversion-donut-card {
    border: 1px solid rgba(22, 152, 115, 0.14);
    border-radius: var(--ui-radius, 22px);
    background:
        radial-gradient(520px 220px at 12% 0%, rgba(22, 152, 115, 0.08), transparent 62%),
        linear-gradient(180deg, rgba(255,255,255,.96), rgba(249,251,250,.90));
    box-shadow: var(--ui-shadow-soft, 0 10px 28px rgba(15,23,42,.055));
    padding: clamp(16px, 2vw, 24px);
}
.conversion-donut-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}
.conversion-donut-card__eyebrow {
    display: inline-flex;
    margin-bottom: 5px;
    color: var(--accent);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .09em;
    text-transform: uppercase;
}
.conversion-donut-card h2 {
    margin: 0 0 5px;
    font-size: clamp(20px, 2.3vw, 28px);
    line-height: 1.12;
    letter-spacing: -.04em;
}
.conversion-donut-card p {
    margin: 0;
    color: var(--ui-ink-soft, #52645e);
}
.conversion-donut-card__body {
    display: grid;
    grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
    gap: clamp(16px, 2vw, 26px);
    align-items: center;
}
.conversion-donut-chart-wrap {
    position: relative;
    min-height: 310px;
}
.conversion-donut-chart-wrap canvas {
    min-height: 310px;
}
.conversion-donut-center {
    position: absolute;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    display: grid;
    place-items: center;
    pointer-events: none;
}
.conversion-donut-center span {
    font-size: clamp(30px, 4vw, 46px);
    font-weight: 900;
    letter-spacing: -.055em;
    color: var(--ui-ink, #10201b);
}
.conversion-donut-center small {
    color: var(--ui-ink-soft, #52645e);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: 11px;
}
.conversion-donut-legend {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 9px;
}
.conversion-donut-legend__item {
    width: 100%;
    min-height: 54px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px !important;
    border-radius: 0.625rem !important;
    border: 1.5px solid rgba(22, 152, 115, 0.11) !important;
    background: rgba(255, 255, 255, 0.68) !important;
    color: var(--ui-ink, #10201b) !important;
    text-align: left;
    box-shadow: none !important;
    cursor: pointer;
    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        transform 0.15s ease;
}
.conversion-donut-legend__item > span:last-child {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
}
.conversion-donut-legend__item:hover,
.conversion-donut-legend__item:focus-visible {
    background: rgba(16, 185, 129, 0.06) !important;
    border-color: rgba(16, 185, 129, 0.22) !important;
    outline: none;
}
.conversion-donut-legend__item.is-active,
.conversion-donut-legend__item[aria-pressed='true'] {
    border-color: color-mix(in srgb, var(--channel-color, #169873) 34%, transparent) !important;
    background: color-mix(in srgb, var(--channel-color, #169873) 9%, white) !important;
    box-shadow:
        inset 3px 0 0 var(--channel-color, #169873),
        0 0 0 2px rgba(16, 185, 129, 0.1) !important;
}
.conversion-donut-legend__item.is-active,
.conversion-donut-legend__item[aria-pressed='true'],
.conversion-donut-legend__item:hover,
.conversion-donut-legend__item:focus-visible {
    transform: translateY(-1px);
}
.conversion-donut-legend__mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.conversion-donut-legend__mark .service-icon,
.conversion-donut-legend__mark .channel-chip__service-icon {
    width: 16px;
    height: 16px;
    margin: 0;
}

.conversion-donut-legend__dot {
    --channel-color: var(--accent);
    width: 10px;
    height: 10px;
    flex: 0 0 10px;
    border-radius: 999px;
    background: var(--channel-color);
    box-shadow: 0 0 0 5px color-mix(in srgb, var(--channel-color) 13%, transparent);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.conversion-donut-legend__mark .channel-chip__dot {
    --channel-color: var(--accent);
    width: 10px;
    height: 10px;
    flex: 0 0 10px;
    border-radius: 999px;
    background: var(--channel-color);
    box-shadow: 0 0 0 5px color-mix(in srgb, var(--channel-color) 13%, transparent);
}
.conversion-donut-legend__item:hover .conversion-donut-legend__dot,
.conversion-donut-legend__item:focus-visible .conversion-donut-legend__dot {
    transform: scale(1.05);
}
.conversion-donut-legend__item.is-active .conversion-donut-legend__dot,
.conversion-donut-legend__item[aria-pressed='true'] .conversion-donut-legend__dot {
    transform: scale(1.08);
}
.conversion-donut-legend__main {
    min-width: 0;
    display: grid;
    gap: 2px;
}
.conversion-donut-legend__main strong,
.conversion-donut-legend__main small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.conversion-donut-legend__main strong {
    font-size: 13px;
    font-weight: 850;
}
.conversion-donut-legend__main small {
    color: var(--ui-ink-soft, #52645e);
    font-size: 12px;
    font-weight: 750;
}
.conversion-donut-card__empty {
    min-height: 180px;
    display: grid;
    place-items: center;
    text-align: center;
    gap: 5px;
    color: var(--ui-ink-soft, #52645e);
}
.conversion-donut-card__empty strong { color: var(--ui-ink, #10201b); }
.conversion-donut-card__reset[hidden] { display: none !important; }
@media (max-width: 1024px) {
    .conversion-donut-card__body { grid-template-columns: 1fr; }
    .conversion-donut-chart-wrap,
    .conversion-donut-chart-wrap canvas { min-height: 260px; }
    .conversion-donut-card__head { flex-direction: column; }
}

/* Flat sidebar and dashboard donut/top pages refinement */
.sb-nav .nb,
.sb-nav .nb:hover,
.sb-nav .nb.on {
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
}
.sb-nav .nb::before,
.sb-nav .nb.on::before,
.sb-nav .nb:hover::before {
    display: none !important;
    content: none !important;
}
.sb-nav .nb {
    padding-left: 8px !important;
    color: rgba(220,233,228,.64) !important;
}
.sb-nav .nb:hover {
    color: rgba(247,255,252,.92) !important;
}
.sb-nav .nb.on {
    color: #8ee8ca !important;
    font-weight: 760 !important;
}
.admin-channel-donut-host,
.dashboard-channel-donut__chart {
    min-height: 320px;
    position: relative;
}
.admin-channel-donut-host canvas,
.dashboard-channel-donut__chart canvas {
    min-height: 320px;
}
.dashboard-channel-donut,
.dashboard-top-pages-card {
    border: 1px solid rgba(22, 152, 115, 0.14) !important;
    border-radius: var(--ui-radius, 22px) !important;
    background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(249,251,250,.90)) !important;
    box-shadow: var(--ui-shadow-soft, 0 10px 28px rgba(15,23,42,.055)) !important;
    padding: clamp(16px, 2vw, 22px) !important;
    margin-top: 14px;
}
.dashboard-channel-donut__head,
.dashboard-top-pages-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}
.dashboard-channel-donut__head span,
.dashboard-top-pages-card__head span {
    display: inline-flex;
    margin-bottom: 5px;
    color: var(--accent);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .09em;
    text-transform: uppercase;
}
.dashboard-channel-donut__head h3,
.dashboard-top-pages-card__head h3 {
    margin: 0 0 4px;
    font-size: clamp(19px, 2vw, 25px);
    letter-spacing: -.035em;
}
.dashboard-channel-donut__head p,
.dashboard-top-pages-card__head p {
    margin: 0;
    color: var(--ui-ink-soft, #52645e);
}
.dashboard-top-pages-list {
    display: grid;
    gap: 10px;
}
.dashboard-top-page-item {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid rgba(22,152,115,.11);
    border-radius: 16px;
    background: rgba(255,255,255,.68);
}
.dashboard-top-page-item__rank {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(22,152,115,.08);
    color: #127e60;
    font-weight: 900;
}
.dashboard-top-page-item__main {
    min-width: 0;
    display: grid;
    gap: 8px;
}
.dashboard-top-page-item__main strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
}
.dashboard-top-page-item__bar {
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(22,152,115,.08);
}
.dashboard-top-page-item__bar i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #169873, #6ee0bd);
}
.dashboard-top-page-item__metrics {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}
.dashboard-top-page-item__metrics span {
    min-width: 70px;
    display: grid;
    gap: 1px;
    padding: 7px 9px;
    border-radius: 13px;
    background: rgba(22,152,115,.055);
    text-align: right;
}
.dashboard-top-page-item__metrics b {
    font-size: 16px;
    line-height: 1;
}
.dashboard-top-page-item__metrics small {
    color: var(--ui-ink-soft, #52645e);
    font-size: 11px;
    font-weight: 700;
}
@media (max-width: 768px) {
    .admin-channel-donut-host,
    .dashboard-channel-donut__chart,
    .admin-channel-donut-host canvas,
    .dashboard-channel-donut__chart canvas { min-height: 260px; }
    .dashboard-top-page-item { grid-template-columns: 34px minmax(0, 1fr); }
    .dashboard-top-page-item__metrics { grid-column: 1 / -1; justify-content: stretch; }
    .dashboard-top-page-item__metrics span { flex: 1 1 72px; text-align: left; }
}

}

/* Premium funnel + KPI metrics redesign */
.admin-analytics-funnel--premium {
    position: relative;
    overflow: hidden;
    padding: clamp(18px, 2.4vw, 28px) !important;
    border: 1px solid rgba(22, 152, 115, 0.16) !important;
    border-radius: var(--ui-radius-lg, 26px) !important;
    background:
        radial-gradient(circle at 12% 0%, rgba(22, 152, 115, 0.12), transparent 30%),
        linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,251,250,.92)) !important;
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.075) !important;
}
.admin-analytics-funnel--premium::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(115deg, rgba(255,255,255,.46), transparent 42%);
}
.admin-analytics-funnel__head {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}
.admin-analytics-funnel__eyebrow {
    display: inline-flex;
    margin-bottom: 6px;
    color: var(--accent);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.admin-analytics-funnel__title,
.admin-analytics-metrics__title {
    margin: 0;
    font-size: clamp(22px, 2.2vw, 30px);
    line-height: 1.05;
    letter-spacing: -.045em;
    color: var(--ui-ink, #14201c);
}
.admin-analytics-funnel__head p,
.admin-analytics-metrics__head p {
    margin: 6px 0 0;
    max-width: 54rem;
    color: var(--ui-ink-soft, #52645e);
    font-size: 14px;
    line-height: 1.55;
}
.admin-analytics-funnel__summary {
    min-width: 142px;
    padding: 12px 14px;
    border: 1px solid rgba(22,152,115,.14);
    border-radius: 18px;
    background: rgba(22,152,115,.065);
    text-align: right;
}
.admin-analytics-funnel__summary strong {
    display: block;
    color: #127e60;
    font-size: 26px;
    line-height: 1;
    letter-spacing: -.04em;
}
.admin-analytics-funnel__summary span {
    color: var(--ui-ink-soft, #52645e);
    font-size: 12px;
    font-weight: 800;
}
.admin-analytics-funnel__grid {
    position: relative;
    grid-template-columns: minmax(320px, 1.08fr) minmax(360px, .92fr);
    gap: clamp(16px, 2vw, 24px);
    align-items: stretch;
}
.admin-funnel-pyramid--premium {
    gap: 12px;
    padding: 0;
}
.admin-funnel-pyramid__level--premium {
    width: 100%;
    min-height: 104px;
    margin: 0;
    clip-path: none !important;
    display: grid;
    grid-template-rows: auto 1fr auto auto;
    justify-items: stretch;
    align-content: stretch;
    gap: 9px;
    padding: 15px 16px;
    border: 1px solid rgba(22,152,115,.12);
    border-radius: 20px;
    background:
        radial-gradient(circle at 8% 18%, rgba(22,152,115,.14), transparent 28%),
        linear-gradient(135deg, rgba(255,255,255,.97), rgba(247,250,249,.9));
    box-shadow: 0 14px 36px rgba(15,23,42,.06);
    color: inherit;
    text-align: left;
    cursor: pointer;
    appearance: none;
    animation: premiumFunnelIn .54s cubic-bezier(.22,.9,.28,1) both;
    animation-delay: calc(var(--step-index, 0) * 70ms);
}
.admin-funnel-pyramid__level--premium:hover,
.admin-funnel-pyramid__level--premium:focus-visible {
    transform: translateY(-3px);
    border-color: rgba(22,152,115,.36);
    box-shadow: 0 20px 46px rgba(22,152,115,.14), 0 10px 28px rgba(15,23,42,.07);
    outline: none;
}
.admin-funnel-pyramid__level--premium[data-step='visits'],
.admin-funnel-pyramid__level--premium[data-step='users'],
.admin-funnel-pyramid__level--premium[data-step='conversions'],
.admin-funnel-pyramid__level--premium[data-step='target_conversions'] {
    background:
        radial-gradient(circle at 8% 18%, rgba(22,152,115,.13), transparent 28%),
        linear-gradient(135deg, rgba(255,255,255,.98), rgba(247,250,249,.91));
}
.admin-funnel-pyramid__level--premium[data-step='target_conversions'] {
    border-color: rgba(22,152,115,.22);
    background:
        radial-gradient(circle at 8% 18%, rgba(22,152,115,.19), transparent 30%),
        linear-gradient(135deg, rgba(255,255,255,.98), rgba(241,250,247,.94));
}
.admin-funnel-pyramid__shine {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(120deg, rgba(255,255,255,.52), transparent 34%, rgba(22,152,115,.035));
    opacity: .9;
}
.admin-funnel-pyramid__top,
.admin-funnel-pyramid__meta {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}
.admin-funnel-pyramid__icon {
    width: 31px;
    height: 31px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 12px;
    background: rgba(22,152,115,.1);
    color: #127e60;
    font-weight: 900;
}
.admin-funnel-pyramid__label {
    color: var(--ui-ink-soft, #52645e);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.admin-funnel-pyramid__rate {
    margin-left: auto;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(22,152,115,.08);
    color: #127e60;
    font-size: 12px;
    font-weight: 900;
}
.admin-funnel-pyramid__value {
    position: relative;
    margin: 0;
    color: var(--ui-ink, #14201c);
    font-size: clamp(30px, 4vw, 44px);
    font-weight: 900;
    letter-spacing: -.06em;
    line-height: 1;
}
.admin-funnel-pyramid__meta {
    justify-content: space-between;
    color: var(--ui-ink-soft, #52645e);
    font-size: 12px;
    font-weight: 760;
}
.admin-funnel-pyramid__meta em {
    color: rgba(18,126,96,.82);
    font-style: normal;
}
.admin-funnel-pyramid__bar {
    position: relative;
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(22,152,115,.08);
}
.admin-funnel-pyramid__bar i {
    display: block;
    width: var(--step-rate, 100%);
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #169873, #6ee0bd);
    transition: width .42s ease;
}
.admin-funnel-pyramid__tooltip {
    left: auto;
    right: 16px;
    top: 14px;
    transform: translateY(-4px);
    display: grid;
    gap: 2px;
    min-width: 130px;
    background: rgba(13,20,18,.94);
    border: 1px solid rgba(22,152,115,.24);
    border-radius: 14px;
    padding: 10px 12px;
    box-shadow: 0 18px 36px rgba(2,6,23,.18);
    transition: opacity .16s ease, transform .16s ease;
}
.admin-funnel-pyramid__tooltip span {
    color: rgba(223,238,233,.82);
    font-size: 12px;
}
.admin-funnel-pyramid__level:hover .admin-funnel-pyramid__tooltip,
.admin-funnel-pyramid__level:focus-visible .admin-funnel-pyramid__tooltip {
    opacity: 1;
    transform: translateY(0);
}
.admin-analytics-metrics--premium {
    min-width: 0;
    padding: 16px;
    border: 1px solid rgba(22,152,115,.12);
    border-radius: 22px;
    background: rgba(255,255,255,.62);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}
.admin-analytics-metrics__head {
    margin-bottom: 12px;
}
.admin-analytics-metrics__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.admin-analytics-metric {
    overflow: hidden;
    min-height: 148px;
    border: 1px solid rgba(22,152,115,.11);
    border-radius: 19px;
    padding: 13px;
    background: linear-gradient(160deg, rgba(255,255,255,.96), rgba(248,251,250,.88));
    box-shadow: 0 10px 26px rgba(15,23,42,.055);
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
    animation: premiumKpiIn .48s ease both;
}
.admin-analytics-metric:hover,
.admin-analytics-metric:focus-within {
    transform: translateY(-3px);
    border-color: rgba(22,152,115,.32);
    box-shadow: 0 18px 38px rgba(22,152,115,.12), 0 8px 22px rgba(15,23,42,.06);
}
.admin-analytics-metric__glow {
    position: absolute;
    inset: -40% -10% auto auto;
    width: 120px;
    height: 120px;
    border-radius: 999px;
    background: rgba(22,152,115,.12);
    filter: blur(3px);
    pointer-events: none;
}
.admin-analytics-metric__top {
    position: relative;
    align-items: flex-start;
}
.admin-analytics-metric__icon {
    width: 30px;
    height: 30px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(22,152,115,.1);
    color: #127e60;
    font-weight: 900;
}
.admin-analytics-metric__label-wrap {
    min-width: 0;
    display: grid;
    gap: 2px;
    margin-right: auto;
}
.admin-analytics-metric__label-wrap small {
    color: var(--ui-ink-soft, #52645e);
    font-size: 11px;
    font-weight: 750;
}
.admin-analytics-metric__label {
    color: var(--ui-ink, #14201c);
    font-size: 13px;
    font-weight: 950;
    letter-spacing: .08em;
}
.admin-analytics-metric__help {
    width: 25px;
    height: 25px;
    border: 0;
    background: rgba(22,152,115,.08);
    color: #127e60;
}
.admin-analytics-metric__value {
    position: relative;
    margin-top: 16px;
    color: var(--ui-ink, #14201c);
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 950;
    letter-spacing: -.055em;
    line-height: 1;
}
.admin-analytics-metric__trend {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    color: var(--ui-ink-soft, #52645e);
    font-size: 11px;
    font-weight: 800;
}
.admin-analytics-metric__trend span {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--accent);
    box-shadow: 0 0 0 4px rgba(22,152,115,.11);
}
.admin-analytics-metric__mini-track {
    position: absolute;
    left: 13px;
    right: 13px;
    bottom: 12px;
    height: 5px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(22,152,115,.07);
}
.admin-analytics-metric__mini-track i {
    display: block;
    width: 68%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #169873, rgba(110,224,189,.75));
}
.admin-analytics-metric--cost .admin-analytics-metric__icon,
.admin-analytics-metric--warning .admin-analytics-metric__icon { background: rgba(245,158,11,.11); color: #a16207; }
.admin-analytics-metric--cost .admin-analytics-metric__mini-track i,
.admin-analytics-metric--warning .admin-analytics-metric__mini-track i { background: linear-gradient(90deg, #d97706, #fbbf24); width: 54%; }
.admin-analytics-metric--reach .admin-analytics-metric__icon { background: rgba(59,130,246,.1); color: #2563eb; }
.admin-analytics-metric--reach .admin-analytics-metric__mini-track i { background: linear-gradient(90deg, #2563eb, #93c5fd); width: 61%; }
.admin-analytics-metric__hint {
    right: 12px;
    top: 46px;
    width: min(22rem, 72vw);
    background: rgba(13,20,18,.94);
    border: 1px solid rgba(22,152,115,.24);
    border-radius: 14px;
}
@keyframes premiumFunnelIn {
    from { opacity: 0; transform: translateY(12px) scale(.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes premiumKpiIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 1024px) {
    .admin-analytics-funnel__grid { grid-template-columns: 1fr; }
    .admin-analytics-metrics__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
    .admin-analytics-funnel--premium { padding: 15px !important; }
    .admin-analytics-funnel__head { display: grid; }
    .admin-analytics-funnel__summary { width: 100%; text-align: left; }
    .admin-funnel-pyramid__level--premium { min-height: 112px; padding: 13px; }
    .admin-funnel-pyramid__meta { display: grid; gap: 3px; }
    .admin-funnel-pyramid__tooltip { display: none; }
    .admin-analytics-metrics--premium { padding: 12px; }
    .admin-analytics-metrics__grid { grid-template-columns: 1fr; }
    .admin-analytics-metric { min-height: 132px; }
}
@media (prefers-reduced-motion: reduce) {
    .admin-funnel-pyramid__level--premium,
    .admin-analytics-metric { animation: none !important; transition: none !important; }
}

}

/* Premium funnel inverted pyramid refinement */
.admin-funnel-pyramid--premium {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 10px;
    padding: 4px 0 2px;
}
.admin-funnel-pyramid--premium::before {
    content: '';
    position: absolute;
    top: 18px;
    bottom: 18px;
    left: 50%;
    width: 1px;
    transform: translateX(-50%);
    background: linear-gradient(180deg, rgba(22,152,115,.2), rgba(22,152,115,.04));
    pointer-events: none;
}
.admin-funnel-pyramid__level--premium {
    width: var(--w, 100%) !important;
    max-width: 100%;
    min-height: 92px;
    border-radius: 22px;
    padding: 14px 16px;
    isolation: isolate;
}
.admin-funnel-pyramid__level--premium::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -11px;
    width: 22px;
    height: 11px;
    transform: translateX(-50%);
    background: linear-gradient(180deg, rgba(22,152,115,.16), rgba(22,152,115,.04));
    clip-path: polygon(50% 100%, 0 0, 100% 0);
    z-index: -1;
}
.admin-funnel-pyramid__level--premium:last-child::after {
    display: none;
}
.admin-funnel-pyramid__level--premium[data-step='visits'] {
    width: 100% !important;
}
.admin-funnel-pyramid__level--premium[data-step='users'] {
    width: 84% !important;
}
.admin-funnel-pyramid__level--premium[data-step='conversions'] {
    width: 68% !important;
}
.admin-funnel-pyramid__level--premium[data-step='target_conversions'] {
    width: 54% !important;
}
.admin-funnel-pyramid__level--premium:hover,
.admin-funnel-pyramid__level--premium:focus-visible {
    transform: translateY(-2px) scale(1.01);
}
.admin-funnel-pyramid__top {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
}
.admin-funnel-pyramid__value {
    text-align: left;
}
.admin-funnel-pyramid__meta {
    gap: 10px;
}
.admin-funnel-pyramid__bar {
    height: 6px;
}
@media (min-width: 1024px) {
    .admin-analytics-funnel__grid {
        grid-template-columns: minmax(420px, 1.05fr) minmax(360px, .95fr);
    }
}
@media (max-width: 1024px) {
    .admin-funnel-pyramid__level--premium[data-step='visits'] { width: 100% !important; }
    .admin-funnel-pyramid__level--premium[data-step='users'] { width: 88% !important; }
    .admin-funnel-pyramid__level--premium[data-step='conversions'] { width: 76% !important; }
    .admin-funnel-pyramid__level--premium[data-step='target_conversions'] { width: 64% !important; }
}
@media (max-width: 768px) {
    .admin-funnel-pyramid--premium {
        gap: 9px;
        justify-items: center;
    }
    .admin-funnel-pyramid--premium::before,
    .admin-funnel-pyramid__level--premium::after {
        display: none;
    }
    .admin-funnel-pyramid__level--premium {
        min-height: 104px;
        border-radius: 19px;
        padding: 13px;
    }
    .admin-funnel-pyramid__level--premium[data-step='visits'] { width: 100% !important; }
    .admin-funnel-pyramid__level--premium[data-step='users'] { width: 94% !important; }
    .admin-funnel-pyramid__level--premium[data-step='conversions'] { width: 88% !important; }
    .admin-funnel-pyramid__level--premium[data-step='target_conversions'] { width: 82% !important; }
    .admin-funnel-pyramid__rate {
        padding: 4px 7px;
        font-size: 11px;
    }
    .admin-funnel-pyramid__value {
        font-size: clamp(28px, 11vw, 40px);
    }
}
@media (max-width: 480px) {
    .admin-funnel-pyramid__level--premium[data-step='visits'] { width: 100% !important; }
    .admin-funnel-pyramid__level--premium[data-step='users'] { width: 96% !important; }
    .admin-funnel-pyramid__level--premium[data-step='conversions'] { width: 92% !important; }
    .admin-funnel-pyramid__level--premium[data-step='target_conversions'] { width: 88% !important; }
    .admin-funnel-pyramid__top {
        grid-template-columns: auto minmax(0, 1fr);
    }
    .admin-funnel-pyramid__rate {
        grid-column: 1 / -1;
        justify-self: start;
        margin-left: 0;
    }
}

/* Unified donut sizing parity */
.dashboard-channel-donut.conversion-donut-section,
.admin-analytics-root .admin-analytics-scroll-x--donut {
    padding: 0 !important;
    margin-top: 14px;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
}
.admin-analytics-root .admin-analytics-scroll-x--donut .chart-container,
.admin-analytics-root .admin-channel-donut-host {
    min-width: 0 !important;
    width: 100% !important;
    min-height: 0 !important;
    overflow: visible !important;
}
.admin-analytics-root .admin-channel-donut-host .conversion-donut-card .conversion-donut-chart-wrap canvas,
.dashboard-channel-donut .conversion-donut-card .conversion-donut-chart-wrap canvas {
    min-height: 310px;
}
.dashboard-channel-donut,
.admin-analytics-root .admin-channel-donut-host {
    max-width: 100%;
}
.dashboard-channel-donut .conversion-donut-card,
.admin-analytics-root .admin-channel-donut-host .conversion-donut-card {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}
.dashboard-channel-donut .conversion-donut-card__body,
.admin-analytics-root .admin-channel-donut-host .conversion-donut-card__body {
    grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
}
@media (max-width: 1024px) {
    .dashboard-channel-donut .conversion-donut-card__body,
    .admin-analytics-root .admin-channel-donut-host .conversion-donut-card__body {
        grid-template-columns: 1fr;
    }
    .dashboard-channel-donut .conversion-donut-card .conversion-donut-chart-wrap,
    .dashboard-channel-donut .conversion-donut-card .conversion-donut-chart-wrap canvas,
    .admin-analytics-root .admin-channel-donut-host .conversion-donut-card .conversion-donut-chart-wrap,
    .admin-analytics-root .admin-channel-donut-host .conversion-donut-card .conversion-donut-chart-wrap canvas {
        min-height: 260px !important;
    }
    .admin-analytics-root .admin-analytics-scroll-x--donut {
        overflow-x: visible !important;
        -webkit-overflow-scrolling: auto !important;
    }
}
@media (max-width: 480px) {
    .dashboard-channel-donut .conversion-donut-card,
    .admin-analytics-root .admin-channel-donut-host .conversion-donut-card {
        padding: 14px;
    }
    .dashboard-channel-donut .conversion-donut-legend,
    .admin-analytics-root .admin-channel-donut-host .conversion-donut-legend {
        grid-template-columns: 1fr;
    }
}

/* Final unified premium funnel + donut analytics polish */
:root {
    --analytics-premium-bg: linear-gradient(180deg, rgba(255,255,255,.985), rgba(248,251,250,.94));
    --analytics-premium-border: rgba(22, 152, 115, .13);
    --analytics-premium-shadow: 0 16px 42px rgba(15, 23, 42, .06);
    --analytics-premium-shadow-hover: 0 22px 52px rgba(22, 152, 115, .12), 0 8px 24px rgba(15,23,42,.055);
    --analytics-premium-radius: 24px;
    --analytics-premium-radius-sm: 17px;
}
.admin-analytics-funnel--premium,
.conversion-donut-card--unified,
.admin-analytics-metrics--premium {
    border-color: var(--analytics-premium-border) !important;
    background: radial-gradient(620px 240px at 14% 0%, rgba(22,152,115,.075), transparent 64%), var(--analytics-premium-bg) !important;
    box-shadow: var(--analytics-premium-shadow) !important;
}
.admin-analytics-funnel__eyebrow,
.conversion-donut-card__eyebrow {
    color: var(--accent);
    letter-spacing: .105em;
    font-weight: 920;
}
.admin-analytics-funnel__title,
.admin-analytics-metrics__title,
.conversion-donut-card h2 {
    color: var(--ui-ink, #14201c);
    font-weight: 880;
    letter-spacing: -.042em;
}
.admin-analytics-funnel__head p,
.admin-analytics-metrics__head p,
.conversion-donut-card p {
    color: color-mix(in srgb, var(--ui-ink-soft, #52645e) 88%, #169873 12%);
    line-height: 1.5;
}
.admin-funnel-pyramid--premium {
    gap: 8px;
    padding: 7px 0 4px;
}
.admin-funnel-pyramid--premium::before,
.admin-funnel-pyramid__level--premium::after {
    opacity: .5;
}
.admin-funnel-pyramid__level--premium {
    min-height: 86px;
    border-radius: 21px;
    padding: 13px 15px;
    border-color: rgba(22,152,115,.115);
    background: radial-gradient(420px 120px at 10% 0%, rgba(22,152,115,.105), transparent 62%), linear-gradient(135deg, rgba(255,255,255,.985), rgba(248,251,250,.93)) !important;
    box-shadow: 0 10px 26px rgba(15,23,42,.045);
    transition: transform .2s cubic-bezier(.22,.9,.28,1), box-shadow .2s ease, border-color .2s ease, background .2s ease;
}
.admin-funnel-pyramid__level--premium:hover,
.admin-funnel-pyramid__level--premium:focus-visible {
    transform: translateY(-2px) scale(1.006);
    border-color: rgba(22,152,115,.28);
    box-shadow: var(--analytics-premium-shadow-hover);
}
.admin-funnel-pyramid__level--premium[data-step='visits'] { width: 100% !important; }
.admin-funnel-pyramid__level--premium[data-step='users'] { width: 86% !important; }
.admin-funnel-pyramid__level--premium[data-step='conversions'] { width: 72% !important; }
.admin-funnel-pyramid__level--premium[data-step='target_conversions'] { width: 58% !important; }
.admin-funnel-pyramid__top { gap: 9px; align-items: center; }
.admin-funnel-pyramid__icon,
.admin-analytics-metric__icon { background: rgba(22,152,115,.085); color: #127e60; box-shadow: inset 0 0 0 1px rgba(22,152,115,.065); }
.admin-funnel-pyramid__label { color: color-mix(in srgb, var(--ui-ink-soft, #52645e) 88%, #14201c 12%); font-size: 11.5px; letter-spacing: .075em; }
.admin-funnel-pyramid__rate { background: rgba(22,152,115,.07); color: #127e60; font-size: 11.5px; }
.admin-funnel-pyramid__value { font-size: clamp(28px, 3.6vw, 39px); font-weight: 900; letter-spacing: -.058em; }
.admin-funnel-pyramid__meta { color: color-mix(in srgb, var(--ui-ink-soft, #52645e) 92%, #169873 8%); font-size: 11.5px; font-weight: 740; }
.admin-funnel-pyramid__bar { height: 5px; background: rgba(22,152,115,.065); }
.admin-funnel-pyramid__bar i,
.admin-analytics-metric__mini-track i { background: linear-gradient(90deg, #169873, rgba(110,224,189,.78)); }
.admin-analytics-metrics--premium { border-radius: var(--analytics-premium-radius); padding: 14px; }
.admin-analytics-metrics__head { margin-bottom: 10px; }
.admin-analytics-metrics__grid { gap: 9px; }
.admin-analytics-metric { min-height: 136px; border-radius: var(--analytics-premium-radius-sm); border-color: rgba(22,152,115,.105); box-shadow: 0 8px 22px rgba(15,23,42,.045); background: linear-gradient(160deg, rgba(255,255,255,.98), rgba(249,251,250,.91)) !important; }
.admin-analytics-metric:hover,
.admin-analytics-metric:focus-within { transform: translateY(-2px); box-shadow: var(--analytics-premium-shadow-hover); }
.admin-analytics-metric__glow { opacity: .62; width: 96px; height: 96px; }
.admin-analytics-metric__label { font-size: 12.5px; }
.admin-analytics-metric__label-wrap small,
.admin-analytics-metric__trend { color: color-mix(in srgb, var(--ui-ink-soft, #52645e) 90%, #169873 10%); }
.admin-analytics-metric__value { margin-top: 13px; font-size: clamp(23px, 2.8vw, 31px); }
.admin-analytics-metric__mini-track { height: 4px; background: rgba(22,152,115,.055); }
.conversion-donut-card--unified { position: relative; overflow: hidden; border-radius: var(--analytics-premium-radius) !important; padding: clamp(16px, 2vw, 22px); }
.conversion-donut-card--unified::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(120deg, rgba(255,255,255,.44), transparent 42%); }
.conversion-donut-card__head,
.conversion-donut-card__body { position: relative; }
.conversion-donut-card__body { grid-template-columns: minmax(252px, 348px) minmax(0, 1fr); gap: clamp(15px, 1.8vw, 24px); }
.conversion-donut-chart-wrap,
.conversion-donut-chart-wrap canvas { min-height: 298px; }
.conversion-donut-center span { font-size: clamp(29px, 3.8vw, 42px); }
.conversion-donut-center small { font-size: 10.5px; color: color-mix(in srgb, var(--ui-ink-soft, #52645e) 90%, #169873 10%); }
.conversion-donut-legend { gap: 8px; align-content: center; }
.conversion-donut-legend__item { min-height: 50px; border-radius: 15px !important; border-color: rgba(22,152,115,.095) !important; background: rgba(255,255,255,.62) !important; cursor: pointer; transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease; }
.conversion-donut-legend__item:hover,
.conversion-donut-legend__item:focus-visible,
.conversion-donut-legend__item.is-active,
.conversion-donut-legend__item[aria-pressed='true'] { transform: translateY(-1px); outline: none; box-shadow: inset 3px 0 0 var(--channel-color, #169873), 0 10px 22px color-mix(in srgb, var(--channel-color, #169873) 13%, transparent) !important; }
.conversion-donut-legend__dot { width: 9px; height: 9px; flex-basis: 9px; box-shadow: 0 0 0 4px color-mix(in srgb, var(--channel-color) 12%, transparent); }
.conversion-donut-legend__main strong { font-size: 12.8px; letter-spacing: -.01em; }
.conversion-donut-legend__main small { font-size: 11.5px; }
.conversion-donut-card__empty { min-height: 170px; border-radius: 18px; background: rgba(22,152,115,.04); }
@media (max-width: 1024px) {
    .admin-funnel-pyramid__level--premium[data-step='users'] { width: 89% !important; }
    .admin-funnel-pyramid__level--premium[data-step='conversions'] { width: 78% !important; }
    .admin-funnel-pyramid__level--premium[data-step='target_conversions'] { width: 67% !important; }
}
@media (max-width: 1024px) {
    .conversion-donut-card__body,
    .dashboard-channel-donut .conversion-donut-card__body,
    .admin-analytics-root .admin-channel-donut-host .conversion-donut-card__body { grid-template-columns: 1fr; }
    .conversion-donut-card .conversion-donut-chart-wrap,
    .conversion-donut-card .conversion-donut-chart-wrap canvas,
    .conversion-donut-card--unified .conversion-donut-chart-wrap,
    .conversion-donut-card--unified .conversion-donut-chart-wrap canvas,
    .dashboard-channel-donut .conversion-donut-card .conversion-donut-chart-wrap,
    .dashboard-channel-donut .conversion-donut-card .conversion-donut-chart-wrap canvas,
    .admin-analytics-root .admin-channel-donut-host .conversion-donut-card .conversion-donut-chart-wrap,
    .admin-analytics-root .admin-channel-donut-host .conversion-donut-card .conversion-donut-chart-wrap canvas { min-height: 252px !important; }
}
@media (max-width: 640px) {
    .admin-analytics-funnel--premium,
    .conversion-donut-card--unified { border-radius: 20px !important; padding: 14px !important; }
    .admin-funnel-pyramid__level--premium { min-height: 96px; padding: 12px; }
    .admin-funnel-pyramid__level--premium[data-step='users'] { width: 95% !important; }
    .admin-funnel-pyramid__level--premium[data-step='conversions'] { width: 90% !important; }
    .admin-funnel-pyramid__level--premium[data-step='target_conversions'] { width: 85% !important; }
    .admin-funnel-pyramid__value { font-size: clamp(27px, 10vw, 37px); }
    .admin-analytics-metric { min-height: 126px; }
    .conversion-donut-legend { grid-template-columns: 1fr; }
}

}

/* Final donut overflow guard */
.conversion-donut-section,
.dashboard-channel-donut.conversion-donut-section,
.admin-analytics-root .admin-analytics-scroll-x--donut,
.admin-analytics-root .admin-channel-donut-host,
.conversion-donut-card--unified,
.conversion-donut-card__body,
.conversion-donut-chart-wrap,
.conversion-donut-legend,
.conversion-donut-legend__item,
.conversion-donut-legend__main {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box;
}
.conversion-donut-section,
.dashboard-channel-donut.conversion-donut-section,
.admin-analytics-root .admin-analytics-scroll-x--donut,
.conversion-donut-card--unified {
    overflow-x: hidden !important;
}
.conversion-donut-chart-wrap canvas {
    width: 100% !important;
    max-width: 100% !important;
    display: block;
}
@media (max-width: 640px) {
    .conversion-donut-card__head {
        gap: 10px;
    }
    .conversion-donut-card__body {
        gap: 12px;
    }
    .conversion-donut-legend__item {
        padding-inline: 10px !important;
    }
}



/* Visual cleanup pass: admin analytics funnel/KPI + top pages links */
.admin-analytics-root .admin-analytics-funnel {
    border: 1px solid rgba(22, 152, 115, 0.12) !important;
    border-radius: 16px !important;
    background: #fff !important;
    box-shadow: none !important;
}
.admin-analytics-root .admin-analytics-funnel__head,
.admin-analytics-root .admin-analytics-metrics__head {
    margin-bottom: 10px;
}
.admin-analytics-root .admin-funnel-pyramid--compact {
    gap: 8px;
}
.admin-analytics-root .admin-funnel-pyramid__level--compact {
    min-height: 96px;
    border-radius: 14px;
    border: 1px solid rgba(22, 152, 115, 0.12);
    background: #fff !important;
    box-shadow: none !important;
}
.admin-analytics-root .admin-funnel-pyramid__level--compact::after,
.admin-analytics-root .admin-funnel-pyramid--compact::before {
    display: none !important;
}
.admin-analytics-root .admin-analytics-metrics {
    border: 1px solid rgba(22, 152, 115, 0.12);
    border-radius: 14px;
    background: #fff;
    padding: 12px;
}
.admin-analytics-root .admin-analytics-metrics__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 8px;
}
.admin-analytics-root .admin-analytics-metric {
    min-height: 120px;
    border-radius: 12px;
    box-shadow: none !important;
    background: #fff !important;
}
.admin-analytics-root .dashboard-channel-donut.conversion-donut-section {
    width: 100%;
    overflow: hidden;
}
.dashboard-top-page-item__domain,
.dashboard-top-page-item__link {
    display: block;
    font-size: 12px;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dashboard-top-page-item__domain {
    color: var(--ui-ink-soft, #52645e);
}
.dashboard-top-page-item__link {
    color: #0f766e;
    text-decoration: underline;
}
.dashboard-top-page-item__link--empty {
    text-decoration: none;
    color: var(--ui-ink-soft, #52645e);
}

/* EcoStat Analytics: unified funnel + KPI section (/admin/analytics) — TZ metrics + funnel parity */
.admin-analytics-funnel--eco-redesign {
    --analytics-fs-metric-value: clamp(2rem, 3.4vw, 2.25rem);
    --analytics-fs-metric-label: 12px;
    --analytics-fs-metric-category: 11px;
    --analytics-fs-block-title: 1.5rem;
    --analytics-fw-block-title: 600;
    --analytics-spacing-block: 32px;
    --analytics-spacing-gap: 24px;
    --analytics-spacing-inside: 16px;
    --analytics-color-text-primary: #111827;
    --analytics-color-text-secondary: #6b7280;
    --analytics-color-border: #e5e7eb;
    --analytics-color-bg-hover: rgba(0, 0, 0, 0.02);
    --analytics-radius-block: 8px;
    --analytics-radius-metric: 4px;
    --analytics-shadow-light: 0 1px 3px rgba(0, 0, 0, 0.08);
    --eco-primary: #10b981;
    --eco-primary-10: rgba(16, 185, 129, 0.1);
    --eco-ink: #111827;
    --eco-muted: #6b7280;
    --eco-faint: #9ca3af;
    --eco-border: #e5e7eb;
    --eco-surface: #fff;
    --eco-bg: #f9fafb;
    --eco-chevron: #d1d5db;
    --eco-cat-traffic: #10b981;
    --eco-cat-spend: #f59e0b;
    --eco-cat-media: #3b82f6;
    --eco-cat-funnel: #10b981;
    --eco-cat-unit: #3b82f6;
}

.admin-analytics-root .admin-analytics-funnel.admin-analytics-funnel--eco-redesign {
    padding: var(--analytics-spacing-block) !important;
    border-radius: var(--analytics-radius-block) !important;
    border: 1px solid var(--analytics-color-border) !important;
    box-shadow: var(--analytics-shadow-light) !important;
    background: var(--eco-surface) !important;
}

.admin-analytics-funnel--eco-redesign .admin-analytics-funnel-metrics {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 0;
}

.admin-analytics-funnel--eco-redesign .admin-analytics-funnel-metrics__header {
    min-width: 0;
}

.admin-analytics-funnel--eco-redesign .admin-analytics-funnel-metrics__eyebrow-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    min-width: 0;
}

.admin-analytics-funnel--eco-redesign .admin-analytics-funnel__eyebrow--eco {
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--eco-primary);
}

.admin-analytics-funnel--eco-redesign .admin-analytics-funnel__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.125rem 0.625rem;
    border-radius: 624.9375rem;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--eco-ink);
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.22);
}

.admin-analytics-funnel--eco-redesign .admin-analytics-funnel__badge strong {
    font-weight: 800;
    color: var(--eco-primary);
}

.admin-analytics-funnel--eco-redesign .admin-analytics-funnel__title {
    margin: 0.25rem 0 0;
    font-size: var(--analytics-fs-block-title);
    font-weight: var(--analytics-fw-block-title);
    line-height: 28px;
    color: var(--eco-ink);
    letter-spacing: -0.02em;
}

.admin-analytics-funnel--eco-redesign .admin-analytics-funnel-metrics__lead-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.5rem 0.75rem;
    margin-top: 0.375rem;
    min-width: 0;
}

.admin-analytics-funnel--eco-redesign .admin-analytics-funnel__lead {
    flex: 1 1 12rem;
    margin: 0;
    min-width: 0;
    font-size: 13px;
    line-height: 1.45;
    color: var(--analytics-color-text-secondary);
}

.admin-analytics-funnel--eco-redesign .admin-analytics-funnel-kpi-help {
    flex: 0 0 auto;
    margin-top: 0.125rem;
}

.admin-analytics-funnel--eco-redesign .admin-analytics-funnel-kpi-help__trigger--link {
    width: auto;
    height: auto;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--eco-cat-media);
    font-size: 12px;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    border-radius: 4px;
}

.admin-analytics-funnel--eco-redesign .admin-analytics-funnel-kpi-help__trigger--link:hover,
.admin-analytics-funnel--eco-redesign .admin-analytics-funnel-kpi-help__trigger--link:focus-visible {
    color: #1d4ed8;
    border-color: transparent;
    background: transparent;
    outline: 2px solid rgba(59, 130, 246, 0.45);
    outline-offset: 2px;
}

.admin-analytics-funnel--eco-redesign .metric-help__tooltip {
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.admin-analytics-funnel--eco-redesign .admin-analytics-funnel-metrics__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(1rem, 3vw, 2rem);
    padding-top: 1rem;
    margin-top: 0.25rem;
    border-top: 1px solid var(--eco-border);
    min-width: 0;
}

@media (min-width: 75rem) {
    .admin-analytics-funnel--eco-redesign .admin-analytics-funnel-metrics__grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }
}

@media (min-width: 90rem) {
    .admin-analytics-funnel--eco-redesign .admin-analytics-funnel-metrics__grid {
        grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
    }
}

.admin-analytics-funnel--eco-redesign .admin-analytics-funnel-metrics__funnel {
    min-width: 0;
}

.admin-analytics-funnel--eco-redesign .admin-analytics-funnel-metrics__kpi {
    min-width: 0;
    padding-left: 0;
    border-left: none;
}

.admin-analytics-funnel--eco-redesign .admin-analytics-metrics--eco {
    border: none;
    background: transparent;
    padding: 0;
    box-shadow: none;
}

@media (min-width: 75rem) {
    .admin-analytics-funnel--eco-redesign .admin-analytics-funnel-metrics__kpi {
        padding-left: clamp(1rem, 2vw, 2rem);
        border-left: 1px solid var(--eco-border);
    }
}

.admin-analytics-funnel--eco-redesign .admin-analytics-metrics__head--eco {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 0.75rem;
}

.admin-analytics-funnel--eco-redesign .admin-analytics-metrics__title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 0.75rem;
    min-width: 0;
}

.admin-analytics-funnel--eco-redesign .admin-analytics-metrics__title {
    margin: 0;
    font-size: var(--analytics-fs-block-title);
    font-weight: var(--analytics-fw-block-title);
    line-height: 28px;
    color: var(--eco-ink);
}

.admin-analytics-funnel--eco-redesign .admin-analytics-metrics__section-help {
    flex: 0 0 auto;
}

.admin-analytics-funnel--eco-redesign .admin-analytics-metrics__section-help-btn {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 6px;
    border: 1px solid var(--analytics-color-border);
    background: var(--eco-surface);
    color: var(--eco-muted);
    font-size: 0.875rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.admin-analytics-funnel--eco-redesign .admin-analytics-metrics__section-help-btn:hover,
.admin-analytics-funnel--eco-redesign .admin-analytics-metrics__section-help-btn:focus-visible {
    color: var(--eco-ink);
    border-color: rgba(59, 130, 246, 0.35);
    background: rgba(59, 130, 246, 0.04);
    outline: none;
}

.admin-analytics-funnel--eco-redesign .admin-analytics-metrics__section-help-btn:focus-visible {
    outline: 2px solid rgba(59, 130, 246, 0.45);
    outline-offset: 2px;
}

.admin-analytics-funnel--eco-redesign .admin-analytics-metrics__section-help-tip {
    max-width: min(22rem, 86vw);
    font-size: 12px;
    line-height: 1.45;
    color: var(--analytics-color-text-primary);
}

.admin-analytics-funnel--eco-redesign .admin-analytics-metrics__section-tip-dl {
    margin: 0;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.25rem 0.75rem;
}

.admin-analytics-funnel--eco-redesign .admin-analytics-metrics__section-tip-dl dt {
    margin: 0;
    font-weight: 700;
    color: var(--analytics-color-text-secondary);
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.admin-analytics-funnel--eco-redesign .admin-analytics-metrics__section-tip-dl dd {
    margin: 0;
    color: var(--analytics-color-text-primary);
}

.admin-analytics-funnel--eco-redesign .admin-analytics-metrics__grid--eco {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-auto-rows: 1fr;
    gap: var(--analytics-spacing-gap);
    align-items: stretch;
}

@media (min-width: 48rem) and (max-width: 74.9375rem) {
    .admin-analytics-funnel--eco-redesign .admin-analytics-metrics__grid--eco {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 75rem) {
    .admin-analytics-funnel--eco-redesign .admin-analytics-metrics__grid--eco {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.admin-analytics-funnel--eco-redesign .admin-funnel-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    min-width: 0;
}

@media (max-width: 63.9375rem) {
    .admin-analytics-funnel--eco-redesign .admin-funnel-steps {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: stretch;
        overflow-x: auto;
        gap: 0.25rem;
        padding-bottom: 0.25rem;
        -webkit-overflow-scrolling: touch;
    }

    .admin-analytics-funnel--eco-redesign .admin-funnel-steps__item {
        flex: 1 1 25%;
        min-width: min(11rem, 72vw);
    }

    .admin-analytics-funnel--eco-redesign .admin-funnel-step {
        width: 100% !important;
    }

    .admin-analytics-funnel--eco-redesign .admin-funnel-steps__connector-vert {
        display: none;
    }

    .admin-analytics-funnel--eco-redesign .admin-funnel-steps__connector-horiz {
        display: inline-flex;
    }
}

@media (max-width: 37.5rem) {
    .admin-analytics-funnel--eco-redesign .admin-funnel-steps {
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: center;
        overflow-x: visible;
        gap: 0;
        padding-bottom: 0;
    }

    .admin-analytics-funnel--eco-redesign .admin-funnel-steps__item {
        flex: 1 1 auto;
        width: 100%;
        min-width: 0;
    }

    .admin-analytics-funnel--eco-redesign .admin-funnel-step {
        width: 100% !important;
        max-width: 100%;
        min-width: 0;
    }

    .admin-analytics-funnel--eco-redesign .admin-funnel-steps__connector-vert {
        display: flex;
    }

    .admin-analytics-funnel--eco-redesign .admin-funnel-steps__connector-horiz {
        display: none;
    }
}

.admin-analytics-funnel--eco-redesign .admin-funnel-steps__item {
    width: 100%;
    display: flex;
    justify-content: center;
    min-width: 0;
    /* Hover/клик только на кнопке шага: пустая область li не должна подсвечивать карточку */
    pointer-events: none;
}

.admin-analytics-funnel--eco-redesign .admin-funnel-steps__item > .admin-funnel-step {
    pointer-events: auto;
}

.admin-analytics-funnel--eco-redesign .admin-funnel-steps__connector {
    list-style: none;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 1.25rem;
}

.admin-analytics-funnel--eco-redesign .admin-funnel-steps__connector-vert {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.125rem;
    width: 100%;
}

.admin-analytics-funnel--eco-redesign .admin-funnel-steps__connector-line {
    width: 1px;
    flex: 1 1 0.75rem;
    min-height: 0.5rem;
    background: var(--eco-chevron);
    border-radius: 1px;
}

.admin-analytics-funnel--eco-redesign .admin-funnel-steps__connector-horiz {
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0 0.125rem;
    color: var(--eco-chevron);
    font-size: 1rem;
    line-height: 1;
}

.admin-analytics-funnel--eco-redesign .admin-funnel-steps__delta {
    font-size: 0.8125rem;
    font-weight: 600;
}

.admin-analytics-funnel--eco-redesign .admin-funnel-steps__delta--neg {
    color: #ef4444;
}

.admin-analytics-funnel--eco-redesign .admin-funnel-steps__delta--pos {
    color: var(--eco-primary);
}

.admin-analytics-funnel--eco-redesign .admin-funnel-steps__delta--flat {
    color: var(--eco-muted);
}

.admin-analytics-funnel--eco-redesign .admin-funnel-step {
    box-sizing: border-box;
    max-width: 100%;
    margin-inline: auto;
    min-width: 0;
    width: 100%;
    border: 1px solid var(--eco-border);
    border-left-width: 0.1875rem;
    border-left-color: transparent;
    border-radius: 0.75rem;
    padding: 0.75rem 0.875rem;
    text-align: left;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    background: var(--eco-surface);
    -webkit-tap-highlight-color: transparent;
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease,
        transform 0.18s ease;
}

.admin-analytics-funnel--eco-redesign .admin-funnel-step[data-step='visits'] {
    background: var(--eco-bg);
}

.admin-analytics-funnel--eco-redesign .admin-funnel-step[data-step='users'] {
    background: rgba(16, 185, 129, 0.04);
}

.admin-analytics-funnel--eco-redesign .admin-funnel-step[data-step='conversions'] {
    background: rgba(16, 185, 129, 0.07);
}

.admin-analytics-funnel--eco-redesign .admin-funnel-step[data-step='target_conversions'] {
    background: rgba(16, 185, 129, 0.12);
    border-left-color: var(--eco-primary);
}

.admin-analytics-funnel--eco-redesign .admin-funnel-step:hover,
.admin-analytics-funnel--eco-redesign .admin-funnel-step:focus-visible {
    background: #f0fdf9 !important;
    border-color: rgba(16, 185, 129, 0.45);
    border-left-color: rgba(16, 185, 129, 0.45);
    box-shadow:
        0 0.25rem 1rem rgba(16, 185, 129, 0.12),
        0 0.0625rem 0.25rem rgba(0, 0, 0, 0.06);
    transform: translateY(-0.125rem);
    outline: none;
}

.admin-analytics-funnel--eco-redesign .admin-funnel-step__row1 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.admin-analytics-funnel--eco-redesign .admin-funnel-step__icon {
    flex: 0 0 auto;
    width: 2rem;
    height: 2rem;
    border-radius: 624.9375rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    background: rgba(16, 185, 129, 0.1);
    color: var(--eco-primary);
}

.admin-analytics-funnel--eco-redesign .admin-funnel-step__label {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--eco-faint);
}

.admin-analytics-funnel--eco-redesign .admin-funnel-step__rate {
    flex: 0 0 auto;
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 0.125rem 0.5rem;
    border-radius: 0.375rem;
}

.admin-analytics-funnel--eco-redesign .admin-funnel-step__rate--base {
    color: var(--eco-muted);
    background: rgba(107, 114, 128, 0.1);
}

.admin-analytics-funnel--eco-redesign .admin-funnel-step__rate--ok {
    color: var(--eco-primary);
    background: rgba(16, 185, 129, 0.12);
}

.admin-analytics-funnel--eco-redesign .admin-funnel-step__rate--low {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.admin-analytics-funnel--eco-redesign .admin-funnel-step__detail {
    margin-left: auto;
    opacity: 0;
    font-size: 1rem;
    color: var(--eco-primary);
    transition: opacity 0.18s ease 0.05s;
}

.admin-analytics-funnel--eco-redesign .admin-funnel-step:hover .admin-funnel-step__detail,
.admin-analytics-funnel--eco-redesign .admin-funnel-step:focus-visible .admin-funnel-step__detail {
    opacity: 1;
}

.admin-analytics-funnel--eco-redesign .admin-funnel-step__value {
    font-size: clamp(2rem, 3.6vw, 2.35rem);
    font-weight: 700;
    line-height: 1.05;
    color: var(--eco-ink);
    letter-spacing: -0.03em;
}

.admin-analytics-funnel--eco-redesign .admin-funnel-step__meta {
    font-size: 13px;
    font-weight: 500;
    color: var(--analytics-color-text-secondary);
}

.admin-analytics-funnel--eco-redesign .admin-funnel-step__bar {
    height: 0.1875rem;
    border-radius: 624.9375rem;
    background: rgba(16, 185, 129, 0.12);
    overflow: hidden;
}

.admin-analytics-funnel--eco-redesign .admin-funnel-step__bar i {
    display: block;
    height: 100%;
    width: var(--step-rate, 100%);
    max-width: 100%;
    border-radius: inherit;
    background: var(--eco-primary);
    opacity: 0.9;
}

.admin-analytics-funnel--eco-redesign .admin-funnel-step__tooltip {
    margin: 0;
    padding: 0 0.5rem;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    font-size: 0.75rem;
    line-height: 1.35;
    color: var(--eco-ink);
    background: rgba(249, 250, 251, 0.95);
    border-radius: 0.5rem;
    border: 1px solid transparent;
    transition: max-height 0.15s ease, opacity 0.15s ease, padding 0.15s ease, border-color 0.15s ease;
}

.admin-analytics-funnel--eco-redesign .admin-funnel-step:hover .admin-funnel-step__tooltip,
.admin-analytics-funnel--eco-redesign .admin-funnel-step:focus-visible .admin-funnel-step__tooltip {
    max-height: 5rem;
    opacity: 1;
    padding: 0.375rem 0.5rem;
    border-color: var(--eco-border);
}

.admin-analytics-funnel--eco-redesign .admin-funnel-step__tooltip strong {
    display: block;
    font-weight: 800;
}

.admin-analytics-funnel--eco-redesign .admin-funnel-step__tooltip-note {
    display: block;
    margin-top: 0.125rem;
    color: var(--eco-muted);
    font-weight: 500;
}

.admin-analytics-funnel--eco-redesign .admin-analytics-metric--eco {
    position: relative;
    box-sizing: border-box;
    min-height: 0;
    min-width: 0;
    padding: var(--analytics-spacing-inside);
    border-radius: var(--analytics-radius-metric);
    border: 1px solid var(--analytics-color-border);
    background: var(--eco-surface);
    display: flex;
    flex-direction: column;
    gap: 0;
    transition: background-color 0.18s ease, box-shadow 0.18s ease;
    box-shadow: var(--analytics-shadow-light);
}

.admin-analytics-funnel--eco-redesign .admin-analytics-metric--eco:hover,
.admin-analytics-funnel--eco-redesign .admin-analytics-metric--eco:focus-within {
    background-color: var(--analytics-color-bg-hover);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.admin-analytics-funnel--eco-redesign .admin-analytics-metric--eco:focus-visible {
    outline: 2px solid rgba(59, 130, 246, 0.55);
    outline-offset: 2px;
}

.admin-analytics-funnel--eco-redesign .admin-analytics-metric__sr-hint {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.admin-analytics-funnel--eco-redesign .admin-analytics-metric--placeholder {
    border-style: dashed;
    border-color: var(--analytics-color-border);
    background: rgba(249, 250, 251, 0.85);
    min-height: 5.5rem;
    pointer-events: none;
    box-shadow: none;
}

.admin-analytics-funnel--eco-redesign .admin-analytics-metric__top--eco {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    min-width: 0;
    margin-bottom: 8px;
}

.admin-analytics-funnel--eco-redesign .admin-analytics-metric__icon-ring {
    flex: 0 0 auto;
    width: 2rem;
    height: 2rem;
    min-width: 2rem;
    min-height: 2rem;
    border-radius: 624.9375rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--eco-primary);
    background: rgba(16, 185, 129, 0.08);
}

.admin-analytics-funnel--eco-redesign .admin-analytics-metric--tone-spend .admin-analytics-metric__icon-ring {
    color: var(--eco-cat-spend);
    background: rgba(245, 158, 11, 0.08);
}

.admin-analytics-funnel--eco-redesign .admin-analytics-metric--tone-media .admin-analytics-metric__icon-ring {
    color: var(--eco-cat-media);
    background: rgba(59, 130, 246, 0.08);
}

.admin-analytics-funnel--eco-redesign .admin-analytics-metric--tone-unit .admin-analytics-metric__icon-ring {
    color: var(--eco-cat-unit);
    background: rgba(59, 130, 246, 0.08);
}

.admin-analytics-funnel--eco-redesign .admin-analytics-metric__label-wrap {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.admin-analytics-funnel--eco-redesign .admin-analytics-metric__label {
    font-size: var(--analytics-fs-metric-category);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--analytics-color-text-secondary);
}

.admin-analytics-funnel--eco-redesign .admin-analytics-metric__caption {
    font-size: var(--analytics-fs-metric-label);
    font-weight: 500;
    color: var(--eco-faint);
}

.admin-analytics-funnel--eco-redesign .admin-analytics-metric__hovertip {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 6;
    margin-top: 6px;
    padding: 10px 12px;
    font-size: 12px;
    line-height: 1.45;
    color: var(--analytics-color-text-primary);
    background: var(--eco-surface);
    border: 1px solid var(--analytics-color-border);
    border-radius: 6px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
    pointer-events: none;
}

.admin-analytics-funnel--eco-redesign .admin-analytics-metric--eco:hover .admin-analytics-metric__hovertip,
.admin-analytics-funnel--eco-redesign .admin-analytics-metric--eco:focus-within .admin-analytics-metric__hovertip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.admin-analytics-funnel--eco-redesign .admin-analytics-metric__value {
    margin-top: 0;
    padding: 6px 8px;
    border-radius: 4px;
    font-size: var(--analytics-fs-metric-value);
    font-weight: 700;
    color: var(--analytics-color-text-primary);
    line-height: 1.1;
    letter-spacing: -0.03em;
    background: rgba(17, 24, 39, 0.04);
}

.admin-analytics-funnel--eco-redesign .admin-analytics-metric__tag {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 0.5rem;
    font-size: var(--analytics-fs-metric-label);
    font-weight: 500;
    color: var(--analytics-color-text-secondary);
    background: transparent;
    padding: 0;
    border-radius: 0;
}

.admin-analytics-funnel--eco-redesign .admin-analytics-metric__tag-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--eco-cat-traffic);
}

.admin-analytics-funnel--eco-redesign .admin-analytics-metric__tag--spend .admin-analytics-metric__tag-dot {
    background: var(--eco-cat-spend);
}

.admin-analytics-funnel--eco-redesign .admin-analytics-metric__tag--media .admin-analytics-metric__tag-dot {
    background: var(--eco-cat-media);
}

.admin-analytics-funnel--eco-redesign .admin-analytics-metric__tag--unit .admin-analytics-metric__tag-dot,
.admin-analytics-funnel--eco-redesign .admin-analytics-metric__tag--funnel .admin-analytics-metric__tag-dot {
    background: var(--eco-cat-traffic);
}

.admin-analytics-funnel--eco-redesign .admin-analytics-metric__tag--neutral .admin-analytics-metric__tag-dot {
    background: var(--eco-muted);
}

.admin-analytics-th-metric {
    cursor: help;
    text-decoration: underline dotted rgba(107, 114, 128, 0.55);
    text-underline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    .admin-analytics-funnel--eco-redesign .admin-funnel-step,
    .admin-analytics-funnel--eco-redesign .admin-analytics-metric--eco,
    .admin-analytics-funnel--eco-redesign .admin-funnel-step__tooltip,
    .admin-analytics-funnel--eco-redesign .admin-analytics-metric__hovertip,
    .admin-analytics-funnel--eco-redesign .metric-help__tooltip {
        transition: none !important;
    }

    .admin-analytics-funnel--eco-redesign .admin-funnel-step:hover,
    .admin-analytics-funnel--eco-redesign .admin-funnel-step:focus-visible {
        transform: none;
    }

    .admin-analytics-funnel--eco-redesign .admin-analytics-metric--eco:hover,
    .admin-analytics-funnel--eco-redesign .admin-analytics-metric--eco:focus-within {
        transform: none;
    }
}

/* Header / topbar rebuild: premium light minimal */
.topbar.topbar--rebuild {
    display: grid;
    grid-template-columns: minmax(180px, auto) minmax(260px, 1fr) auto;
    align-items: center;
    gap: 10px 14px;
    min-height: 56px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid rgba(22, 152, 115, 0.14) !important;
    border-radius: 14px !important;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.07) !important;
    backdrop-filter: blur(10px);
}
.topbar--rebuild .topbar__left,
.topbar--rebuild .topbar__right {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.topbar--rebuild .topbar__center {
    min-width: 0;
    width: 100%;
}
.topbar--rebuild .tb-title {
    margin: 0;
    font-size: clamp(17px, 1.5vw, 22px);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}
.topbar--rebuild .tb-search {
    width: min(100%, 620px);
    max-width: 620px;
    min-height: 40px;
    gap: 10px;
    justify-self: stretch;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(22, 152, 115, 0.2);
    background: #fff;
}
.topbar--rebuild .tb-search svg {
    width: 16px;
    height: 16px;
    color: #5f726b;
}
.topbar--rebuild .tb-search .admin-global-client-search__input {
    min-height: 38px;
    height: 38px;
    font-size: 14px;
    line-height: 1.25;
    padding: 0;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}
.topbar--rebuild .tb-search .admin-global-client-search__input::placeholder {
    color: #6a7f77;
}
.topbar--rebuild .topbar__right {
    justify-content: flex-end;
    flex-wrap: nowrap;
}
.topbar--rebuild .tb-live-indicator,
.topbar--rebuild .tb-icon--notify,
.topbar--rebuild .tb-icon--settings,
.topbar--rebuild .tb-icon--logout,
.topbar--rebuild .topbar__profile-link,
.topbar--rebuild .site-header__logout-btn,
.topbar--rebuild .tb-icon--avatar {
    height: 34px;
    min-height: 34px;
    border-radius: 999px !important;
}
.topbar--rebuild .tb-live-indicator {
    display: inline-flex;
    align-items: center;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 700;
    color: #0f7d61;
    background: rgba(22, 152, 115, 0.1);
    border: 1px solid rgba(22, 152, 115, 0.18);
}
.topbar--rebuild .tb-icon--notify {
    width: 34px;
    border: 1px solid rgba(22, 152, 115, 0.2);
    background: #fff;
    color: #35534a;
}
.topbar--rebuild .tb-icon--notify svg {
    width: 16px;
    height: 16px;
}
.topbar--rebuild .tb-icon--settings,
.topbar--rebuild .tb-icon--logout {
    width: 34px;
    border: 1px solid rgba(22, 152, 115, 0.2);
    background: #fff;
    color: #35534a;
    text-decoration: none;
}
.topbar--rebuild .tb-icon--settings svg,
.topbar--rebuild .tb-icon--logout svg {
    width: 16px;
    height: 16px;
}
.topbar--rebuild .tb-icon--settings:hover,
.topbar--rebuild .tb-icon--logout:hover {
    background: #f4f8f6;
    color: #0f7d61;
    border-color: rgba(22, 152, 115, 0.35);
}
.topbar--rebuild .site-header__logout-form {
    margin: 0;
}
.topbar--rebuild .tb-icon--avatar {
    width: 34px;
    padding: 2px;
    border: 1px solid rgba(22, 152, 115, 0.16);
    background: #fff;
}
.topbar--rebuild .tb-ava {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    font-size: 10px;
}
@media (max-width: 1024px) {
    .topbar.topbar--rebuild {
        grid-template-columns: minmax(140px, auto) minmax(200px, 1fr) auto;
        gap: 8px 10px;
    }
    .topbar--rebuild .tb-search {
        max-width: 100%;
    }
    .topbar--rebuild .topbar__right {
        gap: 6px;
    }
    .topbar--rebuild .tb-live-indicator {
        padding: 0 8px;
        font-size: 11px;
    }
    .topbar--rebuild .topbar__profile-link,
    .topbar--rebuild .site-header__logout-btn {
        padding: 0 10px;
        font-size: 12px;
    }
}
@media (max-width: 768px) {
    .topbar.topbar--rebuild {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "left right"
            "center center";
        padding: 8px;
        gap: 8px;
    }
    .topbar--rebuild .topbar__left { grid-area: left; }
    .topbar--rebuild .topbar__center { grid-area: center; }
    .topbar--rebuild .topbar__right {
        grid-area: right;
        gap: 5px;
    }
    .topbar--rebuild .tb-title {
        font-size: 15px;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .topbar--rebuild .tb-live-indicator {
        display: none;
    }
    .topbar--rebuild .tb-search {
        min-height: 38px;
        padding: 0 10px;
    }
    .topbar--rebuild .tb-search .admin-global-client-search__input {
        font-size: 13px;
    }
    .topbar--rebuild .site-header__logout-btn {
        padding: 0 9px;
    }
}


/* Donut section layout rebuild: single section/header/body */
.dashboard-channel-donut.conversion-donut-section {
    padding: clamp(14px, 1.8vw, 20px) !important;
    margin-top: 14px;
    overflow: visible !important;
}
.dashboard-channel-donut .dashboard-channel-donut__head {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.75rem;
    margin-bottom: clamp(12px, 1.6vw, 16px);
}
@media (min-width: 48rem) {
    .dashboard-channel-donut .dashboard-channel-donut__head {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
        gap: 0.875rem;
    }
}
.dashboard-channel-donut .dashboard-channel-donut__head > div:first-child {
    min-width: 0;
    flex: 1 1 auto;
}
.dashboard-channel-donut .dashboard-channel-donut__head .dash-chart-modes {
    flex: 0 0 auto;
    align-self: flex-start;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}
@media (max-width: 47.9375rem) {
    .dashboard-channel-donut .dashboard-channel-donut__head .dash-chart-modes {
        justify-content: flex-start;
        width: 100%;
        align-self: stretch;
    }
}
.dashboard-channel-donut .admin-analytics-chart-host.admin-channel-donut-host {
    min-height: 0 !important;
    overflow: visible !important;
    background: transparent !important;
    border: 0 !important;
    padding: 0 !important;
}

/* ConversionDonutChart: flex layout + responsive legend (breakpoints 1024 / 768 / 640) */
.conversion-donut-layout,
.conversion-donut-layout__body,
.conversion-donut-layout__side,
.conversion-donut-layout__actions,
.conversion-donut-layout .conversion-donut-chart-wrap,
.conversion-donut-layout .conversion-donut-legend {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}
.conversion-donut-layout {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 24px;
    width: 100%;
}
.conversion-donut-layout__body {
    flex: 0 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}
.conversion-donut-layout__side {
    flex: 1 1 auto;
    width: auto;
    padding-top: 0;
    display: grid;
    gap: 10px;
}
.conversion-donut-layout__actions {
    display: flex;
    justify-content: flex-end;
}
.conversion-donut-layout .conversion-donut-chart-wrap {
    position: relative;
    width: 300px;
    height: 300px;
    max-width: 100%;
    aspect-ratio: 1;
    margin: 0;
    flex-shrink: 0;
}
.conversion-donut-layout .conversion-donut-chart-wrap canvas {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    display: block;
}
.conversion-donut-layout .conversion-donut-legend {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 8px;
}
.dashboard-channel-donut.conversion-donut-section {
    overflow-x: hidden !important;
}
@media (max-width: 1023px) {
    .conversion-donut-layout {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }
    .conversion-donut-layout__body {
        width: 100%;
        flex: 0 1 auto;
    }
    .conversion-donut-layout__side {
        width: 100%;
        padding-top: 0;
    }
    .conversion-donut-layout__actions {
        justify-content: flex-start;
    }
    .conversion-donut-layout .conversion-donut-legend {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .dashboard-channel-donut .dashboard-channel-donut__head {
        align-items: flex-start;
    }
}
@media (max-width: 768px) {
    .conversion-donut-layout {
        gap: 12px;
    }
    .conversion-donut-layout__body {
        max-width: 300px;
        margin-left: auto;
        margin-right: auto;
    }
    .conversion-donut-layout .conversion-donut-chart-wrap {
        width: 250px;
        height: 250px;
    }
    .conversion-donut-layout .conversion-donut-center span {
        font-size: clamp(22px, 6vw, 34px);
    }
}
@media (max-width: 480px) {
    .conversion-donut-layout__body {
        max-width: 220px;
    }
    .conversion-donut-layout .conversion-donut-chart-wrap {
        width: 200px;
        height: 200px;
    }
    .conversion-donut-layout .conversion-donut-center span {
        font-size: clamp(18px, 8vw, 28px);
    }
    .conversion-donut-layout .conversion-donut-legend {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 640px) {
    .conversion-donut-layout .conversion-donut-legend__item {
        min-height: 48px;
        padding: 8px 10px !important;
        font-size: 13px;
    }
    .conversion-donut-layout .conversion-donut-legend__main strong {
        font-size: 12px;
    }
    .conversion-donut-layout .conversion-donut-legend__main small {
        font-size: 10.5px;
    }
}

/* —— Dashboard megaplan: аналитика — табы, KPI-сетка, таблица по каналам — */
@media (max-width: 1023px) {
    .admin-analytics-root .admin-analytics-metrics__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: var(--ds-gap-md, 12px);
    }
}
@media (max-width: 640px) {
    .admin-analytics-root .admin-analytics-metrics__grid {
        grid-template-columns: 1fr;
    }
}

.admin-analytics-root .dash-chart-modes,
.admin-analytics-root .dash-day-chart-modes {
    flex-wrap: wrap;
    gap: var(--ds-gap-sm, 8px);
    min-width: 0;
}

@media (max-width: 640px) {
    .admin-analytics-root .dash-chart-modes,
    .admin-analytics-root .dash-day-chart-modes {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: var(--ds-gap-xs, 4px);
        scrollbar-width: thin;
    }
    .admin-analytics-root .dash-chart-mode {
        flex: 0 0 auto;
        font-size: var(--ds-font-xs, 12px);
        padding: 6px 12px;
        min-height: 40px;
    }
}

@media (max-width: 1024px) and (min-width: 640px) {
    .dashboard-saas .dashboard-today-kpis__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 1023px) and (min-width: 640px) {
    .admin-analytics-by-channels-table thead th:nth-child(7),
    .admin-analytics-by-channels-table thead th:nth-child(8),
    .admin-analytics-by-channels-table tbody td:nth-child(7),
    .admin-analytics-by-channels-table tbody td:nth-child(8) {
        display: none;
    }
}

@media (max-width: 640px) {
    .admin-analytics-root .table-scroll:has(.admin-analytics-by-channels-table) {
        overflow-x: visible;
        -webkit-overflow-scrolling: auto;
    }
    .admin-analytics-by-channels-table thead {
        display: none;
    }
    .admin-analytics-by-channels-table,
    .admin-analytics-by-channels-table tbody,
    .admin-analytics-by-channels-table tr,
    .admin-analytics-by-channels-table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }
    .admin-analytics-by-channels-table tbody tr {
        margin-bottom: var(--ds-gap-lg, 16px);
        padding: var(--ds-gap-md, 12px);
        border: 1px solid var(--ds-border, #e5e7eb);
        border-radius: var(--ds-radius-lg, 12px);
        background: var(--surface, #fff);
    }
    .admin-analytics-by-channels-table tbody td {
        padding: 6px 0 !important;
        border: 0 !important;
        text-align: left !important;
    }
    .admin-analytics-by-channels-table tbody td[colspan] {
        text-align: center;
        padding: 12px !important;
    }
    .admin-analytics-by-channels-table tbody td:nth-child(1) {
        font-size: 1rem;
        font-weight: 800;
        padding-bottom: 8px;
        margin-bottom: 4px;
        border-bottom: 1px solid rgba(15, 23, 42, 0.08) !important;
    }
    .admin-analytics-by-channels-table tbody td:nth-child(n + 2) {
        display: grid;
        grid-template-columns: minmax(7.5rem, 44%) 1fr;
        gap: var(--ds-gap-sm, 8px);
        align-items: baseline;
        font-size: var(--ds-font-sm, 14px);
    }
    .admin-analytics-by-channels-table tbody td:nth-child(n + 2)::before {
        font-size: var(--ds-font-xs, 12px);
        font-weight: 700;
        color: var(--ds-text-muted, #6b7280);
        text-transform: uppercase;
        letter-spacing: 0.04em;
    }
    .admin-analytics-by-channels-table tbody td:nth-child(2)::before { content: 'Просмотры'; }
    .admin-analytics-by-channels-table tbody td:nth-child(3)::before { content: 'Уник. посет.'; }
    .admin-analytics-by-channels-table tbody td:nth-child(4)::before { content: 'Конверсии'; }
    .admin-analytics-by-channels-table tbody td:nth-child(5)::before { content: 'Целевые конв.'; }
    .admin-analytics-by-channels-table tbody td:nth-child(6)::before { content: 'CR'; }
    .admin-analytics-by-channels-table tbody td:nth-child(7)::before { content: 'CPL'; }
    .admin-analytics-by-channels-table tbody td:nth-child(8)::before { content: 'Расход'; }
}

@media (max-width: 640px) {
    .admin-analytics-root .dashboard-channel-donut.conversion-donut-section {
        overflow-x: visible !important;
    }
}

.sb-notification-badge {
    margin-left: auto;
    flex: 0 0 auto;
    min-width: 1.35rem;
    padding: 0.06rem 0.34rem;
    border-radius: 999px;
    background: rgba(110, 224, 189, 0.16);
    color: #9ff0d7;
    border: 1px solid rgba(110, 224, 189, 0.18);
    font-size: 10px;
    font-weight: 900;
    line-height: 1.25;
    text-align: center;
    letter-spacing: 0.02em;
}

.topbar-notification-total {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 1.05rem;
    height: 1.05rem;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.28rem;
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.tb-icon--notify {
    position: relative;
}

.topbar-notification-total[hidden],
#topbar-notification-total[hidden] {
    display: none !important;
}

.admin-notification-drawer {
    position: fixed;
    top: 76px;
    right: 16px;
    width: min(360px, calc(100vw - 32px));
    max-height: min(70vh, 520px);
    overflow: auto;
    z-index: 120;
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
    backdrop-filter: blur(10px);
    padding: 0.75rem;
}

.admin-notification-drawer__head {
    font-size: 0.82rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.admin-notification-list {
    display: grid;
    gap: 0.38rem;
}

.admin-notification-item {
    border-radius: 10px;
a.admin-notification-item {
    display: block;
    text-decoration: none;
    color: inherit;
}

a.admin-notification-item:hover {
    border-color: rgba(22, 152, 115, 0.55);
}

    border: 1px solid rgba(148, 163, 184, 0.22);
    background: #ffffff;
    padding: 0.48rem 0.58rem;
}

.admin-notification-item.is-unread {
    border-color: rgba(22, 152, 115, 0.35);
    background: rgba(22, 152, 115, 0.06);
}

.admin-notification-item__title {
    font-size: 0.76rem;
    font-weight: 700;
    color: #0f172a;
}

.admin-notification-item__time {
    margin-top: 0.2rem;
    font-size: 0.68rem;
    color: #64748b;
}

.admin-notification-empty {
    font-size: 0.75rem;
    color: #64748b;
    padding: 0.35rem 0.2rem;
}

@media (max-width: 768px) {
    .admin-notification-drawer {
        top: 64px;
        right: 10px;
        left: 10px;
        width: auto;
        max-height: min(76vh, 560px);
    }
}

/* Timeline: разделитель дня в дравере атрибуции */
.attribution-timeline__day-sep {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 14px 0 6px;
    padding: 0;
    list-style: none;
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.attribution-timeline__day-sep::before,
.attribution-timeline__day-sep::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(148, 163, 184, 0.3);
}

.attribution-timeline li.attribution-timeline__day-sep:first-child {
    margin-top: 4px;
}

.attribution-timeline li.is-conversion-step {
    background: rgba(22, 152, 115, 0.05);
    border-radius: 8px;
    padding: 4px 6px;
    margin-left: -6px;
    margin-right: -6px;
}

/* Timeline: день — раскрывашки «Первый/Последний визит», детали по точке */
.attribution-timeline li.attribution-timeline__day-wrap {
    display: block;
    grid-template-columns: unset;
    padding-bottom: 10px;
}

.attribution-timeline li.attribution-timeline__day-wrap::before {
    display: none;
}

.attribution-timeline__opener {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 10px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.65);
}

.attribution-timeline__opener:last-child {
    margin-bottom: 0;
}

.attribution-timeline__opener--bundle {
    border-style: dashed;
    background: rgba(248, 250, 252, 0.9);
}

.attribution-timeline__summary {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    list-style: none;
}

.attribution-timeline__summary::-webkit-details-marker,
.attribution-timeline__summary::marker {
    display: none;
    content: '';
}

.attribution-timeline__summary--bundle {
    padding-left: 38px;
}

.attribution-timeline__dot-btn {
    flex-shrink: 0;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    line-height: 0;
}

.attribution-timeline__dot-btn:focus-visible {
    outline: 2px solid rgba(22, 152, 115, 0.55);
    outline-offset: 2px;
    border-radius: 999px;
}

.attribution-timeline__summary-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.attribution-timeline__opener-label {
    font-size: 13px;
    font-weight: 800;
    color: #0f172a;
}

.attribution-timeline__opener-meta {
    font-size: 12px;
    font-weight: 700;
    color: #60746d;
}

.attribution-timeline__panel {
    padding: 0 12px 12px 38px;
}

.attribution-timeline__channel {
    font-size: 12px;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 6px;
}

.attribution-timeline__detail-extra {
    display: none;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed rgba(15, 23, 42, 0.1);
}

.attribution-timeline__opener.is-detail-expanded .attribution-timeline__detail-extra,
.attribution-timeline__sub-item.is-detail-expanded .attribution-timeline__detail-extra {
    display: block;
}

.attribution-timeline__detail-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 12px;
    margin-bottom: 4px;
}

.attribution-timeline__detail-row span {
    color: #64748b;
    font-weight: 700;
}

.attribution-timeline__detail-row strong {
    color: #0f172a;
    font-weight: 800;
    text-align: right;
}

.attribution-timeline__sub {
    list-style: none;
    margin: 0;
    padding: 0 12px 12px 38px;
    display: grid;
    gap: 10px;
}

.attribution-timeline__sub-item {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
}

.attribution-timeline__sub-item::before {
    display: none;
}

.attribution-timeline__link-clamp {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.attribution-timeline__link-clamp:hover {
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
}

/* Подгруппы UTM / click ID в карточке «Реклама и UTM» */
.attribution-subgroup {
    margin-top: 10px;
}

.attribution-subgroup + .attribution-subgroup {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(15, 23, 42, 0.07);
}

.attribution-subgroup__label {
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.attribution-notice {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    color: #475569;
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

/* --- Admin users: freeze / impersonate --- */
.admin-users-actions {
    white-space: nowrap;
}
.admin-users-actions__form {
    display: inline-block;
    margin: 0 4px 4px 0;
    vertical-align: middle;
}
.admin-users-actions__btn {
    margin-top: 0 !important;
    font-size: 12px;
    padding: 4px 10px;
}
.admin-user-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
}
.admin-user-status--active {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}
.admin-user-status--frozen {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}
.admin-impersonation-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin: 0 0 12px;
    padding: 10px 14px;
    border-radius: 12px;
    background: #fffbeb;
    border: 1px solid #fcd34d;
    color: #92400e;
    font-size: 13px;
}
.admin-impersonation-bar__form {
    margin: 0;
}

/* --- Webvisor link in attribution drawer --- */
.adr-webvisor-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 500;
    text-decoration: none;
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #fed7aa;
    white-space: nowrap;
    transition: background .15s, border-color .15s;
    vertical-align: middle;
    margin-left: 6px;
}
.adr-webvisor-link:hover {
    background: #ffedd5;
    border-color: #fb923c;
}
.adr-webvisor-link--card {
    padding: 4px 10px;
    font-size: 12px;
    margin-left: 0;
}

/* Бейдж для данных из Яндекс Метрики в дравере атрибуции */
.adr-ym-badge {
    display: none !important;
}
.adr-ym-badge--visible {
    display: inline-block;
    margin-left: 5px;
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.4;
    color: #1565c0;
    background: rgba(21, 101, 192, 0.1);
    border: 1px solid rgba(21, 101, 192, 0.2);
    vertical-align: middle;
    cursor: default;
}

/* Hub: /admin/tools */
.admin-tools-hub {
    max-width: 960px;
}
.admin-tools-section {
    margin-top: 1.75rem;
}
.admin-tools-section__title {
    margin: 0 0 12px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
}
.admin-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}
.admin-tools-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px 18px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: #fff;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.admin-tools-card:hover {
    border-color: rgba(22, 152, 115, 0.45);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}
.admin-tools-card__icon {
    font-size: 1.1rem;
    line-height: 1;
    color: var(--accent);
}
.admin-tools-card__label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #0f172a;
}
.admin-tools-card__desc {
    font-size: 0.8rem;
    line-height: 1.45;
    color: #64748b;
}

/* ===== Visits page upgrade (/admin/visits) ===== */
.visits-compare-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.visits-compare-toggle { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: #334155; }

/* ── KPI bar: единый блок (конверсии, визиты, лиды, почта) ── */
.conv-kpi-bar {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 20px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}
.dashboard-saas .container > .conv-kpi-bar {
    width: 100%;
    max-width: 100%;
}
.conv-kpi-bar__card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 12px;
    min-height: 72px;
    min-width: 0;
    box-sizing: border-box;
}
.conv-kpi-bar__card--warn {
    border-color: #f59e0b44;
    background: #fffbf0;
}
.conv-kpi-bar__card--duration .conv-kpi-bar__label {
    font-size: 10px;
    letter-spacing: 0.02em;
}
.conv-kpi-bar__card--duration .conv-kpi-bar__value {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.25;
    white-space: normal;
    word-break: break-word;
}
.conv-kpi-bar__label {
    font-size: var(--text-xs);
    color: var(--muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}
.conv-kpi-bar__value {
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--text);
    line-height: 1.1;
    overflow: hidden;
    text-overflow: ellipsis;
}
.conv-kpi-bar__delta {
    font-size: 11px;
    font-weight: 600;
    margin-top: 4px;
    display: inline-block;
}
.conv-kpi-bar__delta--up {
    color: #16a34a;
}
.conv-kpi-bar__delta--down {
    color: #dc2626;
}
.conv-kpi-bar__note {
    margin-top: 4px;
    font-size: 0.76rem;
    color: #64748b;
    line-height: 1.3;
}
.conv-kpi-bar__note.is-empty {
    visibility: hidden;
}

.dashboard-section__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}
.dashboard-section__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.dashboard-section__head--visits {
    justify-content: flex-start;
    align-items: baseline;
    gap: 12px;
    flex-wrap: nowrap;
}
.visits-export-link {
    font-size: 12px;
    font-weight: 500;
    color: var(--accent);
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}
.visits-export-link:hover {
    color: #0d7a5c;
    text-decoration: underline;
}

.seo-metric-link {
    font-size: inherit;
    font-weight: 700;
    color: var(--accent);
    text-decoration: underline;
    cursor: pointer;
    border: 0;
    background: none;
    padding: 0;
}
.seo-metric-link:hover {
    color: #0d7a5c;
}

.visits-seo-keyword-banner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 14px;
    margin: 0 0 16px;
    padding: 12px 16px;
    border-radius: 14px;
    background: rgba(22, 152, 115, 0.08);
    border: 1px solid rgba(22, 152, 115, 0.18);
}

/* VDA cron health warning banner */
.visits-vda-health-banner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 14px;
    padding: 12px 16px;
    border-radius: 10px;
    background: #fff8ed;
    border: 1px solid #f5a623;
    font-size: 13px;
    line-height: 1.45;
    color: #7a4a00;
}
.visits-vda-health-banner__icon {
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 1px;
}
.visits-vda-health-banner__msg {
    flex: 1;
    word-break: break-word;
}
.visits-vda-health-banner__close {
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    color: #a06000;
    padding: 0 2px;
    margin-top: -1px;
}
.visits-vda-health-banner__close:hover { color: #7a4a00; }

.seo-conv-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}
.seo-conv-list__more {
    margin: 12px 0 0;
    font-size: 13px;
}
.seo-conv-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #fff;
    transition: border-color 0.16s, background 0.16s, box-shadow 0.16s;
}
.seo-conv-item--clickable {
    cursor: pointer;
}
.seo-conv-item--clickable:hover,
.seo-conv-item--clickable:focus-visible {
    border-color: rgba(22, 152, 115, 0.35);
    background: rgba(22, 152, 115, 0.06);
    box-shadow: 0 4px 18px rgba(22, 152, 115, 0.08);
    outline: none;
}
.seo-conv-item__main {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.seo-conv-item__type {
    font-size: 14px;
    font-weight: 700;
    color: #10201b;
    line-height: 1.25;
}
.seo-conv-item__cid {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12px;
    color: #64748b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.seo-conv-item__time {
    flex-shrink: 0;
    font-size: 12px;
    color: #64748b;
    white-space: nowrap;
}

.seo-sort-th {
    white-space: nowrap;
}
.seo-sort-th--num {
    text-align: right;
}
.seo-sort-th--num .table-sort-btn {
    justify-content: flex-end;
    width: 100%;
}
.seo-sort-th--active .table-sort-btn__text {
    color: var(--accent);
    font-weight: 700;
}

.dashboard-page-head .seo-api-cost {
    margin: 10px 0 0;
    padding: 10px 12px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-size: 13px;
    line-height: 1.5;
    max-width: 960px;
}
.dashboard-page-head .seo-api-cost:empty {
    display: none;
}

.seo-keywords-panel .seo-toolbar {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e2e8f0;
}
.seo-keywords-panel .seo-toolbar__status {
    font-size: 13px;
    margin-left: auto;
}
.dashboard-filters-inset,
.seo-keywords-panel .seo-filters-block,
.visits-explorer-panel .visits-filters-block {
    margin: 0 0 18px;
    padding: 14px 16px 12px;
    border-radius: 10px;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}
.dashboard-filters-inset .ve-filters-head,
.seo-keywords-panel .seo-filters-block .ve-filters-head,
.visits-explorer-panel .visits-filters-block .ve-filters-head {
    margin-bottom: 10px;
}
.dashboard-filters-inset .ve-filters-row--main,
.seo-keywords-panel .seo-filters-block .ve-filters-row--main,
.visits-explorer-panel .visits-filters-block .ve-filters-row--main {
    margin-bottom: 8px;
}
.visits-explorer-panel .visits-filters-block .ve-filters-row--chips {
    margin-top: 4px;
}
.visits-explorer-panel,
.visits-explorer-panel .visits-filters-block,
.visits-explorer-panel .ve-field--channels,
.visits-explorer-panel .ve-channel-picker,
.visits-explorer-panel .ve-filters-section--ad,
.visits-explorer-panel .ve-filters-row--ad,
.visits-explorer-panel .ad-picker {
    overflow: visible;
}
.visits-explorer-panel .ve-channel-picker:has(.ve-channel-picker__btn[aria-expanded="true"]) {
    position: relative;
    z-index: 50;
}
.visits-explorer-panel .visits-filters-block {
    position: relative;
    z-index: 10;
}
.visits-explorer-panel .ad-picker:has(.ad-picker__btn[aria-expanded="true"]) {
    position: relative;
    z-index: 50;
}
.seo-keywords-panel .seo-table-head,
.visits-explorer-panel .visits-table-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin: 4px 0 12px;
    padding-top: 2px;
}
.seo-keywords-panel .seo-table-head .dashboard-today-kpis__heading,
.visits-explorer-panel .visits-table-head .dashboard-today-kpis__heading {
    margin: 0;
    font-size: 1rem;
}
.seo-keywords-panel .seo-table-head__hint {
    font-size: 12px;
}

#seo-list[data-refreshing="1"],
#admin-visits-root #vp-list[data-refreshing="1"],
#admin-conversions-root #vp-list[data-refreshing="1"] {
    opacity: 0.55;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.ve-filters-head--seo {
    align-items: flex-start;
}
.ve-filters-head--seo .ve-filters-head__lead {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.seo-target-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    font-size: 12px;
    line-height: 1.4;
    color: #64748b;
}
.seo-target-meta__label {
    color: #94a3b8;
    font-weight: 500;
}
.seo-target-meta__value {
    color: #0f172a;
    font-weight: 600;
}
.seo-target-meta__sep {
    color: #cbd5e1;
}
.seo-target-meta__hint {
    font-size: 11px;
}
.seo-target-meta__link {
    color: var(--accent, #169873);
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
}
.seo-target-meta__link:hover {
    text-decoration: underline;
}

/* --- SEO keyword group badges --- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 1px 7px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}
.badge--high   { background: #fef3c7; color: #92400e; }
.badge--medium { background: #dbeafe; color: #1e40af; }
.badge--low    { background: #f1f5f9; color: #475569; }
.badge--ignore { background: #f8fafc; color: #94a3b8; }

.seo-delete-btn {
    border: none;
    background: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1;
    transition: color .15s, background .15s;
}
.seo-delete-btn:hover { color: #ef4444; background: #fee2e2; }

#admin-visits-root .table-col-controls,
#admin-conversions-root .table-col-controls {
    justify-content: flex-end;
    gap: 8px;
}
#admin-visits-root table.data tbody tr {
    cursor: pointer;
}
#admin-visits-root table.data tbody tr button,
#admin-visits-root table.data tbody tr a {
    cursor: pointer;
}
.ve-time-cell {
    display: block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
}

[data-refreshing="1"].conv-kpi-bar,
[data-refreshing="1"].visits-chart-card {
    opacity: 0.55;
    pointer-events: none;
    transition: opacity .2s;
}
[data-refreshing="0"].conv-kpi-bar,
[data-refreshing="0"].visits-chart-card {
    opacity: 1;
    transition: opacity .2s;
}

.icon-button--active {
    background: var(--btn-icon-bg-hover);
    border-color: var(--color-primary, #169873);
    color: var(--color-primary, #169873);
}

.visits-charts-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
    align-items: stretch;
}
.visits-chart-card {
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: #fff;
    border: 1px solid rgba(15,23,42,.08);
    border-radius: 12px;
    padding: 16px 20px;
}
.visits-chart-card__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 8px;
    flex-shrink: 0;
}
.visits-chart-card__title { font-size: 13px; font-weight: 600; color: #0f172a; }
.visits-chart-wrap {
    position: relative;
    flex: 1 1 auto;
    min-height: 280px;
    height: auto;
}
#visits-channel-table,
#conv-channel-table,
.explorer-channel-table {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    max-width: 100%;
    height: 280px;
    max-height: 280px;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0;
}
#visits-channel-table table.data,
#conv-channel-table table.data,
.explorer-channel-table table.data {
    width: 100%;
    min-width: 12rem;
}
#visits-channel-table thead th,
#conv-channel-table thead th,
.explorer-channel-table thead th {
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 2;
    border-bottom: 2px solid rgba(15, 23, 42, .1);
    box-shadow: 0 1px 0 rgba(15, 23, 42, .06);
}
#visits-channel-table tbody tr:nth-child(even),
#conv-channel-table tbody tr:nth-child(even),
.explorer-channel-table tbody tr:nth-child(even) {
    background: rgba(15, 23, 42, .015);
}
.visits-chart-metric-switcher { display: flex; gap: 4px; }
.vcms-btn {
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid rgba(15,23,42,.12);
    border-radius: 6px;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    transition: all .15s;
}
.vcms-btn:hover { background: rgba(15,23,42,.04); color: #0f172a; }
.vcms-btn--active { background: var(--accent); border-color: var(--accent); color: #fff; }
.button-secondary--active {
    background: rgba(22, 152, 115, 0.16) !important;
    border-color: rgba(22, 152, 115, 0.48) !important;
    color: var(--ui-brand) !important;
    box-shadow: inset 0 0 0 1px rgba(22, 152, 115, 0.34) !important;
    font-weight: 800 !important;
}

.visits-funnel { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 0; }
.visits-funnel__step { transition: width .4s; }
.visits-funnel__bar {
    background: linear-gradient(90deg, rgba(22,152,115,.15), rgba(22,152,115,.05));
    border-left: 3px solid var(--accent);
    border-radius: 0 6px 6px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    font-size: 13px;
}
.visits-funnel__icon { font-size: 16px; color: var(--accent); }
.visits-funnel__label { flex: 1; font-weight: 500; color: #0f172a; }
.visits-funnel__value { font-weight: 700; color: #0f172a; }
.visits-funnel__rate { font-size: 11px; color: #94a3b8; text-align: center; margin-top: 2px; }

#admin-visits-root .table-scroll,
#admin-conversions-root .table-scroll {
    overflow-x: auto;
    max-height: 600px;
    overflow-y: auto;
}
#admin-visits-root .table-scroll thead th,
#admin-conversions-root .table-scroll thead th {
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 2;
    border-bottom: 2px solid rgba(15,23,42,.1);
}
#admin-visits-root .data tbody tr:nth-child(even),
#admin-conversions-root .data tbody tr:nth-child(even) { background: rgba(15,23,42,.015); }
#admin-visits-root .data tbody tr:hover { background: rgba(22,152,115,.04); cursor: pointer; }
#admin-conversions-root .data tbody tr.conv-row-clickable:hover { background: rgba(22,152,115,.04); }
#admin-visits-root .table-scroll table.data.data--dense th,
#admin-visits-root .table-scroll table.data.data--dense td,
#admin-conversions-root .table-scroll table.data.data--dense th,
#admin-conversions-root .table-scroll table.data.data--dense td {
    padding: 8px 12px;
    font-size: 13px;
    line-height: 1.4;
}

/* ── Visits: панель фильтров ─────────────────────────────── */
.ve-filters-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}
.ve-filters-title {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    flex: 1;
    min-width: 0;
}
.ve-filters-head__actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}
.ve-filters-reset-top {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    line-height: 1;
    padding: 0 12px;
    height: 32px;
    min-height: 32px;
    color: #94a3b8;
    border-color: transparent;
    background: transparent;
}
.ve-filters-reset-top:hover { color: #dc2626; background: rgba(220,38,38,.06); }

.ve-filters-row {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.ve-filters-row:last-child { margin-bottom: 0; }
.ve-filters-row--classify { align-items: flex-end; }
.visits-explorer-panel .visits-filters-block .ve-filters-row--classify {
    margin-bottom: 8px;
}

.ve-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 140px;
    flex: 1;
}
.ve-field--search { flex: 2; min-width: 200px; }
.ve-field--channels { position: relative; flex: 1.4; min-width: 200px; max-width: 100%; }

.ve-channel-picker { position: relative; width: 100%; }
.ve-channel-picker__btn {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    height: 36px;
    min-height: 36px;
    max-height: 36px;
    padding: 0 30px 0 10px;
    text-align: left;
    cursor: pointer;
    width: 100%;
    position: relative;
    overflow: hidden;
}
.ve-channel-picker__trigger {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.ve-channel-picker__trigger .channel-chip {
    font-size: 12px;
    padding: 2px 8px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ve-channel-picker__summary {
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ve-channel-picker__chevron {
    position: absolute;
    right: 10px;
    top: 50%;
    width: 10px;
    height: 10px;
    margin-top: -5px;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%2394a3b8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
}
.ve-channel-picker__menu {
    position: absolute;
    z-index: 40;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    min-width: 260px;
    overflow: visible;
    background: #fff;
    border: 1px solid rgba(15,23,42,.12);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(15,23,42,.12);
    padding: 4px;
}
.ve-channel-picker__menu:not([hidden]) {
    overflow: visible;
}
.ve-channel-picker__list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    max-height: min(268px, calc(60vh - 12px));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}
.ve-channel-picker__item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 8px;
    margin: 0;
    border-radius: 8px;
    cursor: pointer;
    transition: background .12s;
}
.ve-channel-picker__item:hover { background: rgba(22,152,115,.06); }
.ve-channel-picker__item input[type="checkbox"] {
    margin: 0;
    flex-shrink: 0;
    accent-color: var(--accent);
}
.ve-channel-picker__chip {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
}
.ve-channel-picker__chip .channel-chip { font-size: 12px; }
.ve-channel-picker__visits { font-size: 11px; font-weight: 400; }
.ve-channel-picker__empty { padding: 12px 10px; font-size: 13px; }
.ve-channel-picker__overflow {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    background: #f1f5f9;
    border: 1px solid rgba(15,23,42,.1);
    border-radius: 12px;
    white-space: nowrap;
    flex-shrink: 0;
}
.ve-field__label {
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: .04em;
    white-space: nowrap;
    margin: 0 0 2px;
}
.ve-field__input,
.ve-field__select {
    height: 36px;
    padding: 0 10px;
    border: 1px solid rgba(15,23,42,.12);
    border-radius: 8px;
    font-size: 13px;
    color: #0f172a;
    background: #fff;
    width: 100%;
    box-sizing: border-box;
    transition: border-color .15s;
}
.ve-field__input:focus,
.ve-field__select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(22,152,115,.12);
}
.ve-field__select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%2394a3b8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

.ve-toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 6px 12px;
    border: 1px solid rgba(15,23,42,.1);
    border-radius: 8px;
    background: #f8fafc;
    white-space: nowrap;
    margin-left: 4px;
    flex-shrink: 0;
}
.ve-toggle-label input[type="checkbox"] { margin: 0; accent-color: var(--accent); }
.ve-toggle-text { font-size: 13px; font-weight: 500; color: #334155; }
.ve-toggle-hint { font-size: 11px; color: #94a3b8; }
.ve-toggle-label--compact {
    padding: 0;
    gap: 6px;
    margin: 0;
    border: none;
    background: transparent;
    border-radius: 0;
    height: 32px;
    min-height: 32px;
}
.ve-toggle-label--compact .ve-toggle-text {
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
}
.ve-toggle-label--compact:hover .ve-toggle-text { color: #334155; }

.ve-filters-row--chips { align-items: center; gap: 8px; }
.ve-chips-label {
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: .04em;
    white-space: nowrap;
}
.ve-chips { display: flex; flex-wrap: wrap; gap: 6px; }

.ve-chip { display: inline-block; cursor: pointer; }
.ve-chip input[type="checkbox"],
.ve-chip input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}
.ve-chip span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border: 1px solid rgba(15,23,42,.12);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: #475569;
    background: #f8fafc;
    transition: all .15s;
    white-space: nowrap;
    user-select: none;
}
.ve-chip:hover span { border-color: var(--accent); color: var(--accent); background: rgba(22,152,115,.06); }
.ve-chip input:checked + span {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* ── Ad Field Picker ─────────────────────────────────────────── */
.ad-picker {
    position: relative;
    width: 100%;
}
.ad-picker__btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    width: 100%;
    text-align: left;
    cursor: pointer;
}
.ad-picker__chevron {
    flex-shrink: 0;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    opacity: .5;
    margin-left: auto;
}
.ad-picker__btn[aria-expanded="true"] .ad-picker__chevron {
    border-top: none;
    border-bottom: 5px solid currentColor;
}
.ad-picker__value {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
}
.ad-picker__menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: auto;
    z-index: 500;
    min-width: 260px;
    max-width: min(420px, calc(100vw - 24px));
    background: var(--surface-elevated, #fff);
    border: 1px solid var(--border-subtle, #e2e8f0);
    border-radius: 10px;
    box-shadow: 0 8px 28px rgba(15, 23, 42, .14);
    overflow: hidden;
}
.ad-picker__search-wrap {
    padding: 8px 10px 6px;
    border-bottom: 1px solid var(--border-subtle, #f1f5f9);
}
.ad-picker__search {
    width: 100%;
    padding: 5px 8px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    outline: none;
}
.ad-picker__search:focus {
    border-color: var(--accent, #169873);
}
.ad-picker__list {
    max-height: 260px;
    overflow-y: auto;
    padding: 4px 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(22, 152, 115, .44) rgba(22, 152, 115, .08);
}
.ad-picker__list::-webkit-scrollbar {
    width: 8px;
}
.ad-picker__list::-webkit-scrollbar-thumb {
    background: rgba(22, 152, 115, .42);
    border-radius: 999px;
}
.ad-picker__list::-webkit-scrollbar-track {
    background: rgba(22, 152, 115, .06);
    border-radius: 999px;
}
.ad-picker__item {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 12px;
    line-height: 1.4;
}
.ad-picker__item:hover {
    background: var(--surface-hover, #f8fafc);
}
.ad-picker__item--active {
    background: rgba(22, 152, 115, .08);
    font-weight: 600;
}
.ad-picker__item-val {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ad-picker__item-cnt {
    color: var(--text-muted, #64748b);
    flex-shrink: 0;
}
.ad-picker__loading,
.ad-picker__empty {
    padding: 10px 12px;
    font-size: 12px;
}
.ad-picker__clear {
    display: block;
    width: calc(100% - 16px);
    margin: 6px 8px 8px;
    font-size: 12px;
    padding: 4px;
}
.ve-filters-section--ad {
    border: 1px solid var(--border-subtle, #e6e9ef);
    border-radius: 8px;
    margin-top: 8px;
    overflow: visible;
}
.ve-filters-section--ad .ve-filters-section__summary {
    border-radius: 8px 8px 0 0;
}
.ve-filters-section--ad:not([open]) .ve-filters-section__summary {
    border-radius: 8px;
}
.ve-filters-section__summary {
    cursor: pointer;
    padding: 8px 12px;
    font-weight: 600;
    font-size: 13px;
    background: var(--surface-secondary, #f8fafc);
    list-style: none;
    display: flex;
    align-items: center;
    gap: 6px;
}
.ve-filters-section__summary::-webkit-details-marker {
    display: none;
}
.ve-ad-active-count {
    color: var(--accent, #169873);
    font-size: 11px;
    font-weight: 700;
}
.seo-kw-kind {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    white-space: nowrap;
}
.seo-kw-kind--organic {
    background: #ecfdf5;
    color: #047857;
}
.seo-kw-kind--paid {
    background: #eff6ff;
    color: #1d4ed8;
}
.seo-label-btns {
    display: flex;
    gap: 4px;
    align-items: center;
}
.seo-label-btn {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.15s;
}
.seo-label-btn:hover {
    opacity: 0.8;
}
.seo-label-btn.is-active {
    opacity: 1;
    background: #eff6ff;
    border-color: #93c5fd;
}
.seo-label-btn--clear {
    font-size: 10px;
    color: #94a3b8;
}
.seo-label-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.seo-label-tab {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    cursor: pointer;
}
.seo-label-tab.active {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}
.seo-label-tab__count {
    font-size: 11px;
    opacity: 0.75;
}
.ve-filters-row--ad {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    padding: 12px;
}

.ve-filters-row--actions { align-items: center; gap: 12px; margin-top: 4px; }
.ve-apply-btn--dirty {
    box-shadow: 0 0 0 2px rgba(22,152,115,.35);
    animation: ve-apply-pulse 1.5s ease-in-out infinite;
}
@keyframes ve-apply-pulse {
    0%, 100% { box-shadow: 0 0 0 2px rgba(22,152,115,.35); }
    50%       { box-shadow: 0 0 0 4px rgba(22,152,115,.15); }
}
.ve-saved-views-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}
.ve-saved-views-label { font-size: 12px; color: #94a3b8; white-space: nowrap; }
.ve-save-view-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    min-height: 32px;
    padding: 0 14px;
    font-size: 12px;
    line-height: 1;
    box-sizing: border-box;
}
#visits-saved-views-list {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.visits-view-pill {
    display: inline-flex;
    align-items: stretch;
    height: 32px;
    border: 1px solid rgba(15,23,42,.12);
    border-radius: 8px;
    background: #f1f5f9;
    overflow: hidden;
    box-sizing: border-box;
}
.visits-view-pill:hover {
    border-color: rgba(22,152,115,.35);
    background: rgba(22,152,115,.06);
}
.visits-view-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    min-height: 32px;
    padding: 0 10px;
    font-size: 12px;
    line-height: 1;
    border: none;
    border-radius: 0;
    background: transparent;
    color: #475569;
    cursor: pointer;
    transition: color .15s, background .15s;
    box-sizing: border-box;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.visits-view-pill:hover .visits-view-btn { color: var(--accent); }
.visits-view-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 32px;
    min-height: 32px;
    padding: 0;
    border: none;
    border-left: 1px solid rgba(15,23,42,.1);
    border-radius: 0;
    background: transparent;
    color: #94a3b8;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    transition: color .15s, background .15s;
    box-sizing: border-box;
}
.visits-view-delete:hover {
    background: rgba(220,38,38,.08);
    color: #dc2626;
}

@media (max-width: 768px) {
    .ve-field { min-width: 100%; }
    .ve-filters-row--main { flex-direction: column; }
    .ve-toggle-label { margin-left: 0; }
    .ve-saved-views-inline { margin-left: 0; flex-wrap: wrap; }
}

.skeleton-bar {
    height: 14px;
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.4s infinite;
    border-radius: 4px;
}
@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.visits-why-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    font-size: 10px;
    font-weight: 700;
    color: #64748b;
    cursor: pointer;
    margin-left: 4px;
    vertical-align: middle;
}
.visits-why-popup {
    position: absolute;
    z-index: 9999;
    background: rgba(13,20,18,.94);
    color: #f7fbfa;
    font-size: 12px;
    line-height: 1.5;
    padding: 8px 12px;
    border-radius: 8px;
    max-width: 260px;
    box-shadow: 0 4px 16px rgba(0,0,0,.2);
}

@media (min-width: 769px) {
    .conv-kpi-bar:not(.conv-kpi-bar--n3) {
        display: grid !important;
        grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    .conv-kpi-bar--n3 {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    .dashboard-saas .container > .conv-kpi-bar .conv-kpi-bar__card {
        width: 100% !important;
        min-width: 0 !important;
    }
    .dashboard-saas .container > .conv-kpi-bar .conv-kpi-bar__value {
        font-size: 28px !important;
    }
}
@media (max-width: 1024px) {
    .visits-compare-controls { gap: 6px; }
    .visits-compare-controls select { width: 100%; }
    .vcms-btn { padding: 4px 8px; font-size: 11px; }
}
@media (max-width: 640px) {
    .visits-funnel__bar { flex-wrap: wrap; gap: 6px; padding: 6px 10px; }
}

/* Мобилка: дашборд / визиты / конверсии / лиды */
@media (max-width: 768px) {
    .dashboard-page-head.ph .ph-right {
        width: 100%;
        max-width: 100%;
        overflow: visible;
    }
    .dashboard-page-head.ph .dashboard-period-toolbar {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0.4rem;
        width: 100%;
        max-width: 100%;
        overflow: visible;
    }
    .dashboard-page-head.ph .dashboard-period-toolbar__row {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        gap: 0.35rem;
        overflow: hidden;
        margin-bottom: 0;
        padding-bottom: 0.2rem;
        border-bottom: 1px solid rgba(203, 213, 225, 0.45);
        min-width: 0;
        width: 100%;
        max-width: 100%;
    }
    .dashboard-page-head.ph .dashboard-period-toolbar__label {
        flex: 0 0 auto;
        flex-shrink: 0;
    }
    .dashboard-page-head.ph .dashboard-period-toolbar__pills {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        flex: 1 1 0;
        min-width: 0;
        max-width: 100%;
        padding-bottom: 4px;
        margin: 0;
    }
    .form-leads-page .dashboard-page-head.ph .dashboard-period-toolbar__pills,
    .dashboard-saas .dashboard-page-head.ph .dashboard-period-toolbar__pills {
        -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent);
        mask-image: linear-gradient(90deg, #000 92%, transparent);
    }
    .dashboard-page-head.ph .dashboard-period-toolbar__pill,
    .dashboard-page-head.ph .dashboard-period-toolbar__row .button {
        width: auto !important;
        flex: 0 0 auto;
        flex-shrink: 0;
        white-space: nowrap;
    }
    .dashboard-page-head.ph .dashboard-period-toolbar__custom,
    .dashboard-page-head.ph .dashboard-period-toolbar__custom-wrap {
        display: flex;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        gap: 0.35rem;
        flex: 0 0 auto;
        width: 100%;
        max-width: 100%;
        overflow: visible;
        padding-top: 0.15rem;
        border-top: none;
    }
    .dashboard-page-head.ph .dashboard-period-toolbar__custom-label {
        flex: 0 0 auto;
        white-space: nowrap;
    }
    .dashboard-page-head.ph .dashboard-period-toolbar__date,
    .dashboard-page-head.ph .dashboard-period-toolbar__custom .btn {
        width: auto !important;
        flex: 0 1 auto;
        min-width: 118px;
        max-width: 100%;
    }
    .dashboard-page-head.ph .dashboard-period-toolbar__err {
        flex: 1 1 100%;
    }

    .conv-kpi-bar {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        grid-template-columns: none !important;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        gap: 6px;
        margin-bottom: 12px;
        padding-bottom: 2px;
        scrollbar-width: thin;
    }
    .conv-kpi-bar .conv-kpi-bar__card {
        display: block;
        flex: 0 0 auto;
        width: auto;
        max-width: none;
        min-width: 96px;
        padding: 8px 10px !important;
        min-height: 52px !important;
    }
    .conv-kpi-bar .conv-kpi-bar__label {
        font-size: 9px;
        letter-spacing: 0.02em;
        margin-bottom: 2px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .conv-kpi-bar .conv-kpi-bar__value {
        font-size: 16px;
    }
    .conv-kpi-bar .conv-kpi-bar__delta {
        font-size: 10px;
        margin-top: 2px;
    }

    .visits-charts-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
        margin-bottom: 14px;
        overflow: visible;
        padding-bottom: 0;
    }
    .visits-charts-row .visits-chart-card {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        padding: 12px 14px;
        box-sizing: border-box;
    }
    .visits-charts-row .visits-chart-wrap {
        min-height: 200px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
    }
    .visits-charts-row .visits-chart-wrap canvas {
        max-width: none;
    }
    .visits-charts-row #visits-channel-table,
    .visits-charts-row #conv-channel-table,
    .visits-charts-row .explorer-channel-table {
        height: 220px;
        max-height: 220px;
        overflow-x: auto;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
    }
    .visits-charts-row #visits-channel-table table.data,
    .visits-charts-row #conv-channel-table table.data,
    .visits-charts-row .explorer-channel-table table.data {
        min-width: 16rem;
    }
    .visits-chart-card__head {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 2px;
    }
    .visits-chart-metric-switcher {
        flex-wrap: nowrap;
        flex-shrink: 0;
    }
    .visits-chart-metric-switcher .button-secondary,
    .visits-chart-metric-switcher .vcms-btn {
        flex-shrink: 0;
        white-space: nowrap;
    }

    details.visits-filters-collapsible > summary.ve-filters-head--collapsible {
        display: flex;
        align-items: center;
        gap: 12px;
        cursor: pointer;
        list-style: none;
        margin-bottom: 0;
    }
    details.visits-filters-collapsible > summary.ve-filters-head--collapsible::-webkit-details-marker {
        display: none;
    }
    details.visits-filters-collapsible:not([open]) {
        padding-bottom: 10px;
    }
    details.visits-filters-collapsible:not([open]) .visits-filters-collapsible__body {
        display: none;
    }
    .ve-filters-collapsible__chevron {
        flex-shrink: 0;
        width: 8px;
        height: 8px;
        margin-left: auto;
        border-right: 2px solid #64748b;
        border-bottom: 2px solid #64748b;
        transform: rotate(45deg);
        transition: transform 0.15s ease;
    }
    details.visits-filters-collapsible[open] .ve-filters-collapsible__chevron {
        transform: rotate(-135deg);
        margin-top: 4px;
    }
    details.visits-filters-collapsible[open] .visits-filters-collapsible__body {
        padding-top: 10px;
    }
    .ve-filters-head--inner {
        margin-bottom: 10px;
    }

    details.form-leads-filters-collapsible > .form-leads-filters-collapsible__summary {
        cursor: pointer;
        list-style: none;
        padding: 0;
        margin: 0 0 0;
    }
    details.form-leads-filters-collapsible > .form-leads-filters-collapsible__summary::-webkit-details-marker {
        display: none;
    }
    details.form-leads-filters-collapsible:not([open]) .form-leads-filters-collapsible__body {
        display: none;
    }
    details.form-leads-filters-collapsible[open] .form-leads-filters-collapsible__body {
        padding-top: 12px;
    }
}

@media (min-width: 769px) {
    details.visits-filters-collapsible > summary.ve-filters-head--collapsible {
        pointer-events: none;
        cursor: default;
        list-style: none;
    }
    details.visits-filters-collapsible > summary.ve-filters-head--collapsible::-webkit-details-marker {
        display: none;
    }
    .ve-filters-collapsible__chevron {
        display: none;
    }
    details.visits-filters-collapsible .visits-filters-collapsible__body {
        display: block;
    }

    details.form-leads-filters-collapsible > .form-leads-filters-collapsible__summary {
        pointer-events: none;
        cursor: default;
        list-style: none;
    }
    details.form-leads-filters-collapsible > .form-leads-filters-collapsible__summary::-webkit-details-marker {
        display: none;
    }
}

/* Hub: /admin/tools */
.admin-tools-hub {
    max-width: 960px;
}
.admin-tools-section {
    margin-top: 1.75rem;
}
.admin-tools-section__title {
    margin: 0 0 12px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
}
.admin-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}
.admin-tools-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px 18px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: #fff;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.admin-tools-card:hover {
    border-color: rgba(22, 152, 115, 0.45);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}
.admin-tools-card__icon {
    font-size: 1.1rem;
    line-height: 1;
    color: var(--accent);
}
.admin-tools-card__label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #0f172a;
}
.admin-tools-card__desc {
    font-size: 0.8rem;
    line-height: 1.45;
    color: #64748b;
}


.badge--keyword {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    background: rgba(234, 179, 8, 0.1);
    color: #92400e;
    border: 1px solid rgba(234, 179, 8, 0.25);
    max-width: 200px;
    min-width: 0;
    overflow: hidden;
    vertical-align: middle;
    position: relative;
    cursor: help;
}

.badge--keyword-paid {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    background: rgba(59, 130, 246, 0.1);
    color: #1e40af;
    border: 1px solid rgba(59, 130, 246, 0.25);
    max-width: 200px;
    min-width: 0;
    overflow: hidden;
    vertical-align: middle;
    position: relative;
    cursor: help;
}

.badge--keyword__text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1 1 auto;
}

.badge--keyword__prefix {
    flex-shrink: 0;
}

.badge--keyword .service-icon,
.badge--keyword-paid .service-icon {
    flex-shrink: 0;
}

/* CSS-tooltip: срабатывает и когда текст обрезан overflow без ellipsis */
.badge--keyword[data-keyword-full]:hover::after,
.badge--keyword-paid[data-keyword-full]:hover::after {
    content: attr(data-keyword-full);
    position: absolute;
    left: 0;
    top: calc(100% + 6px);
    z-index: 10100;
    max-width: min(360px, 92vw);
    padding: 6px 10px;
    border-radius: 8px;
    background: #0f172a;
    color: #f8fafc;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.35;
    white-space: normal;
    word-break: break-word;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.28);
    pointer-events: none;
}

/* Site/subdomain badge (visits + leads) */
.visits-row--hash-focus {
    background: #fffbeb;
    outline: 1px solid #fcd34d;
    outline-offset: -1px;
}

.ve-site-badge,
.fl-site-badge {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    background: #f0f9ff;
    color: #0369a1;
    border: 1px solid #bae6fd;
    white-space: nowrap;
    vertical-align: middle;
}

.inbox-mail-attach-icon {
    margin-right: 4px;
    font-size: 13px;
    line-height: 1;
    vertical-align: middle;
    opacity: 0.85;
}

.inbox-source-page-link {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
}

/* --- Conversion type badges --- */
.conv-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}
.conv-badge--form      { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.conv-badge--phone     { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.conv-badge--messenger { background: #fdf4ff; color: #7e22ce; border: 1px solid #e9d5ff; }
.conv-badge--custom    { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.conv-badge--email     { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }

#admin-conversions-root tr.conv-row-clickable {
    cursor: pointer;
}
#admin-conversions-root tr.conv-row-clickable:hover td {
    background: rgba(22, 152, 115, 0.06);
}

/* CRM integration badges */
.crm-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
}
.crm-status-badge--active   { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.crm-status-badge--inactive { background: #f9fafb; color: #6b7280; border: 1px solid #e5e7eb; }

.crm-stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    color: #374151;
}
.crm-stat-pill--synced      { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.crm-stat-pill--pending     { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.crm-stat-pill--in_progress { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.crm-stat-pill--won         { background: #f0fdf4; color: #166534; border-color: #86efac; }
.crm-stat-pill--lost        { background: #fef2f2; color: #dc2626; border-color: #fecaca; }
.crm-stat-pill--error       { background: #fef2f2; color: #dc2626; border-color: #fecaca; }

.crm-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    background: #f9fafb;
    color: #374151;
    border: 1px solid #e5e7eb;
}
.crm-badge--synced      { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.crm-badge--pending     { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.crm-badge--in_progress { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.crm-badge--won         { background: #dcfce7; color: #166534; border-color: #86efac; }
.crm-badge--lost        { background: #fef2f2; color: #dc2626; border-color: #fecaca; }
.crm-badge--error       { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }

/* ===== Logo link ===== */
a.sb-logo {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.15s;
    /* make room for the collapse button at the right edge */
    padding-right: 36px !important;
}
a.sb-logo:hover {
    opacity: 0.84;
}

/* ===== Collapsible sidebar — desktop only ===== */
.sb-toggle { display: none; }

@media (min-width: 1025px) {
    /* Smooth grid transition */
    .app-shell { transition: grid-template-columns 0.24s ease; }
    .sb-wrap   { transition: width 0.24s ease, padding 0.24s ease; min-width: 0; }

    /* ── Toggle button ──
       Small 24×24 icon pill, absolute in the logo area top-right.
       Follows the sidebar edge as it collapses (right:14px stays constant). */
    .sb-toggle {
        position: absolute;
        top: 22px;
        right: 14px;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 24px;
        height: 24px;
        padding: 0;
        border-radius: 8px;
        border: 1px solid rgba(22, 152, 115, 0.28);
        background: rgba(22, 152, 115, 0.10);
        color: #6ee0bd;
        cursor: pointer;
        z-index: 3;
        transition: background 0.15s, border-color 0.15s, color 0.15s;
    }
    .sb-toggle svg {
        width: 13px;
        height: 13px;
        flex-shrink: 0;
        transition: transform 0.24s ease;
    }
    .sb-toggle:hover {
        background: rgba(22, 152, 115, 0.20);
        border-color: rgba(22, 152, 115, 0.48);
        color: #8ee8ca;
    }
    .sb-toggle:active {
        background: rgba(22, 152, 115, 0.28);
    }

    /* ── Collapsed state ── */
    body.sb-collapsed .app-shell {
        grid-template-columns: 56px minmax(0, 1fr);
    }
    body.sb-collapsed .sb-wrap {
        padding: 20px 8px !important;
    }

    /* In collapsed mode: move button below the logo SVG */
    body.sb-collapsed .sb-toggle {
        top: 70px;
    }
    /* Chevron flips to point right */
    body.sb-collapsed .sb-toggle svg {
        transform: scaleX(-1);
    }

    /* Logo: center the SVG, hide text */
    body.sb-collapsed .sb-logo {
        justify-content: center;
        padding-right: 0 !important;
        gap: 0 !important;
    }
    body.sb-collapsed .sb-logo-name,
    body.sb-collapsed .sb-logo-badge {
        display: none !important;
    }

    /* Section labels: hide */
    body.sb-collapsed .sb-section {
        display: none !important;
    }

    /* Nav: allow tooltips to escape the container */
    body.sb-collapsed .sb-nav {
        overflow: visible !important;
    }

    /* Nav items: icon only */
    body.sb-collapsed .sb-nav .nb {
        position: relative;
        padding: 7px !important;
        justify-content: center;
        font-size: 0 !important;   /* hides text nodes; ::before/::after override explicitly */
        gap: 0 !important;
        border-radius: 11px !important;
    }
    /* Re-enable icon pseudo-element (beats the "display:none !important" flat rule by specificity) */
    body.sb-collapsed .sb-nav .nb::before,
    body.sb-collapsed .sb-nav .nb:hover::before,
    body.sb-collapsed .sb-nav .nb.on::before {
        display: inline-flex !important;
        content: attr(data-nav-icon) !important;
        /* All icons are now text/Unicode glyphs → single size for uniformity */
        font-size: 14px !important;
        line-height: 1 !important;
        width: 32px !important;
        height: 32px !important;
        flex: 0 0 32px !important;
        border-radius: 9px;
        background: rgba(255, 255, 255, 0.055);
        color: rgba(220, 233, 228, 0.78);
        align-items: center;
        justify-content: center;
        border: 0 !important;
        box-shadow: none !important;
        overflow: hidden;
    }
    body.sb-collapsed .sb-nav .nb.on::before {
        background: rgba(22, 152, 115, 0.22) !important;
        color: #8ee8ca !important;
    }
    body.sb-collapsed .sb-nav .nb:hover::before {
        background: rgba(255, 255, 255, 0.10) !important;
        color: rgba(247, 255, 252, 0.92) !important;
    }

    /* ── Tooltip (::after) ── */
    body.sb-collapsed .sb-nav .nb::after {
        content: attr(data-sb-tip);
        position: absolute;
        left: calc(100% + 10px);
        top: 50%;
        transform: translateY(-50%) translateX(4px);
        /* brand dark background */
        background: #0c1c17;
        color: #d8ede6;
        border: 1px solid rgba(22, 152, 115, 0.24);
        border-radius: 8px;
        padding: 6px 12px;
        font-size: 13px !important;
        font-weight: 600;
        letter-spacing: -0.01em;
        white-space: nowrap;
        pointer-events: none;
        z-index: 300;
        box-shadow: 0 6px 22px rgba(0, 0, 0, 0.38);
        /* hidden by default, fade in on hover */
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.14s ease, transform 0.14s ease, visibility 0.14s;
    }
    body.sb-collapsed .sb-nav .nb:hover::after {
        opacity: 1;
        visibility: visible;
        transform: translateY(-50%) translateX(0);
    }

    /* User card: center avatar, hide name/email */
    body.sb-collapsed .sb-bot .user {
        padding: 6px !important;
        justify-content: center;
        gap: 0 !important;
    }
    body.sb-collapsed .sb-bot .user > div:last-child {
        display: none !important;
    }
}

/* ── Balance widget ──────────────────────────────────────────── */
.topbar--rebuild .tb-balance {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 34px;
    min-height: 34px;
    border-radius: 999px !important;
    padding: 0 12px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s, border-color 0.15s;
}
.topbar--rebuild .tb-balance--ok {
    color: #0f7d61;
    background: rgba(22, 152, 115, 0.1);
    border: 1px solid rgba(22, 152, 115, 0.18);
}
.topbar--rebuild .tb-balance--low {
    color: #a05f00;
    background: rgba(255, 165, 0, 0.1);
    border: 1px solid rgba(255, 165, 0, 0.28);
}
.topbar--rebuild .tb-balance--empty {
    color: #b0281a;
    background: rgba(176, 40, 26, 0.09);
    border: 1px solid rgba(176, 40, 26, 0.22);
}
.tb-balance__label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    pointer-events: none;
}
.tb-balance__popup {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 200px;
    background: #fff;
    border: 1px solid #e2e8e5;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    padding: 14px 16px 10px;
    z-index: 1200;
    flex-direction: column;
    gap: 8px;
}
.tb-balance--open .tb-balance__popup {
    display: flex;
}
.tb-balance__popup-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #3a4a43;
    gap: 16px;
}
.tb-balance__popup-row span { color: #7a8c84; }
.tb-balance__popup-row strong { color: #1a2620; }
.tb-balance__popup-blocked {
    font-size: 12px;
    color: #b0281a;
    background: rgba(176,40,26,0.07);
    border-radius: 6px;
    padding: 5px 8px;
    text-align: center;
    margin-top: 2px;
}
.tb-balance__topup-btn {
    margin-top: 6px;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
}

/* ── Balance modal ─────────────────────────────────────────── */
.tb-balance-modal {
    position: fixed;
    inset: 0;
    z-index: 9100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.tb-balance-modal[hidden] { display: none; }
.tb-balance-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(10,25,20,0.45);
    backdrop-filter: blur(2px);
}
.tb-balance-modal__box {
    position: relative;
    background: #fff;
    border-radius: 20px;
    padding: 28px 28px 24px;
    width: 50vw;
    min-width: 400px;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    box-shadow: 0 24px 64px rgba(0,0,0,0.22);
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.tb-balance-modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #f4f8f6;
    border: none;
    color: #7a8c84;
    cursor: pointer;
    padding: 5px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.12s, color 0.12s;
}
.tb-balance-modal__close:hover { background: #e8f0ec; color: #2a3a32; }

/* Modal header */
.tbm-header { display: flex; align-items: center; gap: 14px; }
.tbm-header__icon { font-size: 32px; line-height: 1; }
.tbm-header__title { font-size: 20px; font-weight: 700; color: #1a2620; margin: 0 0 3px; }
.tbm-header__balance { font-size: 13px; color: #7a8c84; }
.tbm-header__balance strong { color: #0f7d61; }

/* Tabs */
.tbm-tabs {
    display: flex;
    gap: 0;
    background: #f0f5f2;
    border-radius: 10px;
    padding: 3px;
}
.tbm-tab {
    flex: 1;
    border: none;
    background: none;
    padding: 8px 0;
    font-size: 13px;
    font-weight: 600;
    color: #7a8c84;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.tbm-tab--active {
    background: #fff;
    color: #1a2620;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

/* Panel */
.tbm-panel { display: flex; flex-direction: column; gap: 14px; }
.tbm-panel[hidden] { display: none; }
.tbm-card-form[hidden] { display: none; }
.tbm-sbp-form[hidden]  { display: none; }

/* Amount */
.tbm-amount-label { font-size: 12px; font-weight: 600; color: #7a8c84; text-transform: uppercase; letter-spacing: 0.5px; }
.tbm-amount-presets { display: flex; gap: 8px; flex-wrap: wrap; }
.tbm-preset {
    flex: 1;
    min-width: 70px;
    padding: 8px 4px;
    border: 1.5px solid #d8e8e2;
    border-radius: 9px;
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    color: #3a4a43;
    cursor: pointer;
    text-align: center;
    transition: border-color 0.12s, background 0.12s, color 0.12s;
}
.tbm-preset:hover { border-color: #1aab82; color: #0f7d61; }
.tbm-preset--active { border-color: #1aab82; background: #edf8f4; color: #0a6e52; }
.tbm-amount-custom {
    position: relative;
    display: flex;
    align-items: center;
}
.tbm-amount-custom .tbm-input { padding-right: 28px; }
.tbm-input-suffix {
    position: absolute;
    right: 10px;
    font-size: 13px;
    color: #7a8c84;
    pointer-events: none;
}

/* Fields */
.tbm-field-group { display: flex; flex-direction: column; gap: 5px; }
.tbm-label { font-size: 12px; font-weight: 600; color: #5a6e65; }
.tbm-input {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #d8e8e2;
    border-radius: 9px;
    font-size: 14px;
    color: #1a2620;
    background: #fff;
    box-sizing: border-box;
    transition: border-color 0.12s, box-shadow 0.12s;
    outline: none;
}
.tbm-input:focus { border-color: #1aab82; box-shadow: 0 0 0 3px rgba(26,171,130,0.12); }
.tbm-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* Payment method selector */
.tbm-methods { display: flex; gap: 8px; }
.tbm-method {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px;
    border: 1.5px solid #d8e8e2;
    border-radius: 10px;
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    color: #5a6e65;
    cursor: pointer;
    transition: all 0.12s;
}
.tbm-method:hover { border-color: #1aab82; color: #0f7d61; }
.tbm-method--active { border-color: #1aab82; background: #edf8f4; color: #0a6e52; }

/* Card visual */
.tbm-card-form { display: flex; flex-direction: column; gap: 12px; }
.tbm-card-visual {
    position: relative;
    height: 120px;
    border-radius: 14px;
    background: linear-gradient(135deg, #1a3a2e 0%, #0f5c42 50%, #1aab82 100%);
    color: #fff;
    padding: 16px 20px;
    box-sizing: border-box;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(15,92,66,0.35);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.tbm-card-visual--visa { background: linear-gradient(135deg, #1a2050 0%, #1a4080 60%, #2060c0 100%); }
.tbm-card-visual--mc   { background: linear-gradient(135deg, #3a1000 0%, #a04000 60%, #e06010 100%); }
.tbm-card-visual__chip {
    width: 28px;
    height: 20px;
    border-radius: 4px;
    background: linear-gradient(135deg, #d4aa50, #f0cc70);
    border: 1px solid rgba(255,255,255,0.2);
}
.tbm-card-visual__number {
    font-size: 16px;
    letter-spacing: 2.5px;
    font-weight: 500;
    font-family: 'Courier New', monospace;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.tbm-card-visual__bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}
.tbm-card-visual__name { font-size: 11px; font-weight: 600; letter-spacing: 1px; opacity: 0.9; text-transform: uppercase; }
.tbm-card-visual__exp  { font-size: 12px; opacity: 0.85; font-family: monospace; }
.tbm-card-visual__logo {
    position: absolute;
    top: 14px;
    right: 16px;
    display: flex;
}
.tbm-card-logo-circle {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    opacity: 0.7;
}
.tbm-card-logo-circle--1 { background: #e84040; margin-right: -10px; }
.tbm-card-logo-circle--2 { background: #f0a010; }

/* SBP form */
.tbm-sbp-form { display: flex; flex-direction: column; gap: 14px; }
.tbm-sbp-info { display: flex; align-items: center; gap: 16px; background: #f4f8f6; border-radius: 12px; padding: 16px; }
.tbm-sbp-qr {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    background: #e8f0ec;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: #3a6a54;
}
.tbm-sbp-qr-label { font-size: 10px; font-weight: 600; color: #7a8c84; }
.tbm-sbp-title { font-size: 14px; font-weight: 700; color: #1a2620; margin-bottom: 5px; }
.tbm-sbp-desc { font-size: 12px; color: #7a8c84; line-height: 1.5; }
.tbm-sbp-btn { width: 100%; box-sizing: border-box; text-align: center; }

/* Invoice info */
.tbm-invoice-info {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    font-size: 12px;
    color: #7a8c84;
    line-height: 1.5;
    background: #f8fbf9;
    border-radius: 8px;
    padding: 10px 12px;
}
.tbm-invoice-info svg { flex-shrink: 0; margin-top: 1px; }

/* Pay button */
.tbm-pay-btn { width: 100%; box-sizing: border-box; text-align: center; font-size: 15px; }

/* Secure line */
.tbm-secure {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 11px;
    color: #9aaca4;
}

/* Admin billing table */
.admin-users-billing {
    min-width: 160px;
    vertical-align: top;
    padding-top: 8px;
}
.admin-billing-balance {
    font-weight: 700;
    font-size: 14px;
    color: #0f7d61;
    margin-bottom: 2px;
}
.admin-billing-balance--zero { color: #b0281a; }
.admin-billing-balance--low  { color: #a05f00; }
.admin-billing-days {
    font-size: 11px;
    font-weight: 400;
    color: #7a8c84;
    margin-left: 4px;
}
.admin-billing-daily {
    font-size: 12px;
    color: #7a8c84;
    margin-bottom: 6px;
}
.admin-billing-form {
    display: flex;
    gap: 4px;
    align-items: center;
    margin-bottom: 4px;
}
.admin-billing-input {
    width: 80px;
    padding: 4px 6px;
    border: 1px solid #d0dbd5;
    border-radius: 6px;
    font-size: 12px;
}
.admin-billing-btn {
    padding: 4px 8px !important;
    font-size: 12px !important;
    white-space: nowrap;
}
.admin-user-status--balance-blocked {
    display: inline-block;
    margin-left: 4px;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 11px;
    background: rgba(176,40,26,0.08);
    color: #b0281a;
    border: 1px solid rgba(176,40,26,0.18);
}