/* ==================== RESET & BASE ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f2f5;
    color: #333;
}

/* ==================== FIXED HEADER ==================== */
.fixed-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 65px;
    background: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sidebar-toggle-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #1a237e;
    padding: 8px;
    border-radius: 6px;
    transition: background 0.2s;
}

.sidebar-toggle-btn:hover {
    background: #f0f0f0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    height: 35px;
    width: auto;
}

.logo-text {
    font-size: 18px;
    font-weight: 700;
    color: #1a237e;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-link {
    text-decoration: none;
    color: #555;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover {
    color: #1a237e;
}

.login-btn {
    background: #1a237e;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
}

.login-btn:hover {
    background: #0d1757;
}


.register-btn {
    box-sizing: border-box !important; /* Forces border inside */
    border: 2px solid #1f2a8a;
    background: transparent;
    color: #1f2a8a;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
}

.register-btn:hover {
    background: #1f2a8a;
    color: white;
}



/* ==================== SIDEBAR OVERLAY ==================== */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

.sidebar-overlay.active {
    display: block;
}

/* ==================== LEFT SIDEBAR ==================== */
.left-sidebar {
    position: fixed;
    top: 65px;
    left: 0;
    width: 280px;
    height: calc(100% - 65px);
    background: #ffffff;
    border-right: 1px solid #e0e0e0;
    overflow-y: auto;
    transition: left 0.3s ease;
    z-index: 1000;
    padding: 20px 0;
}

/* Mobile styles - sidebar hidden by default */
@media (max-width: 768px) {
    .left-sidebar {
        width: 80%;
        left: -80%;
        max-width: 320px;
        box-shadow: none !important;
        transition: left 0.3s ease, box-shadow 0.3s ease;
    }
    
    .left-sidebar.open {
        left: 0;
        /*box-shadow: 2px 0 20px rgba(0, 0, 0, 0.25);*/
    }
    
    .sidebar-toggle-btn {
        display: flex !important;
    }
    
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }
    
    .sidebar-overlay.active {
        display: block;
    }
    
    .main-content.sidebar-open {
        margin-left: 0;
    }
    
    .fixed-header {
        padding: 0 16px;
    }
    
    .logo-text {
        display: none;
    }
    
    .header-right .nav-link {
        display: none;
    }
    
    .header-right .login-btn {
        padding: 6px 14px;
        font-size: 13px;
    }
    
    .header-right .register-btn {
        box-sizing: border-box !important;
        padding: 6px 14px !important;
        font-size: 13px !important;
    }
    
    .main-content {
        padding-left: 10px;
        padding-right: 10px;
        padding-top: 40px;
    }
    
    .test-grid {
        grid-template-columns: 1fr;
    }
    
    .welcome-section {
        padding: 20px;
    }
    
    .welcome-text h1 {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .left-sidebar {
        width: 85%;
        left: -85%;
        max-width: 300px;
    }
    
    .main-content {
        padding-left: 8px;
        padding-right: 8px;
        padding-top: 40px;
        /*Width:100% !important;*/
    }
    
    .main-content.sidebar-open {
        margin-left: 0;
    }
    
    .test-card {
        flex-wrap: wrap;
    }
    
    .header-right .login-btn {
        padding: 6px 14px;
        font-size: 13px;
    }
    
    .header-right .register-btn {
        box-sizing: border-box !important;
        padding: 6px 14px !important;
        font-size: 13px !important;
    }
}

/* Desktop styles - sidebar always visible */
@media (min-width: 769px) {
    .sidebar-toggle-btn {
        display: none !important;
    }
    
    .left-sidebar {
        left: 0 !important;
    }
    
    .main-content {
        margin-left: 280px !important;
        padding-top: 85px;
        padding-left: 30px;
        padding-right: 30px;
        padding-bottom: 40px;
        min-height: calc(100vh - 65px);
    }
    
    .main-content.sidebar-open {
        margin-left: 280px !important;
    }
    
    .sidebar-overlay {
        display: none !important;
    }
}

.sidebar-header {
    padding: 0 0 8px;
    border-bottom: 1px solid #e0e0e0;
}

.sidebar-header h3 {
    font-size: 18px;
    color: #1a237e;
    margin-bottom: 6px;
}

.sidebar-header p {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
}

.sidebar-header.active {
    background: #e8eaf6 !important;
    color: #1a237e !important;
    border-right: 3px solid #1a237e !important;
}

