/* Custom Theme Colors for PASTI e-MAS */

/* ===== BLUE THEME (Default) ===== */
.theme-blue .sidenav-light {
    background-color: #1e40af !important;
    /* Blue background */
    color: #ffffff !important;
    /* White text */
}

.theme-blue .topnav {
    background-color: #1e40af !important;
    /* Blue header background */
}

.theme-blue .topnav .navbar-brand {
    color: #ffffff !important;
    /* White brand text */
}

.theme-blue .topnav .btn-transparent-dark {
    color: #ffffff !important;
    /* White button icons */
}

.theme-blue .topnav .btn-transparent-dark:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    /* Light hover effect */
    color: #ffffff !important;
}

.theme-blue .topnav .form-select {
    background-color: rgba(255, 255, 255, 0.1) !important;
    /* Semi-transparent select */
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
}

.theme-blue .topnav .form-select:focus {
    background-color: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
}

.theme-blue .page-header-dark {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%) !important;
    /* Blue gradient - light to dark */
}

.theme-blue .page-header-title {
    color: #ffffff !important;
    /* White title */
}

.theme-blue .page-header-subtitle {
    color: #e2e8f0 !important;
    /* Light gray subtitle */
}

.theme-blue .page-header-icon {
    color: #ffffff !important;
    /* White icon */
}

.theme-blue .sidenav-light .nav-link {
    color: #ffffff !important;
    /* White text for nav links */
}

.theme-blue .sidenav-light .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    /* Light grey background on hover */
    color: #ffffff !important;
    /* White text on hover */
}

.theme-blue .sidenav-light .nav-link.active {
    background-color: rgba(255, 255, 255, 0.15) !important;
    /* Slightly darker grey for active state */
    color: #ffffff !important;
    /* White text for active */
    font-weight: 600;
    /* Bold text for active */
}

.theme-blue .sidenav-light .nav-link-icon {
    color: #ffffff !important;
    /* White icons */
}

.theme-blue .sidenav-light .sidenav-menu-heading {
    color: #e2e8f0 !important;
    /* Light gray for headings */
}

.theme-blue .sidenav-light .sidenav-collapse-arrow {
    color: #ffffff !important;
    /* White arrows */
}

.theme-blue .sidenav-light .sidenav-menu-nested .nav-link {
    color: #f1f5f9 !important;
    /* Light white for nested links */
}

.theme-blue .sidenav-light .sidenav-menu-nested .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.08) !important;
    /* Light grey background on hover for nested */
    color: #ffffff !important;
    /* White text on hover */
}

.theme-blue .sidenav-light .sidenav-menu-nested .nav-link.active {
    background-color: rgba(255, 255, 255, 0.12) !important;
    /* Light grey for active nested */
    color: #ffffff !important;
    /* White text for active nested */
    font-weight: 600;
    /* Bold text for active nested */
}

/* ===== GREEN THEME ===== */
.theme-green .sidenav-light {
    background-color: #059669 !important;
    /* Green background */
    color: #ffffff !important;
    /* White text */
}

.theme-green .topnav {
    background-color: #059669 !important;
    /* Green header background */
}

.theme-green .topnav .navbar-brand {
    color: #ffffff !important;
    /* White brand text */
}

.theme-green .topnav .btn-transparent-dark {
    color: #ffffff !important;
    /* White button icons */
}

.theme-green .topnav .btn-transparent-dark:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    /* Light hover effect */
    color: #ffffff !important;
}

.theme-green .topnav .form-select {
    background-color: rgba(255, 255, 255, 0.1) !important;
    /* Semi-transparent select */
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
}

.theme-green .topnav .form-select:focus {
    background-color: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
}

.theme-green .page-header-dark {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    /* Green gradient - light to dark */
}

.theme-green .page-header-title {
    color: #ffffff !important;
    /* White title */
}

.theme-green .page-header-subtitle {
    color: #e2e8f0 !important;
    /* Light gray subtitle */
}

.theme-green .page-header-icon {
    color: #ffffff !important;
    /* White icon */
}

.theme-green .sidenav-light .nav-link {
    color: #ffffff !important;
    /* White text for nav links */
}

.theme-green .sidenav-light .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    /* Light grey background on hover */
    color: #ffffff !important;
    /* White text on hover */
}

.theme-green .sidenav-light .nav-link.active {
    background-color: rgba(255, 255, 255, 0.15) !important;
    /* Slightly darker grey for active state */
    color: #ffffff !important;
    /* White text for active */
    font-weight: 600;
    /* Bold text for active */
}

