/* ==============================================
   adminis — единый CSS без внешних зависимостей
   ============================================== */

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 14px;
}

body {
    font-family: "Segoe UI", system-ui, sans-serif;
    background-color: #f0f2f5;
    color: #1a1d23;
    line-height: 1.5;
    margin-left: 260px;
    padding-top: 50px;
    min-height: 100vh;
}

a {
    color: #4f6ef7;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

h1, h2, h3 {
    font-weight: 600;
    color: #1a1d23;
    line-height: 1.3;
}

/* --- Sidebar --- */
.app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 100vh;
    background-color: #1e2130;
    display: flex;
    flex-direction: column;
    padding: 1rem;
    z-index: 1030;
    border-right: 1px solid #2d3148;
}

.app-sidebar .sidebar-brand {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    padding: 0.5rem 0.5rem 1rem;
    display: block;
    border-bottom: 1px solid #2d3148;
    margin-bottom: 0.75rem;
    letter-spacing: 0.3px;
}

.app-sidebar .sidebar-brand:hover {
    text-decoration: none;
    color: #a5b4fc;
}

.app-sidebar .nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.app-sidebar .nav-link {
    padding: 0.45rem 0.75rem;
    border-radius: 6px;
    color: #9ca3c4;
    font-size: 13.5px;
    transition: background 0.15s, color 0.15s;
    display: block;
}

.app-sidebar .nav-link:hover {
    background-color: #2d3148;
    color: #e2e8ff;
    text-decoration: none;
}

.app-sidebar .nav-link.active {
    background-color: #4f6ef7;
    color: #fff;
    font-weight: 600;
}

.app-sidebar .sidebar-footer {
    border-top: 1px solid #2d3148;
    padding-top: 0.75rem;
    margin-top: auto;
}

.app-sidebar .sidebar-version {
    font-size: 12px;
    color: #6b7499;
    margin-bottom: 0.5rem;
    padding: 0 0.25rem;
}

/* --- Top Navbar --- */
.top-navbar {
    position: fixed;
    top: 0;
    left: 260px;
    right: 0;
    height: 50px;
    background: #fff;
    border-bottom: 1px solid #e5e7ef;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 1025;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.top-navbar-title {
    color: #1a1d23;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.top-navbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
    overflow: visible;
}

.top-navbar-version {
    color: #6b7499;
    font-size: 12px;
    background: #f0f2f5;
    padding: 3px 10px;
    border-radius: 10px;
}

.top-navbar-logout {
    background: #fff0f0;
    color: #d63031;
    border: 1px solid #ffd6d6;
    padding: 5px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.15s;
}

.top-navbar-logout:hover {
    background: #ffe0e0;
    color: #d63031;
    text-decoration: none;
}

/* --- Layout --- */
.content-wrapper {
    padding: 24px;
    min-height: calc(100vh - 50px);
}

.content-container {
    background: #fff;
    border: 1px solid #e5e7ef;
    border-radius: 10px;
    padding: 28px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

/* --- Кнопки --- */
.btn {
    display: inline-block;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, opacity 0.15s;
    text-decoration: none;
    line-height: 1.5;
}

.btn:hover {
    text-decoration: none;
    opacity: 0.88;
}

.btn-primary {
    background: #4f6ef7;
    color: #fff;
    border-color: #4f6ef7;
}

.btn-outline-success {
    background: transparent;
    color: #16a34a;
    border-color: #16a34a;
}

.btn-outline-success:hover {
    background: #f0fdf4;
    color: #16a34a;
}

.btn-outline-danger {
    background: transparent;
    color: #d63031;
    border-color: #d63031;
}

.btn-outline-danger:hover {
    background: #fff0f0;
    color: #d63031;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 12px;
}

.btn-danger {
    background: #d63031;
    color: #fff;
    border-color: #d63031;
}

.w-100 {
    width: 100%;
}

/* --- Таблицы --- */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
    background: #fff;
}

th, td {
    border: 1px solid #e5e7ef;
    padding: 8px 12px;
    text-align: left;
}