.sidebar-menu {
    list-style: none;
    padding: 16px 0;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    cursor: pointer;
    transition: background 0.2s;
    gap: 12px;
    color: #555;
    font-size: 14px;
    font-weight: 500;
}

.menu-item:hover {
    background: #f5f5f5;
}

.menu-item.active {
    background: #e8eaf6;
    color: #1a237e;
    border-right: 3px solid #1a237e;
}

.menu-item i {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

.menu-item .badge {
    margin-left: auto;
    background: #ff9800;
    color: white;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 12px;
}

.menu-item .badge.new {
    background: #4caf50;
}

.menu-item.logout {
    margin-top: 20px;
    border-top: 1px solid #e0e0e0;
    padding-top: 20px;
    color: #f44336;
}

.menu-item.logout:hover {
    background: #ffebee;
}



/* Sidebar menu links behave like menu buttons */
.sidebar-menu .menu-item > a {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    height: 100%;
    color: inherit !important;
    text-decoration: none !important;
}

    .sidebar-menu .menu-item .li > a {
        text-decoration: none !important;
    }
/* Active state for sidebar items */
.sidebar-menu .menu-item.active {
    background: #e8eaf6;
    color: #1a237e;
    border-right: 3px solid #1a237e;
}




/* ============================================================
   COLLAPSIBLE SIDEBAR MENU - FIXES
   ============================================================ */

/* Ensure collapsible items don't interfere with other menu items */
.menu-item-collapsible {
    flex-direction: column !important;
    padding: 0 !important;
    margin: 0 !important;
    align-items: stretch !important;
    position: relative;
}

.menu-item-content {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    gap: 12px;
    cursor: pointer;
    transition: background 0.2s;
    width: 100%;
    min-height: 40px;
    box-sizing: border-box;
    border: none;
    background: transparent;
}

.menu-item-content:hover {
    background: #f5f5f5;
}

/*.menu-item-content i:first-child {*/
/*    width: 20px;*/
/*    text-align: center;*/
/*    font-size: 16px;*/
/*}*/

.menu-item-content span:first-of-type {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #555;
}

.collapse-icon {
    margin-left: auto;
    transition: transform 0.3s ease;
}

.collapse-icon i {
    font-size: 14px !important;
    color: #888;
}

/* Sub-menu styles */
.sub-menu {
    list-style: none;
    padding: 0 !important;
    margin: 0 !important;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #f8f9fa;
}

.sub-menu.open {
    max-height: 300px;
}

.sub-menu-item {
    padding: 0 !important;
    border-left: 3px solid transparent;
}

.sub-menu-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px 10px 56px;
    width: 100%;
    height: 100%;
    color: #555 !important;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 400;
}

.sub-menu-item a i {
    width: 20px;
    text-align: center;
    font-size: 14px;
    color: #777;
}

.sub-menu-item:hover {
    background: #eef0f5;
    border-left-color: #1a237e;
}

.sub-menu-item:hover a {
    color: #1a237e !important;
}

.sub-menu-item.active {
    background: #e8eaf6;
    border-right-color: #1a237e;
}

.sub-menu-item.active a {
    color: #1a237e !important;
}



/* Rotate icon when expanded */
.menu-item-collapsible.expanded .collapse-icon {
    transform: rotate(180deg);
}

/* Prevent sub-menu items from triggering the parent click */
.sub-menu-item a {
    pointer-events: auto;
}

/* Parent menu item active state */
.menu-item-collapsible.active > .menu-item-content {
    background: #e8eaf6;
    color: #1a237e;
    border-right: 3px solid #1a237e;
}

.menu-item-collapsible.active > .menu-item-content span:first-of-type {
    color: #1a237e;
}

/* When expanded, remove the right border from parent if sub-item is active */
.menu-item-collapsible.expanded.active > .menu-item-content {
    border-right: none;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .sub-menu-item a {
        padding: 10px 16px 10px 48px;
    }
}

@media (max-width: 480px) {
    .sub-menu-item a {
        padding: 10px 14px 10px 40px;
    }
}





/* ==================== MAIN CONTENT ==================== */
.main-content {
    margin-left: 0;
    padding-top: 85px;
    padding-left: 24px;
    padding-right: 24px;
    padding-bottom: 40px;
    min-height: calc(100vh - 65px);
    transition: margin-left 0.3s ease;
}

.main-content.sidebar-open {
    margin-left: 280px;
}

