/* Кастомные переменные */
:root {
    --sidebar-width: 280px;
    --header-height: 60px;
}

/* Общие стили */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

/* Сайдбар */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.sidebar .sidebar-header {
    flex-shrink: 0;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar .sidebar-header h4 {
    margin: 0;
    font-size: 1.1rem;
}

.sidebar .sidebar-header small {
    opacity: 0.8;
}

.sidebar > .nav {
    flex: 1 1 0;
    flex-wrap: nowrap;
    overflow-x: hidden;
    overflow-y: auto;
    min-height: 0;
}

.sidebar > .nav::-webkit-scrollbar {
    width: 6px;
}

.sidebar > .nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar > .nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.sidebar > .nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.sidebar .nav-link i {
    width: 20px;
    text-align: center;
}

.sidebar .nav-section {
    padding: 0.5rem 1.5rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.6;
    margin-top: 1rem;
}

.sidebar .sidebar-footer {
    flex-shrink: 0;
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.1);
}

/* Основной контент */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    padding: 2rem;
}

/* Хедер страницы */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.page-header h1 {
    font-size: 1.75rem;
    margin: 0;
}

/* Карточки статистики */
.stat-card {
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 600;
}

.stat-label {
    color: #6c757d;
    font-size: 0.875rem;
}

/* Таблицы */
.table-card {
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.table-card .card-header {
    background: white;
    border-bottom: 1px solid #e9ecef;
    padding: 1rem 1.25rem;
}

.table-card .card-header h5 {
    margin: 0;
    font-size: 1rem;
}

.table-card .card-body {
    padding: 0;
}

/* Страница авторизации */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem;
}

.login-card {
    width: 100%;
    max-width: 420px;
    border: none;
    border-radius: 1rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.login-header {
    text-align: center;
    color: white;
    margin-bottom: 2rem;
}

.login-header h1 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.login-header p {
    opacity: 0.9;
    margin: 0;
}

.login-info {
    text-align: center;
    color: white;
    margin-top: 1.5rem;
    opacity: 0.9;
    font-size: 0.875rem;
}

/* Утилиты */
.cursor-pointer {
    cursor: pointer;
}

/* Бейджи статусов */
.badge-active {
    background-color: #198754;
}

.badge-blocked {
    background-color: #dc3545;
}

.badge-pending {
    background-color: #ffc107;
    color: #000;
}

/* Адаптивность */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .sidebar-toggle {
        display: block !important;
    }
}

@media (min-width: 992px) {
    .sidebar-toggle {
        display: none !important;
    }
}

/* Модальные окна */
.modal-content {
    border: none;
    border-radius: 0.75rem;
}

/* Формы */
.form-label {
    font-weight: 500;
    margin-bottom: 0.375rem;
}

/* Кнопки в таблицах */
.btn-table-action {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}
