/* Дополнения к теме (assets/theme/style.css) */
body, .heading-font-family, h1, h2, h3, h4, h5, h6 { font-family: Montserrat, "Segoe UI", system-ui, -apple-system, sans-serif; }
.mono, pre, code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; }

/* Шапка */
.navbar-brand p { margin: 0; color: #2b3a4a; font-weight: 600; font-size: 20px; letter-spacing: .02em; }
.navbar-form { margin: 0; height: 100%; display: flex; align-items: center; }
.navbar .navbar-link { display: flex; align-items: center; gap: 8px; height: 100%; padding: 0 20px;
    background: none; border: 0; color: #fff; font: inherit; font-size: 14px; cursor: pointer; text-decoration: none; }
.navbar .navbar-link:hover { opacity: .8; }

/* Боковое меню: длинные пункты переносятся аккуратно */
.sidebar-expand .site-sidebar .side-menu > li > a { display: flex; align-items: center; line-height: 1.35; padding-top: 14px; padding-bottom: 14px; height: auto; }
.site-sidebar .side-menu > li > a .list-icon { flex: none; }
.domains-table .btn-sm { padding: 3px 12px; line-height: 1.4; }

/* Страницы без бокового меню (гость) */
.no-sidebar .main-wrapper { margin-left: 0; }

/* Вход */
.login-page { background: #f2f4f8; }
.login-brand { font-size: 28px; font-weight: 600; color: inherit; text-decoration: none; }

/* Таблица доменов */
.filter { margin-bottom: 20px; row-gap: 10px; }
.domains-table th, .domains-table td { white-space: nowrap; vertical-align: middle; }
.domains-table td.domain { font-weight: 500; }
.price { width: 1%; text-align: right; }

/* Сводка */
.summary { display: flex; flex-wrap: wrap; gap: 48px; }
.summary-label { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: #8d9ea7; }
.summary-value { display: block; font-size: 26px; font-weight: 600; line-height: 1.3; }

/* Проверка домена */
.check-form { max-width: 560px; }
.check-result { display: flex; align-items: flex-start; gap: 12px; font-size: 16px; }
.check-result .feather { font-size: 22px; line-height: 1.2; }

/* Документация */
.docs { max-width: 820px; }
.docs h2 { font-size: 20px; margin: 32px 0 10px; padding-top: 22px; border-top: 1px solid #e4e9f0; }
.docs h2:first-of-type { margin-top: 20px; }
.docs h3 { font-size: 13px; margin: 18px 0 6px; text-transform: uppercase; letter-spacing: .04em; color: #8d9ea7; }
.docs pre { margin: 8px 0 14px; padding: 12px 14px; overflow-x: auto; background: #f5f7fa; border: 1px solid #e4e9f0; border-radius: 4px; color: #2b3a4a; }
.docs code { padding: 1px 5px; background: #f0f3f7; border-radius: 3px; color: #c7254e; }
.docs .endpoint { margin: 12px 0; }
.docs .endpoint code { font-size: 15px; background: none; padding: 0; color: inherit; }
.docs .method { margin-right: 8px; padding: 5px 10px; font-size: 12px; vertical-align: middle; }

/* Модальные окна */
.modal.show { display: block; overflow-y: auto; }
.modal-body p { overflow-wrap: anywhere; }

/* Боковое меню на телефоне: открывается кнопкой в шапке */
@media (max-width: 960px) {
    .sidebar-mobile-open .site-sidebar { display: block; z-index: 1000; left: 0; top: 0; width: 18em; min-height: calc(100vh - 5rem);
        background: #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, .2); }
    .site-sidebar .side-menu > li > a { display: flex; align-items: center; line-height: 1.35; padding-top: 14px; padding-bottom: 14px; }
    .site-sidebar .side-menu .hide-menu { display: inline; }
}

/* Бренды */
.brands-table .flag-col { width: 1%; white-space: nowrap; text-align: center; }
.brands-table .action-col { width: 1%; white-space: nowrap; text-align: right; }
.brands-table .brand-flag { width: 18px; height: 18px; margin: 0; vertical-align: middle; cursor: pointer; accent-color: #7b55e6; }
.brands-table .brand-flag:disabled { cursor: progress; opacity: .6; }
.brands-table td { vertical-align: middle; }
.brands-table td.brand-name { font-weight: 500; overflow-wrap: anywhere; }
.brands-table .btn-sm { padding: 3px 12px; line-height: 1.4; }
.widget-heading .widget-actions .btn .feather { margin-right: 4px; }
.site-sidebar .side-menu > li > a.menu-strong .hide-menu { font-weight: 700; }

/* Яндекс боты */
.domains-table td.bots-cell { width: 1%; }
.domains-table .btn[disabled] { opacity: .45; cursor: not-allowed; }
.period-switch { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 20px; }
.bots-summary { margin-bottom: 20px; }
.bots-table th, .bots-table td { white-space: nowrap; vertical-align: middle; }
.bots-table td.host { font-weight: 500; }
.bots-table td.path { max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
.bots-table td.mono { font-family: SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
.badge-index-none { background: #eceff1; color: #8d9ea7; }
.domains-table .index-col { width: 1%; padding-right: 28px; }
/* Кнопка «Ключевые запросы»: место под счётчик есть всегда, поэтому все кнопки одной ширины */
.brands-table .kw-btn { display: inline-flex; align-items: center; }
.brands-table .kw-count { width: 34px; margin-left: 6px; padding-left: 0; padding-right: 0; text-align: center; }
.brands-table .kw-count-empty { visibility: hidden; }

/* Мониторинг брендов: вкладки-бренды */
/* Вкладки брендов — компактные, чтобы 20 брендов помещались в одну строку на обычном экране.
   Если места всё же не хватает (узкое окно, больше брендов), вкладки переносятся на вторую
   строку — так названия остаются читаемыми, а не обрезаются. */
.monitoring-tabs { flex-wrap: wrap; margin-bottom: 0; }
.monitoring-tabs .nav-link { padding: 7px 8px; font-size: 13px; white-space: nowrap; }
.monitoring-pane { padding-top: 20px; }
.monitoring-tabs .nav-link.active { color: #7b55e6; font-weight: 600; box-shadow: inset 0 -2px 0 #7b55e6; }
.monitoring-toolbar { display: flex; justify-content: flex-end; margin-bottom: 16px; }
.monitoring-toolbar .btn .feather { margin-right: 6px; }
/* Подвкладки — ключевые запросы выбранного бренда */
.monitoring-subtabs { flex-wrap: wrap; gap: 6px; margin-bottom: 0; }
.monitoring-subtabs .nav-link { padding: 5px 14px; border-radius: 20px; font-size: 13px; line-height: 1.5; background: #f1f3f6; color: #5a6b78; white-space: nowrap; }
.monitoring-subtabs .nav-link:hover { background: #e6e9ee; color: #2b3a4a; }
.monitoring-subtabs .nav-link.active { background: #7b55e6; color: #fff; }
.monitoring-subpane { padding-top: 20px; }
/* Вкладки часов («1 час» … «12 часов»): всегда в одну строку, на узком экране — прокрутка вбок */
.monitoring-hours-wrap { overflow-x: auto; }
.monitoring-hours { flex-wrap: nowrap; gap: 2px; margin-bottom: 0; border-bottom: 1px solid #e4e9f0; }
.monitoring-hours .nav-item { flex: 1 0 auto; }
.monitoring-hours .nav-link { padding: 6px 8px; text-align: center; font-size: 13px; color: #5a6b78; white-space: nowrap; border-radius: 4px 4px 0 0; }
.monitoring-hours .nav-link:hover { background: #f1f3f6; color: #2b3a4a; }
.monitoring-hours .nav-link.active { color: #7b55e6; font-weight: 600; box-shadow: inset 0 -2px 0 #7b55e6; }
.monitoring-hourpane { padding-top: 20px; }
/* «Топ 10 доменов по бренду» — не запрос, поэтому слегка отделена от подвкладок-запросов */
.monitoring-subtabs .monitoring-top-tab { background: #fff; box-shadow: inset 0 0 0 1px #d5dae2; }
.monitoring-subtabs .monitoring-top-tab.active { box-shadow: none; }

/* Таблицы снимков выдачи */
.monitoring-hours .nav-link.is-empty { color: #b3bdc6; }
.monitoring-hours .nav-link.is-empty.active { color: #7b55e6; }
.serp-table { margin-bottom: 0; }
.serp-table th, .serp-table td { white-space: nowrap; vertical-align: middle; }
.serp-table td.domain { font-weight: 500; }
.serp-table td.url { max-width: 520px; overflow: hidden; text-overflow: ellipsis; }
.serp-table .num { width: 1%; text-align: right; }
/* Вторая строка в ячейке: дата регистрации под доменом, адрес под заголовком страницы */
.serp-table .cell-sub { display: block; margin-top: 2px; font-size: 12px; font-weight: 400; line-height: 1.35; color: #8d9ea7; overflow: hidden; text-overflow: ellipsis; }
.serp-table .serp-title { display: block; overflow: hidden; text-overflow: ellipsis; color: #2b3a4a; }
.serp-table td.url .cell-sub a { color: inherit; }
.serp-table td.url .cell-sub a:hover { color: #7b55e6; }

/* Раздел «Проверка по РКН» */
.rkn-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.rkn-filter .nav-link { padding: 7px 14px; font-size: 13px; }
.rkn-filter .rkn-count { margin-left: 4px; opacity: .7; }
.rkn-search { display: flex; gap: 8px; }
.rkn-search .form-control { width: 240px; height: 36px; }
.rkn-search .btn { height: 36px; padding: 0 16px; line-height: 34px; }
.rkn-table { margin-bottom: 0; }
.rkn-table th, .rkn-table td { white-space: nowrap; vertical-align: middle; }
.rkn-table td.domain { font-weight: 500; }
.rkn-table .rkn-date { font-weight: 600; color: #d9534f; }

/* Логи сервера */
.logs-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 20px; }
.logs-filter select { width: auto; min-width: 260px; max-width: 100%; }
.logs-filter select.logs-status { min-width: 130px; }
.logs-total { margin-bottom: 14px; }
.logs-total .logs-range { margin-left: 14px; }
.logs-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 16px; }
.logs-scroll .table { margin-bottom: 0; }
.logs-table { font-size: 13px; }
.logs-table td.clip { max-width: 200px; overflow: hidden; text-overflow: ellipsis; }
.logs-table td.agent { max-width: 300px; }

/* Аналитика */
.analytics-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.zones-table { margin-bottom: 0; }
.zones-table th, .zones-table td { white-space: nowrap; vertical-align: middle; padding-top: 8px; padding-bottom: 8px; }
.zones-table .num { width: 1%; text-align: right; }
.zones-table td.zone { width: 1%; font-weight: 500; padding-right: 32px; }
.zones-table td.share { font-weight: 600; }
.zones-table .bar-col { width: auto; min-width: 120px; }
.zone-bar { display: block; height: 8px; min-width: 2px; border-radius: 4px; background: #7b55e6; }