/* ==================== WELCOME SECTION ==================== */
.welcome-section {
    background: linear-gradient(135deg, #1a237e 0%, #283593 100%);
    border-radius: 12px;
    padding: 30px 35px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.welcome-text h1 {
    font-size: 24px;
    margin-bottom: 6px;
}

.welcome-text p {
    opacity: 0.8;
    font-size: 14px;
}

/* ==================== SECTION HEADER ==================== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: 20px;
    color: #1a237e;
    padding: 0 12px 0 0;
}

.section-header::after {
    content: '';
    flex: 1;
    height: 1px !important;
    background: #1a237e; /*linear-gradient(90deg, transparent, #1a237e, #4caf50);*/
    min-width: 20px;
}

.view-all {
    color: #1a237e;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.view-all:hover {
    text-decoration: underline;
}



/* ==================== TEST HEADER WITH LINES ==================== */

.test-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 30px 0 40px;
    width: 100%;
    position: relative;
}

/* The text style */
.test-header p {
    font-size: 20px;
    font-weight: 700;
    color: #1a237e;
    letter-spacing: -0.5px;
    margin: 0;
    padding: 0 12px;
    white-space: pre-wrap !important;
    flex-shrink: 0;
}

/* Horizontal lines on both sides */
.test-header::before,
.test-header::after {
    content: '';
    flex: 1;
    height: 1px !important;
    background: #1a237e; /*linear-gradient(90deg, transparent, #1a237e, #4caf50);*/
    min-width: 20px;
}

.test-header::after {
    /*background: linear-gradient(90deg, #4caf50, #1a237e, transparent);*/
    background: #1a237e;
}




@media (min-width: 769px) {
    .test-header {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 20px;
        margin: 30px 0 40px;
        width: 100%;
        position: relative;
    }
    
    /* The text style */
    .test-header p {
        font-size: 20px;
        font-weight: 700;
        color: #1a237e;
        letter-spacing: -0.5px;
        margin: 0;
        padding: 0 12px;
        white-space: nowrap !important;
        flex-shrink: 0;
    }
    
    /* Horizontal lines on both sides */
    .test-header::before,
    .test-header::after {
        content: '';
        flex: 1;
        height: 1px !important;
        background: #1a237e; /*linear-gradient(90deg, transparent, #1a237e, #4caf50);*/
        min-width: 20px;
    }
    
    .test-header::after {
        /*background: linear-gradient(90deg, #4caf50, #1a237e, transparent);*/
        background: #1a237e;
    }
}




/* ==================== FIX: TEST HEADER MOBILE OVERFLOW ==================== */

@media (max-width: 768px) {
    .test-header {
        gap: 8px;
        margin: 20px 0 18px;
        padding: 0 5px;
        flex-wrap: nowrap;
    }
    
    .test-header p {
        font-size: 18px !important;
        padding: 0 6px;
        white-space: normal !important;
        word-wrap: break-word;
        text-align: center;
        line-height: 1.3;
        max-width: 70%;
        flex-shrink: 1;
    }
    
    .test-header::before,
    .test-header::after {
        min-width: 8px;
        flex: 0.2;
        flex-shrink: 0;
    }
}

@media (max-width: 480px) {
    .test-header p {
        font-size: 18px !important;
        max-width: 65%;
    }
}


/* ==================== TEST HEADER WITH BOX ==================== */


/* The rectangular box containing the text */
.test-header-wrapper {
    display: block;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 12px 30px;
    background: #fff;
    /*border: 0.5px solid #1a237e;*/
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(26, 35, 126, 0.1);
    position: relative;
    z-index: 2;
    min-width: 200px;
}

/* Lines on both sides */
.test-header-wrapper::before,
.test-header-wrapper::after {
    content: '';
    flex: 1;
    height: 2px;
    background: #1a237e;
    min-width: 10px;
    opacity: 0.6;
}

/* Text inside the box */
.test-header-box p {
    font-size: 20px !important;
    font-weight: 700;
    color: #1a237e;
    letter-spacing: -0.5px;
    margin: 0;
    padding: 0;
    white-space: nowrap;
}

/* Optional: Icon inside the box */
.test-header-box i {
    font-size: 20px !important;
    color: #4caf50;
    margin-right: 8px;
}

