/* Dark Theme Fixes - Addresses layout issues in dark mode */

/* Fix for the gap seen in admin pages by ensuring the sidebar extends fully */
body.dark-theme #wrapper {
    background-color: #1a202c;
}

body.dark-theme .sidebar {
    background-color: #111827;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(0, 0, 0, 0.3);
    height: 100%;
    min-height: 100vh;
}

body.dark-theme #content-wrapper {
    background-color: #1a202c;
}

body.dark-theme #content {
    background-color: #1a202c;
}

/* Fix navbar in dark theme */
body.dark-theme .topbar {
    background-color: #1e2235 !important;
    border-bottom: 1px solid #2d3748;
}

body.dark-theme .navbar-light .navbar-nav .nav-link {
    color: #e2e8f0;
}

body.dark-theme .topbar .nav-item .nav-link {
    color: #e2e8f0;
}

body.dark-theme .img-profile {
    border: 2px solid #2d3748;
}

/* Fix card styling in dark theme */
body.dark-theme .card {
    background-color: #1e2235;
    border: none;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(0, 0, 0, 0.2);
}

body.dark-theme .card-header {
    background-color: #161b2b !important;
    border-bottom: 1px solid #2d3748 !important;
    color: #e2e8f0;
}

body.dark-theme .card-body {
    background-color: #1e2235;
    color: #e2e8f0;
}

/* Fix form elements in dark theme */
body.dark-theme .form-control {
    background-color: #2d3748;
    border-color: #4a5568;
    color: #e2e8f0;
}

body.dark-theme .form-control:focus {
    background-color: #2d3748;
    border-color: #4299e1;
    color: #e2e8f0;
}

body.dark-theme .input-group-text {
    background-color: #4a5568;
    border-color: #4a5568;
    color: #e2e8f0;
}

/* Fix table elements in dark theme */
body.dark-theme .table {
    color: #e2e8f0;
}

body.dark-theme .table td,
body.dark-theme .table th {
    border-top: 1px solid #2d3748;
}

body.dark-theme .table thead th {
    border-bottom: 2px solid #2d3748;
}

/* Fix modal elements in dark theme */
body.dark-theme .modal-content {
    background-color: #1e2235;
    border-color: #2d3748;
}

body.dark-theme .modal-header {
    border-bottom: 1px solid #2d3748;
}

body.dark-theme .modal-footer {
    border-top: 1px solid #2d3748;
}

/* Fix dropdown menu styling */
body.dark-theme .dropdown-menu {
    background-color: #1e2235;
    border: 1px solid #2d3748;
}

body.dark-theme .dropdown-item {
    color: #e2e8f0;
}

body.dark-theme .dropdown-item:hover,
body.dark-theme .dropdown-item:focus {
    background-color: #2d3748;
    color: #fff;
}

body.dark-theme .dropdown-divider {
    border-top: 1px solid #2d3748;
}

/* Fix badge styling */
body.dark-theme .badge-counter {
    background-color: #4299e1 !important;
}

/* Fix alert styling */
body.dark-theme .alert {
    background-color: #2d3748;
    border-color: #4a5568;
    color: #e2e8f0;
}

body.dark-theme .alert-success {
    background-color: #1c4532;
    border-color: #2f855a;
    color: #c6f6d5;
}

body.dark-theme .alert-danger {
    background-color: #742a2a;
    border-color: #c53030;
    color: #fed7d7;
}

body.dark-theme .alert-warning {
    background-color: #744210;
    border-color: #b7791f;
    color: #fefcbf;
}

/* Fix list groups */
body.dark-theme .list-group-item {
    background-color: #1e2235;
    border-color: #2d3748;
    color: #e2e8f0;
}

/* Specifically fix the gap issue highlighted in the screenshot */
body.dark-theme #wrapper .sidebar {
    position: fixed;
    height: 100vh;
    z-index: 100;
}

body.dark-theme #content-wrapper {
    margin-left: 14rem;
    width: calc(100% - 14rem);
}

body.dark-theme #wrapper.toggled #content-wrapper {
    margin-left: 0;
    width: 100%;
}

body.dark-theme .sidebar.toggled {
    overflow: visible;
    width: 0 !important;
}

/* Fix text colors */
body.dark-theme .text-gray-800,
body.dark-theme .text-gray-900 {
    color: #e2e8f0 !important;
}

body.dark-theme .text-gray-600,
body.dark-theme .text-gray-700 {
    color: #cbd5e0 !important;
}

body.dark-theme .text-gray-500 {
    color: #a0aec0 !important;
}

/* Fix button styling */
body.dark-theme .btn-light {
    background-color: #2d3748;
    border-color: #4a5568;
    color: #e2e8f0;
}

body.dark-theme .btn-light:hover {
    background-color: #4a5568;
    border-color: #4a5568;
    color: #fff;
}

/* Fix scroll-to-top button */
body.dark-theme .scroll-to-top {
    background-color: #4a5568;
}

body.dark-theme .scroll-to-top:hover {
    background-color: #2d3748;
}

/* Fix for footer */
body.dark-theme footer.sticky-footer {
    background-color: #1a202c;
    color: #e2e8f0;
    border-top: 1px solid #2d3748;
} 