.theme-green .sidenav-light .nav-link-icon {
    color: #ffffff !important;
    /* White icons */
}

.theme-green .sidenav-light .sidenav-menu-heading {
    color: #e2e8f0 !important;
    /* Light gray for headings */
}

.theme-green .sidenav-light .sidenav-collapse-arrow {
    color: #ffffff !important;
    /* White arrows */
}

.theme-green .sidenav-light .sidenav-menu-nested .nav-link {
    color: #f1f5f9 !important;
    /* Light white for nested links */
}

.theme-green .sidenav-light .sidenav-menu-nested .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.08) !important;
    /* Light grey background on hover for nested */
    color: #ffffff !important;
    /* White text on hover */
}

.theme-green .sidenav-light .sidenav-menu-nested .nav-link.active {
    background-color: rgba(255, 255, 255, 0.12) !important;
    /* Light grey for active nested */
    color: #ffffff !important;
    /* White text for active nested */
    font-weight: 600;
    /* Bold text for active nested */
}

/* ===== RED THEME ===== */
.theme-red .sidenav-light {
    background-color: #dc2626 !important;
    /* Red background */
    color: #ffffff !important;
    /* White text */
}

.theme-red .topnav {
    background-color: #dc2626 !important;
    /* Red header background */
}

.theme-red .topnav .navbar-brand {
    color: #ffffff !important;
    /* White brand text */
}

.theme-red .topnav .btn-transparent-dark {
    color: #ffffff !important;
    /* White button icons */
}

.theme-red .topnav .btn-transparent-dark:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    /* Light hover effect */
    color: #ffffff !important;
}

.theme-red .topnav .form-select {
    background-color: rgba(255, 255, 255, 0.1) !important;
    /* Semi-transparent select */
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
}

.theme-red .topnav .form-select:focus {
    background-color: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
}

.theme-red .page-header-dark {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    /* Red gradient - light to dark */
}

.theme-red .page-header-title {
    color: #ffffff !important;
    /* White title */
}

.theme-red .page-header-subtitle {
    color: #e2e8f0 !important;
    /* Light gray subtitle */
}

.theme-red .page-header-icon {
    color: #ffffff !important;
    /* White icon */
}

.theme-red .sidenav-light .nav-link {
    color: #ffffff !important;
    /* White text for nav links */
}

.theme-red .sidenav-light .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    /* Light grey background on hover */
    color: #ffffff !important;
    /* White text on hover */
}

.theme-red .sidenav-light .nav-link.active {
    background-color: rgba(255, 255, 255, 0.15) !important;
    /* Slightly darker grey for active state */
    color: #ffffff !important;
    /* White text for active */
    font-weight: 600;
    /* Bold text for active */
}

.theme-red .sidenav-light .nav-link-icon {
    color: #ffffff !important;
    /* White icons */
}

.theme-red .sidenav-light .sidenav-menu-heading {
    color: #e2e8f0 !important;
    /* Light gray for headings */
}

.theme-red .sidenav-light .sidenav-collapse-arrow {
    color: #ffffff !important;
    /* White arrows */
}

.theme-red .sidenav-light .sidenav-menu-nested .nav-link {
    color: #f1f5f9 !important;
    /* Light white for nested links */
}

.theme-red .sidenav-light .sidenav-menu-nested .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.08) !important;
    /* Light grey background on hover for nested */
    color: #ffffff !important;
    /* White text on hover */
}

.theme-red .sidenav-light .sidenav-menu-nested .nav-link.active {
    background-color: rgba(255, 255, 255, 0.12) !important;
    /* Light grey for active nested */
    color: #ffffff !important;
    /* White text for active nested */
    font-weight: 600;
    /* Bold text for active nested */
}

/* ===== DARK THEME ===== */
.theme-dark .sidenav-light {
    background-color: #1f2937 !important;
    /* Dark gray background */
    color: #ffffff !important;
    /* White text */
}

.theme-dark .topnav {
    background-color: #1f2937 !important;
    /* Dark header background */
}

.theme-dark .topnav .navbar-brand {
    color: #ffffff !important;
    /* White brand text */
}

.theme-dark .topnav .btn-transparent-dark {
    color: #ffffff !important;
    /* White button icons */
}

.theme-dark .topnav .btn-transparent-dark:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    /* Light hover effect */
    color: #ffffff !important;
}

.theme-dark .topnav .form-select {
    background-color: rgba(255, 255, 255, 0.1) !important;
    /* Semi-transparent select */
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
}

.theme-dark .topnav .form-select:focus {
    background-color: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
}

.theme-dark .page-header-dark {
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%) !important;
    /* Dark gradient - light to dark */
}

