/* Основные стили для админ-панели KNTY */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f8f9fa;
    padding-top: 56px; /* Отступ для фиксированного header */
}

/* Header */
.navbar {
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    z-index: 1050;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.2rem;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 56px; /* Высота navbar */
    bottom: 0;
    left: 0;
    z-index: 100;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
    min-height: calc(100vh - 56px);
}

.sidebar .nav-link {
    font-weight: 500;
    color: #adb5bd;
    padding: 0.75rem 1rem;
    border-radius: 0.35rem;
    margin: 0.25rem 0.75rem;
    transition: all 0.3s;
}

.sidebar .nav-link:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar .nav-link.active {
    color: #fff;
    background-color: #007bff;
}

.sidebar .nav-link i {
    width: 16px;
    text-align: center;
}

.user-avatar {
    margin-bottom: 1rem;
}

/* Main content */
.main-content {
    padding-top: 1rem;
    min-height: calc(100vh - 56px);
}

/* Page headers */
.page-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e3e6f0;
}

.page-header h1 {
    color: #5a5c69;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.page-header p {
    margin-bottom: 0;
    font-size: 1rem;
    color: #858796;
}

/* Карточки с улучшенным дизайном */
.card {
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    margin-bottom: 1.5rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.25rem 2rem 0 rgba(58, 59, 69, 0.2);
}

.card-header {
    background-color: #f8f9fc;
    border-bottom: 1px solid #e3e6f0;
    border-radius: 0.75rem 0.75rem 0 0;
    padding: 1rem 1.25rem;
}

.card-header h5, .card-header h6 {
    color: #5a5c69;
    font-weight: 600;
}

/* Специальные карточки статистики */
.border-left-primary {
    border-left: 0.25rem solid #4e73df !important;
}

.border-left-success {
    border-left: 0.25rem solid #1cc88a !important;
}

.border-left-info {
    border-left: 0.25rem solid #36b9cc !important;
}

.border-left-warning {
    border-left: 0.25rem solid #f6c23e !important;
}

.text-xs {
    font-size: 0.7rem;
}

.font-weight-bold {
    font-weight: 700 !important;
}

.text-gray-800 {
    color: #5a5c69 !important;
}

.text-gray-300 {
    color: #dddfeb !important;
}

/* Кнопки */
.btn {
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.1);
}

/* Алерты */
.alert {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
}

.alert i {
    margin-right: 0.5rem;
}

/* Утилиты для страниц */
.page {
    min-height: calc(100vh - 56px);
    padding: 1rem 0;
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.page {
    animation: fadeIn 0.3s ease-in-out;
}

/* Отзывчивость */
@media (max-width: 767.98px) {
    .sidebar {
        top: 56px;
        transform: translateX(-100%);
        transition: transform 0.3s;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        padding-left: 0;
    }
    
    .card-body .row .col-md-6 {
        margin-bottom: 1rem;
    }
}

@media (min-width: 768px) {
    .main-content {
        margin-left: 0;
    }
}

/* Дополнительные стили для улучшения UX */
.shadow {
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15) !important;
}

.shadow-lg {
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important;
}

/* Кастомные цвета для consistency */
:root {
    --primary: #4e73df;
    --success: #1cc88a;
    --info: #36b9cc;
    --warning: #f6c23e;
    --danger: #e74a3b;
    --secondary: #858796;
    --dark: #5a5c69;
    --light: #f8f9fc;
}

/* Улучшения для accessibility */
.btn:focus, .nav-link:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Статусные индикаторы */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.status-indicator.online {
    background-color: var(--success);
}

.status-indicator.offline {
    background-color: var(--secondary);
}

.status-indicator.error {
    background-color: var(--danger);
}