/* ==========================================================================
   1. Global Styles & Layout
   ========================================================================== */
body.admin-body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    background-attachment: fixed;
    font-family: 'Inter', sans-serif;
    margin: 0;
}

.admin-wrapper {
    display: flex;
    align-items: flex-start;
    min-height: 100vh;
}

.main-content {
    flex-grow: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ==========================================================================
   2. Sidebar (Fixed & Responsive)
   ========================================================================== */

.sidebar {
    width: 260px; /* Desired width */
    min-width: 260px; /* Lock minimum width */
    max-width: 260px; /* Lock maximum width */
    height: 100vh;
    background: #002e5b;
    position: sticky;
    top: 0;
    flex-shrink: 0; /* Prevents sidebar from shrinking in flex container */
    overflow-y: auto; /* Adds scrollbar if menu items are too many */
    transition: none; /* Removed transition to keep it rigid as requested */
}

/* Ensure the right side content takes the rest of the space */
.flex-grow-1 {
    width: calc(100% - 260px); 
    min-width: 0; /* Prevents content from overflowing the screen */
}

.sidebar-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.menu-label {
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 1.2px;
    font-size: 0.7rem;
    padding-left: 15px;
}


.nav-link-custom {
    display: flex;
    align-items: center;
    padding: 12px 18px;
    margin-bottom: 5px;
    color: rgba(255, 255, 255, 0.7) !important;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 500;
    transition: 0.2s all ease;
}

.nav-link-custom i {
    font-size: 1.2rem;
    margin-right: 12px;
}


.nav-link-custom.active {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff !important;
    box-shadow: inset 4px 0 0 #d3261d; 
}

.nav-link-custom:hover:not(.active) {
    background: rgba(255, 255, 255, 0.05);
    color: #fff !important;
    padding-left: 22px; 
}

.logout-link:hover {
    background: rgba(211, 38, 29, 0.1) !important;
    color: #d3261d !important;
}


.admin-profile.glass-card {
    background: #fff;
    border-radius: 50px;
    border: 1px solid #eee;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* ==========================================================================
   3. Glassmorphism Components
   ========================================================================== */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.07);
    transition: transform 0.3s ease;
}

.topbar {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding: 15px 30px;
}

/* ==========================================================================
   4. Gallery & Images
   ========================================================================== */
