/* Dark Mode Styles */

body.dark-mode {
    background-color: #111827;
    color: #f9fafb;
}

/* Navigation */
body.dark-mode .navbar {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%) !important;
    border-bottom: 1px solid #374151;
}

body.dark-mode .navbar-brand,
body.dark-mode .text-light {
    color: #f9fafb !important;
}

/* Navigation tabs */
body.dark-mode .nav-link {
    color: #9ca3af !important;
}

body.dark-mode .nav-link.active {
    color: #f9fafb !important;
    border-bottom-color: #f9fafb !important;
}

/* Stats cards */
body.dark-mode .row[style*="background: linear-gradient"] {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%) !important;
    border: 1px solid #374151;
}

body.dark-mode .stat-card-tab {
    background: #1f2937 !important;
    border: 1px solid #374151 !important;
}

body.dark-mode .stat-card-tab.active {
    background: #374151 !important;
}

body.dark-mode .stat-card-tab:hover {
    background: #374151 !important;
}

body.dark-mode .card-label {
    color: #9ca3af !important;
}

body.dark-mode .card-number {
    color: #f9fafb !important;
}

/* Article cards */
body.dark-mode .card {
    background: #1f2937;
    border-color: #374151;
}

body.dark-mode .card-body {
    color: #f9fafb;
}

body.dark-mode .card-title {
    color: #f9fafb;
}

body.dark-mode .card-text {
    color: #d1d5db;
}

/* Badges */
body.dark-mode .badge {
    background: #374151 !important;
    color: #f9fafb !important;
}

body.dark-mode .badge-success {
    background: #065f46 !important;
    color: #d1fae5 !important;
}

body.dark-mode .badge-warning {
    background: #92400e !important;
    color: #fef3c7 !important;
}

body.dark-mode .badge-danger {
    background: #7f1d1d !important;
    color: #fee2e2 !important;
}

body.dark-mode .badge-info {
    background: #1e3a8a !important;
    color: #dbeafe !important;
}

/* Buttons */
body.dark-mode .btn-primary {
    background: #3b82f6;
    border-color: #3b82f6;
}

body.dark-mode .btn-primary:hover {
    background: #2563eb;
    border-color: #2563eb;
}

body.dark-mode .btn-secondary {
    background: #4b5563;
    border-color: #4b5563;
    color: #f9fafb;
}

body.dark-mode .btn-secondary:hover {
    background: #6b7280;
    border-color: #6b7280;
}

body.dark-mode .btn-danger {
    background: #dc2626;
    border-color: #dc2626;
}

body.dark-mode .btn-danger:hover {
    background: #b91c1c;
    border-color: #b91c1c;
}

/* Form controls */
body.dark-mode .form-control {
    background: #374151;
    border-color: #4b5563;
    color: #f9fafb;
}

body.dark-mode .form-control:focus {
    background: #374151;
    border-color: #6b7280;
    color: #f9fafb;
}

body.dark-mode .form-control::placeholder {
    color: #9ca3af;
}

/* Select dropdowns */
body.dark-mode select.form-control,
body.dark-mode select.form-select {
    background: #374151;
    color: #f9fafb;
}

body.dark-mode select.form-control option,
body.dark-mode select.form-select option {
    background: #374151;
    color: #f9fafb;
}

/* Modals */
body.dark-mode .modal-content {
    background: #1f2937;
    border-color: #374151;
}

body.dark-mode .modal-header {
    border-bottom-color: #374151;
}

body.dark-mode .modal-footer {
    border-top-color: #374151;
}

body.dark-mode .modal-title {
    color: #f9fafb;
}

body.dark-mode .close {
    color: #f9fafb;
}

/* Tables */
body.dark-mode .table {
    color: #f9fafb;
}

body.dark-mode .table-striped tbody tr:nth-of-type(odd) {
    background: rgba(55, 65, 81, 0.3);
}

body.dark-mode .table-hover tbody tr:hover {
    background: rgba(55, 65, 81, 0.5);
}

/* Borders */
body.dark-mode [style*="border"] {
    border-color: #374151 !important;
}

/* Text colors */
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6 {
    color: #f9fafb;
}

body.dark-mode .text-muted {
    color: #9ca3af !important;
}

/* Links */
body.dark-mode a {
    color: #60a5fa;
}

body.dark-mode a:hover {
    color: #93c5fd;
}

/* Scrollbar */
body.dark-mode ::-webkit-scrollbar {
    width: 12px;
    background: #1f2937;
}

body.dark-mode ::-webkit-scrollbar-track {
    background: #111827;
}

body.dark-mode ::-webkit-scrollbar-thumb {
    background: #4b5563;
    border-radius: 6px;
}

body.dark-mode ::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

/* Dark mode toggle button */
.dark-mode-toggle {
    background: none;
    border: 2px solid #e5e7eb;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    color: #666;
}

.dark-mode-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: #d1d5db;
}

body.dark-mode .dark-mode-toggle {
    border-color: #4b5563;
    color: #f9fafb;
}

body.dark-mode .dark-mode-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #6b7280;
}

.dark-mode-toggle svg {
    width: 20px;
    height: 20px;
}

/* Smooth transitions */
body,
.navbar,
.card,
.btn,
.form-control,
.modal-content {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