/* Hover effect */
.test-header-box:hover {
    box-shadow: 0 6px 25px rgba(26, 35, 126, 0.2);
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

/* Responsive styles */
@media (max-width: 768px) {
    .test-header-wrapper {
        margin: 20px 0 18px;
    }
    
    .test-header-box {
        padding: 10px 20px;
        gap: 12px;
        min-width: 150px;
        border-radius: 8px;
    }
    
    .test-header-box p {
        font-size: 22px;
    }
    
    .test-header-box i {
        font-size: 18px;
    }
    
    .test-header-wrapper::before,
    .test-header-wrapper::after {
        min-width: 15px;
    }
}

@media (max-width: 480px) {
    .test-header-wrapper {
        margin: 16px 0 14px;
    }
    
    .test-header-box {
        padding: 8px 14px;
        gap: 8px;
        min-width: 120px;
        border-radius: 6px;
        border-width: 1.5px;
    }
    
    .test-header-box p {
        font-size: 18px;
    }
    
    .test-header-box i {
        font-size: 14px;
        margin-right: 4px;
    }
    
    .test-header-wrapper::before,
    .test-header-wrapper::after {
        min-width: 10px;
        height: 1.5px;
    }
}




/* ==================== TEST SERIES ==================== */
.test-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
    Margin-bottom: 40px;
}

.test-card {
    background: #fff;
    border-radius: 10px;
    border: 1px solid #1a237e;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    /*border: 1px solid #e8e8e8;*/
}

.test-card:hover {
    background: #e6e6ff;
    color: #fff !important;
    cursor: pointer;
    /*border: 1px solid #1a237e;*/
}


a {
  text-decoration: none !important;
}

.test-icon {
    width: 44px;
    height: 44px;
    background: #e8eaf6;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #1a237e;
    flex-shrink: 0;
}

.board-logo {
    width: 44px;
    height: 44px;
    background: none !important;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.board-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 10px;
}

.test-info {
    flex: 1;
}

.test-info h4 {
    font-size: 15px;
    color: #333;
    margin-bottom: 2px;
}