.gallery-item {
    overflow: hidden;
    border-radius: 15px;
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-item img {
    transition: 0.5s;
    object-fit: cover;
    width: 100%;
}

/* ==========================================================================
   5. Form Inputs
   ========================================================================== */
.glass-input {
    background: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid #ced4da !important; 
    color: #002e5b !important; 
    border-radius: 10px !important;
    padding: 10px 15px !important;
    width: 100%;
    margin-bottom: 15px;
}

/* ==========================================================================
   6. Login Page Specific
   ========================================================================== */
.login-body {
    background: radial-gradient(circle, #003a70 0%, #001a33 100%);
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

/* Main Glass Card Container */
.login-body .glass-login-container {
    background: rgba(255, 255, 255, 0.1); /* Subtle white overlay */
    backdrop-filter: blur(20px); /* Frosted glass effect */
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 25px;
    padding: 50px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
}

/* Top Icon Box */
.login-body .login-icon-box {
    background: #ffffff;
    width: 70px;
    height: 70px;
    margin: 0 auto;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #002e5b;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* Input Group Glassy Background */
.login-body .custom-glass-group {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 12px !important;
    overflow: hidden;
}

.login-body .custom-glass-group .input-group-text {
    background: transparent !important;
    border: none !important;
    color: rgba(255, 255, 255, 0.6) !important;
    padding-left: 15px;
}

.login-body .custom-glass-group .form-control {
    background: transparent !important;
    border: none !important;
    color: #ffffff !important;
    padding: 12px 10px !important;
}

.login-body .custom-glass-group .form-control::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Submit Button matching the Red in image */
.login-body .btn-ipsr-red-solid {
    background: #d3261d !important;
    border: none !important;
    color: white !important;
    border-radius: 10px !important;
    transition: 0.3s ease;
}

.login-body .btn-ipsr-red-solid:hover {
    background: #b32a27 !important;
    transform: scale(1.02);
}

/* ==========================================================================
   7. MOBILE RESPONSIVENESS (The Magic Part)
   ========================================================================== */

@media (max-width: 992px) {
    
}

@media (max-width: 768px) {
    .admin-wrapper {
        flex-direction: column; /* Stack sidebar on top for mobile */
    }
    
    .topbar {
        padding: 10px 20px;
    }
    .glass-login-card {
        padding: 25px;
    }
    .gallery-item img {
        height: 120px; /* Smaller height for mobile thumbnails */
    }
}

@media (max-width: 576px) {
    .admin-profile span {
        display: none; /* Hide name, show only profile pic on very small phones */
    }
}

/* Styling for the main action buttons (Upload/Login) */
.btn-navy {
    background: linear-gradient(135deg, #002e5b 0%, #004a8f 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 10px 25px !important;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 46, 91, 0.2);
}

.btn-navy:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 46, 91, 0.3);
    filter: brightness(1.1);
}

/* Styling for the delete/danger buttons */
.btn-red {
    background: linear-gradient(135deg, #b32a27 0%, #e63946 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 10px 25px !important;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(179, 42, 39, 0.2);
}

.btn-red:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(179, 42, 39, 0.3);
    filter: brightness(1.1);
}

/* Glassy effect for outline buttons */
.btn-glass-outline {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(0, 46, 91, 0.5) !important;
    color: #002e5b !important;
    backdrop-filter: blur(5px);
    border-radius: 12px;
    padding: 8px 20px;
    transition: 0.3s;
}

.btn-glass-outline:hover {
    background: #002e5b;
    color: #fff !important;
}

/* Primary navy blue color for headings and bold text */
.text-navy {
    color: #002e5b !important;
    font-weight: 600;
    letter-spacing: -0.2px;
}

/* Navy blue background with white text for badges or icons */
.bg-navy {
    background-color: #002e5b !important;
    color: #ffffff !important;
}

/* Light navy effect for subtle backgrounds */
.bg-soft-navy {
    background-color: rgba(0, 46, 91, 0.1) !important;
    color: #002e5b !important;
}

/* Main card styling for course management */
.card-course {
    border-radius: 15px;
    border: none;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

/* Styling for the table headers */
.table-navy thead {
    background-color: #002e5b;
    color: #ffffff;
}

.table-navy th {
    font-weight: 500;
    padding: 15px;
    border: none;
}

/* Course name text styling */
.course-name-text {
    color: #002e5b;
    font-weight: 600;
    font-size: 0.85rem;
}

/* Status badges with soft backgrounds */
.badge-active {
    background-color: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border: 1px solid #28a745;
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 0.8rem;
}

.badge-inactive {
    background-color: rgba(108, 117, 125, 0.1);
    color: #6c757d;
    border: 1px solid #6c757d;
    padding: 5px 12px;
    border-radius: 50px;
}

/* Input field focus effect */
.form-control-navy:focus {
    border-color: #002e5b;
    box-shadow: 0 0 0 0.25rem rgba(0, 46, 91, 0.1);
}

/* ==========================================================================
   IPSR CUSTOM THEME - NAVY & GOLD
   ========================================================================== */

/* Main action buttons with IPSR Navy-Gold Gradient */
.btn-navy {
    background: linear-gradient(135deg, #002e5b 0%, #001a33 100%) !important;
    color: #fdb913 !important; /* Gold Text */
    border: 1px solid #fdb913 !important;
    border-radius: 8px !important;
    padding: 10px 25px !important;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-navy:hover {
    background: #fdb913 !important; /* Switch to Gold on hover */
    color: #002e5b !important; /* Navy text on hover */
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(253, 185, 19, 0.3);
}

/* Professional Card for Course Management */
.card-course {
    background: #ffffff;
    border-radius: 12px;
    border-top: 5px solid #002e5b; /* Navy Top Border */
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

/* Elegant Table Header */
.table-navy thead {
    background-color: #f8f9fa; /* Light background for contrast */
    border-bottom: 2px solid #002e5b;
}

.table-navy th {
    color: #002e5b;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    padding: 15px;
}

/* Row Hover Effect */
.table-hover tbody tr:hover {
    background-color: rgba(0, 46, 91, 0.02);
}



/* Danger Button for Delete */
.btn-red-outline {
    background: transparent;
    color: #e63946 !important;
    border: 1px solid #e63946 !important;
    border-radius: 6px;
    padding: 5px 10px;
    transition: 0.3s;
}

.btn-red-outline:hover {
    background: #e63946;
    color: #fff !important;
}