.theme-dark .page-header-title {
    color: #ffffff !important;
    /* White title */
}

.theme-dark .page-header-subtitle {
    color: #e2e8f0 !important;
    /* Light gray subtitle */
}

.theme-dark .page-header-icon {
    color: #ffffff !important;
    /* White icon */
}

.theme-dark .sidenav-light .nav-link {
    color: #ffffff !important;
    /* White text for nav links */
}

.theme-dark .sidenav-light .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    /* Light grey background on hover */
    color: #ffffff !important;
    /* White text on hover */
}

.theme-dark .sidenav-light .nav-link.active {
    background-color: rgba(255, 255, 255, 0.15) !important;
    /* Slightly darker grey for active state */
    color: #ffffff !important;
    /* White text for active */
    font-weight: 600;
    /* Bold text for active */
}

.theme-dark .sidenav-light .nav-link-icon {
    color: #ffffff !important;
    /* White icons */
}

.theme-dark .sidenav-light .sidenav-menu-heading {
    color: #e2e8f0 !important;
    /* Light gray for headings */
}

.theme-dark .sidenav-light .sidenav-collapse-arrow {
    color: #ffffff !important;
    /* White arrows */
}

.theme-dark .sidenav-light .sidenav-menu-nested .nav-link {
    color: #f1f5f9 !important;
    /* Light white for nested links */
}

.theme-dark .sidenav-light .sidenav-menu-nested .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.08) !important;
    /* Light grey background on hover for nested */
    color: #ffffff !important;
    /* White text on hover */
}

.theme-dark .sidenav-light .sidenav-menu-nested .nav-link.active {
    background-color: rgba(255, 255, 255, 0.12) !important;
    /* Light grey for active nested */
    color: #ffffff !important;
    /* White text for active nested */
    font-weight: 600;
    /* Bold text for active nested */
}

/* ===== LIGHT THEME ===== */
.theme-light .sidenav-light {
    background-color: #f8fafc !important;
    /* Light gray background */
    color: #1f2937 !important;
    /* Dark text */
}

.theme-light .topnav {
    background-color: #f8fafc !important;
    /* Light header background */
}

.theme-light .topnav .navbar-brand {
    color: #1f2937 !important;
    /* Dark brand text */
}

.theme-light .topnav .btn-transparent-dark {
    color: #6b7280 !important;
    /* Gray button icons */
}

.theme-light .topnav .btn-transparent-dark:hover {
    background-color: rgba(0, 0, 0, 0.05) !important;
    /* Light hover effect */
    color: #1f2937 !important;
}

.theme-light .topnav .form-select {
    background-color: rgba(0, 0, 0, 0.05) !important;
    /* Semi-transparent select */
    border-color: rgba(0, 0, 0, 0.1) !important;
    color: #1f2937 !important;
}

.theme-light .topnav .form-select:focus {
    background-color: rgba(0, 0, 0, 0.08) !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
    color: #1f2937 !important;
}

.theme-light .page-header-dark {
    background: linear-gradient(135deg, #e2e8f0 0%, #f8fafc 100%) !important;
    /* Light gradient - light to dark */
}

.theme-light .page-header-title {
    color: #1f2937 !important;
    /* Dark title */
}

.theme-light .page-header-subtitle {
    color: #6b7280 !important;
    /* Gray subtitle */
}

.theme-light .page-header-icon {
    color: #6b7280 !important;
    /* Gray icon */
}

.theme-light .sidenav-light .nav-link {
    color: #1f2937 !important;
    /* Dark text for nav links */
}

.theme-light .sidenav-light .nav-link:hover {
    background-color: rgba(0, 0, 0, 0.05) !important;
    /* Light dark background on hover */
    color: #1f2937 !important;
    /* Dark text on hover */
}

.theme-light .sidenav-light .nav-link.active {
    background-color: rgba(0, 0, 0, 0.1) !important;
    /* Darker background for active state */
    color: #1f2937 !important;
    /* Dark text for active */
    font-weight: 600;
    /* Bold text for active */
}

.theme-light .sidenav-light .nav-link-icon {
    color: #6b7280 !important;
    /* Gray icons */
}

.theme-light .sidenav-light .sidenav-menu-heading {
    color: #6b7280 !important;
    /* Gray for headings */
}

.theme-light .sidenav-light .sidenav-collapse-arrow {
    color: #6b7280 !important;
    /* Gray arrows */
}

.theme-light .sidenav-light .sidenav-menu-nested .nav-link {
    color: #4b5563 !important;
    /* Darker gray for nested links */
}

.theme-light .sidenav-light .sidenav-menu-nested .nav-link:hover {
    background-color: rgba(0, 0, 0, 0.03) !important;
    /* Light background on hover for nested */
    color: #1f2937 !important;
    /* Dark text on hover */
}

.theme-light .sidenav-light .sidenav-menu-nested .nav-link.active {
    background-color: rgba(0, 0, 0, 0.08) !important;
    /* Darker background for active nested */
    color: #1f2937 !important;
    /* Dark text for active nested */
    font-weight: 600;
    /* Bold text for active nested */
}

/* ===== THEME TRANSITION ===== */
.sidenav-light {
    transition: all 0.3s ease;
}

.sidenav-light * {
    transition: all 0.3s ease;
}

/* ===== MOBILE SIDEBAR ENHANCEMENT ===== */
@media (max-width: 991.98px) {

    /* Simple fix: Just ensure sidebar is above overlay */
    .sidenav-overlay {
        z-index: 1037 !important;
    }

    .sidenav-toggled #layoutSidenav #layoutSidenav_nav {
        z-index: 1038 !important;
    }

    .nav-fixed .topnav {
        z-index: 1039 !important;
    }

    /* Academic session selector responsive */
    #academicSessionSelector {
        min-width: 150px !important;
        max-width: 200px !important;
    }
}

