body {
    min-height: 100vh;
}

.min-vh-main {
    min-height: calc(100vh - 56px);
}

@media (max-width: 767.98px) {
    /* На телефоне меню раскрывается кнопкой «Меню» и не занимает весь экран. */
    .sidebar.min-vh-main {
        min-height: 0;
    }
}

.sidebar-nav .nav-link {
    color: #495057;
    padding: 0.35rem 0.75rem;
    border-radius: 0.375rem;
}

.sidebar-nav .nav-link:hover {
    background-color: #e9ecef;
}

.sidebar-nav .nav-link.active {
    background-color: #0d6efd;
    color: #fff;
}

.sidebar-group-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6c757d;
    padding: 0 0.75rem;
}

.sidebar-group-toggle {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    border: none;
    background: transparent;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6c757d;
    padding: 0 0.75rem;
    cursor: pointer;
}

.sidebar-group-toggle:hover {
    color: #495057;
}

.sidebar-chevron {
    display: inline-block;
    font-size: 0.9rem;
    line-height: 1;
    transition: transform 0.2s ease;
}

.sidebar-group-toggle[aria-expanded="true"] .sidebar-chevron {
    transform: rotate(90deg);
}

.sidebar-subgroup {
    padding-left: 0.25rem;
}

.sync-card .card-body {
    min-height: 120px;
}

.login-page {
    display: flex;
    align-items: center;
    min-height: 100vh;
    background-color: #f8f9fa;
}

.login-card {
    border: none;
    border-radius: 0.5rem;
}

.navbar-brand {
    letter-spacing: 0.02em;
}

.import-step-pending .import-step-icon {
    color: #adb5bd;
}

.import-step-running .import-step-icon {
    color: #0d6efd;
}

.import-step-ok .import-step-icon {
    color: #198754;
}

.import-step-warning .import-step-icon {
    color: #fd7e14;
}

.import-step-error .import-step-icon {
    color: #dc3545;
}

.import-step-running {
    background-color: #f8f9fa;
}

.monitor-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #198754;
    animation: monitor-pulse 2s ease-in-out infinite;
}

@keyframes monitor-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.monitor-row--requesting {
    background-color: #e7f1ff;
}

.monitor-row--error {
    background-color: #f8d7da;
}

.monitor-row--due {
    box-shadow: inset 3px 0 0 #ffc107;
}

/* --- Таблицы данных --- */
.data-table {
    font-variant-numeric: tabular-nums;
}

.data-table thead th {
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    vertical-align: bottom;
    position: sticky;
    top: 0;
    z-index: 1;
}

.data-table thead th .fw-normal {
    font-size: 0.75rem;
}

.trip-row {
    cursor: pointer;
}

.trip-row:focus-visible {
    outline: 2px solid #0d6efd;
    outline-offset: -2px;
}

.endpoint-table .col-name { min-width: 10rem; }
.endpoint-table .col-template { min-width: 8rem; }
.endpoint-table .col-url { min-width: 17rem; }
.endpoint-table .col-method { min-width: 5.5rem; }
.endpoint-table .col-token { min-width: 10rem; }
.endpoint-table .col-order { width: 5rem; }
.endpoint-table td, .endpoint-table th { padding-left: 0.35rem; padding-right: 0.35rem; }

.source-json {
    max-height: 24rem;
    overflow: auto;
    font-size: 0.8rem;
    white-space: pre;
}

.page-subtitle {
    font-size: 0.875rem;
    color: #6c757d;
}

.monitor-cell--flash {
    animation: monitor-flash 0.3s ease;
}

@keyframes monitor-flash {
    from { background-color: #fff3cd; }
    to { background-color: transparent; }
}
