/* ==========================================
   📌 GLOBAL STYLES
========================================== */
body {
    overflow-x: hidden;
    background-color: #f8f9fa;
    color: #333;
}
/* ========================================== 
   📌 NAVBAR STYLING (TOP HEADER)
========================================== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: 56px;
    z-index: 1040;
    padding: 0 1rem;

}

/* ✅ Navbar Brand */
.navbar-brand {
    font-size: 1.3rem;
    font-weight: bold;
    color: white !important;
}

/* ✅ Navbar Items */
.navbar-nav .nav-link {
    color: white !important;
    font-size: 0.95rem;
    padding: 8px 12px;
    transition: 0.3s;
}

/* ✅ Navbar Hover Effect */
/* .navbar-nav .nav-link:hover {
    color: #f8d210 !important;
} */

/* ✅ Mobile Navbar Background Fix */
.navbar-collapse {
    background-color: #061435;
    /* Keep same as navbar */
    padding: 1rem;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    z-index: 1035;
}

/* ✅ Fix Background Color on Large Screens */
@media (min-width: 992px) {
    .navbar-collapse {
        position: static;
        padding: 0;
        background-color: transparent;
    }
}

/* ✅ User Profile Dropdown */
.navbar .nav-item.dropdown a {
    /* color: white !important; */
    background-color: transparent;
}


/* ✅ Dropdown Hover Effect */
/* .navbar .dropdown-menu {
    background-color: black !important;
    color: black !important;
} */
.navbar .dropdown-menu a {

    color: black !important;
}
.navbar .dropdown-menu .dropdown-item:hover {
    background-color: #007bff !important;
    color: white !important;
}


/* ✅ Navbar Mobile Responsiveness */
@media (max-width: 991px) {
    .navbar-nav {
        width: 100%;
    }

    .nav-item {
        padding: 0.25rem 0;
    }

    .navbar-brand {
        font-size: 1.2rem;
    }
}
/* ==========================================
   📌 SIDEBAR STYLING (Including Logo Section)
========================================== */
#sidebar {
    position: fixed;
    top: 56px;
    left: -250px;
    width: 250px;
    height: calc(100vh - 56px);
    background-color: #061435;
    color: white;
    overflow-y: auto;
    transition: all 0.3s ease-in-out;
    z-index: 1030;
}

#sidebar.active {
    left: 0;
}

/* ✅ Sidebar Header (Including Logo Section) */
#sidebar .sidebar-header {
    display: flex;
    align-items: center;
    padding: 15px;
    background-color: #0B1D46;
}

/* ✅ Sidebar Logo (Align Left) */
#sidebar .logo {
    height: 50px;
    /* Adjust size as needed */
    width: auto;
    max-width: 80px;
    margin-right: 10px;
    /* Space between logo & text */
}

/* ✅ Sidebar Title & Description (Align Right) */
#sidebar .sidebar-title {
    flex-grow: 1;
    /* Take remaining space */
    color: white;
    font-size: 1.2em;
    font-weight: bold;
}

#sidebar .sidebar-description {
    color: #ddd;
    font-size: 0.9em;
    margin-top: 3px;
}

/* ✅ Sidebar Navigation */
#sidebar ul.components {
    padding: 20px 0;
    margin: 0 10px;
}

#sidebar ul li a {
    padding: 10px 15px;
    font-size: 1.1em;
    display: block;
    color: #fff;
    text-decoration: none;
}

.nav-item:hover {
    background-color: #152c62;
}

.nav-link.active {
    background-color: #007bff !important;
    color: white !important;
    border-radius: 5px;
}

/* ==========================================
   📌 CONTENT STYLING
========================================== */
#content {
    width: 100%;
    padding: 20px;
    min-height: calc(100vh - 56px);
    transition: all 0.3s;
    padding-top: 70px;
}

/* ==========================================
   📌 RESPONSIVE STYLING
========================================== */
@media (min-width: 768px) {
    #sidebar {
        left: 0;
    }

    #sidebar.hidden {
        left: -250px;
    }

    #content {
        width: calc(100% - 250px);
        margin-left: 250px;
    }

    #content.full {
        width: 100%;
        margin-left: 0;
    }
}

@media (max-width: 991.98px) {
    .navbar-nav {
        width: 100%;
    }

    .nav-item {
        padding: 0.25rem 0;
    }

    .navbar-brand {
        font-size: 2.5vw;
    }
}

/* ==========================================
   📌 FORM & INPUT STYLING
========================================== */
input:focus {
    border: none;
}

#content .form-inputs,
#content .dropdown {
    margin-top: 10px;
    width: 100%;
    height: 3rem;
    background-color: #FAFAFA;
    border: 1px solid #E3E3E3;
    border-radius: 4px;
    padding-left: 15px;
}