/* ===== SELECT OPTION FONT COLOR ===== */
/* Ensure select dropdown text is black */
.form-select option {
    color: #000000 !important;
    background-color: #ffffff !important;
}


/* ===== THEME PREVIEW STYLES ===== */
.theme-option {
    cursor: pointer;
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.theme-option:hover {
    background-color: #f8f9fa;
}

.theme-preview {
    width: 60px;
    height: 40px;
    border-radius: 6px;
    margin: 0 auto 8px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.theme-blue-preview {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #1e40af 100%);
}

.theme-green-preview {
    background: linear-gradient(135deg, #059669 0%, #10b981 50%, #059669 100%);
}

.theme-red-preview {
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 50%, #dc2626 100%);
}

.theme-dark-preview {
    background: linear-gradient(135deg, #1f2937 0%, #374151 50%, #1f2937 100%);
}

.theme-light-preview {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #f8fafc 100%);
    border: 2px solid #cbd5e1;
}

.theme-option input[type="radio"]:checked+label {
    font-weight: 600;
    color: #0d6efd;
}

.theme-option input[type="radio"]:checked~.theme-preview {
    border-color: #0d6efd;
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.25);
}

/* ===== PROFILE PICTURE UPLOAD STYLES ===== */
.img-account-profile {
    border: 3px solid #e9ecef;
    transition: all 0.3s ease;
}

.img-account-profile:hover {
    border-color: #0d6efd;
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.25);
}

#profile-picture-input {
    display: none;
}

.profile-picture-upload-btn {
    position: relative;
    overflow: hidden;
}

.profile-picture-upload-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* ===== UNIVERSAL SIDEBAR WHITE ICON ENFORCEMENT ===== */
.theme-green .sidenav .nav-link-icon,
.theme-green .sidenav .nav-link-icon i,
.theme-blue .sidenav .nav-link-icon,
.theme-blue .sidenav .nav-link-icon i,
.theme-red .sidenav .nav-link-icon,
.theme-red .sidenav .nav-link-icon i,
.theme-dark .sidenav .nav-link-icon,
.theme-dark .sidenav .nav-link-icon i,
.theme-purple .sidenav .nav-link-icon,
.theme-purple .sidenav .nav-link-icon i,
.sidenav-dark .nav-link-icon,
.sidenav-dark .nav-link-icon i {
    color: #ffffff !important;
}

.theme-green .sidenav .sidenav-collapse-arrow i,
.theme-blue .sidenav .sidenav-collapse-arrow i,
.theme-red .sidenav .sidenav-collapse-arrow i,
.theme-dark .sidenav .sidenav-collapse-arrow i,
.theme-purple .sidenav .sidenav-collapse-arrow i {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* ===== INPUT GROUP PASSWORD TOGGLE ===== */
.input-group > .toggle-password {
    border: 1px solid #c5ccd6 !important;
    border-left: none !important;
    background-color: #f2f6fc !important;
    color: #69707a !important;
    z-index: 4;
    padding: 0.55rem 0.95rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease-in-out;
}
.input-group > .toggle-password:hover {
    background-color: #e3e8f0 !important;
    color: #0061f2 !important;
}
.input-group > .toggle-password:focus {
    box-shadow: none !important;
    border-color: #c5ccd6 !important;
}