*, *::before, *::after { box-sizing: border-box; }
body { font-family: -apple-system, Segoe UI, Arial, sans-serif; margin: 0; background: #f5f6f8; color: #1a1a1a; }
header.topnav { background: #1f2937; padding: 12px 20px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
header.topnav a { color: #e5e7eb; text-decoration: none; font-size: 14px; padding: 6px 10px; border-radius: 6px; white-space: nowrap; }
header.topnav a:hover, header.topnav a.active { background: #374151; color: #fff; }
header.topnav .brand { display: flex; align-items: center; gap: 9px; color: #fff; font-weight: 600; margin-right: 12px; padding: 6px 8px 6px 4px; }
.brand-logo-icon { width: 28px; height: 28px; flex: 0 0 auto; }
.brand-logo-text { font-size: 15px; letter-spacing: .2px; white-space: nowrap; }
main { max-width: 1100px; margin: 24px auto; padding: 0 16px; }
.card { background: #fff; border: 1px solid #e2e5ea; border-radius: 10px; padding: 18px 20px; margin-bottom: 20px; overflow-x: auto; }
.card h2 { margin-top: 0; font-size: 16px; color: #374151; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
table th, table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #eef0f3; vertical-align: middle; }
table th { color: #6b7280; font-weight: 600; font-size: 12px; text-transform: uppercase; }
input[type=text], input[type=number], input[type=password], input[type=date], select, textarea { max-width: 100%; padding: 6px 8px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 14px; }
button, input[type=submit] { background: #059669; color: #fff; border: none; padding: 7px 14px; border-radius: 6px; cursor: pointer; font-size: 14px; }
button:hover, input[type=submit]:hover { background: #047857; }
button.secondary { background: #6b7280; }
button.secondary:hover { background: #4b5563; }
button.danger { background: #dc2626; }
button.danger:hover { background: #b91c1c; }
.flash-ok { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; }
.flash-err { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; white-space: pre-wrap; }
.inline-form { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.muted { color: #9ca3af; font-size: 13px; }

/* Мобильная адаптация */
@media (max-width: 720px) {
    header.topnav { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 10px 12px; gap: 8px; }
    header.topnav a { flex: 0 0 auto; }
    header.topnav .brand { flex: 0 0 auto; margin-right: 6px; padding: 4px; }
    .brand-logo-icon { width: 24px; height: 24px; }
    .brand-logo-text { font-size: 14px; }
    main { padding: 0 10px; margin: 14px auto; }
    .card { padding: 14px; margin-bottom: 14px; }
    table th, table td { padding: 7px 8px; font-size: 13px; }
    h1 { font-size: 20px; }
    .login-logo-icon { width: 56px; height: 56px; }
    .login-logo span { font-size: 19px; }
}

@media (max-width: 420px) {
    .brand-logo-text { display: none; }
}

/* ============================================================
   Утилиты (замена точечных inline style="..." по всей панели)
   ============================================================ */
.mt-6 { margin-top: 6px; }
.mt-8 { margin-top: 8px; }
.mt-10 { margin-top: 10px; }
.mt-12 { margin-top: 12px; }
.mt-14 { margin-top: 14px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-neg-6 { margin-top: -6px; }
.mb-0 { margin-bottom: 0; }
.mb-6 { margin-bottom: 6px; }
.mb-8 { margin-bottom: 8px; }
.mb-10 { margin-bottom: 10px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.m-0 { margin: 0; }
.m-h3-spacing { margin: 16px 0 6px; }
.ml-auto { margin-left: auto; }
.hint-tight { margin: 0 0 8px; }

.flex-1 { flex: 1; }
.self-end { align-self: flex-end; }
.flex-gap-10 { display: flex; gap: 10px; }
.flex-wrap { flex-wrap: wrap; }
.tab-row { display: flex; gap: 8px; margin-bottom: 14px; }
.checkbox-label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.actions-row { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }

.input-full { width: 100%; box-sizing: border-box; }
.textarea-mono { width: 100%; box-sizing: border-box; font-family: Consolas, Menlo, monospace; font-size: 13px; }
.max-w-60pct-right { max-width: 60%; text-align: right; }
.code-block { background: #f5f6f8; padding: 12px; border-radius: 8px; overflow-x: auto; }

.w-80 { width: 80px; }
.w-120 { width: 120px; }
.w-140 { width: 140px; }
.w-160 { width: 160px; }
.max-w-160 { max-width: 160px; }
.w-170 { width: 170px; }
.w-180 { width: 180px; }
.w-200 { width: 200px; }
.w-220 { width: 220px; }
.w-240 { width: 240px; }
.w-260 { width: 260px; }
.w-280 { width: 280px; }
.w-320 { width: 320px; }
.max-w-320 { max-width: 320px; }
.w-340 { width: 340px; }

.col-5 { width: 5%; }
.col-6 { width: 6%; }
.col-8 { width: 8%; }
.col-10 { width: 10%; }
.col-11 { width: 11%; }
.col-14 { width: 14%; }
.col-16 { width: 16%; }
.col-38 { width: 38%; }
.col-40 { width: 40%; }
.col-52 { width: 52%; }

/* Общее поле формы (.field) — proxy.php, maintenance.php, schedule.php,
   join_queue.php (везде, где .field — вертикальный отступ 16px; страницы
   с другими значениями переопределяют ниже в своих разделах). */
body.page-proxy .field, body.page-maintenance .field, body.page-schedule .field, body.page-join-queue .field { margin-bottom: 16px; }
body.page-proxy .field label, body.page-maintenance .field label, body.page-schedule .field label { display: block; font-size: 13px; color: #6b7280; margin-bottom: 5px; }

/* Диагностика — общее (.diag-line используется в maintenance.php и diagnostics.php) */
.diag-line { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 1px solid #f3f4f6; font-size: 14px; }
.diag-line .val-bad { color: #dc2626; font-weight: 600; }
.diag-line .val-ok { color: #059669; font-weight: 600; }

/* ============================================================
   Главная (index.php)
   ============================================================ */
.bot-cmd-table code { background: #f1f5f9; color: #1d4ed8; padding: 2px 7px; border-radius: 5px; font-size: 13px; white-space: nowrap; }
.bot-cmd-table td.cmd-desc { color: #374151; }
.bot-cmd-group th { padding-top: 18px; }
.bot-access-note { display: flex; gap: 10px; align-items: flex-start; background: #fff7ed; border: 1px solid #fdba74; border-radius: 8px; padding: 12px 14px; margin-bottom: 18px; font-size: 14px; color: #7c2d12; }
.bot-access-note span.ico { font-size: 18px; line-height: 1; }

/* ============================================================
   Вход (login.php) — две отдельные страницы: настройка входа и форма входа
   ============================================================ */
body.page-login-setup main { max-width: 640px; margin: 60px auto; }
body.page-login main { max-width: 380px; margin: 80px auto; }
body.page-login h1 { text-align: center; margin-top: 0; }
.login-logo { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 24px; }
.login-logo-icon { width: 72px; height: 72px; }
.login-logo span { font-size: 22px; font-weight: 700; color: #1f2937; letter-spacing: .2px; }

/* ============================================================
   Сводка дня (dashboard.php)
   ============================================================ */
.cat-line { display: flex; justify-content: space-between; padding: 4px 0; border-bottom: 1px solid #f3f4f6; font-size: 14px; }
.chat-item { padding: 6px 0; border-bottom: 1px solid #f3f4f6; font-size: 13px; }
.chat-item .name { font-weight: 600; }
.chat-item .meta { color: #9ca3af; }
.big-number { font-size: 28px; font-weight: 700; }
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 6px; }
.stat-card { background: #f9fafb; border-radius: 8px; padding: 12px 14px; }
.stat-card .label { font-size: 12px; color: #6b7280; text-transform: uppercase; }
.pct-inline { font-size: 16px; color: #6b7280; }

/* ============================================================
   Настройки ИИ (ai_settings.php)
   ============================================================ */
textarea.prompt { width: 100%; min-height: 320px; font-family: ui-monospace, Consolas, monospace; font-size: 13px; box-sizing: border-box; }
.apikey-row { display: flex; gap: 8px; align-items: center; }
body.page-ai-settings .field { margin-bottom: 12px; }
body.page-ai-settings .field label { display: block; font-size: 13px; color: #6b7280; margin-bottom: 4px; }
body.page-ai-settings .field input[type=text] { width: 100%; box-sizing: border-box; }

/* ============================================================
   Пользователи бота (bot_users.php) — использует только утилиты выше
   ============================================================ */

/* ============================================================
   Категории (categories.php) — использует только утилиты выше
   ============================================================ */

/* ============================================================
   Вступление в чаты (join_queue.php)
   ============================================================ */
body.page-join-queue .field label { display: block; margin-bottom: 6px; font-size: 13px; color: #6b7280; font-weight: 600; }
textarea.wide { width: 100%; min-height: 160px; padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 13px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; resize: vertical; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 4px; }
@media (max-width: 640px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
.stat-tile { border: 1px solid #eef0f3; border-radius: 10px; padding: 14px; text-align: center; }
.stat-tile .stat-icon { font-size: 20px; }
.stat-tile .stat-value { font-size: 24px; font-weight: 700; color: #1f2937; margin: 4px 0 2px; }
.stat-tile .stat-label { font-size: 12px; color: #6b7280; }
.pause-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; }
.pause-banner.on { background: #fffaf0; border: 1px solid #fde68a; color: #92400e; }
.pause-banner.off { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.jq-feed { display: flex; flex-direction: column; gap: 8px; }
.jq-entry { border: 1px solid #eef0f3; border-radius: 8px; padding: 8px 12px; border-left-width: 4px; border-left-style: solid; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.jq-entry.st-pending { border-left-color: #6b7280; }
.jq-entry.st-joined { border-left-color: #059669; background: #f7fdfa; }
.jq-entry.st-failed { border-left-color: #dc2626; background: #fef6f6; }
.jq-entry.st-skipped { border-left-color: #d97706; background: #fffaf0; }
.jq-id { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 600; }
.jq-detail { color: #6b7280; }
.jq-time { color: #9ca3af; font-size: 12px; white-space: nowrap; }

/* ============================================================
   Логи (logs.php)
   ============================================================ */
.log-feed { display: flex; flex-direction: column; gap: 10px; }
.log-entry { border: 1px solid #eef0f3; border-radius: 8px; padding: 10px 12px; border-left-width: 4px; border-left-style: solid; }
.log-entry.lvl-critical { border-left-color: #dc2626; background: #fef6f6; }
.log-entry.lvl-warning { border-left-color: #d97706; background: #fffaf0; }
.log-entry.lvl-info { border-left-color: #6b7280; background: #fafafa; }
.log-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.log-badge { font-weight: 600; font-size: 13px; }
.log-time { font-size: 12px; color: #898781; white-space: nowrap; }
.log-msg { font-size: 13px; color: #374151; line-height: 1.5; }
.log-undelivered { display: inline-block; margin-left: 8px; font-size: 11px; color: #dc2626; font-weight: 600; }
.conn-entry { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid #f3f4f6; font-size: 13px; gap: 10px; flex-wrap: wrap; }
.conn-entry:last-child { border-bottom: none; }
.conn-left { display: flex; align-items: center; gap: 8px; }
.conn-detail { color: #9ca3af; font-size: 12px; }

/* ============================================================
   Редактор ключевых слов (keywords.php)
   ============================================================ */
#kwTable { table-layout: fixed; min-width: 480px; }
#kwTable input[type=text] { width: 100%; box-sizing: border-box; }
#kwTable td { padding: 8px 10px; }
.row-del { color: #dc2626; cursor: pointer; font-size: 13px; white-space: nowrap; }
.toolbar-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.toolbar-divider { border: none; border-top: 1px solid #eef0f3; margin: 16px 0; }
.field-label { font-size: 13px; color: #6b7280; }

/* ============================================================
   Лента сообщений (messages.php)
   ============================================================ */
.feed-table { width: 100%; min-width: 760px; table-layout: fixed; font-size: 13px; }
.feed-table td, .feed-table th { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-table td.msg-text { white-space: normal; }
.feed-table a { color: inherit; text-decoration: underline; }
.stats-line { display: flex; gap: 24px; font-size: 13px; flex-wrap: wrap; align-items: center; }
.stats-line b { font-weight: 600; }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #d1d5db; }
.live-dot-on { background: #dc2626; box-shadow: 0 0 0 rgba(220, 38, 38, .6); animation: kibermon-live-pulse 1.6s infinite; }
@keyframes kibermon-live-pulse {
    0% { box-shadow: 0 0 0 0 rgba(220, 38, 38, .6); }
    70% { box-shadow: 0 0 0 6px rgba(220, 38, 38, 0); }
    100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}
.msg-viz-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 20px; }
.msg-viz-card h2 { font-size: 14px; margin-bottom: 12px; }
.msg-viz-card .muted { font-weight: 400; font-size: 12px; }
.chart-empty-msg { font-size: 12px; }
.mini-breakdown-table { width: 100%; font-size: 12px; border-collapse: collapse; }
.mini-breakdown-table td { padding: 4px 0; vertical-align: middle; }
.mini-breakdown-name { max-width: 0; width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 8px; }
.mini-breakdown-count { width: 28px; text-align: right; font-weight: 600; padding-right: 8px; }
.mini-breakdown-bar { width: auto; }
.msg-new { animation: kibermon-row-highlight 2.5s ease-out; }
@keyframes kibermon-row-highlight {
    0% { background: #fef3c7; }
    100% { background: transparent; }
}
@media (max-width: 900px) {
    .msg-viz-row { grid-template-columns: 1fr; }
}

/* ============================================================
   Прокси (proxy.php)
   ============================================================ */
body.page-proxy .field input[type=text], body.page-proxy .field input[type=password] { width: 100%; box-sizing: border-box; }
.field-checkbox label { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #1a1a1a; font-weight: 600; }
body.page-proxy .fields-row { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 4px; }
body.page-proxy .fields-row .field { margin-bottom: 16px; }
body.page-proxy .card form > button { margin-top: 4px; }

/* ============================================================
   Платформы (platforms.php) — .tab-row общий с ai_settings.php (см. утилиты)
   ============================================================ */

/* ============================================================
   Обслуживание (maintenance.php)
   ============================================================ */
body.page-maintenance .field input[type=text] { width: 100%; box-sizing: border-box; }
body.page-maintenance .fields-row { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 4px; }
body.page-maintenance .fields-row .field { margin-bottom: 16px; }
body.page-maintenance .card p.muted { margin-top: 0; }
.chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.chart-panel h3 { margin: 0 0 6px; font-size: 13px; font-weight: 600; color: #374151; }
.chart-panel svg { display: block; }
@media (max-width: 800px) { .chart-grid { grid-template-columns: 1fr; } }

/* ============================================================
   Диагностика ИИ (diagnostics.php)
   ============================================================ */
.badge-ok { background: #ecfdf5; color: #065f46; padding: 3px 10px; border-radius: 6px; font-weight: 600; }
.badge-bad { background: #fef2f2; color: #991b1b; padding: 3px 10px; border-radius: 6px; font-weight: 600; }

/* ============================================================
   Глобальные уведомления (notifications.php) — использует только утилиты выше
   ============================================================ */
.manual-add-block { margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid #eef0f3; }

/* ============================================================
   Расписание отчётов (schedule.php)
   ============================================================ */
body.page-schedule .field input[type=text], body.page-schedule .field select { width: 100%; box-sizing: border-box; }
body.page-schedule .fields-row { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 8px; }
body.page-schedule .fields-row .field { margin-bottom: 0; }
body.page-hourly-reports .fields-row { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 8px; }
body.page-hourly-reports .fields-row .field { margin-bottom: 0; }
.slot-header { display: grid; grid-template-columns: 180px 140px 1fr; gap: 16px; padding: 10px 0 8px; margin-top: 20px; border-bottom: 2px solid #d1d5db; font-size: 12px; color: #6b7280; text-transform: uppercase; letter-spacing: .02em; }
.slot-row { display: grid; grid-template-columns: 180px 140px 1fr; gap: 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid #eef0f3; }
.slot-row label.chk { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.slot-row input[type=text] { width: 100%; box-sizing: border-box; }
body.page-schedule .card form > button { margin-top: 20px; }
.slot-caption { display: none; font-size: 12px; color: #6b7280; }
@media (max-width: 640px) {
    .slot-header { display: none; }
    .slot-row { grid-template-columns: 1fr; gap: 6px; padding: 14px 0; }
    .slot-row input[type=text] { max-width: 100%; }
    .slot-caption { display: block; margin-top: 4px; }
}

/* ============================================================
   Аналитика (analytics.php)
   ============================================================ */
body.page-analytics .field { margin-bottom: 0; }
body.page-analytics .field label { display: block; font-size: 12px; color: #6b7280; margin-bottom: 4px; }
.charts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.chart-card { border: 1px solid #eef0f3; border-radius: 8px; padding: 12px; }
.chart-card h4 { margin: 0 0 6px; font-size: 13px; }
.chart-card .muted-total { font-size: 11px; color: #9ca3af; }
details.dead-keywords summary { cursor: pointer; color: #6b7280; font-size: 13px; margin-top: 10px; }
.arrow-up { color: #16a34a; }
.arrow-down { color: #dc2626; }
.arrow-flat { color: #9ca3af; }
.pct-bar-wrap { display: flex; align-items: center; gap: 8px; }
.pct-bar-track { flex: 1; background: #eef0f3; border-radius: 4px; height: 8px; overflow: hidden; }
.pct-bar-fill { height: 100%; }
.pct-bar-label { font-size: 12px; width: 36px; text-align: right; }

/* ============================================================
   Архив отчётов (reports_archive.php)
   ============================================================ */
.month-switch { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.month-switch .month-label { font-size: 17px; font-weight: 600; color: #1f2937; min-width: 160px; text-align: center; }
.month-switch a.nav-arrow { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 8px; background: #fff; border: 1px solid #d1d5db; color: #374151; text-decoration: none; font-size: 16px; }
.month-switch a.nav-arrow:hover { background: #f3f4f6; }
.month-switch form { margin-left: auto; }
.panels { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 900px) { .panels { grid-template-columns: 1fr; } }
.report-list { display: flex; flex-direction: column; gap: 10px; }
.report-card { border: 1px solid #eef0f3; border-radius: 8px; padding: 12px 14px; border-left-width: 4px; border-left-style: solid; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.report-card.daily { border-left-color: #2563eb; background: #f7f9ff; }
.report-card.big { border-left-color: #7c3aed; background: #faf7ff; }
.report-meta { font-size: 13px; color: #374151; line-height: 1.6; }
.report-meta .period { font-weight: 600; color: #1f2937; font-size: 14px; }
.report-meta .sub { color: #6b7280; }
.report-open { flex: 0 0 auto; text-decoration: none; font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 6px; white-space: nowrap; }
.report-card.daily .report-open { background: #2563eb; color: #fff; }
.report-card.daily .report-open:hover { background: #1d4ed8; }
.report-card.big .report-open { background: #7c3aed; color: #fff; }
.report-card.big .report-open:hover { background: #6d28d9; }
.panel-title { display: flex; align-items: center; gap: 8px; }
.panel-count { font-weight: 400; color: #9ca3af; font-size: 13px; }

/* ============================================================
   Просмотр отчёта (report_view.php) — отдельная страница, без общей шапки/nav
   ============================================================ */
body.page-report-view { font-family: -apple-system, Segoe UI, Arial, sans-serif; background: #f5f6f8; color: #1a1a1a; margin: 0; padding: 32px 16px; }
body.page-report-view .doc-wrap { max-width: 820px; margin: 0 auto; }
body.page-report-view .doc-card { background: #fff; border: 1px solid #e2e5ea; border-radius: 12px; padding: 32px 36px; box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
body.page-report-view .doc-header { border-bottom: 2px solid #eef0f3; padding-bottom: 18px; margin-bottom: 24px; }
body.page-report-view .doc-header h1 { font-size: 22px; margin: 0 0 12px; color: #111827; }
body.page-report-view .doc-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 13px; color: #6b7280; }
body.page-report-view .doc-meta b { color: #374151; font-weight: 600; }
body.page-report-view .report-doc { font-size: 15px; line-height: 1.7; color: #1f2937; }
body.page-report-view .report-doc h1, body.page-report-view .report-doc h2, body.page-report-view .report-doc h3 { color: #111827; margin: 1.4em 0 0.5em; }
body.page-report-view .report-doc h1:first-child, body.page-report-view .report-doc h2:first-child, body.page-report-view .report-doc h3:first-child { margin-top: 0; }
body.page-report-view .report-doc h2 { font-size: 18px; }
body.page-report-view .report-doc h3 { font-size: 16px; }
body.page-report-view .report-doc p { margin: 0 0 14px; }
body.page-report-view .report-doc ul, body.page-report-view .report-doc ol { padding-left: 24px; margin: 0 0 14px; }
body.page-report-view .report-doc li { margin-bottom: 6px; }
body.page-report-view .report-doc blockquote { border-left: 3px solid #2F5DAA; background: #F3F6FB; margin: 14px 0; padding: 10px 18px; font-style: italic; color: #374151; border-radius: 0 6px 6px 0; }
body.page-report-view .report-doc a { color: #2563eb; text-decoration: underline; }
body.page-report-view .report-doc strong, body.page-report-view .report-doc b { color: #111827; }
body.page-report-view .report-doc hr { border: none; border-top: 1px solid #e2e5ea; margin: 22px 0; }
body.page-report-view .report-doc table { border-collapse: collapse; width: 100%; margin-bottom: 14px; }
body.page-report-view .report-doc table td, body.page-report-view .report-doc table th { border: 1px solid #e2e5ea; padding: 6px 10px; font-size: 14px; }
body.page-report-view .flash-err { padding: 14px 18px; }
@media (max-width: 640px) {
    body.page-report-view { padding: 16px 10px; }
    body.page-report-view .doc-card { padding: 20px; }
}
@media print {
    body.page-report-view { background: #fff; padding: 0; }
    body.page-report-view .doc-card { border: none; box-shadow: none; padding: 0; }
}

/* ============================================================
   Общий helper-график (lib/charts.php) — используется maintenance.php и analytics.php
   ============================================================ */
.chart-empty-msg { padding: 24px 0; text-align: center; }

/* ============================================================
   Каналы и чаты (chats_status.php)
   ============================================================ */
.status-badge { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.status-excluded { background: #fef2f2; color: #991b1b; }
.status-included { background: #ecfdf5; color: #065f46; }
