/* ============================================================
   Foxnezia Admin — mobile-first
   Брейкпоинты: base = телефон, ≥768px = планшет, ≥992px = десктоп
   ============================================================ */

:root {
    --bg: #0a0d14;
    --bg-elev: #11151d;
    --surface: #161b22;
    --surface-2: #1c2230;
    --surface-3: #232a3a;
    --border: #2a3142;
    --border-strong: #3a4256;
    --text: #e6edf3;
    --text-muted: #8b96a8;
    --text-dim: #6e7787;
    --accent: #58a6ff;
    --accent-2: #79b8ff;
    --success: #3fb950;
    --warning: #f0b429;
    --danger: #f85149;
    --info: #3ab7e0;
    --purple: #a371f7;
    --radius: 10px;
    --radius-sm: 6px;
    --radius-lg: 14px;
    --sidebar-w: 240px;
    --topbar-h: 54px;
    --bottomnav-h: 60px;
    --content-pad: 14px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

@media (min-width: 992px) {
    :root { --content-pad: 24px; }
}

/* ─── Base ─── */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { height: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, system-ui, sans-serif;
    font-size: 15px;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
    overscroll-behavior-y: contain;
}

@media (min-width: 992px) {
    body { font-size: 14px; }
}

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

code {
    color: var(--accent);
    font-size: 0.82em;
    background: rgba(88, 166, 255, 0.08);
    padding: 1px 5px;
    border-radius: 4px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-strong); }

/* ─── Login ─── */
.login-cover {
    position: fixed; inset: 0;
    background: radial-gradient(ellipse 80% 50% at 50% -10%, rgba(88, 166, 255, 0.10), transparent), var(--bg);
    z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
}

.login-card {
    width: 100%;
    max-width: 380px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 28px calc(32px + var(--safe-bottom));
}

/* ─── App shell ─── */
.app-shell {
    grid-template-columns: minmax(0, 1fr);
    min-height: 100vh;
}

@media (min-width: 992px) {
    .app-shell { grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }
}

/* ─── Topbar (mobile) ─── */
.topbar {
    position: sticky; top: 0;
    height: var(--topbar-h);
    display: flex; align-items: center;
    padding: 0 var(--content-pad);
    background: rgba(17, 21, 29, 0.88);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 1020;
}

.topbar-brand {
    font-weight: 650; font-size: 1.05rem;
    display: flex; align-items: center; gap: 10px;
    letter-spacing: -0.01em;
}
.topbar-brand i { color: var(--accent); font-size: 1.2rem; }

@media (min-width: 992px) {
    .topbar { display: none; }
}

/* ─── Sidebar (desktop) ─── */
.sidebar {
    display: none;
    background: var(--surface);
    border-right: 1px solid var(--border);
    padding: 20px 14px;
    flex-direction: column;
    position: sticky; top: 0;
    height: 100vh;
    overflow-y: auto;
}

@media (min-width: 992px) {
    .sidebar { display: flex; }
}

.sidebar-brand {
    font-size: 1.15rem; font-weight: 700;
    color: var(--text);
    padding: 6px 10px 18px;
    display: flex; align-items: center; gap: 10px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 14px;
}
.sidebar-brand .brand-icon { color: var(--accent); font-size: 1.3rem; }

.sidebar-nav { list-style: none; padding: 0; margin: 0; flex: 1; }
.sidebar-nav li { margin-bottom: 2px; }
.sidebar-nav a {
    display: flex; align-items: center; gap: 10px;
    color: var(--text-muted);
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    transition: color 0.15s ease, background 0.15s ease;
    cursor: pointer;
}
.sidebar-nav a:hover { color: var(--text); background: var(--surface-2); }
.sidebar-nav a.active {
    color: var(--text);
    background: var(--surface-3);
    font-weight: 500;
}
.sidebar-nav a i { font-size: 1.05rem; width: 18px; text-align: center; }

.sidebar-footer { padding-top: 14px; border-top: 1px solid var(--border); }

/* ─── Bottom nav (mobile) ─── */
.bottom-nav {
    position: fixed; left: 0; right: 0; bottom: 0;
    z-index: 1030;
    display: flex;
    background: rgba(17, 21, 29, 0.92);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-top: 1px solid var(--border);
    padding: 6px 6px calc(6px + var(--safe-bottom));
}

.bn-item {
    flex: 1;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    min-height: 50px;
    background: none; border: none;
    color: var(--text-dim);
    font-size: 0.66rem; font-weight: 500;
    border-radius: 10px;
    padding: 4px 0;
    cursor: pointer;
    transition: color 0.15s ease;
    user-select: none;
}
.bn-item i { font-size: 1.3rem; line-height: 1; }
.bn-item.active { color: var(--accent); }
.bn-item:active { background: var(--surface-2); }