thead th {
    background-color: #f8f9fc;
    color: #4b5280;
    font-weight: 600;
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

tbody tr:hover {
    background-color: #f5f7ff;
}

tbody tr:nth-child(even) {
    background-color: #fafbfd;
}

.table-responsive {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #e5e7ef;
}

.table-responsive table {
    border: none;
}

.table-responsive th,
.table-responsive td {
    border-color: #e5e7ef;
}

.text-center {
    text-align: center;
}

/* --- Формы и фильтры --- */
.filters-container {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-weight: 600;
    color: #4b5280;
    margin-bottom: 5px;
    font-size: 13px;
}

.form-select,
.form-control,
input[type="text"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #d1d5e8;
    border-radius: 6px;
    font-size: 13.5px;
    background-color: #fff;
    color: #1a1d23;
    transition: border-color 0.15s, box-shadow 0.15s;
    appearance: auto;
}

.form-select:focus,
.form-control:focus,
input:not(#gs-input):focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #4f6ef7;
    box-shadow: 0 0 0 3px rgba(79,110,247,0.12);
}

textarea {
    resize: vertical;
    min-height: 70px;
}

/* --- Grid (замена bootstrap col-md-*) --- */
.row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.row > [class*="col-"] {
    min-width: 0;
    box-sizing: border-box;
}

.col-md-2  { flex: 0 0 calc(16.666% - 14px); }
.col-md-3  { flex: 0 0 calc(25% - 12px); }
.col-md-4  { flex: 0 0 calc(33.333% - 11px); }
.col-md-5  { flex: 0 0 calc(20% - 13px); }
.col-md-6  { flex: 0 0 calc(50% - 8px); }
.col-md-8  { flex: 0 0 calc(66.666% - 6px); }
.col-md-10 { flex: 0 0 calc(40% - 10px); }
.col-md-12 { flex: 0 0 100%; }

.align-items-end { align-items: flex-end; }
.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }
.d-flex { display: flex; }
.gap-2 { gap: 8px; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 20px; }
.mt-auto { margin-top: auto; }
.ms-auto { margin-left: auto; }
.small { font-size: 12px; }
.fw-bold { font-weight: 700; }
.text-muted { color: #6b7499; }
.text-decoration-none { text-decoration: none; }

/* --- Алерты --- */
.alert {
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 13.5px;
    border: 1px solid transparent;
}

.alert-success, .success {
    background: #f0fdf4;
    border-color: #86efac;
    color: #166534;
}

.alert-danger, .error {
    background: #fff0f0;
    border-color: #fca5a5;
    color: #991b1b;
}

/* --- Главная страница --- */
.main-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
}

.card {
    background: #fff;
    border: 1px solid #e5e7ef;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: box-shadow 0.2s, border-color 0.2s, transform 0.15s;
    cursor: pointer;
}

.card:hover {
    border-color: #4f6ef7;
    box-shadow: 0 4px 16px rgba(79,110,247,0.12);
    transform: translateY(-2px);
}

a.card {
    text-decoration: none;
    color: inherit;
    display: block;
}