.test-info p {
    font-size: 13px;
    color: #666;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 992px) {
    .welcome-section {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .fixed-header {
        padding: 0 16px;
    }
    
    .logo-text {
        display: none;
    }
    
    .header-right .nav-link {
        display: none;
    }
    
    .header-right .login-btn {
        padding: 6px 14px;
        font-size: 13px;
    }
    
    .header-right .register-btn {
        box-sizing: border-box !important;
        padding: 6px 14px !important;
        font-size: 13px !important;
    }
    
    .left-sidebar {
        width: 260px;
        left: -260px;
    }
    
    .main-content.sidebar-open {
        margin-left: 260px;
    }
    
    .main-content {
        padding-left: 16px;
        padding-right: 16px;
        padding-top: 75px;
    }
    
    .test-grid {
        grid-template-columns: 1fr;
    }
    
    .welcome-section {
        padding: 20px;
    }
    
    .welcome-text h1 {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .left-sidebar {
        width: 100%;
        left: -100%;
    }
    
    .main-content.sidebar-open {
        margin-left: 0;
    }
    
    .test-card {
        flex-wrap: wrap;
    }
    
    .header-right .login-btn {
        padding: 6px 14px;
        font-size: 13px;
    }
    
    .header-right .register-btn {
        box-sizing: border-box !important;
        padding: 6px 14px !important;
        font-size: 13px !important;
    }
}

/* ==================== FOOTER ==================== */
.site-footer {
    background: #1a237e;
    color: #ffffff;
    margin-top: 20px;
    margin-left: 280px !important;
    padding: 0;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 12px;
}

.footer-main {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding: 50px 0 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-social {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}

.footer-social a {
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
}

.footer-social a:hover {
    background: #fff;
    color: #1a237e;
}

.footer-column h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #ffffff;
    position: relative;
    padding-bottom: 10px;
}

.footer-column h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: #4caf50;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #fff;
}

.footer-bottom {
    padding: 20px 0;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-bottom-content p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

.footer-bottom-content p strong {
    color: #ffffff;
}

/* ============================================================
   MOBILE FOOTER - Social icons centered + 3 columns
   ============================================================ */

/* Mobile view - up to 768px */
@media (max-width: 768px) {
    
    .site-footer {
        width: 100% !important;
        margin-left: 0 !important;
        padding: 0;
    }

    .footer-container {
        padding: 0 16px;
    }

    .footer-main {
        display: flex;
        flex-direction: column;
        gap: 30px;
        padding: 35px 0 30px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    /* Social icons - centered in first row */
    .footer-social {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 14px;
        width: 100%;
        margin: 0 0 10px 0;
        padding: 0;
        order: 0;
    }

    .footer-social a {
        width: 40px;
        height: 40px;
        background: rgba(255, 255, 255, 0.12);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #ffffff;
        text-decoration: none;
        transition: all 0.3s ease;
        font-size: 16px;
    }

    .footer-social a:hover {
        background: #fff;
        color: #1a237e;
        transform: translateY(-2px);
    }

    /* Three columns of footer links */
    .footer-columns-wrapper {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
        width: 100%;
        order: 1;
        margin-top: 5px;
    }

    .footer-column {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        padding: 0;
    }

    .footer-column h4 {
        font-size: 14px;
        font-weight: 600;
        color: #ffffff;
        margin-bottom: 12px;
        padding-bottom: 8px;
        position: relative;
        width: 100%;
    }

    .footer-column h4::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 25px;
        height: 2px;
        background: #4caf50;
    }

    .footer-links {
        list-style: none;
        padding: 0;
        margin: 0;
        width: 100%;
    }

    .footer-links li {
        margin-bottom: 8px;
    }

    .footer-links a {
        color: rgba(255, 255, 255, 0.75);
        text-decoration: none;
        font-size: 14px;
        transition: color 0.3s ease;
        display: inline-block;
        line-height: 1.4;
    }

    .footer-links a:hover {
        color: #fff;
    }

    /* Footer bottom */
    .footer-bottom {
        padding: 18px 0;
    }

    .footer-bottom-content {
        display: flex;
        justify-content: center;
        text-align: center;
    }

    .footer-bottom-content p {
        font-size: 14px;
        color: rgba(255, 255, 255, 0.5);
        margin: 0;
        line-height: 1.5;
    }

    .footer-bottom-content p strong {
        color: rgba(255, 255, 255, 0.8);
    }
}

/* Extra small devices (up to 480px) */
@media (max-width: 480px) {
    
    .footer-main {
        padding: 25px 0 20px;
        gap: 20px;
    }

    .footer-columns-wrapper {
        gap: 15px;
    }

    .footer-column h4 {
        font-size: 16px;
        margin-bottom: 12px;
        padding-bottom: 6px;
    }

    .footer-column h4::after {
        width: 20px;
        height: 2px;
    }

    .footer-links a {
        font-size: 14px;
    }

    .footer-links li {
        margin-bottom: 6px;
    }

    .footer-social a {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .footer-social {
        gap: 12px;
    }
}

/* Tablet view (769px - 1024px) - maintain desktop layout */
@media (min-width: 769px) and (max-width: 1024px) {
    
    .footer-main {
        grid-template-columns: 2fr 1fr 1fr 1fr;
        gap: 30px;
        padding: 40px 0 30px;
    }

    .footer-social {
        justify-content: flex-start;
    }

    .footer-columns-wrapper {
        display: contents;
    }

    .footer-column h4 {
        font-size: 15px;
    }

    .footer-links a {
        font-size: 13px;
    }
}

/* Desktop view - keep existing layout */
@media (min-width: 769px) {
    
    .footer-columns-wrapper {
        display: contents;
    }

    .footer-main {
        display: grid;
        grid-template-columns: 2fr 1fr 1fr 1fr;
        gap: 40px;
        padding: 50px 0 40px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .footer-social {
        justify-content: flex-start;
        margin-top: 10px;
    }

    .footer-column h4 {
        font-size: 16px;
    }

    .footer-links a {
        font-size: 14px;
    }

    .footer-bottom-content {
        flex-direction: row;
        justify-content: space-between;
    }
}

/* ============================================================
   LOGIN POPUP (MODAL) – with password toggle
   ============================================================ */
.login-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.login-modal-overlay.active {
    display: flex;
}

.login-modal {
    background: #ffffff;
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
    padding: 32px 28px 28px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: modalFadeIn 0.25s ease;
}

@keyframes modalFadeIn {
    from { 
        opacity: 1; 
        transform: translateY(-20px);
    }
    to { 
        opacity: 1; 
        transform: translateY(0);
    }
}

.login-modal-close {
    position: absolute;
    top: 14px;
    right: 18px;
    background: none;
    border: none;
    font-size: 24px;
    color: #888;
    cursor: pointer;
    transition: color 0.2s;
    animation: modalPopOut 0.25s ease;
}

@keyframes modalPopOut {
    from { 
        opacity: 1; 
        transform: translateY(20px);
    }
    to { 
        opacity: 1; 
        transform: translateY(0);
    }
}

.login-modal-close:hover {
    color: #1a237e;
}

.login-modal h2 {
    font-size: 24px;
    color: #1a237e;
    margin-bottom: 6px;
}

.login-modal .subtitle {
    color: #666;
    font-size: 14px;
    margin-bottom: 24px;
}

.login-modal label {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    display: block;
    margin-bottom: 4px;
}

/* Increase gap above the password label */
.login-modal label[for="loginPassword"] {
    margin-top: 12px;
}

/* Email wrapper - matches password wrapper structure */
.email-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 16px;
}

.email-wrapper input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    font-size: 14px;
    background: #fafafa;
    transition: border 0.2s;
    margin-bottom: 0;
    height: 44px;
    box-sizing: border-box;
}

.email-wrapper input:focus {
    border-color: #1a237e;
    outline: none;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(26, 35, 126, 0.1);
}

/* Password wrapper - consistent with email wrapper */
.password-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 16px;
}

.password-wrapper input {
    width: 100%;
    padding: 10px 44px 10px 14px;
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    font-size: 14px;
    background: #fafafa;
    transition: border 0.2s;
    margin-bottom: 0;
    height: 44px;
    box-sizing: border-box;
}

.password-wrapper input:focus {
    border-color: #1a237e;
    outline: none;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(26, 35, 126, 0.1);
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 18px;
    padding: 4px;
    transition: color 0.2s;
    z-index: 1;
    height: 44px;
    display: flex;
    align-items: center;
}

.password-toggle:hover {
    color: #1a237e;
}





/* ==================== LOGIN ERROR MESSAGE ==================== */

.login-message {
    display: none;
    margin-top: -8px;
    margin-bottom: 12px;
    padding: 9px 12px;
    background: #ffebee;
    color: #d32f2f;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.4;
}

.login-message.error {
    display: block;
}

/* Red border when login fails */
.password-wrapper.login-error input {
    border-color: #d32f2f !important;
}

/* Keep red border even when the password box is focused */
.password-wrapper.login-error input:focus {
    border-color: #d32f2f !important;
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.12);
}