@media (min-width: 992px) {
    .bottom-nav { display: none; }
}

/* ─── «Ещё» bottom sheet (mobile) ─── */
.sheet-backdrop {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1040;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}
.sheet-backdrop.show { opacity: 1; pointer-events: auto; }

.more-sheet {
    position: fixed; left: 0; right: 0; bottom: 0;
    z-index: 1050;
    background: var(--surface);
    border: 1px solid var(--border); border-bottom: none;
    border-radius: 18px 18px 0 0;
    padding: 8px 16px calc(16px + var(--safe-bottom));
    transform: translateY(105%);
    transition: transform 0.25s ease;
}
.more-sheet.open { transform: none; }

.sheet-handle {
    width: 36px; height: 4px;
    background: var(--border-strong);
    border-radius: 2px;
    margin: 4px auto 10px;
}

.more-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.more-item {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
    padding: 16px 6px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-muted);
    font-size: 0.76rem; font-weight: 500;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease;
    user-select: none;
}
.more-item i { font-size: 1.4rem; line-height: 1; }
.more-item.active { color: var(--accent); border-color: var(--accent); }
.more-item-danger { color: var(--danger); }

@media (min-width: 992px) {
    .sheet-backdrop, .more-sheet { display: none; }
}

/* ─── Content ─── */
.content {
    padding: var(--content-pad);
    padding-bottom: calc(var(--bottomnav-h) + var(--safe-bottom) + 24px);
    min-width: 0;
    min-height: 100vh;
    width: 100%;
    max-width: 1480px;
    margin: 0 auto;
}

@media (min-width: 992px) {
    .content { padding-bottom: var(--content-pad); }
}

/* ─── Page header ─── */
.page-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.page-title {
    font-size: 1.3rem; font-weight: 650;
    margin: 0 0 2px;
    letter-spacing: -0.01em;
}
.page-subtitle { color: var(--text-muted); font-size: 0.82rem; }

.page-actions {
    display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
    width: 100%;
}
.page-actions .form-control,
.page-actions .form-select {
    flex: 1 1 150px;
    min-width: 0;
    max-width: none !important;
}

@media (min-width: 768px) {
    .page-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
        gap: 16px;
        flex-wrap: wrap;
        margin-bottom: 22px;
    }
    .page-title { font-size: 1.5rem; }
    .page-subtitle { font-size: 0.85rem; }
    .page-actions { width: auto; }
    .page-actions .form-control,
    .page-actions .form-select { flex: 0 1 auto; }
}

/* ─── Stat tiles ─── */
.stat-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 16px;
}

@media (min-width: 768px) {
    .stat-grid {
        gap: 14px;
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        margin-bottom: 20px;
    }
}

.stat-tile {
    background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 14px;
    min-width: 0;
    transition: border-color 0.15s ease;
}

.stat-tile-label {
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
}
.stat-tile-value {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.01em;
    overflow-wrap: anywhere;
}
.stat-tile-caption {
    color: var(--text-dim);
    font-size: 0.73rem;
    margin-top: 6px;
}
.stat-tile-icon {
    width: 32px; height: 32px;
    border-radius: var(--radius-sm);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1rem;
    float: right;
}

@media (min-width: 768px) {
    .stat-tile { padding: 16px 18px; }
    .stat-tile:hover { border-color: var(--accent); }
    .stat-tile-label { font-size: 0.72rem; }
    .stat-tile-value { font-size: 1.7rem; }
    .stat-tile-caption { font-size: 0.75rem; }
    .stat-tile-icon { width: 38px; height: 38px; font-size: 1.15rem; }
}

.stat-tile.success .stat-tile-value { color: var(--success); }
.stat-tile.danger .stat-tile-value { color: var(--danger); }
.stat-tile.warning .stat-tile-value { color: var(--warning); }
.stat-tile.info .stat-tile-value { color: var(--info); }
.stat-tile.accent .stat-tile-value { color: var(--accent); }

/* ─── Sections ─── */
.section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 16px;
}

