/* ============================================
   ТЁМНАЯ ТЕМА
   ============================================ */

/* Основные стили */
.dark-theme body {
    background: #1a1a2e;
    color: #e0e0e0;
}

.dark-theme .grid-view {
    background: #16213e;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

.dark-theme .grid-view thead {
    background: linear-gradient(135deg, #0f3460 0%, #16213e 100%);
}

.dark-theme .grid-view thead th {
    color: #e0e0e0 !important;
    background: #0f3460 !important;
}

.dark-theme .grid-view thead th a {
    color: #e0e0e0 !important;
}

.dark-theme .grid-view tbody td {
    color: #b0b0b0;
    border-bottom-color: #2a2a4a;
}

.dark-theme .grid-view tbody tr:hover {
    background: linear-gradient(135deg, rgba(15, 52, 96, 0.3) 0%, rgba(22, 33, 62, 0.3) 100%);
}

.dark-theme .grid-view .filters {
    background: #1a1a2e;
}

.dark-theme .grid-view .filters td,
.dark-theme .grid-view .filters th {
    background: #1a1a2e !important;
    color: #e0e0e0 !important;
}

.dark-theme .grid-view .filters input,
.dark-theme .grid-view .filters select {
    background: #16213e;
    border-color: #0f3460;
    color: #e0e0e0;
}

.dark-theme .grid-view .filters input:focus,
.dark-theme .grid-view .filters select:focus {
    border-color: #667eea;
    color: #e0e0e0;
}

.dark-theme .grid-view .summary {
    background: #16213e;
    color: #888;
    border-bottom-color: #2a2a4a;
}

.dark-theme .grid-view .pagination .page-item .page-link {
    background: #16213e !important;
    color: #667eea !important;
}

.dark-theme .grid-view .pagination .page-item .page-link:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.dark-theme .grid-view .pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.dark-theme .grid-view .pagination .page-item.disabled .page-link {
    color: #555 !important;
    background: #1a1a2e !important;
}

/* Формы */
.dark-theme .form-control,
.dark-theme .form-select {
    background: #16213e;
    border-color: #0f3460;
    color: #e0e0e0;
}

.dark-theme .form-control:focus,
.dark-theme .form-select:focus {
    background: #1a1a2e;
    border-color: #667eea;
    color: #e0e0e0;
}

.dark-theme .form-group label {
    color: #e0e0e0;
}

.dark-theme .form-text {
    color: #888;
}

/* Кнопки */
.dark-theme .btn-secondary {
    background: #0f3460 !important;
    color: #e0e0e0 !important;
}

/* Карточки */
.dark-theme .card {
    background: #16213e;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

.dark-theme .card-header {
    background: linear-gradient(135deg, #0f3460 0%, #16213e 100%);
    color: #e0e0e0;
}

.dark-theme .card-footer {
    background: #1a1a2e;
    border-top-color: #2a2a4a;
}

/* Breadcrumbs */
.dark-theme .breadcrumbs-custom {
    background: #16213e;
    box-shadow: 0 3px 10px rgba(0,0,0,0.3);
}

.dark-theme .breadcrumbs-custom .breadcrumb-item {
    color: #667eea;
}

.dark-theme .breadcrumbs-custom .breadcrumb-item a {
    color: #667eea;
}

.dark-theme .breadcrumbs-custom .breadcrumb-item.active {
    color: #764ba2;
}

.dark-theme .breadcrumbs-custom .breadcrumb-item + .breadcrumb-item::before {
    color: #555;
}

/* Tabs */
.dark-theme .nav-tabs .nav-link {
    color: #b0b0b0;
    background: transparent;
}

.dark-theme .nav-tabs .nav-link:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.dark-theme .nav-tabs .nav-link.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.dark-theme .tab-content {
    background: #16213e;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

/* Modal */
.dark-theme .modal-content {
    background: #16213e;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.dark-theme .modal-header {
    background: linear-gradient(135deg, #0f3460 0%, #16213e 100%);
    color: #e0e0e0;
    border: none;
}

.dark-theme .modal-body {
    color: #b0b0b0;
}

.dark-theme .modal-footer {
    background: #1a1a2e;
    border: none;
}

/* Dropdown */
.dark-theme .dropdown-menu {
    background: #16213e;
    border-color: #0f3460;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.dark-theme .dropdown-menu .dropdown-item {
    color: #e0e0e0;
}

.dark-theme .dropdown-menu .dropdown-item:hover {
    background: rgba(102, 126, 234, 0.2);
    color: #667eea;
}

.dark-theme .dropdown-menu .dropdown-divider {
    border-top-color: #2a2a4a;
}

/* Action кнопки в gridview */
.dark-theme .grid-view .btn-view {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.dark-theme .grid-view .btn-update {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.dark-theme .grid-view .btn-delete {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.dark-theme .grid-view .btn-view:hover,
.dark-theme .grid-view .btn-update:hover,
.dark-theme .grid-view .btn-delete:hover {
    color: white;
}

/* Navbar */
.dark-theme .navbar-custom {
    background: linear-gradient(135deg, #0f3460 0%, #16213e 100%);
    box-shadow: 0 3px 15px rgba(0,0,0,0.3);
}

.dark-theme .navbar-custom .navbar-brand {
    color: #e0e0e0 !important;
}

.dark-theme .navbar-custom .navbar-nav .nav-link {
    color: rgba(224, 224, 224, 0.9) !important;
}

.dark-theme .navbar-custom .navbar-nav .nav-link:hover,
.dark-theme .navbar-custom .navbar-nav .nav-link.active {
    background: rgba(255, 255, 255, 0.1);
    color: white !important;
}

.dark-theme .navbar-custom .navbar-nav .nav-link .text-white,
.dark-theme .navbar-custom .navbar-nav .nav-link strong {
    color: #e0e0e0 !important;
}

.dark-theme .btn-navbar {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    color: #e0e0e0 !important;
}

.dark-theme .btn-navbar:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white !important;
}

/* Footer */
.dark-theme .footer-custom {
    background: linear-gradient(135deg, #0f3460 0%, #0a0a1a 100%);
}

.dark-theme .footer-custom h5,
.dark-theme .footer-custom h6 {
    color: #e0e0e0;
}

.dark-theme .footer-custom a {
    color: rgba(224, 224, 224, 0.8);
}

.dark-theme .footer-custom a:hover {
    color: white;
}

.dark-theme .footer-custom .text-white-50 {
    color: rgba(224, 224, 224, 0.5) !important;
}

/* Alert */
.dark-theme .alert {
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* Badge */
.dark-theme .badge.bg-light {
    background: #0f3460 !important;
    color: #e0e0e0 !important;
}

/* Переключатель темы */
.theme-switcher {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.theme-switcher .btn-theme-toggle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.theme-switcher .btn-theme-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

/* Scrollbar для тёмной темы */
.dark-theme ::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.dark-theme ::-webkit-scrollbar-track {
    background: #1a1a2e;
}

.dark-theme ::-webkit-scrollbar-thumb {
    background: #0f3460;
    border-radius: 5px;
}

.dark-theme ::-webkit-scrollbar-thumb:hover {
    background: #667eea;
}