/* Make sure the forgot link is visible */
.login-modal .forgot-link {
    display: block;
    text-align: right;
    font-size: 13px;
    color: #1a237e;
    text-decoration: none;
    margin-top: -8px;
    margin-bottom: 20px;
    cursor: pointer;
}

.login-modal .forgot-link:hover {
    text-decoration: underline;
    color: #0d1757;
}

.login-modal .login-submit-btn {
    width: 100%;
    background: #1a237e;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    height: 44px;
}

.login-modal .login-submit-btn:hover {
    background: #0d1757;
}

.login-modal .signup-text {
    text-align: center;
    font-size: 14px;
    color: #555;
    margin-top: 20px;
}

.login-modal .signup-text a {
    color: #1a237e;
    font-weight: 600;
    text-decoration: none;
}

.login-modal .signup-text a:hover {
    text-decoration: underline;
}

@media (max-width: 480px) {
    .login-modal {
        padding: 24px 18px 20px;
        margin: 0 12px;
    }
}





/* ============================================================
   FORGOT PASSWORD MODAL
   ============================================================ */

.forgot-modal-overlay {
    display: none;
    
    position: fixed;
    inset: 0;
    
    width: 100%;
    height: 100%;
    
    background: rgba(0, 0, 0, 0.6);
    
    backdrop-filter: blur(4px);
    
    z-index: 2150;
    
    justify-content: center;
    align-items: center;
    
    padding: 20px;
    
    box-sizing: border-box;
}

.forgot-modal-overlay.active {
    display: flex;
}

.forgot-modal {
    background: #ffffff;
    
    border-radius: 16px;
    
    width: 100%;
    max-width: 420px;
    
    padding: 32px 28px 28px;
    
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    
    position: relative;
    
    animation: forgotModalFadeIn 0.25s ease;
}

@keyframes forgotModalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.forgot-modal-close {
    position: absolute;
    top: 14px;
    right: 18px;
    
    background: none;
    border: none;
    
    font-size: 24px;
    color: #888;
    
    cursor: pointer;
    transition: color 0.2s;
}

.forgot-modal-close:hover {
    color: #1a237e;
}

.forgot-modal h2 {
    font-size: 24px;
    color: #1a237e;
    margin: 0 0 6px;
}

