/* Вид как у ads.telegram.org.
   Класс html.tg-off ставится, если вошедший выбрал тему Telegram. */

.tg-off-mark,
.tg-off-actions,
.tg-off-only { display: none; }
html.tg-off .brand-mark { display: none; }

.theme-choice { width: 100%; }
.theme-choice.is-on { font-weight: 600; }
.theme-choice.is-on::after {
    content: "";
    width: .45rem;
    height: .45rem;
    margin-inline-start: auto;
    border-radius: 50%;
    background: currentColor;
    flex: none;
}

html.tg-off {
    --bg-body: #fff;
    --bg-card: #fff;
    --text-primary: #222;
    --text-secondary: #8a939d;
    --accent-color: #119af5;
    --accent-hover: #0d8de0;
    --border-color: #e6e6e6;
    --shadow-sm: none;
    --shadow-md: 0 8px 24px rgba(0, 0, 0, .08);
    --input-bg: #fff;
    --icon-bg: transparent;
    --table-head-bg: #fff;
    --table-hover: #eef3f7;
    --hdr-bal-bg: transparent;
    --hdr-bal-bd: transparent;
    --alist-zebra: #f2f5f7;
    --alist-hover: #e7eef3;
    --alist-picked: #e3f2fc;
    --alist-link: #0288db;
    --alist-link-hover: #026eaf;
    --off-logo: #0288db;
    --off-btn: #119af5;
    --off-btn-hover: #0e8de3;
    --off-ring: #d9d9d9;
    --off-row: #f2f5f7;
}

html.tg-off[data-bs-theme="dark"] {
    --bg-body: #1c1c1e;
    --bg-card: #1c1c1e;
    --text-primary: #fff;
    --text-secondary: #8a939d;
    --border-color: #2e2e32;
    --input-bg: #1c1c1e;
    --table-head-bg: #1c1c1e;
    --table-hover: #2a2a2e;
    --alist-zebra: #262628;
    --alist-hover: #2e2e32;
    --alist-picked: #1a3344;
    --alist-link: #6ab3f3;
    --alist-link-hover: #8ec6f7;
    --off-logo: #6ab3f3;
    --off-ring: #3a3a3e;
    --off-row: #262628;
}

html.tg-off body {
    font-family: Roboto, system-ui, sans-serif;
    font-size: 15px;
    line-height: 1.35;
    background: var(--bg-body);
    color: var(--text-primary);
}

html.tg-off .dashboard-header {
    padding: 8px 0;
    margin-bottom: 0;
    border-bottom: 0;
    box-shadow: none;
    background: var(--bg-body);
}

html.tg-off .dashboard-header .container {
    max-width: 842px;
    margin-inline: auto;
    padding-left: 15px;
    padding-right: 15px;
}
html.tg-off .alist-page.container {
    max-width: none;
    padding-left: 15px;
    padding-right: 15px;
}

html.tg-off .brand-logo {
    gap: 8px;
    color: var(--off-logo);
    font-weight: 500;
    font-size: 15px;
}
html.tg-off .brand-logo .brand-name {
    color: var(--off-logo);
    font-weight: 500;
    font-size: 15px;
}
html.tg-off .tg-off-mark { display: block; flex: none; }

html.tg-off .dash-nav {
    display: inline-flex;
    height: auto;
    padding: 0;
    gap: 22px;
    border: 0;
    border-radius: 0;
    background: transparent;
}
html.tg-off .dash-nav-link {
    padding: 2px 0 4px;
    border-radius: 0;
    background: transparent;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    box-shadow: inset 0 -2px 0 transparent;
}
html.tg-off .dash-nav-link i { display: none; }
html.tg-off .dash-nav-link:hover {
    background: transparent;
    color: var(--off-logo);
}
html.tg-off .dash-nav-link.is-on {
    background: transparent;
    color: var(--off-logo);
    box-shadow: inset 0 -2px 0 var(--off-logo);
}

html.tg-off .hdr-pill {
    height: auto;
    padding: 0 4px;
    border: 0;
    background: transparent;
    box-shadow: none;
    font-size: 14px;
    font-weight: 500;
}
html.tg-off .hdr-bal,
html.tg-off .hdr-bal:hover {
    background: transparent;
    border: 0;
}
html.tg-off .hdr-right { gap: 18px; }
html.tg-off .hdr-bal-drop { order: 1; }
html.tg-off .hdr-cab-drop { order: 2; }
html.tg-off .hdr-right > .dropdown:has(.btn-user) { order: 3; }
html.tg-off .hdr-right > .dropdown:has(.btn-lang) { order: 4; }
html.tg-off .tg-off-budget-lab {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-primary);
}
html.tg-off .hdr-bal-num { font-size: 14px; font-weight: 500; }
html.tg-off .hdr-bal > .bi-wallet2,
html.tg-off .hdr-bal .hdr-pill-chev,
html.tg-off .btn-cab .hdr-pill-ic,
html.tg-off .btn-lang-lab,
html.tg-off .btn-lang .hdr-pill-chev,
html.tg-off .btn-user-name,
html.tg-off .btn-user .hdr-pill-chev { display: none; }
html.tg-off .btn-cab,
html.tg-off .btn-cab-name { color: var(--off-logo); }
html.tg-off .btn-cab:hover,
html.tg-off .btn-cab:hover .btn-cab-name { color: var(--alist-link-hover); }
html.tg-off .btn-cab-name { max-width: 11rem; }
html.tg-off .btn-user { padding: 0; }
html.tg-off .btn-user-ava {
    width: 32px;
    height: 32px;
    font-size: 14px;
    font-weight: 500;
    background: var(--off-btn);
}

