/* Аудит экранов 22.11.2026, часть B: аналитика, админка, ключи API, журнал, счёт, выбор файла.
   Подключается в _Layout.cshtml после v2.css. */

/* 41: карточки настроек не слипаются */
.panel + .panel { margin-top: 16px; }
/* в сетках отступ даёт gap */
:where(.users, .work-cols, .an-stack, .notify-grid, .plan-grid, .ads-lead-grid, .form-grid, .grid-form, .stats, .posts) > .panel + .panel { margin-top: 0; }

/* 26: таблицы с прокруткой вбок и подсказкой на телефоне */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.scroll-hint { display: none; margin: 0 0 6px; }
@media (max-width: 760px) {
    .scroll-hint { display: block; }
    .table-scroll {
        background:
            linear-gradient(to right, var(--panel) 30%, transparent) left / 24px 100% no-repeat local,
            linear-gradient(to left, var(--panel) 30%, transparent) right / 24px 100% no-repeat local,
            linear-gradient(to right, rgba(0,0,0,.12), transparent) left / 10px 100% no-repeat scroll,
            linear-gradient(to left, rgba(0,0,0,.12), transparent) right / 10px 100% no-repeat scroll;
    }
}

/* 28: аналитика, рубрики и виды одной колонкой, приёмы другой */
.an-cols { align-items: start; }
.an-stack { display: grid; gap: 16px; align-content: start; min-width: 0; }

/* 39: страницы в «Биллинге» и «Пользователях» */
.pager { display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap; margin: 16px 0 24px; }

/* 42: «Сайт и реклама» */
.stats.stats-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.leads-table .lead-page { max-width: 220px; overflow-wrap: break-word; word-break: normal; }
@media (max-width: 760px) { .stats.stats-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 43: выбор файла по-русски вместо «Choose File» */
.file-pick { position: relative; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 6px; font-weight: 400; }
.file-pick input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.file-pick .file-btn { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 14px; border: 1px solid var(--accent); border-radius: 10px;
    color: var(--accent); font-size: 14px; font-weight: 700; cursor: pointer; background: var(--panel); }
.file-pick:hover .file-btn, .file-pick input:focus-visible + .file-btn { background: var(--soft); }
.file-pick input:focus-visible + .file-btn { outline: 2px solid var(--accent); outline-offset: 2px; }
.file-pick small { overflow-wrap: anywhere; }

/* 38, 40: ключи API и журнал на телефоне карточками, кнопка «Отозвать» и действие не уходят за экран */
@media (max-width: 600px) {
    table.keys-table, table.keys-table tbody, table.journal-table, table.journal-table tbody { display: block; }
    table.keys-table tr:first-child, table.journal-table tr:first-child { display: none; }
    table.keys-table tr, table.journal-table tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
    table.keys-table td, table.journal-table td { border: 0; padding: 0; }
    table.keys-table td[data-l] { grid-column: 1 / -1; color: var(--muted); font-size: 14px; }
    table.keys-table td[data-l]::before { content: attr(data-l) ": "; }
    table.keys-table td:last-child { grid-column: 1 / -1; }
    table.keys-table td:last-child button { width: 100%; margin-top: 6px; }
    table.journal-table td:first-child { grid-column: 1 / -1; color: var(--muted); font-size: 13px; white-space: normal !important; }
    table.journal-table td.j-action { grid-column: 1 / -1; font-weight: 600; }
    table.journal-table td:nth-child(4), table.journal-table td:nth-child(5) { font-size: 14px; color: var(--muted); }
}