.forgot-modal .subtitle {
    color: #666;
    font-size: 14px;
    margin: 0 0 24px;
}

.forgot-modal label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.forgot-input-wrapper {
    position: relative;
    width: 100%;
}

.forgot-input-wrapper input {
    width: 100%;
    height: 44px;
    padding: 10px 14px;
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    font-size: 14px;
    background: #fafafa;
    box-sizing: border-box;
    transition: border-color 0.2s, background 0.2s;
}

.forgot-input-wrapper input:focus {
    border-color: #1a237e;
    outline: none;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(26, 35, 126, 0.1);
}

.forgot-submit-btn {
    width: 100%;
    height: 44px;
    margin-top: 10px;
    border: none;
    border-radius: 8px;
    background: #1a237e;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
}

.forgot-submit-btn:hover {
    background: #0d1757;
}

.forgot-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.forgot-message {
    display: none;
    margin-top: 14px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.4;
}

.forgot-message.error {
    display: block;
    color: #b42318;
    background: #fef3f2;
}

.forgot-message.success {
    display: block;
    color: #087443;
    background: #ecfdf3;
}

.forgot-back-text {
    text-align: center;
    margin-top: 18px;
    font-size: 14px;
    color: #666;
}

.forgot-back-text a {
    color: #1a237e;
    font-weight: 600;
    text-decoration: none;
}

.forgot-back-text a:hover {
    text-decoration: underline;
}

@media (max-width: 480px) {
    .forgot-modal {
        padding: 24px 18px 20px;
        margin: 0 12px;
    }
}





/* ============================================================
   LOGOUT CONFIRMATION MODAL
   ============================================================ */

.logout-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    z-index: 99999;

    align-items: center;
    justify-content: center;

    padding: 20px;
    box-sizing: border-box;
}

.logout-modal-overlay.active {
    display: flex;
}

.logout-modal {
    position: relative;
    width: min(420px, calc(100% - 40px));
    background: #ffffff;
    border-radius: 16px;
    padding: 35px;
    text-align: center;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.25);

    transform: translateY(10px) scale(0.97);
    transition: transform 0.2s ease;
}

.logout-modal-overlay.active .logout-modal {
    transform: translateY(0) scale(1);
}

.logout-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 18px;
    color: #777;
}

.logout-modal-close:hover {
    color: #222;
}

.logout-modal-icon {
    width: 60px;
    height: 60px;
    margin: 5px auto 20px;
    border-radius: 50%;
    background: #fce8e8;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #dc3545;
    font-size: 25px;
}

.logout-modal h2 {
    margin: 0 0 10px;
    color: #17247c;
    font-size: 26px;
}

.logout-modal p {
    margin: 0 0 28px;
    color: #555;
    font-size: 16px;
    line-height: 1.5;
}

.logout-modal-actions {
    display: flex;
    gap: 12px;
}

.logout-modal-actions button {
    flex: 1;
    padding: 13px 20px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.logout-cancel-btn {
    background: #f1f1f1;
    color: #333;
    border: 1px solid #ddd;
}

.logout-cancel-btn:hover {
    background: #e7e7e7;
}

.logout-confirm-btn {
    background: #dc3545;
    color: #fff;
    border: none;
}

.logout-confirm-btn:hover {
    background: #c82333;
}

@media (max-width: 480px) {
    .logout-modal {
        padding: 30px 22px;
    }

    .logout-modal-actions {
        flex-direction: column;
    }
}


/* ============================================================
   SIGN UP POPUP (MODAL)
   ============================================================ */

.signup-modal-overlay {
    display: none;

    position: fixed;
    inset: 0;

    width: 100%;
    height: 100%;

    background: rgba(0, 0, 0, 0.6);

    backdrop-filter: blur(4px);

    z-index: 2100;

    justify-content: center;
    align-items: center;

    padding: 20px;

    box-sizing: border-box;
}


.signup-modal-overlay.active {
    display: flex;
}


.signup-modal {

    background: #ffffff;

    border-radius: 16px;

    width: 100%;
    max-width: 500px;

    max-height: 90vh;

    overflow-y: auto;

    padding: 32px 32px 28px;

    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.3);

    position: relative;

    animation: signupModalFadeIn 0.25s ease;
}


@keyframes signupModalFadeIn {

    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }

}