html.tg-off .tg-off-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 18px;
}
html.tg-off .tg-off-icon:hover { color: var(--text-primary); }

html.tg-off .alist-page { padding-top: 0; }
html.tg-off .alist-kpis { display: none !important; }
html.tg-off .alist-kpis-wrap { margin: 0; }
html.tg-off .alist-kpis-wrap > .ad-bulk {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    height: auto;
    width: 100%;
    margin: 0 0 8px;
    padding: 6px 10px;
    border: 1px solid var(--off-ring);
    border-radius: 6px;
    background: var(--bg-card);
    box-shadow: none;
}
html.tg-off .alist-kpis-wrap > .ad-bulk[hidden] { display: none; }
html.tg-off .alist-kpis-wrap > .ad-bulk .ad-bulk-count,
html.tg-off .alist-kpis-wrap > .ad-bulk .ad-bulk-count:not(.ad-bulk-run) {
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
}
html.tg-off .alist-kpis-wrap > .ad-bulk .ad-bulk-clear {
    color: var(--off-logo);
    font-size: 13px;
    font-weight: 500;
}
html.tg-off .alist-kpis-wrap > .ad-bulk .ad-bulk-clear:hover { color: var(--off-logo); text-decoration: underline; }
html.tg-off .alist-kpis-wrap > .ad-bulk .ad-btn,
html.tg-off .alist-kpis-wrap > .ad-bulk .ad-btn--pause,
html.tg-off .alist-kpis-wrap > .ad-bulk .ad-btn--resume,
html.tg-off .alist-kpis-wrap > .ad-bulk .ad-btn--danger {
    height: 28px;
    padding: 0 10px;
    border: 1px solid var(--off-ring);
    border-radius: 6px;
    background: transparent;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    box-shadow: none;
}
html.tg-off .alist-kpis-wrap > .ad-bulk .ad-btn i { display: none; }
html.tg-off .alist-kpis-wrap > .ad-bulk .ad-btn:hover:not(:disabled),
html.tg-off .alist-kpis-wrap > .ad-bulk .ad-btn--pause:hover:not(:disabled),
html.tg-off .alist-kpis-wrap > .ad-bulk .ad-btn--resume:hover:not(:disabled) {
    background: var(--off-row);
    color: var(--text-primary);
    border-color: var(--off-ring);
}
html.tg-off .alist-kpis-wrap > .ad-bulk .ad-btn--danger { color: #c62828; border-color: #f0c4c4; }
html.tg-off .alist-kpis-wrap > .ad-bulk .ad-btn--danger:hover:not(:disabled) {
    background: #fdecec;
    color: #c62828;
    border-color: #f0c4c4;
}
html.tg-off[data-bs-theme="dark"] .alist-kpis-wrap > .ad-bulk .ad-btn--danger { border-color: #5c3030; }
html.tg-off[data-bs-theme="dark"] .alist-kpis-wrap > .ad-bulk .ad-btn--danger:hover:not(:disabled) {
    background: #3a2424;
    border-color: #5c3030;
}
html.tg-off .ad-bulk-more-menu,
html.tg-off .alist-kpis-wrap .ad-bulk-more-menu,
html.tg-off[data-bs-theme="light"] .alist-kpis-wrap .ad-bulk-more-menu {
    background: var(--bg-card);
    border: 1px solid var(--off-ring);
    border-radius: 6px;
    box-shadow: var(--shadow-md);
}

html.tg-off .alist-page .card-box {
    background: transparent;
    border: 0;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    margin: 0 !important;
}
html.tg-off .card-box {
    border-color: var(--off-ring);
    box-shadow: none;
    border-radius: 6px;
}
html.tg-off .form-control:focus,
html.tg-off .form-select:focus {
    border-color: var(--off-btn);
    box-shadow: 0 0 0 3px rgba(17, 154, 245, .15);
}

html.tg-off .alist-toolbar {
    flex-wrap: nowrap;
    align-items: center;
    padding: 8px 0 10px;
    border-bottom: 0;
    gap: 8px;
    background: transparent;
}
/* В обычной теме обёртка не рисует блок. В теме Telegram тоже:
   поиск, фильтры и кнопки становятся одной строкой. */
.tg-off-bar { display: contents; }
html.tg-off .tg-off-bar,
html.tg-off .alist-tools { display: contents; }
html.tg-off .alist-search {
    flex: 0 1 220px;
    width: 220px;
    max-width: 240px;
    min-width: 140px;
    order: 1;
}
html.tg-off .alist-search > .bi-search {
    left: 12px;
    font-size: 14px;
    color: var(--text-secondary);
}
html.tg-off .alist-search .form-control {
    height: 36px;
    min-height: 36px;
    max-height: 36px;
    padding: 0 12px 0 36px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    box-shadow: inset 0 0 0 1px var(--off-ring);
    font-size: 14px;
    font-weight: 400;
    color: var(--text-primary);
}
html.tg-off .alist-search .form-control:focus {
    box-shadow: inset 0 0 0 1px var(--off-btn);
}
html.tg-off[dir="rtl"] .alist-search > .bi-search { left: auto; right: 12px; }
html.tg-off[dir="rtl"] .alist-search .form-control { padding: 0 36px 0 12px; }

html.tg-off .alist-filter,
html.tg-off .alist-filter--obj {
    flex: 0 1 auto;
    width: auto;
    min-width: 0;
    max-width: 12rem;
    order: 2;
}
html.tg-off .alist-toolbar .alist-filter-toggle {
    width: auto;
    max-width: 12rem;
    height: 36px;
    min-height: 36px;
}

html.tg-off .tg-off-actions {
    display: flex;
    gap: 8px;
    width: auto;
    order: 4;
    margin-inline-start: auto;
    padding: 0;
}
html.tg-off .tg-off-btn {
    flex: 0 0 auto;
    height: 36px;
    margin: 0;
    padding: 0 16px;
    white-space: nowrap;
    border: 0;
    border-radius: 6px;
    background: var(--off-btn);
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
}
html.tg-off .tg-off-btn:hover,
html.tg-off .tg-off-btn:focus-visible {
    background: var(--off-btn-hover);
    color: #fff;
}

html.tg-off .alist-toolbar > form,
html.tg-off .alist-toolbar > .alist-ai-btn { order: 7; }
html.tg-off .alist-csv,
html.tg-off .alist-cols,
html.tg-off .alist-tools > .dropdown:not(.alist-filter),
html.tg-off .alist-matrix { order: 5; }
html.tg-off .alist-funnel { order: 6; }
html.tg-off .alist-csv { margin-inline-start: 0; height: 36px; }
html.tg-off .alist-toolbar:not(:has(.tg-off-actions)) .alist-csv { margin-inline-start: auto; }
html.tg-off .alist-cols-btn,
html.tg-off .alist-funnel-btn,
html.tg-off .alist-folder-add,
html.tg-off .alist-matrix {
    height: 36px;
    min-height: 36px;
}
html.tg-off .alist-cols-btn { width: 36px; }
html.tg-off .alist-tools .js-ad-create { display: none; }
html.tg-off .alist-ai-btn {
    height: 32px;
    border: 0;
    background: transparent;
    color: var(--off-logo);
    font-weight: 500;
    box-shadow: none;
}
html.tg-off .alist-ai-btn i { color: var(--off-logo); }
html.tg-off .alist-ai-btn:hover,
html.tg-off .alist-ai-btn:focus-visible {
    border: 0;
    color: var(--off-logo);
}
html.tg-off .alist-toolbar .alist-filter-toggle,
html.tg-off .alist-csv,
html.tg-off .alist-cols-btn,
html.tg-off .alist-folder-add,
html.tg-off .alist-matrix {
    border-radius: 6px;
    border-color: var(--off-ring);
    background: transparent;
    color: var(--text-primary);
    font-weight: 500;
}

html.tg-off .alist-wrap { overflow-x: auto; }
html.tg-off .alist-table {
    font-size: 14px;
    font-weight: 400;
}
html.tg-off .alist-table th,
html.tg-off .alist-table td {
    padding: 3px 10px;
    font-weight: 400;
    color: var(--text-primary);
}
html.tg-off .alist-table thead th {
    height: 38px;
    padding-top: 3px;
    padding-bottom: 3px;
    border-bottom: 0;
    background: var(--bg-body);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .01em;
    text-transform: uppercase;
    color: var(--text-primary);
}
html.tg-off .alist-sort { font-weight: 600; }
html.tg-off .alist-caret { opacity: .35; }
html.tg-off .alist-th.is-on > .alist-caret,
html.tg-off .alist-sort.is-on .alist-caret { color: var(--text-primary); }

html.tg-off .alist-table tbody tr.alist-card { background: transparent; }
html.tg-off .alist-table tbody tr.alist-card:nth-child(odd of .alist-card) { background: var(--off-row); }
html.tg-off .alist-table tbody tr.alist-card:nth-child(even of .alist-card) { background: transparent; }
html.tg-off .alist-table tbody tr.alist-card:hover { background: var(--alist-hover); }
html.tg-off .alist-table tbody tr.alist-card.is-picked:nth-child(n of .alist-card) { background: var(--alist-picked); }

html.tg-off td.alist-ad {
    position: relative;
    padding-inline-start: 36px !important;
}
html.tg-off td.alist-ad::before {
    content: "";
    position: absolute;
    inset-inline-start: 10px;
    top: 50%;
    width: 18px;
    height: 18px;
    transform: translateY(-50%);
    background-color: #2b2b2b;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath fill='black' d='M9.09 11.52C9.27 11.65 9.37 11.75 9.38 11.81 9.55 12.59 9.67 13.18 9.76 13.58 9.83 14.3 9.62 14.95 9.04 15.04 9.02 15.04 9 15.04 8.98 15.05L8.86 15.05C8.26 15.1 7.69 14.68 7.44 14 6.81 13 6.4 12.25 6.22 11.76 6.2 11.7 6.26 11.62 6.41 11.52zM5.14 6.17H8.7C9.03 6.17 9.3 6.43 9.3 6.76V10.15C9.3 10.48 9.03 10.75 8.7 10.75H6.65 5.14C4.21 10.75 3.46 9.99 3.46 9.07V7.85C3.46 6.92 4.21 6.17 5.14 6.17zM10.54 5.77L12.91 4.19C13.39 3.87 14.04 4 14.37 4.48 14.48 4.65 14.54 4.85 14.54 5.06V11.47C14.54 12.05 14.07 12.52 13.49 12.52 13.31 12.52 13.12 12.47 12.96 12.38L10.58 10.98C10.32 10.83 10.16 10.56 10.16 10.26V6.47C10.16 6.19 10.3 5.92 10.54 5.77z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath fill='black' d='M9.09 11.52C9.27 11.65 9.37 11.75 9.38 11.81 9.55 12.59 9.67 13.18 9.76 13.58 9.83 14.3 9.62 14.95 9.04 15.04 9.02 15.04 9 15.04 8.98 15.05L8.86 15.05C8.26 15.1 7.69 14.68 7.44 14 6.81 13 6.4 12.25 6.22 11.76 6.2 11.7 6.26 11.62 6.41 11.52zM5.14 6.17H8.7C9.03 6.17 9.3 6.43 9.3 6.76V10.15C9.3 10.48 9.03 10.75 8.7 10.75H6.65 5.14C4.21 10.75 3.46 9.99 3.46 9.07V7.85C3.46 6.92 4.21 6.17 5.14 6.17zM10.54 5.77L12.91 4.19C13.39 3.87 14.04 4 14.37 4.48 14.48 4.65 14.54 4.85 14.54 5.06V11.47C14.54 12.05 14.07 12.52 13.49 12.52 13.31 12.52 13.12 12.47 12.96 12.38L10.58 10.98C10.32 10.83 10.16 10.56 10.16 10.26V6.47C10.16 6.19 10.3 5.92 10.54 5.77z'/%3E%3C/svg%3E") center / contain no-repeat;
}
html.tg-off[data-bs-theme="dark"] td.alist-ad::before { background-color: #e6e6e6; }
html.tg-off tr[data-ttype="bots"] td.alist-ad::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cg fill='black'%3E%3Cpath d='M9 3.33c2.34 0 4.24 1.9 4.24 4.25v4.4c0 1.1-.89 2-2 2H6.76c-1.11 0-2-.9-2-2v-4.4C4.76 5.23 6.66 3.33 9 3.33zm0 1c-1.79 0-3.23 1.42-3.23 3.18v.39c0 .66.54 1.2 1.21 1.2h4.04c.67 0 1.21-.54 1.21-1.2v-.39C12.23 5.75 10.79 4.33 9 4.33z'/%3E%3Crect x='14.05' y='7.71' width='1.62' height='4.37' rx='.81'/%3E%3Crect x='2.33' y='7.71' width='1.62' height='4.37' rx='.81'/%3E%3Cellipse cx='10.41' cy='7.11' rx='1' ry='1'/%3E%3Cellipse cx='7.59' cy='7.11' rx='1' ry='1'/%3E%3C/g%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cg fill='black'%3E%3Cpath d='M9 3.33c2.34 0 4.24 1.9 4.24 4.25v4.4c0 1.1-.89 2-2 2H6.76c-1.11 0-2-.9-2-2v-4.4C4.76 5.23 6.66 3.33 9 3.33zm0 1c-1.79 0-3.23 1.42-3.23 3.18v.39c0 .66.54 1.2 1.21 1.2h4.04c.67 0 1.21-.54 1.21-1.2v-.39C12.23 5.75 10.79 4.33 9 4.33z'/%3E%3Crect x='14.05' y='7.71' width='1.62' height='4.37' rx='.81'/%3E%3Crect x='2.33' y='7.71' width='1.62' height='4.37' rx='.81'/%3E%3Cellipse cx='10.41' cy='7.11' rx='1' ry='1'/%3E%3Cellipse cx='7.59' cy='7.11' rx='1' ry='1'/%3E%3C/g%3E%3C/svg%3E");
}
html.tg-off tr[data-ttype="users"] td.alist-ad::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle fill='black' cx='12' cy='8' r='3.2'/%3E%3Cpath fill='black' d='M5.5 19.2c.8-3.2 3.2-4.8 6.5-4.8s5.7 1.6 6.5 4.8c.2.6-.3 1.1-.9 1.1H6.4c-.6 0-1.1-.5-.9-1.1z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle fill='black' cx='12' cy='8' r='3.2'/%3E%3Cpath fill='black' d='M5.5 19.2c.8-3.2 3.2-4.8 6.5-4.8s5.7 1.6 6.5 4.8c.2.6-.3 1.1-.9 1.1H6.4c-.6 0-1.1-.5-.9-1.1z'/%3E%3C/svg%3E");
}

html.tg-off .alist-title,
html.tg-off button.alist-title {
    font-size: 14px;
    font-weight: 500;
    line-height: 16px;
    color: var(--text-primary);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
html.tg-off button.alist-title:hover { text-decoration: underline; }
html.tg-off .alist-link {
    margin-top: 0;
    font-size: 13px;
    font-weight: 400;
    color: var(--alist-link);
    line-height: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
html.tg-off .alist-name { position: relative; padding-inline-end: 1.45rem; }
html.tg-off .alist-react {
    width: 16px;
    height: 16px;
    margin-top: 0;
    font-size: 15px;
}
html.tg-off .alist-react-menu {
    z-index: 80;
    border-color: var(--off-ring);
    box-shadow: 0 4px 16px rgba(0, 0, 0, .12);
}
html.tg-off .alist-react-menu button:hover,
html.tg-off .alist-react-menu button.is-on { background: rgba(2, 136, 219, .12); }
html.tg-off .alist-rename {
    position: absolute;
    z-index: 1;
    top: 0;
    inset-inline-end: 0;
    margin-top: 0;
    opacity: 0;
    pointer-events: none;
}
html.tg-off tr.alist-card:hover .alist-rename,
html.tg-off .alist-rename:focus-visible {
    opacity: 1;
    pointer-events: auto;
}

html.tg-off .alist-act { align-items: flex-end; }
html.tg-off .alist-act-kind {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-secondary);
}
html.tg-off .alist-table .ad-cell { font-weight: 400; color: var(--text-primary); }
html.tg-off .alist-table td[data-col="cpm"],
html.tg-off .alist-table td[data-col="cpc"],
html.tg-off .alist-table td[data-col="cpa"],
html.tg-off .alist-table td[data-col="budget"],
html.tg-off .alist-table .ad-cpm-cell .ad-cell,
html.tg-off .alist-table .ad-balance-cell .ad-cell { color: var(--alist-link); }
html.tg-off .alist-table .ad-cpm-cell .ad-cell:hover,
html.tg-off .alist-table .ad-balance-cell .ad-cell:hover,
html.tg-off .alist-table .ad-day-cell .ad-cell:hover { color: var(--alist-link); }
html.tg-off .alist-table td.ad-state,
html.tg-off .alist-table th[data-col="status"] { text-align: start; }
html.tg-off .alist-table .ad-status {
    display: inline;
    width: auto;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    color: var(--alist-link);
    font-size: 14px;
    font-weight: 400;
}
html.tg-off .alist-table .ad-state .ad-cell:hover .ad-status {
    background: none;
    border: 0;
    color: var(--alist-link-hover);
    text-decoration: underline;
}
html.tg-off .alist-date { color: var(--text-primary); font-weight: 400; }
html.tg-off .alist-target { color: var(--text-primary); }
html.tg-off .alist-table td.alist-target,
html.tg-off .alist-table th[data-col="target"] { text-align: start; }

/* Папка — тихий заголовок группы: шеврон и имя, счётчик строкой ниже.
   Цветная полоса, иконка папки и рупор объявления здесь лишние. */
html.tg-off .alist-folder td {
    background: transparent;
    border-top: 1px solid var(--border-color);
    border-bottom: 0;
    padding-top: 8px;
    padding-bottom: 6px;
    font-weight: 400;
    color: var(--text-secondary);
    vertical-align: middle;
}
html.tg-off .alist-folder:hover td { background: transparent; }
html.tg-off .alist-table tbody > tr.alist-folder:first-child td { border-top: 0; }
html.tg-off .alist-folder.is-ungrouped td {
    border-top: 1px solid var(--border-color);
    padding-top: 8px;
}
html.tg-off .alist-folder:not(.is-ungrouped):not(.is-drop) td:first-child,
html.tg-off .alist-card[data-folder-id]:not([data-folder-id="0"]) td:first-child {
    box-shadow: none;
}
html.tg-off .alist-folder.is-drop td {
    background: var(--alist-picked);
    box-shadow: inset 0 -1px 0 var(--off-btn);
}
html.tg-off .alist-folder td.alist-ad {
    padding-inline-start: 8px !important;
    overflow: hidden;
}
html.tg-off .alist-folder td.alist-ad::before { content: none; }
html.tg-off .alist-folder-ic { display: none; }
html.tg-off .alist-folder-line {
    position: relative;
    column-gap: 4px;
    row-gap: 1px;
    min-width: 0;
}
html.tg-off .alist-folder-toggle {
    width: 16px;
    height: 16px;
    border-radius: 0;
    color: var(--text-secondary);
}
html.tg-off .alist-folder-toggle:hover {
    background: transparent;
    color: var(--text-primary);
}
html.tg-off .alist-folder-toggle .bi { font-size: 11px; }
html.tg-off .alist-folder-name {
    flex: 1 1 0;
    min-width: 0;
    max-width: 100%;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}
html.tg-off .alist-folder.is-ungrouped .alist-folder-name {
    color: var(--text-secondary);
    font-weight: 400;
}
html.tg-off button.alist-folder-name:hover {
    color: var(--text-primary);
    text-decoration: underline;
}
html.tg-off .alist-folder-meta {
    flex: 1 1 100%;
    flex-wrap: nowrap;
    gap: 6px;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    padding-inline-start: 20px;
}
html.tg-off .alist-folder-n {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}
html.tg-off .alist-folder-limit { flex: none; }
html.tg-off .alist-folder-n,
html.tg-off .alist-folder-limit {
    font-size: 12px;
    font-weight: 400;
}
html.tg-off .alist-folder-limit-lab {
    padding: 0;
    border-radius: 0;
    background: none;
    font-size: 12px;
    font-weight: 500;
}
html.tg-off .alist-folder-acts {
    position: absolute;
    z-index: 1;
    inset-inline-end: 0;
    top: 0;
    width: auto;
    min-width: 0;
    overflow: visible;
    opacity: 0;
    pointer-events: none;
    background: var(--bg-body);
}
html.tg-off .alist-folder:hover .alist-folder-acts,
html.tg-off .alist-folder:focus-within .alist-folder-acts {
    opacity: 1;
    pointer-events: auto;
}
html.tg-off .alist-folder-set,
html.tg-off .alist-folder-del {
    width: 1.25rem;
    height: 1.25rem;
}
html.tg-off .alist-folder-set:hover,
html.tg-off .alist-folder-del:hover { background: transparent; }
html.tg-off .alist-folder td.alist-num,
html.tg-off .alist-folder .alist-day-spent {
    font-size: 12px;
    font-weight: 400;
    color: var(--text-secondary);
}
html.tg-off .alist-folder td[data-col="target"],
html.tg-off .alist-folder td[data-col="status"],
html.tg-off .alist-folder td[data-col="date"] {
    color: transparent;
}

html.tg-off .site-footer { color: var(--text-secondary); }

html.tg-off .stats-page .card-box {
    background: transparent;
    border: 0;
    box-shadow: none;
    border-radius: 0;
    margin-bottom: 16px !important;
}
html.tg-off .stats-page .row > [class*="col-"] > .card-box {
    background: var(--bg-card);
    border: 1px solid var(--off-ring);
    border-radius: 6px;
    box-shadow: none;
    margin-bottom: 0 !important;
}
html.tg-off .stats-page .form-label {
    font-size: 11px;
    letter-spacing: .01em;
    color: var(--text-secondary);
}
html.tg-off .stats-page .form-control,
html.tg-off .stats-page .form-select,
html.tg-off .stats-page .obj-picker-toggle {
    min-height: 40px;
    border: 0;
    border-radius: 6px;
    background: var(--input-bg);
    box-shadow: inset 0 0 0 1px var(--off-ring);
    font-size: 14px;
}
html.tg-off .stats-page .form-control:focus,
html.tg-off .stats-page .form-select:focus,
html.tg-off .stats-page .obj-picker-toggle:focus {
    box-shadow: inset 0 0 0 1px var(--off-btn);
}
html.tg-off .stats-page .input-group {
    flex-wrap: nowrap;
    align-items: stretch;
    height: 40px;
    overflow: hidden;
    border: 1px solid var(--off-ring);
    border-radius: 6px;
    background: var(--input-bg);
    box-shadow: none;
}
html.tg-off .stats-page .input-group > .form-control,
html.tg-off .stats-page .input-group > .input-group-text {
    height: 100%;
    min-height: 0;
    margin: 0;
    padding-top: 0;
    padding-bottom: 0;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
}
html.tg-off .stats-page .btn-primary {
    min-height: 40px;
    border: 0;
    border-radius: 6px;
    background: var(--off-btn);
    font-size: 14px;
    font-weight: 600;
}
html.tg-off .stats-page .btn-primary:hover,
html.tg-off .stats-page .btn-primary:active { background: var(--off-btn-hover); }
html.tg-off .stats-page .step-seg {
    height: 40px;
    min-height: 40px;
    border: 1px solid var(--off-ring);
    border-radius: 6px;
    box-shadow: none;
    background: var(--input-bg);
}
html.tg-off .stats-page .step-seg input:checked + label {
    background: var(--off-btn);
    color: #fff;
}
html.tg-off .stats-page table.dataTable thead th {
    height: 38px;
    padding: 3px 10px !important;
    background: var(--bg-body) !important;
    color: var(--text-primary) !important;
    font-size: 12px !important;
    font-weight: 600;
    letter-spacing: .01em;
    border-bottom: 0 !important;
    border-right: 0 !important;
}
html.tg-off .stats-page table.dataTable tbody td {
    padding: 3px 10px !important;
    border: 0 !important;
    font-size: 14px;
    color: var(--text-primary);
    background-color: transparent !important;
}
html.tg-off .stats-page table.dataTable tbody tr:nth-child(odd) td {
    background-color: var(--off-row) !important;
}
html.tg-off .stats-page table.dataTable tbody tr:hover td {
    background-color: var(--alist-hover) !important;
}
html.tg-off .stats-page .dt-buttons .dt-button {
    background: transparent !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--off-ring) !important;
    border-radius: 6px !important;
    font-weight: 500 !important;
}
/* Меню «Колонки» в report.css залито тёмным. В теме Telegram это светлая карточка. */
html.tg-off div.dt-button-collection {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--off-ring) !important;
    border-radius: 6px;
    box-shadow: var(--shadow-md);
    padding: 6px;
}
html.tg-off div.dt-button-collection button.dt-button {
    background: transparent !important;
    color: var(--text-primary) !important;
    border: 0 !important;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 400;
}
html.tg-off div.dt-button-collection button.dt-button:hover,
html.tg-off div.dt-button-collection button.dt-button.active:hover {
    background: var(--off-row) !important;
    color: var(--text-primary) !important;
}
html.tg-off div.dt-button-collection button.dt-button.active {
    background: transparent !important;
    color: var(--text-primary) !important;
}
html.tg-off div.dt-button-collection button.dt-button.active:before {
    color: var(--off-logo);
}
html.tg-off .stats-page .dataTables_filter input {
    height: 36px;
    border: 0 !important;
    border-radius: 6px !important;
    background: transparent !important;
    box-shadow: inset 0 0 0 1px var(--off-ring) !important;
}
html.tg-off .stats-page .page-link { color: var(--off-logo); }
html.tg-off .stats-page .page-item.active .page-link {
    background: var(--off-btn);
    border-color: var(--off-btn);
    color: #fff;
}
html.tg-off .stats-page .ad-bulk {
    margin: 0 0 8px;
    padding: 6px 10px;
    border: 1px solid var(--off-ring);
    border-bottom: 1px solid var(--off-ring);
    border-radius: 6px;
    background: var(--bg-card);
}
html.tg-off .stats-page .ad-bulk-count { color: var(--text-primary); font-weight: 500; }
html.tg-off .stats-page .ad-bulk-clear { color: var(--off-logo); text-decoration: none; font-size: 13px; }
html.tg-off .stats-page .ad-bulk-clear:hover { color: var(--off-logo); text-decoration: underline; }
html.tg-off .stats-page .ad-bulk .ad-btn {
    height: 28px;
    padding: 0 10px;
    border: 1px solid var(--off-ring);
    border-radius: 6px;
    background: transparent;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
}
html.tg-off .stats-page .ad-bulk .ad-btn i { display: none; }
html.tg-off .stats-page .ad-bulk .ad-btn:hover:not(:disabled) { background: var(--off-row); }
html.tg-off .stats-page .ad-bulk .ad-btn--danger { color: #c62828; border-color: #f0c4c4; }

@media (max-width: 1199.98px) {
    html.tg-off .alist-toolbar { flex-wrap: wrap; }
}

@media (min-width: 992px) {
    html.tg-off .alist-table {
        width: 100%;
        min-width: 0;
        margin-inline: 0;
    }
    html.tg-off .alist-w-ad { width: 200px; }
    html.tg-off .alist-table th[data-col="title"],
    html.tg-off .alist-table td.alist-ad {
        width: 200px;
        max-width: 200px;
    }
    html.tg-off .alist-table.is-sized th[data-col="title"],
    html.tg-off .alist-table.is-sized td.alist-ad {
        width: auto;
        max-width: none;
    }
    html.tg-off .alist-table.is-sized th[data-col="title"],
    html.tg-off .alist-table.is-sized td.alist-ad {
        width: auto;
        max-width: none;
    }
}

@media (max-width: 767.98px) {
    html.tg-off .tg-off-bar,
    html.tg-off .alist-tools {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
        width: 100%;
    }
    html.tg-off .tg-off-bar { order: 1; }
    html.tg-off .alist-tools { order: 3; }
    html.tg-off .alist-funnel { order: 4; }
    html.tg-off .alist-search {
        flex: 1 1 100%;
        width: 100%;
        max-width: none;
    }
    html.tg-off .tg-off-actions {
        width: 100%;
        margin-inline-start: 0;
    }
    html.tg-off .tg-off-btn { flex: 1 1 auto; }
    html.tg-off .alist-filter,
    html.tg-off .alist-filter--obj {
        flex: 1 1 calc(50% - 8px);
        max-width: none;
    }
    html.tg-off .alist-toolbar .alist-filter-toggle {
        width: 100%;
        max-width: none;
    }
    html.tg-off .dashboard-header { margin-bottom: 0; padding: 8px 0; }
    html.tg-off .dashboard-header-in { flex-wrap: nowrap; }
    html.tg-off .hdr-right {
        flex: none;
        width: auto;
        justify-content: flex-end;
    }
    html.tg-off .brand-name { display: inline; }
    html.tg-off .dash-nav { display: none; }
    html.tg-off .tg-off-only { display: block; }
    html.tg-off .btn-cab-name { max-width: 7rem; }
    html.tg-off .alist-folder-acts {
        opacity: 1;
        pointer-events: auto;
    }
    html.tg-off .alist-table tr.alist-folder td.alist-ad,
    html.tg-off .alist-table tr.alist-folder td.alist-col-check,
    html.tg-off .alist-table tbody tr.alist-folder:hover td.alist-ad,
    html.tg-off .alist-table tbody tr.alist-folder:hover td.alist-col-check {
        background-color: var(--bg-body);
        background-image: none;
    }
    html.tg-off .alist-folder:not(.is-ungrouped) td.alist-ad:first-child,
    html.tg-off .alist-card[data-folder-id]:not([data-folder-id="0"]) td.alist-ad:first-child {
        box-shadow: 6px 0 8px -6px rgba(0, 0, 0, .12);
    }
    html.tg-off .alist-folder.is-drop td.alist-ad,
    html.tg-off .alist-folder.is-drop td.alist-col-check {
        background-color: var(--bg-body);
        background-image: linear-gradient(var(--alist-picked), var(--alist-picked));
    }
}

/* Создание — две колонки, как на широком экране кабинета.
   Узкое окно браузера само складывает их форму, наше окно от этого не сужаем. */
html.tg-off #adCard.is-create .ad-card-dialog { max-width: 900px; }
html.tg-off #adCard.is-create .ad-card-grid {
    display: grid;
    grid-template-columns: var(--ad-col-form) var(--ad-col-preview);
    column-gap: 66px;
    max-width: none;
}
html.tg-off #adCard.is-create .ad-card-col { display: block; }
html.tg-off #adCard.is-create .ad-card-create-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 19px;
}
html.tg-off #adCard.is-create .ad-card-box {
    min-height: 40px;
    background: var(--bg-card);
    box-shadow: inset 0 0 0 1px var(--off-ring);
}
html.tg-off #adCard.is-create .ad-card-box:focus {
    box-shadow: inset 0 0 0 1px var(--off-btn);
}
html.tg-off #adCard.is-create .ad-card-pill {
    min-height: 40px;
    background: var(--bg-card);
    box-shadow: inset 0 0 0 1px var(--off-ring);
}
html.tg-off #adCard.is-create .ad-card-pill.is-on,
html.tg-off #adCard.is-create .ad-card-upload {
    background: var(--off-btn);
    color: #fff;
    box-shadow: none;
}
html.tg-off #adCard.is-create .ad-card-upload { border-radius: 6px; }
html.tg-off #adCard.is-create .ad-card-type {
    color: var(--off-logo);
    font-weight: 600;
}
html.tg-off #adCard.is-create .ad-card-type.is-on {
    background: var(--off-btn);
    color: #fff;
}
html.tg-off #adCard.is-create .ad-card-link,
html.tg-off #adCard.is-create .ad-card-terms a,
html.tg-off #adCard.is-create .ad-card-add-list { color: var(--off-logo); }
html.tg-off #adCard.is-create .ad-card-add-list {
    font-size: 14px;
    font-weight: 400;
}
html.tg-off #adCard.is-create .ad-card-peers-box {
    min-height: 40px;
    padding: 0 13px;
    background: var(--bg-card);
    box-shadow: inset 0 0 0 1px var(--off-ring);
}
html.tg-off #adCard.is-create .ad-card-chip-in {
    height: 38px;
    margin: 0;
    padding: 0;
    font-size: 14px;
    font-weight: 400;
    line-height: 38px;
    color: var(--text-primary);
}
html.tg-off #adCard.is-create .ad-card-chip-in::placeholder {
    color: #999;
    opacity: 1;
}
html.tg-off #adCard.is-create .ad-card-notes {
    margin-top: 16px;
    font-size: 13px;
    line-height: 16px;
}
html.tg-off #adCard.is-create .ad-card-notes li {
    position: relative;
    display: block;
    margin: 0;
    padding: 4px 0 4px 30px;
    line-height: 18px;
    color: var(--text-primary) !important;
}
html.tg-off #adCard.is-create .ad-card-notes i { display: none; }
html.tg-off #adCard.is-create .ad-card-notes li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 5px;
    width: 16px;
    height: 16px;
    background: center / 16px 16px no-repeat;
}
html.tg-off #adCard.is-create .ad-card-notes .is-out::before {
    background-image: url("data:image/svg+xml,%3Csvg%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20width%3D%2216%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Ccircle%20cx%3D%228%22%20cy%3D%228%22%20fill%3D%22%23d64d4d%22%20r%3D%228%22%2F%3E%3Crect%20fill%3D%22%23fff%22%20height%3D%221.8%22%20rx%3D%22.9%22%20width%3D%229%22%20x%3D%223.5%22%20y%3D%227.1%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
}
html.tg-off #adCard.is-create .ad-card-notes .is-in::before {
    background-image: url("data:image/svg+xml,%3Csvg%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20width%3D%2216%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Ccircle%20cx%3D%228%22%20cy%3D%228%22%20fill%3D%22%2331b545%22%20r%3D%228%22%2F%3E%3Cpath%20d%3D%22M7.1%203.5h1.8v3.6h3.6v1.8H8.9v3.6H7.1V8.9H3.5V7.1h3.6z%22%20fill%3D%22%23fff%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
}
html.tg-off #adCard.is-create .ad-card-notes li:not(.is-in):not(.is-out)::before {
    background-image: url("data:image/svg+xml,%3Csvg%20height%3D%2216%22%20viewBox%3D%220%200%2016%2016%22%20width%3D%2216%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cg%20fill%3D%22none%22%20fill-rule%3D%22evenodd%22%3E%3Ccircle%20cx%3D%228%22%20cy%3D%228%22%20fill%3D%22%23ee9939%22%20r%3D%228%22%2F%3E%3Cpath%20d%3D%22m8%2012.73c.62%200%201.13-.51%201.13-1.13s-.51-1.13-1.13-1.13-1.12.51-1.12%201.13.5%201.13%201.12%201.13zm0-9.23c.5%200%20.9.4.9.9v4.5c0%20.5-.4.9-.9.9s-.9-.4-.9-.9v-4.5c0-.5.4-.9.9-.9z%22%20fill%3D%22%23fff%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
}