.section-header {
    padding: 12px 14px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.section-title {
    font-size: 0.95rem; font-weight: 600; margin: 0;
    display: flex; align-items: center; gap: 8px;
}
.section-hint { font-size: 0.76rem; color: var(--text-muted); margin-top: 2px; }
.section-body { padding: 12px 14px; }
.section-body.flush { padding: 0; }

@media (min-width: 768px) {
    .section { margin-bottom: 20px; }
    .section-header { padding: 14px 18px; }
    .section-title { font-size: 1rem; }
    .section-body { padding: 16px 18px; }
}

/* ─── Tables ─── */
.table {
    color: var(--text);
    --bs-table-bg: transparent;
    --bs-table-hover-color: var(--text);
    --bs-table-hover-bg: var(--surface-2);
    font-size: 0.85rem;
    margin-bottom: 0;
}

.table thead th {
    background: var(--surface-2);
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--border);
    padding: 10px 12px;
    white-space: nowrap;
}

.table tbody td {
    padding: 11px 12px;
    border-color: var(--border);
    vertical-align: middle;
}

@media (min-width: 768px) {
    .table thead th { padding: 10px 14px; font-size: 0.72rem; }
    .table tbody td { padding: 12px 14px; }
}

.table-hover tbody tr {
    cursor: pointer;
    transition: background 0.1s ease;
}

/* ─── Forms ─── */
.form-control, .form-select {
    background-color: var(--bg-elev) !important;
    border: 1px solid var(--border) !important;
    color: var(--text) !important;
    border-radius: var(--radius-sm) !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-control:focus, .form-select:focus {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.15) !important;
}
.form-control::placeholder { color: var(--text-dim); }
.form-label.small, label.small { color: var(--text-muted); font-size: 0.78rem; }
.form-check-input:checked { background-color: var(--accent); border-color: var(--accent); }

/* На мобиле инпуты ≥16px — иначе iOS зумит страницу при фокусе */
@media (max-width: 991.98px) {
    .form-control, .form-select,
    .form-control-sm, .form-select-sm {
        font-size: 16px !important;
        min-height: 42px;
    }
    textarea.form-control { min-height: 80px; }
}

/* ─── Buttons ─── */
.btn { border-radius: var(--radius-sm); font-weight: 500; transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease; }
.btn-primary { background-color: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background-color: var(--accent-2); border-color: var(--accent-2); }
.btn-outline-secondary { color: var(--text-muted); border-color: var(--border); }
.btn-outline-secondary:hover { background: var(--surface-2); color: var(--text); border-color: var(--border-strong); }

.btn-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; padding: 0;
    flex-shrink: 0;
}

/* Крупнее тап-таргеты на мобиле */
@media (max-width: 991.98px) {
    .btn-sm { padding: 0.45rem 0.8rem; font-size: 0.875rem; min-height: 40px; }
    .btn-icon { width: 42px; height: 42px; }
}

/* ─── Badges ─── */
.badge { font-weight: 500; padding: 4px 8px; border-radius: 5px; font-size: 0.72rem; }
.badge.subtle-success { background: rgba(63, 185, 80, 0.15); color: var(--success); }
.badge.subtle-danger { background: rgba(248, 81, 73, 0.15); color: var(--danger); }
.badge.subtle-warning { background: rgba(240, 180, 41, 0.15); color: var(--warning); }
.badge.subtle-info { background: rgba(58, 183, 224, 0.15); color: var(--info); }
.badge.subtle-accent { background: rgba(88, 166, 255, 0.15); color: var(--accent); }
.badge.subtle-muted { background: var(--surface-3); color: var(--text-muted); }

/* ─── Modals ─── */
.modal-content {
    background-color: var(--surface) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-lg) !important;
}
.modal-header, .modal-footer { border-color: var(--border) !important; }
.modal-header { padding: 14px 18px; }
.modal-body { padding: 16px 18px; }
.modal-footer { padding: 12px 18px; }

@media (min-width: 768px) {
    .modal-header { padding: 16px 20px; }
    .modal-body { padding: 18px 20px; }
    .modal-footer { padding: 14px 20px; }
}

/* На телефоне все модалки — bottom sheet: прижаты к низу, скролл внутри тела */
@media (max-width: 767.98px) {
    .modal-dialog {
        position: absolute;
        bottom: 0; left: 0; right: 0;
        margin: 0;
        width: 100%;
        max-width: 100%;
        display: flex;
        align-items: flex-end;
        min-height: 0;
    }
    .modal.fade .modal-dialog { transform: translateY(30px); }
    .modal.show .modal-dialog { transform: none; }
    .modal-content {
        width: 100%;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
        border-bottom: none !important;
        max-height: 92vh;
        max-height: 92dvh;
    }
    .modal-body { overflow-y: auto; -webkit-overflow-scrolling: touch; }
    .modal-footer { padding-bottom: calc(12px + var(--safe-bottom)); }
}