.card-icon { font-size: 36px; margin-bottom: 10px; }
.card-title { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.card-desc { font-size: 12.5px; color: #6b7499; }

/* --- Статистика --- */
.stats {
    margin-top: 32px;
    padding: 20px;
    background: #f5f7ff;
    border-radius: 10px;
    border: 1px solid #e0e4ff;
}

.stats h2 { text-align: center; margin-bottom: 16px; font-size: 16px; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 12px;
}

.stat-block {
    background: #fff;
    border: 1px solid #e5e7ef;
    border-radius: 8px;
    padding: 14px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.stat-block h3 { font-size: 22px; color: #4f6ef7; }
.stat-block p { font-size: 12px; color: #6b7499; margin-top: 4px; }

/* --- Мониторинг --- */
.container-server {
    max-width: 95%;
    margin: 24px auto;
    padding: 20px;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e5e7ef;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.card-bottom { margin-top: auto; }

.server-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 16px;
    border: 1px solid #e5e7ef;
    border-radius: 10px;
    background: #fff;
}

.server-card h3 { margin: 0 0 10px; font-size: 15px; }
.status-online { color: #16a34a; font-weight: 600; }
.status-offline { color: #d63031; font-weight: 600; }
.metric-chart { max-height: 150px; width: 100%; margin-bottom: 14px; }

/* --- Документация --- */
h2.setup-title {
    text-align: center;
    font-size: 22px;
    font-weight: 600;
    margin: 28px 0 14px;
    color: #1a1d23;
}

pre.setup-instruction {
    background-color: #1e2130;
    color: #a5b4fc;
    border: 1px solid #2d3148;
    padding: 18px;
    border-radius: 8px;
    font-family: Consolas, Monaco, 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin: 16px auto;
    overflow-x: auto;
    width: 80%;
    max-width: 1000px;
}

/* --- Иконки --- */
img.icon-option {
    width: 40px;
    height: 40px;
    margin: 3px;
    border: 2px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.15s;
}

img.icon-option:hover { border-color: #4f6ef7; }

/* --- Вспомогательные --- */
.p-center { text-align: center; }
.href-center { display: inline-block; text-align: center; }

.actions {
    display: flex;
    gap: 8px;
}

.actions .btn-view {
    background-color: #e0f7fa;
    color: #00796b;
    border-color: #b2ebf2;
}

.actions .btn-edit {
    background-color: #fff3e0;
    color: #ef6c00;
    border-color: #ffe0b2;
}

/* --- Адаптив --- */
@media (max-width: 991.98px) {
    body {
        margin-left: 0;
        padding-top: 110px;
    }

    .app-sidebar {
        height: 60px;
        width: 100%;
        flex-direction: row;
        align-items: center;
        padding: 0 0.75rem;
        border-right: none;
        border-bottom: 1px solid #2d3148;
    }

    .app-sidebar .nav {
        flex-direction: row;
        overflow-x: auto;
        gap: 4px;
    }

    .app-sidebar .sidebar-footer { display: none; }

    .top-navbar {
        left: 0;
        top: 60px;
    }

    .row { flex-direction: column; }
}

/* --- Документация: layout --- */
.docs-layout {
    display: flex;
    min-height: calc(100vh - 50px);
}

.docs-sidebar-left {
    min-width: 250px;
    max-width: 250px;
    padding: 20px 16px;
    background-color: #f8f9fc;
    border-right: 1px solid #e5e7ef;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.docs-sidebar-title {
    font-size: 13px;
    font-weight: 700;
    color: #4f6ef7;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.docs-content {
    flex: 1;
    padding: 28px 36px;
    overflow-y: auto;
    background: #f0f2f5;
}

.doc-tree-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.doc-tree-item { margin: 0; }

.doc-tree-link {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    border-radius: 6px;
    color: #3a3f5c;
    font-size: 13px;
    transition: background 0.15s, color 0.15s;
    border: 1px solid transparent;
}

.doc-tree-link:hover {
    background: #eef0ff;
    color: #4f6ef7;
    text-decoration: none;
}

.doc-tree-link.active {
    background: #4f6ef7;
    color: #fff;
    font-weight: 600;
}

.doc-tree-icon { font-size: 13px; }

.doc-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #e5e7ef;
}

.doc-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7ef;
}

.doc-main-title {
    font-size: 22px;
    font-weight: 700;
    color: #1a1d23;
    margin: 0;
    text-align: left;
}

#doc-content {
    font-size: 14.5px;
    line-height: 1.75;
    color: #2d3148;
}

#doc-content h1 { font-size: 24px; margin: 0 0 1rem; text-align: left; }
#doc-content h2 { font-size: 19px; margin: 1.8rem 0 0.7rem; border-bottom: 1px solid #e5e7ef; padding-bottom: 6px; text-align: left; }
#doc-content h3 { font-size: 16px; margin: 1.4rem 0 0.5rem; text-align: left; }
#doc-content p  { margin-bottom: 0.9rem; }
#doc-content ul, #doc-content ol { margin-bottom: 0.9rem; padding-left: 1.4rem; }
#doc-content li { margin-bottom: 0.4rem; }

#doc-content code {
    background: #f0f2f5;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: Consolas, monospace;
    font-size: 0.88em;
    color: #4f6ef7;
}

#doc-content pre {
    background: #1e2130;
    color: #a5b4fc;
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    border-left: 3px solid #4f6ef7;
    font-size: 13px;
    line-height: 1.6;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6b7499;
}

.empty-state-icon { font-size: 48px; margin-bottom: 16px; }

@media (max-width: 991.98px) {
    .docs-layout { flex-direction: column; }
    .docs-sidebar-left { max-width: 100%; border-right: none; border-bottom: 1px solid #e5e7ef; }
    .docs-content { padding: 16px; }
}

/* --- Страница логина --- */
body.login-page {
    margin-left: 0;
    padding-top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1e2130 0%, #2d3148 100%);
}

.login-card {
    background: #fff;
    border-radius: 14px;
    padding: 40px 36px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    text-align: center;
}

.login-logo {
    font-size: 48px;
    margin-bottom: 12px;
}

.login-title {
    font-size: 22px;
    font-weight: 700;
    color: #1a1d23;
    margin-bottom: 4px;
    text-align: center;
}

.login-subtitle {
    font-size: 13px;
    color: #6b7499;
    margin-bottom: 28px;
}

.login-field {
    text-align: left;
    margin-bottom: 16px;
}

.login-card .btn-primary {
    margin-top: 8px;
    padding: 10px;
    font-size: 14px;
}

/* --- Карта сети --- */
.map-filters {
    margin-bottom: 20px;
}

#layoutSettings {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 5px 10px;
    align-items: center;
}

#layoutSettings label {
    margin: 0;
    font-weight: normal;
    font-size: 13px;
    color: #4b5280;
}

#layoutSettings input {
    padding: 5px 8px;
    border: 1px solid #d1d5e8;
    border-radius: 6px;
    font-size: 13px;
    width: 100%;
}

#myDiagramDiv {
    width: 100%;
    height: calc(100vh - 220px);
    border: 1px solid #e5e7ef;
    border-radius: 8px;
    background: #fafbfd;
}