/* ==========================================
   📌 STUDENT CARD STYLING (Light Mode)
========================================== */
.student-card {
    background-color: #f8f9fa;
    border: 2px solid #ddd;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
}

/* ✅ Present (Green) */
.student-card.present {
    background-color: #c3e6cb;
    border-color: #28a745;
}

/* ✅ Absent (Light Pink) */
.student-card.absent {
    background-color: #f8d7da;
    border-color: #dc3545;
}

/* ✅ Status Label */
.student-card .status-label {
    font-size: 1rem;
    font-weight: bold;
}

/* ==========================================
   📌 DARK MODE STUDENT CARD
========================================== */
.dark-mode .student-card {
    background-color: #1e1e1e !important;
    border: 2px solid #444 !important;
    color: white !important;
}

/* ✅ Dark Mode Present */
.dark-mode .student-card.present {
    background-color: #265d2b !important;
    border-color: #28a745 !important;
}

/* ✅ Dark Mode Absent */
.dark-mode .student-card.absent {
    background-color: #5d1d1f !important;
    border-color: #dc3545 !important;
}

/* ✅ Dark Mode Status Label */
.dark-mode .student-card .status-label {
    color: #ddd !important;
}
@media (max-width: 768px) {
    .student-card {
        padding: 10px;
    }
}
/* ==========================================
   📌 TABLE STYLING (Default Light Mode)
========================================== */
.table {
    border-radius: 10px;
    overflow: hidden;
}

.table thead {
    background-color: #343a40;
    color: white;
}

.table tbody tr {
    background-color: #ffffff;
    /* Default Light Mode */
    color: #333;
}

/* ✅ Hover Effect in Light Mode */
.table-hover tbody tr:hover {
    background-color: #f1f1f1 !important;
}

/* ==========================================
   📌 FORCE DARK MODE TABLE FIX
========================================== */
.dark-mode .table {
    background-color: #242424 !important;
    color: white !important;
    border-color: #555 !important;
}

/* ✅ Force Table Rows to Dark in Dark Mode */
.dark-mode .table tbody tr {
    background-color: #1e1e1e !important;
    color: white !important;
}

/* ✅ Ensure ALL table rows take Dark Mode */
.dark-mode .table tbody tr td {
    background-color: #1e1e1e !important;
    color: white !important;
}

/* ✅ Fix Striped Table in Dark Mode */
.dark-mode .table-striped tbody tr:nth-of-type(odd) {
    background-color: #2a2a2a !important;
}

/* ✅ Table Hover in Dark Mode */
.dark-mode .table-hover tbody tr:hover {
    background-color: #333 !important;
}

/* ✅ Ensure Table Borders are Dark */
.dark-mode .table-bordered {
    border-color: #666 !important;
}

/* ✅ Ensure Dark Mode Applies to Table Container */
.dark-mode .table-responsive {
    background-color: #242424 !important;
}
/* ==========================================
   📌 DARK MODE STYLES
========================================== */
.dark-mode {
    background-color: #121212 !important;
    color: #ffffff !important;
}

/* ✅ Navbar in Dark Mode */
.dark-mode .navbar {
    background-color: #1e1e1e !important;
    border-bottom: 1px solid #333;
}

/* ✅ Sidebar in Dark Mode */
.dark-mode #sidebar {
    background-color: #1e1e1e !important;
    color: white;
}

.dark-mode #sidebar .sidebar-header {
    background-color: #2c2c2c;
}

.dark-mode #sidebar ul li a {
    color: #ddd;
}

.dark-mode #sidebar ul li a:hover {
    background-color: #343a40;
}

/* ✅ Active Sidebar Link */
.dark-mode .nav-link.active {
    background-color: #007bff !important;
    color: white !important;
}

/* ✅ Content Background in Dark Mode */
.dark-mode #content {
    background-color: #181818 !important;
    color: white !important;
}

/* ✅ Tables in Dark Mode */
.dark-mode .table {
    background-color: #242424 !important;
    color: white !important;
    border-color: #444 !important;
}

.dark-mode .table thead {
    background-color: #333 !important;
    color: #fff !important;
}

.dark-mode .table-hover tbody tr:hover {
    background-color: #2a2a2a !important;
}

/* ✅ Forms, Inputs, Textareas in Dark Mode */
.dark-mode input,
.dark-mode textarea,
.dark-mode select {
    background-color: #222 !important;
    color: white !important;
    border: 1px solid #555 !important;
}

.dark-mode input::placeholder,
.dark-mode textarea::placeholder {
    color: #bbb !important;
}

.dark-mode input:focus,
.dark-mode textarea:focus,
.dark-mode select:focus {
    border-color: #007bff !important;
    outline: none !important;
}

/* ✅ Buttons in Dark Mode */
/* .dark-mode .btn {
    background-color: #444;
    color: white;
    border-color: #666;
} */

/* .dark-mode .btn:hover {PROFILE SECTION STYLING
} */