.signup-modal-close {

    position: absolute;

    top: 14px;
    right: 18px;

    background: none;

    border: none;

    font-size: 24px;

    color: #888;

    cursor: pointer;

    transition: color 0.2s;
}


.signup-modal-close:hover {
    color: #1a237e;
}


.signup-modal h2 {

    font-size: 26px;

    color: #1a237e;

    margin: 0 0 6px;

}


.signup-modal .subtitle {

    color: #666;

    font-size: 15px;

    margin: 0 0 24px;

}


/* ==================== LABELS ==================== */

.signup-modal label {

    display: block;

    font-size: 14px;

    font-weight: 600;

    color: #333;

    margin-bottom: 6px;

}


.signup-modal label:not(:first-of-type) {
    margin-top: 14px;
}


/* ==================== INPUTS ==================== */

.signup-input-wrapper,
.signup-password-wrapper {

    position: relative;

    width: 100%;
}


.signup-input-wrapper input,
.signup-password-wrapper input {

    width: 100%;

    height: 48px;

    padding: 10px 14px;

    border: 1px solid #d0d0d0;

    border-radius: 8px;

    font-size: 15px;

    background: #fafafa;

    box-sizing: border-box;

    transition:
        border-color 0.2s,
        background 0.2s;

}


.signup-password-wrapper input {
    padding-right: 48px;
}


.signup-input-wrapper input:focus,
.signup-password-wrapper input:focus {

    border-color: #1a237e;

    outline: none;

    background: #ffffff;
}


/* ==================== PASSWORD TOGGLE ==================== */

.signup-password-toggle {

    position: absolute;

    right: 12px;
    top: 50%;

    transform: translateY(-50%);

    border: none;

    background: transparent;

    color: #888;

    font-size: 18px;

    cursor: pointer;

    padding: 4px;
}


.signup-password-toggle:hover {
    color: #1a237e;
}


/* ==================== PASSWORD REQUIREMENTS ==================== */

.signup-password-requirements {

    margin-top: 18px;

    padding: 14px 16px;

    background: #f5f5f5;

    border-radius: 8px;

    font-size: 13px;

    color: #555;

}

.signup-password-requirements strong {

    display: block;
    margin-bottom: 8px;
    color: #333;
}

.signup-password-requirements ul {
    margin: 0;
    padding-left: 20px;
}

.signup-password-requirements li {

    margin: 4px 0;
    transition: color 0.2s;

}

.signup-password-requirements li.valid {
    color: #168447;
}

.signup-password-requirements li.invalid {
    color: #d93025;
}




/* ==================== STATUS MESSAGE ==================== */

.signup-message {
    display: none;
    margin-top: 14px;
    padding: 11px 14px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.4;
}


.signup-message.error {

    display: block;
    color: #b42318;
    background: #fef3f2;

}


.signup-message.success {

    display: block;

    color: #087443;

    background: #ecfdf3;

}


/* ==================== SIGN UP BUTTON ==================== */

.signup-submit-btn {
    width: 100%;
    height: 48px;
    margin-top: 18px;
    border: none;
    border-radius: 8px;
    background: #1a237e;
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition:
        background 0.2s,
        opacity 0.2s;
}


.signup-submit-btn:hover {
    background: #11175f;
}


.signup-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;

}


/* ==================== LOGIN LINK ==================== */

.login-existing-text {

    text-align: center;
    margin: 20px 0 0;
    color: #666;
    font-size: 14px;
}


.login-existing-text a {
    color: #1a237e;
    font-weight: 600;
    text-decoration: none;
}


.login-existing-text a:hover {
    text-decoration: underline;
}


/* ==================== MOBILE ==================== */

@media (max-width: 600px) {

    .signup-modal {
        max-height: 92vh;
        padding: 28px 22px 24px;
        border-radius: 14px;
    }

    .signup-modal h2 {
        font-size: 24px;
    }

}



/* ==================== AUTHENTICATION VISIBILITY ==================== */

.auth-hidden {
    display: none !important;
}


/* ==================== SIDEBAR LINK ITEMS ==================== */

.left-sidebar .sidebar-menu > li.menu-item > a {
    display: flex;
    align-items: center;
    gap: 12px;

    width: 100%;
    height: 100%;

    color: inherit;
    text-decoration: none;

    box-sizing: border-box;
}


hr {
  display: block;
  margin-top: 1em;
  margin-bottom: 0.5em;
  margin-left: auto;
  margin-right: auto;
  border-style: inset;
  border-width: 1px;
  color: gray;
}