/* --- Иконки выбора устройства --- */
.icon-picker-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 12px;
    border: 1px solid #e5e7ef;
    border-radius: 8px;
    background: #f8f9fc;
    min-height: 60px;
}

.icon-picker-container img.icon-option {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: border-color 0.15s, transform 0.15s;
    background: #fff;
    padding: 3px;
}

.icon-picker-container img.icon-option:hover {
    border-color: #4f6ef7;
    transform: scale(1.1);
}

/* --- Пагинация --- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border-radius: 6px;
    font-size: 13px;
    border: 1px solid #e5e7ef;
    color: #3a3f5c;
    background: #fff;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
}

.pagination a:hover {
    background: #f0f2ff;
    border-color: #4f6ef7;
    color: #4f6ef7;
    text-decoration: none;
}

.pagination a.active {
    background: #4f6ef7;
    border-color: #4f6ef7;
    color: #fff;
    font-weight: 600;
}

.pagination span {
    border-color: transparent;
    background: transparent;
    color: #9ca3c4;
}

/* =============================================
   NAVBAR ADDITIONS — вставить в конец style.css
   ============================================= */

/* Увеличенные кнопки навигации */
.app-sidebar .nav-link {
    padding: 0.6rem 0.85rem;
    font-size: 14px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 9px;
}

.app-sidebar .nav .nav-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

/* Выпадающее меню журнала */
.nav-dropdown { position: relative; }

.nav-dropdown-toggle {
    cursor: pointer;
    display: flex !important;
    align-items: center;
    gap: 9px;
    justify-content: flex-start;
    user-select: none;
}

.nav-dropdown-arrow {
    margin-left: auto;
    flex-shrink: 0;
    transition: transform 0.2s ease;
    opacity: 0.5;
}

.nav-dropdown-menu {
    display: none;
    flex-direction: column;
    gap: 2px;
    padding: 4px 0 4px 12px;
    margin-top: 2px;
}

.nav-dropdown-menu.open {
    display: flex;
}

/* Стрелка поворачивается когда открыто */
.nav-dropdown-menu.open ~ .nav-dropdown-toggle .nav-dropdown-arrow,
.nav-dropdown-toggle:has(+ .nav-dropdown-menu.open) .nav-dropdown-arrow {
    transform: rotate(180deg);
}

/* Проще — крутим стрелку через JS-класс на родителе */
.nav-dropdown.open .nav-dropdown-arrow {
    transform: rotate(180deg);
    opacity: 1;
}

.nav-sublink {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.45rem 0.75rem;
    border-radius: 7px;
    color: #7b83b0;
    font-size: 13px;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    border-left: 2px solid #2d3148;
}

.nav-sublink:hover {
    background-color: #252840;
    color: #e2e8ff;
    text-decoration: none;
    border-left-color: #4f6ef7;
}