/* ✅ Alerts & Modals in Dark Mode */
.dark-mode .alert {
    background-color: #2c2c2c;
    color: white;
    border-color: #444;
}

.dark-mode .modal-content {
    background-color: #222;
    color: white;
}

/* ✅ Prevent White Flash */
html.dark-mode {
    background-color: #121212;
    color: #ffffff;
}




/* ==========================================
   📌 FOOTER STYLING
========================================== */
footer {
    text-align: center;
    padding: 10px;
    font-size: 14px;
    color: #666;
    border-top: 1px solid #ddd;
    background-color: #f8f9fa;
}

/* ✅ Dark Mode Footer */
.dark-mode footer {
    background-color: #1e1e1e !important;
    color: #ccc !important;
    border-top: 1px solid #444 !important;
}

/* ✅ Footer Links in Dark Mode */
.dark-mode footer a {
    color: #4da3ff !important;
    /* Lighter blue for visibility */
    text-decoration: none;
}

.dark-mode footer a:hover {
    text-decoration: underline;
}


/* ==========================================
   📌 SIDEBAR SCROLLBAR (Minimalist & Simple)
========================================== */
#sidebar {
    scrollbar-width: thin;
    /* For Firefox */
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
    /* Light thumb, invisible track */
}

/* ✅ WebKit Browsers (Chrome, Edge, Safari) */
#sidebar::-webkit-scrollbar {
    width: 5px;
    /* Thin scrollbar */
}

#sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    /* Light thumb */
    border-radius: 10px;
    transition: background 0.3s ease-in-out;
}

#sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
    /* Slightly visible on hover */
}

#sidebar::-webkit-scrollbar-track {
    background: transparent;
    /* Invisible track */
}

/* ==========================================
   📌 DARK MODE SIDEBAR SCROLLBAR
========================================== */
.dark-mode #sidebar {
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
    /* Dark Mode Thumb */
}

.dark-mode #sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    /* Very faint */
}

.dark-mode #sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
    /* Slightly visible on hover */
}

/* ==========================================
   📌 LOGIN FORM STYLING
========================================== */
.login-container {
    width: 40vw;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.login-container h1 {
    text-align: center;
    letter-spacing: 2px;
}

/* ✅ Login Form Table Adjustments */
.login-container table tr:nth-child(odd) td {
    padding-top: 30px;
}

.login-container table tr td label {
    font-size: 17px;
    letter-spacing: 1px;
}

/* ✅ Form Inputs */
/* .form-inputs,
.dropdown {
    margin-top: 10px;
    width: 15rem;
    height: 3rem;
    background-color: #FAFAFA;
    border: 1px solid #E3E3E3;
    border-radius: 4px;
    padding: 0px 20px;
} */

::placeholder {
    padding-left: 0px;
    color: #C2C2C2;
    font-weight: 400;
    font-size: 0.9rem;
}

/* ✅ Prevent Number Input Spinner */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* ✅ Login Button */
.login-container td button {
    font-size: 20px;
    letter-spacing: 1px;
    background-color: black;
    color: white;
    width: 100%;
    padding: 10px 30px;
}

/* ✅ Center Text */
.login-container td p {
    text-align: center;
}

.login-container td p a {
    font-size: inherit;
    text-align: center;
    width: 100%;
    letter-spacing: 1px;
}

/* ✅ Remove Padding on Last Table Row */
.login-container table tr:last-child td {
    padding: 0px;
}

/* ✅ Link Styling */
.login-container a {
    text-decoration: none;
    color: black;
}

/* ✅ Error Message */
.red {
    color: crimson;
}

/* ==========================================
   📌 RESPONSIVE LOGIN FORM
========================================== */
@media (max-width: 768px) {
    .login-container {
        width: 90vw;
    }

    .form-inputs {
        width: 100%;
    }
}

/* ==========================================
   📌 DARK MODE LOGIN FORM
========================================== */
.dark-mode .login-container {
    background-color: #1e1e1e;
    border: 1px solid #444;
    border-radius: 10px;
    padding: 25px;
}

.dark-mode .form-inputs,
.dark-mode .dropdown {
    background-color: #222 !important;
    color: white !important;
    border: 1px solid #555 !important;
}

.dark-mode ::placeholder {
    color: #bbb !important;
}

/* ✅ Dark Mode Button */
.dark-mode .login-container td button {
    background-color: #007bff !important;
    color: white !important;
    border: none;
    transition: all 0.3s ease-in-out;
}

.dark-mode .login-container td button:hover {
    background-color: #0056b3 !important;
}

/* ✅ Dark Mode Link */
.dark-mode .login-container a {
    color: #4da3ff !important;
}

.dark-mode .login-container a:hover {
    text-decoration: underline;
}

/* ✅ Dark Mode Error Message */
.dark-mode .red {
    color: #ff6961 !important;
}