/* ─── Offcanvas ─── */
.offcanvas {
    background-color: var(--surface);
    color: var(--text);
    border-left: 1px solid var(--border) !important;
    border-right: 1px solid var(--border) !important;
}
.offcanvas.offcanvas-end { width: min(400px, 90vw) !important; }
.offcanvas-header { border-bottom: 1px solid var(--border); }
.offcanvas-body { padding-bottom: calc(16px + var(--safe-bottom)); }

/* ─── Toast ─── */
.toast-container { z-index: 10000; max-width: calc(100vw - 24px); }
.toast { border-radius: var(--radius-sm); }

/* ─── Log items ─── */
.log-item {
    border-left: 3px solid var(--border);
    padding: 6px 12px;
    margin-bottom: 8px;
    background: var(--bg-elev);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 0.85rem;
    overflow-wrap: anywhere;
}
.log-item.pay { border-color: var(--success); }
.log-item.ban { border-color: var(--danger); }

/* ─── Text helpers ─── */
.text-accent { color: var(--accent) !important; }
.text-muted { color: var(--text-muted) !important; }
.country-flag { font-size: 1.2rem; margin-right: 6px; vertical-align: middle; }

/* ─── AWG ─── */
.awg-stat-card {
    background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 14px;
    min-width: 0;
    transition: border-color 0.15s ease;
}
.awg-stat-icon {
    width: 36px; height: 36px; border-radius: 9px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.awg-stat-value { font-size: 1.25rem; font-weight: 700; line-height: 1.1; }
.awg-stat-label { font-size: 0.68rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 500; }
.awg-stat-caption { font-size: 0.72rem; color: var(--text-dim); margin-top: 4px; }

@media (min-width: 768px) {
    .awg-stat-card { padding: 16px 18px; }
    .awg-stat-card:hover { border-color: var(--accent); }
    .awg-stat-icon { width: 40px; height: 40px; font-size: 1.2rem; }
    .awg-stat-value { font-size: 1.65rem; }
    .awg-stat-label { font-size: 0.72rem; }
}

.awg-host-row {
    display: flex; align-items: center; gap: 12px;
    flex-wrap: wrap;
    padding: 12px 14px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.awg-host-row:hover { border-color: var(--accent); background: var(--surface-2); }
.awg-host-row.inactive { opacity: 0.55; }

@media (min-width: 768px) {
    .awg-host-row { flex-wrap: nowrap; }
}

.awg-host-flag {
    font-size: 1.7rem; line-height: 1;
    width: 42px; height: 42px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--surface-2); border-radius: 9px; flex-shrink: 0;
}

.awg-icon-btn {
    background: transparent; border: 1px solid var(--border);
    color: var(--text-muted); padding: 8px 11px; border-radius: var(--radius-sm);
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
    line-height: 1;
    cursor: pointer;
}
.awg-icon-btn:hover { background: var(--surface-2); color: var(--text); border-color: var(--accent); }
.awg-icon-btn.danger:hover { color: var(--danger); border-color: var(--danger); }

@media (min-width: 992px) {
    .awg-icon-btn { padding: 5px 9px; }
}

/* ─── Skeleton ─── */
.skeleton-row {
    height: 54px; border-radius: var(--radius-sm); margin-bottom: 8px;
    background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%);
    background-size: 200% 100%;
    animation: skel 1.2s ease-in-out infinite;
}
@keyframes skel {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ─── Pagination ─── */
.pager {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 12px; gap: 12px;
}

/* ─── Empty state ─── */
.empty {
    text-align: center; padding: 40px 20px;
    color: var(--text-dim);
}
.empty i { font-size: 2.4rem; opacity: 0.4; margin-bottom: 10px; display: block; }

/* ─── Search bar (иконка внутри инпута) ─── */
.search-bar { position: relative; flex: 1 1 100%; min-width: 0; }
.search-bar > i {
    position: absolute; left: 12px; top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    pointer-events: none;
    font-size: 0.9rem;
}
.search-bar .form-control { padding-left: 36px !important; width: 100%; }

@media (min-width: 768px) {
    .search-bar { flex: 0 1 300px; }
}

/* Поля тулбара: на мобиле по два в ряд, на десктопе фикс. ширина */
.action-field { flex: 1 1 45%; min-width: 0; }
@media (min-width: 768px) {
    .action-field { flex: 0 0 auto; width: 160px; }
}

/* ─── Карточный вид списков (мобила) / таблицы (десктоп) ─── */
.card-list { display: flex; flex-direction: column; gap: 8px; padding: 10px; }
.table-wrap { display: none; }

@media (min-width: 768px) {
    .card-list { display: none; }
    .table-wrap { display: block; }
}

.m-card {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    cursor: pointer;
    transition: background 0.1s ease;
}
.m-card:active { background: var(--surface-2); }

.m-card-top {
    display: flex; justify-content: space-between; align-items: flex-start;
    gap: 10px;
}
.m-card-title { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.m-card-sub { color: var(--text-muted); font-size: 0.8rem; font-weight: 400; }
.m-card-top .badge { flex-shrink: 0; }

.m-chips {
    display: flex; flex-wrap: wrap; align-items: center;
    gap: 6px 14px;
    margin-top: 8px;
    font-size: 0.82rem;
}
.m-chip { color: var(--text-muted); display: inline-flex; align-items: center; white-space: nowrap; }
.m-chip i { margin-right: 5px; color: var(--text-dim); }

/* ─── Мини-список платежей в модалке пользователя ─── */
.mini-pay-list { display: flex; flex-direction: column; gap: 6px; }
.mini-pay {
    display: flex; flex-wrap: wrap; align-items: center;
    gap: 4px 12px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    font-size: 0.85rem;
}
.mini-pay .amount { font-weight: 700; }
.mini-pay .date { color: var(--text-muted); font-size: 0.78rem; margin-left: auto; }

/* Заглушённые кнопки пагинации */
.pager .btn:disabled { opacity: 0.35; }

/* Карточки без клика (рассылки, скидки, промокоды) */
.m-card-static { cursor: default; }
.m-card-static:active { background: var(--bg-elev); }

/* ─── AWG: фильтры и кнопки действий ─── */
.awg-filter { width: 180px; }

.awg-actions { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }

@media (max-width: 767.98px) {
    .awg-filter { width: auto; flex: 1 1 140px; }
    .awg-host-row .awg-actions { width: 100%; justify-content: flex-end; margin-top: 2px; }
}

/* ─── Сворачиваемый блок фильтров в модалках ─── */
.filters-toggle {
    display: flex; align-items: center; gap: 8px;
    width: 100%;
    background: none; border: none;
    color: var(--accent);
    font-weight: 600; font-size: 0.9rem;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    margin: 16px 0 12px;
    cursor: pointer;
}
.filters-toggle .chev { margin-left: auto; transition: transform 0.2s ease; }
.filters-toggle:not(.collapsed) .chev { transform: rotate(180deg); }

/* ─── Chart containers ─── */
.chart-box, .chart-box-lg { position: relative; }
.chart-box { height: 220px; }
.chart-box-lg { height: 240px; }

@media (min-width: 768px) {
    .chart-box { height: 260px; }
    .chart-box-lg { height: 300px; }
}

/* ─── Funnel (analytics): вертикальный список на мобиле, ряд на десктопе ─── */
.funnel { display: flex; flex-direction: column; gap: 8px; }

.funnel-step {
    display: flex; align-items: baseline; gap: 10px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    min-width: 0;
}
.funnel-label {
    color: var(--text-muted);
    font-size: 0.7rem; font-weight: 500;
    text-transform: uppercase; letter-spacing: 0.04em;
    flex: 1;
}
.funnel-value { font-size: 1.25rem; font-weight: 700; line-height: 1.1; }
.funnel-pct { color: var(--text-dim); font-size: 0.72rem; }

.funnel-step.warning .funnel-value { color: var(--warning); }
.funnel-step.info .funnel-value { color: var(--info); }
.funnel-step.success .funnel-value { color: var(--success); }

.funnel-arrow { display: none; color: var(--text-dim); }

@media (min-width: 768px) {
    .funnel { flex-direction: row; align-items: stretch; }
    .funnel-step {
        flex: 1;
        flex-direction: column; align-items: center; text-align: center;
        gap: 4px; padding: 12px 8px;
    }
    .funnel-label { flex: 0 0 auto; }
    .funnel-value { font-size: 1.5rem; }
    .funnel-arrow { display: flex; align-items: center; }
}

.funnel-track {
    position: relative;
    height: 8px;
    margin-top: 14px;
    background: var(--surface-3);
    border-radius: 4px;
    overflow: hidden;
}
.funnel-bar {
    position: absolute; left: 0; top: 0;
    height: 100%; width: 0%;
    border-radius: 4px 0 0 4px;
    transition: width 0.5s;
}

/* ─── Responsive column visibility (до перевода таблиц в карточки) ─── */
@media (max-width: 767.98px) {
    .hide-sm { display: none !important; }
}
@media (max-width: 575.98px) {
    .hide-xs { display: none !important; }
}