.nav-sublink.active {
    color: #a5b4fc;
    font-weight: 600;
    border-left-color: #4f6ef7;
    background-color: #252840;
}
/* ── Глобальный поиск (top_navbar) ─────────────────────────────────────── */
.top-navbar { display:flex; align-items:center; }
.global-search {
    position: relative;
    width: 420px;
}
.global-search-wrap {
    display: flex;
    align-items: center;
    background: #f0f2f5;
    border: 1px solid #e5e7ef;
    border-radius: 8px;
    padding: 0 10px;
    gap: 8px;
    transition: background .15s, border-color .15s;
}
.global-search-wrap:focus-within {
    background: #fff;
    border-color: #4f6ef7;
    box-shadow: 0 0 0 3px rgba(79,110,247,.15);
}
.gs-icon { flex-shrink: 0; }
#gs-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #1e2130;
    font-size: 13px;
    padding: 7px 0;
    min-width: 0;
}
#gs-input::placeholder { color: #9ca3c4; }
.gs-kbd {
    font-size: 11px;
    color: #9ca3c4;
    background: #e5e7ef;
    border: 1px solid #d1d5e8;
    border-radius: 4px;
    padding: 1px 5px;
    font-family: monospace;
    flex-shrink: 0;
}
.global-search-wrap:focus-within .gs-kbd { display: none; }
.gs-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0; right: 0;
    background: #fff;
    border: 1px solid #e5e7ef;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0,0,0,.14);
    z-index: 9999;
    overflow: hidden;
    max-height: 420px;
    overflow-y: auto;
}
.gs-dropdown.open { display: block; }
.gs-group-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: #9ca3c4;
    padding: 10px 14px 5px;
    background: #f8f9fc;
    border-bottom: 1px solid #f0f2f5;
}
.gs-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    cursor: pointer;
    text-decoration: none;
    border-bottom: 1px solid #f5f6fa;
    transition: background .1s;
}
.gs-item:last-child { border-bottom: none; }
.gs-item:hover, .gs-item.gs-active { background: #f0f2ff; }
.gs-item-icon { font-size: 15px; flex-shrink: 0; width: 24px; text-align: center; }
.gs-item-body { flex: 1; min-width: 0; }
.gs-item-title { font-size: 13px; font-weight: 600; color: #1e2130; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-item-sub   { font-size: 11px; color: #9ca3c4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.gs-status { font-size: 10px; font-weight: 600; border-radius: 20px; padding: 2px 7px; flex-shrink: 0; background:#f0fdf4; color:#16a34a; border:1px solid #bbf7d0; }
.gs-status.s-repair  { background:#fff7ed; color:#ea580c; border-color:#fed7aa; }
.gs-status.s-written { background:#f1f5f9; color:#64748b; border-color:#cbd5e1; }
.gs-status.s-storage { background:#eff6ff; color:#2563eb; border-color:#bfdbfe; }
.gs-empty   { padding: 20px 14px; text-align: center; font-size: 13px; color: #9ca3c4; }
.gs-loading { padding: 14px; text-align: center; font-size: 12px; color: #9ca3c4; }
.gs-item-title mark, .gs-item-sub mark { background: #fef08a; color: inherit; border-radius: 2px; padding: 0 1px; }

/* ── Админ-панель ───────────────────────────────────────────────────────── */
.admin-section {
    background: #fff;
    border: 1px solid #e5e7ef;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 20px;
}
.admin-section-title {
    font-size: 15px;
    font-weight: 700;
    color: #1e2130;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f2f5;
}
.admin-stats-grid {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.admin-stat {
    flex: 1;
    min-width: 100px;
    background: #f8f9fc;
    border: 1px solid #e5e7ef;
    border-radius: 10px;
    padding: 14px 16px;
    text-align: center;
}
.admin-stat-warn  { background: #fff7ed; border-color: #fed7aa; }
.admin-stat-muted { background: #f1f5f9; border-color: #cbd5e1; }
.admin-stat-info  { background: #eff6ff; border-color: #bfdbfe; }
.admin-stat-value { font-size: 28px; font-weight: 700; color: #1e2130; line-height: 1; }
.admin-stat-warn  .admin-stat-value { color: #ea580c; }
.admin-stat-muted .admin-stat-value { color: #64748b; }
.admin-stat-info  .admin-stat-value { color: #2563eb; }
.admin-stat-label { font-size: 11px; color: #6b7499; margin-top: 4px; }

.admin-type-bars { display: flex; flex-direction: column; gap: 6px; }
.admin-type-bar-row { display: flex; align-items: center; gap: 10px; }
.admin-type-bar-label { font-size: 12px; color: #1e2130; width: 160px; flex-shrink: 0; }
.admin-type-bar-track { flex: 1; height: 8px; background: #f0f2f5; border-radius: 4px; overflow: hidden; }
.admin-type-bar-fill  { height: 100%; background: #4f6ef7; border-radius: 4px; transition: width .4s; }
.admin-type-bar-count { font-size: 12px; color: #6b7499; width: 32px; text-align: right; flex-shrink: 0; }

.admin-integrity-list { display: flex; flex-direction: column; gap: 8px; }
.admin-integrity-item {
    font-size: 13px;
    padding: 10px 14px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.integrity-ok   { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.integrity-warn { background: #fff7ed; color: #ea580c; border: 1px solid #fed7aa; }
.integrity-info { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }

.admin-log-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-log-table th { text-align: left; padding: 8px 10px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: #9ca3c4; border-bottom: 1px solid #e5e7ef; }
.admin-log-table td { padding: 9px 10px; border-bottom: 1px solid #f5f6fa; }
.admin-log-table tr:last-child td { border-bottom: none; }
.admin-log-table tr:hover td { background: #f8f9fc; }

.top-navbar-admin {
    background: #f0f2f5;
    color: #1e2130;
    border: 1px solid #e5e7ef;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.15s;
    text-decoration: none;
}
.top-navbar-admin:hover { background: #e5e7ef; color: #1e2130; text-decoration: none; }