/* Custom Styles for Exam Management System */

:root {
    --primary-color: #0d6efd;
    --sidebar-bg: #f8f9fa;
    --sidebar-hover: #e9ecef;
    --card-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --border-radius: 0.375rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    overflow-x: hidden;
}

html {
    overflow-x: hidden;
}

/* Touch / cross-browser: momentum scroll (iOS), thin scrollbars (Firefox) */
.table-responsive {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(100, 116, 139, 0.5) transparent;
}

/* ============================================================================
   MODERN NAVBAR - Dark Blue Header
   ============================================================================ */
.modern-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 73px;
    background: linear-gradient(180deg, #0f203a 0%, #0b1a30 100%) !important;
    z-index: 1000;
    padding: 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
}

.navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 24px;
    max-width: 100%;
    width: 100%;
}

.navbar-brand-section {
    flex-shrink: 0;
}

.navbar-nav-main {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item-main {
    position: relative;
}

.nav-link-main {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.nav-link-main:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.nav-link-main.active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.3) 100%);
    color: #ffffff;
}

.nav-link-main i {
    font-size: 1.1rem;
}

.dropdown-toggle-nav {
    position: relative;
}

.dropdown-arrow {
    font-size: 0.75rem;
    margin-left: 4px;
    transition: transform 0.3s ease;
}

.dropdown-nav.active .dropdown-arrow {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.dropdown-menu-nav {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 8px;
    min-width: 240px;
    background: rgba(15, 32, 58, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    list-style: none;
    margin: 0;
    padding: 8px;
    display: none;
    z-index: 1000;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dropdown-nav.active .dropdown-menu-nav {
    display: block;
    animation: slideDownFade 0.3s ease-out;
}

@keyframes slideDownFade {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 0.9rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.dropdown-item-nav:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
    color: #ffffff;
    transform: translateX(4px);
}

.dropdown-item-nav.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    color: #ffffff;
}

.dropdown-item-nav i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.navbar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
}

.sbagh-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sbagh-logo svg {
    display: block;
}

.navbar-brand-text-container {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.navbar-brand-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0.5px;
    display: inline-block;
}

.navbar-brand-subtitle {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.navbar-toggler {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    padding: 8px;
    cursor: pointer;
}

.navbar-center { display: none; }
.navbar-search { display: none; }

.navbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pluto-topbar {
    background: linear-gradient(180deg, #0f203a 0%, #0b1a30 100%) !important;
}

/* Navbar Academic Year & Term - contrasting text */
.navbar-academic-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex: 1;
    font-size: 0.9rem;
    color: #fff !important;
    padding: 0 20px;
    min-width: 0;
}

.navbar-academic-year,
.navbar-academic-term {
    display: inline-flex;
    align-items: center;
    color: #fff !important;
}

.navbar-academic-info strong {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 600;
    margin-right: 6px;
}

.navbar-academic-info #navbarCurrentYear,
.navbar-academic-info #navbarCurrentTerm {
    color: #fde047 !important;
    font-weight: 700;
}

.navbar-academic-divider {
    color: rgba(255, 255, 255, 0.5) !important;
    font-weight: 300;
}

/* Navbar Global Student Search */
.navbar-search-wrap {
    position: relative;
    margin-right: 16px;
}
.navbar-search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.navbar-search-icon {
    position: absolute;
    left: 10px;
    color: rgba(255,255,255,0.7) !important;
    font-size: 0.95rem;
    pointer-events: none;
}
.navbar-search-input {
    width: 200px;
    padding: 6px 12px 6px 36px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 8px;
    background: rgba(255,255,255,0.1);
    color: #fff !important;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}
.navbar-search-input::placeholder { color: rgba(255,255,255,0.6); }
.navbar-search-input:focus {
    outline: none;
    border-color: rgba(255,255,255,0.5);
    background: rgba(255,255,255,0.15);
}
.navbar-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 280px;
    margin-top: 4px;
    max-height: 320px;
    overflow-y: auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    z-index: 1100;
    display: none;
    color: #334155 !important; /* Override .navbar-right * white text */
}
.navbar-search-results.show { display: block; }
.navbar-search-results .search-result-item {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    color: #334155 !important;
    font-size: 0.9rem;
    transition: background 0.15s;
}
.navbar-search-results .search-result-item:hover { background: #f1f5f9; }
.navbar-search-results .search-result-item.search-result-empty { flex-direction: column; align-items: center; }
.navbar-search-results .search-result-item:last-child { border-bottom: none; }
.navbar-search-results .search-result-avatar-wrap {
    flex-shrink: 0;
    position: relative;
    width: 40px;
    height: 40px;
}
.navbar-search-results .search-result-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}
.navbar-search-results .search-result-avatar-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b !important;
}
.navbar-search-results .search-result-avatar-placeholder i { font-size: 1.2rem; }
.navbar-search-results .search-result-info { flex: 1; min-width: 0; }
.navbar-search-results .search-result-name { font-weight: 600; color: #1e293b !important; }
.navbar-search-results .search-result-meta { font-size: 0.8rem; color: #64748b !important; margin-top: 2px; }
.navbar-search-results .search-result-id { font-size: 0.8rem; color: #64748b !important; }
.navbar-search-results .search-result-class { font-size: 0.8rem; color: #64748b !important; font-weight: 500; }
.navbar-search-results .text-muted { color: #64748b !important; }
.navbar-search-results .text-danger { color: #dc2626 !important; }
@media (max-width: 991px) {
    .navbar-search-wrap { display: none; }
}

/* Tablet: compact year/term strip (phones hide it below — frees space for brand + menu) */
@media (min-width: 768px) and (max-width: 991px) {
    .modern-navbar.pluto-topbar .navbar-academic-info {
        display: flex !important;
        flex: 1 1 0;
        min-width: 0;
        font-size: 0.65rem;
        line-height: 1.25;
        gap: 0.45rem;
        padding: 0 4px;
        justify-content: center;
        align-items: center;
        flex-wrap: wrap;
    }

    .modern-navbar.pluto-topbar .navbar-academic-year,
    .modern-navbar.pluto-topbar .navbar-academic-term {
        display: inline-flex;
        align-items: center;
        min-width: 0;
        max-width: min(46vw, 13rem);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .modern-navbar.pluto-topbar .navbar-academic-divider {
        display: none;
    }
}

/* Mobile: no year/term in top bar; pad for fixed hamburger so title/school are not covered */
@media (max-width: 767px) {
    .modern-navbar.pluto-topbar .navbar-academic-info {
        display: none !important;
    }

    .modern-navbar.pluto-topbar .navbar-container {
        padding-left: max(14px, calc(env(safe-area-inset-left, 0px) + 58px));
        padding-right: max(12px, env(safe-area-inset-right, 0px));
        gap: 14px;
        align-items: center;
    }

    .modern-navbar.pluto-topbar .navbar-brand-section {
        min-width: 0;
        flex: 1 1 auto;
        margin-right: 6px;
        padding-right: 4px;
    }

    .modern-navbar.pluto-topbar .navbar-brand-text-container {
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 0.2rem;
    }

    .modern-navbar.pluto-topbar .navbar-brand-text {
        font-size: 1.05rem;
        max-width: 100%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .modern-navbar.pluto-topbar .navbar-brand-subtitle {
        font-size: 0.72rem;
        max-width: 100%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        opacity: 0.92;
    }

    .modern-navbar.pluto-topbar .navbar-right {
        flex-shrink: 0;
    }
}

/* ============================================================================
   MODERN FOOTER - Matching Navbar Style
   ============================================================================ */
.modern-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(180deg, #0f203a 0%, #0b1a30 100%);
    z-index: 1000;
    padding: 0;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.18);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 0 24px;
    max-width: 100%;
    width: 100%;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1400px;
    gap: 20px;
}

.footer-branding {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
}

.footer-company {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    margin: 0 4px;
}

.footer-contact {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
}

.footer-contact i {
    color: #f093fb;
    font-size: 1rem;
}

.footer-phone {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.footer-phone:hover {
    color: #f093fb;
    text-decoration: none;
    transform: translateY(-1px);
}

/* ============================================================================
   SIDEBAR FOOTER - Footer content moved to sidebar
   ============================================================================ */
.sidebar-footer {
    padding: 20px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
    background: rgba(255, 255, 255, 0.02);
}

.sidebar-footer-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    text-align: center;
}

.sidebar-footer-branding {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
}

.sidebar-footer-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.75rem;
    line-height: 1.4;
}

.sidebar-footer-company {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.sidebar-footer-contact {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
}

.sidebar-footer-contact i {
    color: #f093fb;
    font-size: 0.9rem;
}

.sidebar-footer-phone {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.sidebar-footer-phone:hover {
    color: #f093fb;
    text-decoration: none;
}

/* ============================================================================
   RESPONSIVE SIDEBAR MENU STYLES
   ============================================================================ */

/* Tablet and below */
@media (max-width: 1024px) {
    .sidebar .nav-link,
    .modern-sidebar .nav-link {
        padding: 11px 14px;
        font-size: 0.85rem;
        gap: 10px;
    }
    
    .sidebar .nav-link i,
    .modern-sidebar .nav-link i {
        font-size: 1rem;
    }
}

/* Mobile devices */
@media (max-width: 767px) {
    .sidebar-menu-wrapper {
        padding: 12px 6px;
    }
    
    .sidebar-menu {
        padding: 8px 4px;
    }
    
    .sidebar .nav-link,
    .modern-sidebar .nav-link {
        padding: 14px 12px;
        font-size: 0.9rem;
        gap: 10px;
        margin: 3px 4px;
        width: calc(100% - 8px);
        max-width: calc(100% - 8px);
        min-height: 48px; /* Larger touch target for mobile */
    }
    
    .sidebar .nav-link i,
    .modern-sidebar .nav-link i {
        font-size: 1.1rem;
        min-width: 22px;
    }
    
    .sidebar .nav-item {
        margin-bottom: 6px;
    }
    
    .sidebar .menu-group-header {
        padding: 14px 12px !important;
        font-size: 0.8rem !important;
        min-height: 48px;
    }
    
    .sidebar .menu-group-header i:first-child {
        font-size: 1.1rem;
        min-width: 22px;
    }
    
    .sidebar .submenu-link {
        padding: 12px 14px !important;
        font-size: 0.85rem !important;
        min-height: 44px;
        gap: 10px;
    }
    
    .sidebar .submenu-link i {
        font-size: 1rem;
        min-width: 20px;
    }
    
    .submenu {
        margin-left: 8px;
        padding-left: 10px;
    }
    
    .sidebar-footer {
        padding: 16px 12px;
    }
    
    .sidebar-footer-text {
        font-size: 0.7rem;
    }
    
    .sidebar-footer-contact {
        font-size: 0.75rem;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .sidebar-menu-wrapper {
        padding: 10px 4px;
    }
    
    .sidebar-menu {
        padding: 6px 2px;
    }
    
    .sidebar .nav-link,
    .modern-sidebar .nav-link {
        padding: 12px 10px;
        font-size: 0.85rem;
        gap: 8px;
        margin: 2px 3px;
        width: calc(100% - 6px);
        max-width: calc(100% - 6px);
    }
    
    .sidebar .nav-link i,
    .modern-sidebar .nav-link i {
        font-size: 1rem;
        min-width: 20px;
    }
    
    .sidebar .nav-link span,
    .modern-sidebar .nav-link span {
        font-size: 0.8rem;
    }
    
    .sidebar .menu-group-header {
        padding: 12px 10px !important;
        font-size: 0.75rem !important;
        min-height: 46px;
    }
    
    .sidebar .menu-group-header i:first-child {
        font-size: 1rem;
        min-width: 20px;
    }
    
    .sidebar .submenu-link {
        padding: 10px 12px !important;
        font-size: 0.8rem !important;
        min-height: 42px;
        gap: 8px;
    }
    
    .sidebar .submenu-link i {
        font-size: 0.95rem;
        min-width: 18px;
    }
    
    .submenu {
        margin-left: 6px;
        padding-left: 8px;
    }
    
    .sidebar-footer {
        padding: 12px 8px;
    }
    
    .sidebar-footer-text {
        font-size: 0.65rem;
    }
    
    .sidebar-footer-contact {
        font-size: 0.7rem;
    }
}

/* Large screens - optimize spacing */
@media (min-width: 1440px) {
    .sidebar .nav-link,
    .modern-sidebar .nav-link {
        padding: 14px 18px;
        font-size: 0.95rem;
        gap: 14px;
    }
    
    .sidebar .nav-link i,
    .modern-sidebar .nav-link i {
        font-size: 1.2rem;
    }
}

/* Extra small devices - ensure text doesn't overflow */
@media (max-width: 360px) {
    .sidebar .nav-link span,
    .modern-sidebar .nav-link span {
        max-width: 120px;
    }
    
    .sidebar .menu-group-header > span {
        max-width: 100px;
    }
    
    .sidebar .submenu-link span {
        max-width: 100px;
    }
    
    .submenu {
        margin-left: 4px;
        padding-left: 6px;
    }
}

/* Tablet landscape optimization */
@media (min-width: 768px) and (max-width: 1024px) {
    .sidebar .nav-link,
    .modern-sidebar .nav-link {
        padding: 11px 15px;
        font-size: 0.88rem;
    }
    
    .sidebar .submenu-link {
        padding: 9px 13px !important;
        font-size: 0.78rem !important;
    }
}

/* Responsive Footer (old footer styles - can be removed if not needed) */
@media (max-width: 768px) {
    .modern-footer {
        height: auto;
        min-height: 60px;
        padding: 12px 0;
    }
    
    .footer-container {
        padding: 0 16px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    .footer-text {
        font-size: 0.85rem;
        line-height: 1.4;
    }
    
    .footer-contact {
        font-size: 0.85rem;
    }
    
    .main-content {
        padding-bottom: 24px;
    }
}

@media (max-width: 480px) {
    .footer-text {
        font-size: 0.75rem;
    }
    
    .footer-contact {
        font-size: 0.8rem;
    }
    
    .main-content {
        padding-bottom: 24px;
    }
}

/* ============================================================================
   CASPERO SIDEBAR - Left Sidebar Navigation (CasperoBoard Style)
   ============================================================================ */
.sidebar.caspero-sidebar {
    position: fixed;
    left: 0;
    top: 73px;
    bottom: 0;
    width: 250px;
    background: linear-gradient(180deg, #0f203a 0%, #0b1a30 100%);
    z-index: 999;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.25);
}

/* Profile Header Section */
.sidebar-profile-header {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
    text-align: center;
    display: block !important;
    visibility: visible !important;
}

.sidebar-profile-avatar-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 12px;
}

.sidebar-profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(102, 126, 234, 0.5);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.sidebar-profile-status {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 18px;
    height: 18px;
    background: #10b981;
    border: 3px solid #0f203a;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.5);
}

.sidebar-profile-details {
    color: white !important;
    display: block !important;
    visibility: visible !important;
}

.sidebar-profile-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 4px 0;
    color: #ffffff !important;
    display: block !important;
    visibility: visible !important;
}

.sidebar-profile-role {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7) !important;
    margin: 0;
    display: block !important;
    visibility: visible !important;
}

/* Navigation Menu Container */
.sidebar-menu-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px 0 16px 0;
}

.sidebar-nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav-item {
    margin-bottom: 2px;
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.sidebar-nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    border-left-color: rgba(102, 126, 234, 0.5);
}

.sidebar-nav-link.active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
    color: #ffffff;
    border-left-color: #667eea;
    font-weight: 600;
}

.sidebar-nav-link i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

/* Label grows; icon wrappers stay tight (avoids huge gap before link text) */
.sidebar-nav-link > i:first-child + span,
.sidebar-nav-link > .tp-sidebar-nav-ico-wrap + span,
.sidebar-nav-link > .pp-sidebar-nav-ico-wrap + span {
    flex: 1;
    min-width: 0;
}

.sidebar-arrow {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
    margin-left: auto;
}

.sidebar-nav-toggle {
    cursor: pointer;
}

.sidebar-nav-group.active .sidebar-arrow {
    transform: rotate(180deg);
}

.sidebar-nav-group.active .sidebar-nav-link {
    background: rgba(255, 255, 255, 0.05);
}

/* Submenu */
.sidebar-submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    background: rgba(0, 0, 0, 0.2);
    border-left: 2px solid rgba(102, 126, 234, 0.3);
    margin-left: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    pointer-events: auto !important;
}

.sidebar-submenu li {
    pointer-events: auto !important;
}

.sidebar-submenu-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px 10px 40px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    cursor: pointer;
    pointer-events: auto !important;
    position: relative;
    z-index: 1;
}

.sidebar-submenu-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    padding-left: 44px;
}

.sidebar-submenu-link.active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
    color: #ffffff;
    font-weight: 600;
}

.sidebar-submenu-link i {
    font-size: 1rem;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}

/* Bottom Action Icons */
.sidebar-bottom-actions {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: center;
    gap: 16px;
    background: rgba(255, 255, 255, 0.02);
}

.sidebar-bottom-actions--with-footer {
    flex-wrap: wrap;
}

/* Caspero sidebar only: high specificity + px so Bootstrap / rem root cannot dilute “same look” */
.sidebar.caspero-sidebar .sidebar-bottom-actions .sidebar-version-footer {
    flex: 1 1 100%;
    box-sizing: border-box;
    margin: 4px 0 0;
    margin-bottom: 0;
    padding: 5px 7px 6px;
    font-size: 9px;
    line-height: 1.35;
    letter-spacing: 0.04em;
    color: #facc15;
    text-align: center;
    font-weight: 400;
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(250, 204, 21, 0.28);
    border-radius: 8px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.sidebar.caspero-sidebar .sidebar-bottom-actions .sidebar-version-footer .sidebar-version-brand {
    color: #fef08a;
    font-weight: 600;
    letter-spacing: 0.03em;
    font-size: inherit;
}

.sidebar-action-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.sidebar-action-icon:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    transform: translateY(-2px);
}

.sidebar-action-icon:last-child:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: rgba(239, 68, 68, 0.5);
}

/* Sidebar Scrollbar */
.sidebar.caspero-sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar.caspero-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar.caspero-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.sidebar.caspero-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ============================================================================
   MOBILE NAVIGATION MENU
   ============================================================================ */
.navbar-mobile-toggle {
    position: fixed;
    top: max(12px, env(safe-area-inset-top));
    left: max(12px, env(safe-area-inset-left));
    z-index: 1001;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    width: 38px;
    height: 38px;
    border-radius: 9px;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.35);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

@media (hover: hover) {
    .navbar-mobile-toggle:hover {
        transform: scale(1.04);
        box-shadow: 0 4px 14px rgba(102, 126, 234, 0.45);
    }
}

@media (max-width: 767px) {
    .navbar-mobile-toggle {
        display: flex !important;
        /* Vertically center in 73px top bar (was overlapping brand row) */
        top: max(10px, calc(env(safe-area-inset-top, 0px) + 17px));
        left: max(10px, env(safe-area-inset-left, 0px));
    }
}

.navbar-mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 1002;
    display: none;
}

.navbar-mobile-overlay.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

.navbar-mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: linear-gradient(180deg, #0f203a 0%, #0b1a30 100%);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
    z-index: 1003;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.navbar-mobile-overlay.show .navbar-mobile-menu {
    transform: translateX(0);
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-menu-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s;
}

.mobile-menu-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    background: rgba(102, 126, 234, 0.2);
    border-left-color: #667eea;
    color: #ffffff;
}

.mobile-nav-link i {
    font-size: 1.1rem;
    width: 24px;
}

.mobile-nav-group {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-nav-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.mobile-nav-group-header:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

.mobile-nav-group-header i:last-child {
    transition: transform 0.3s;
}

.mobile-nav-group.active .mobile-nav-group-header i:last-child {
    transform: rotate(180deg);
}

.mobile-nav-submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    background: rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transition: all 0.3s ease;
}

.mobile-nav-submenu li {
    border-left: 2px solid rgba(102, 126, 234, 0.3);
    margin-left: 20px;
}

.mobile-nav-submenu .mobile-nav-link {
    padding-left: 40px;
    font-size: 0.9rem;
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .navbar-container {
        padding: 0 16px;
    }
    
    .navbar-brand-text {
        font-size: 1.2rem;
    }
    
    .navbar-icons-group {
        gap: 4px;
    }
    
    .pluto-icon-btn {
        width: 34px;
        height: 34px;
    }
}

/* ============================================================================
   CASPEROBOARD DASHBOARD STYLES
   ============================================================================ */

/* Dashboard Container */
.caspero-dashboard {
    padding: 0;
    background: transparent;
    min-height: auto;
    width: 100%;
    box-sizing: border-box;
    /* Display controlled by JavaScript - no forced display here */
}

/* Ensure Bootstrap rows don't conflict in dashboard */
.caspero-dashboard .row {
    margin-left: -12px;
    margin-right: -12px;
}

.caspero-dashboard .row > * {
    padding-left: 12px;
    padding-right: 12px;
}

/* Fix Bootstrap mb-4 spacing */
.caspero-dashboard .mb-4 {
    margin-bottom: 1.5rem !important;
}

/* Dashboard display is controlled by showSection function */
/* No forced display rule here - let JavaScript control it */

/* Dashboard Header */
.dashboard-header {
    margin-bottom: 24px;
}

.dashboard-header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 16px;
}

.dashboard-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 4px 0;
}

.dashboard-subtitle {
    font-size: 0.95rem;
    color: #64748b;
    margin: 0;
}

.dashboard-date-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    color: #475569;
    font-size: 0.9rem;
    font-weight: 500;
}

.dashboard-date-badge i {
    color: #667eea;
}

/* Metric Cards Grid */
.dashboard-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

/* Admin dashboard: fees collected + total billed always share one row when space allows */
.admin-dashboard-fees-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 575.98px) {
    .admin-dashboard-fees-row {
        grid-template-columns: 1fr;
    }
}

.caspero-metric-card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

/* Gradient Backgrounds for Cards */
.caspero-card-primary {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.caspero-card-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.1) 100%);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.caspero-card-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(217, 119, 6, 0.1) 100%);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.caspero-card-info {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(124, 58, 237, 0.1) 100%);
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.caspero-card-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.1) 100%);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.caspero-metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.caspero-card-primary:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
    border-color: rgba(102, 126, 234, 0.3);
}

.caspero-card-success:hover {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.15) 100%);
    border-color: rgba(16, 185, 129, 0.3);
}

.caspero-card-warning:hover {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(217, 119, 6, 0.15) 100%);
    border-color: rgba(245, 158, 11, 0.3);
}

.caspero-card-info:hover {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(124, 58, 237, 0.15) 100%);
    border-color: rgba(139, 92, 246, 0.3);
}

.caspero-card-danger:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(220, 38, 38, 0.15) 100%);
    border-color: rgba(239, 68, 68, 0.3);
}

/* Invoices hub + Fee manager: KPI cards match dashboard look but are not navigation targets */
#invoices-hub .invoices-hub-kpi-stat.caspero-metric-card,
#fees-manager .fees-manager-kpi-stat.caspero-metric-card {
    cursor: default;
}

#invoices-hub .invoices-hub-kpi-stat.caspero-metric-card:hover,
#fees-manager .fees-manager-kpi-stat.caspero-metric-card:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

#invoices-hub .invoices-hub-kpi-stat.caspero-card-primary:hover,
#invoices-hub .invoices-hub-kpi-stat.caspero-card-success:hover,
#invoices-hub .invoices-hub-kpi-stat.caspero-card-warning:hover,
#invoices-hub .invoices-hub-kpi-stat.caspero-card-danger:hover,
#fees-manager .fees-manager-kpi-stat.caspero-card-primary:hover,
#fees-manager .fees-manager-kpi-stat.caspero-card-success:hover,
#fees-manager .fees-manager-kpi-stat.caspero-card-warning:hover,
#fees-manager .fees-manager-kpi-stat.caspero-card-info:hover,
#fees-manager .fees-manager-kpi-stat.caspero-card-danger:hover {
    transform: none;
}

#invoices-hub .invoices-hub-kpi-stat .caspero-card-header,
#fees-manager .fees-manager-kpi-stat .caspero-card-header {
    justify-content: center;
}

#invoices-hub .invoices-hub-kpi-stat .caspero-card-body,
#fees-manager .fees-manager-kpi-stat .caspero-card-body {
    text-align: center;
}

#invoices-hub .invoices-hub-kpi-stat .caspero-card-value--currency,
#fees-manager .fees-manager-kpi-stat .fees-manager-kpi-currency {
    font-size: 1.5rem;
    word-break: break-word;
}

@media (min-width: 768px) {
    #invoices-hub .invoices-hub-kpi-stat .caspero-card-value--currency,
    #fees-manager .fees-manager-kpi-stat .fees-manager-kpi-currency {
        font-size: 1.65rem;
    }
}

/* Invoice list tables (hub + student profile fees + fee manager + parent portal): visible grid */
#invoices-hub .invoices-hub-list-table,
#ppPortalContent .invoices-hub-list-table,
#fees-manager .fees-manager-list-table,
#student-profile-fees-invoices .sbapro-invoice-list-table {
    --invoices-hub-border: #64748b;
    --invoices-hub-border-muted: #94a3b8;
    border: 1px solid var(--invoices-hub-border);
    border-collapse: collapse;
}

#invoices-hub .invoices-hub-list-table > thead > tr > th,
#invoices-hub .invoices-hub-list-table > tbody > tr > td,
#ppPortalContent .invoices-hub-list-table > thead > tr > th,
#ppPortalContent .invoices-hub-list-table > tbody > tr > td,
#fees-manager .fees-manager-list-table > thead > tr > th,
#fees-manager .fees-manager-list-table > tbody > tr > td,
#student-profile-fees-invoices .sbapro-invoice-list-table > thead > tr > th,
#student-profile-fees-invoices .sbapro-invoice-list-table > tbody > tr > td {
    border: 1px solid var(--invoices-hub-border-muted);
    vertical-align: middle;
}

#invoices-hub .invoices-hub-list-table > thead > tr > th,
#ppPortalContent .invoices-hub-list-table > thead > tr > th,
#fees-manager .fees-manager-list-table > thead > tr > th,
#student-profile-fees-invoices .sbapro-invoice-list-table > thead > tr > th {
    border-bottom: 2px solid var(--invoices-hub-border);
    font-weight: 600;
    color: #1e293b;
    background-color: #e2e8f0;
}

/* Student profile — term invoices: horizontal scroll on narrow viewports */
#student-profile-fees-invoices .prof-invoice-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}

#student-profile-fees-invoices .sbapro-invoice-list-table.prof-inv-table-wide {
    width: 100%;
    min-width: 36rem;
    table-layout: auto;
}

#student-profile-fees-invoices .sbapro-invoice-list-table .prof-inv-col-year,
#student-profile-fees-invoices .sbapro-invoice-list-table .prof-inv-col-term {
    min-width: 5.5rem;
    max-width: 10rem;
    word-break: break-word;
}

#student-profile-fees-invoices .sbapro-invoice-list-table .prof-inv-col-money {
    text-align: center;
    white-space: nowrap;
}

#student-profile-fees-invoices .sbapro-invoice-list-table .prof-inv-col-status {
    min-width: 5.5rem;
}

#student-profile-fees-invoices .sbapro-invoice-list-table .prof-inv-col-actions {
    white-space: nowrap;
    text-align: center;
}

.caspero-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.caspero-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.caspero-icon-blue {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

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

.caspero-icon-orange {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.caspero-icon-purple {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.caspero-card-action {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    background: rgba(255, 255, 255, 0.6);
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

.caspero-card-action:hover {
    background: rgba(255, 255, 255, 0.9);
    color: #475569;
    transform: translateX(2px);
}

.caspero-card-body {
    position: relative;
}

.caspero-card-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.2;
    margin-bottom: 4px;
}

/* Admin dashboard: animated spinners while stat values load */
.caspero-card-value.dashboard-stat-loading,
.caspero-secondary-value.dashboard-stat-loading {
    min-height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.caspero-card-label {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
}

/* Card Color Variants - Border removed, using gradient backgrounds instead */

/* Secondary Metrics */
.dashboard-secondary-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.caspero-secondary-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
}

.caspero-secondary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.caspero-secondary-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

.caspero-icon-teal {
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
}

.caspero-icon-pink {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
}

.caspero-icon-indigo {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
}

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

.caspero-secondary-content {
    flex: 1;
}

.caspero-secondary-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.2;
    margin-bottom: 4px;
}

.caspero-secondary-label {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
}

/* Charts Grid */
.dashboard-charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.caspero-chart-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.caspero-chart-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.caspero-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
}

.caspero-chart-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.caspero-chart-action {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: #f1f5f9;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.caspero-chart-action:hover {
    background: #e2e8f0;
    color: #475569;
    transform: translateX(4px);
}

.caspero-chart-body {
    position: relative;
    height: 300px;
}

.caspero-chart-full {
    grid-column: 1 / -1;
}

.caspero-chart-full .caspero-chart-body {
    height: 350px;
}

/* Bottom Grid */
.dashboard-bottom-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

/* Recent Students List */
.caspero-list-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.caspero-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
}

.caspero-list-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.caspero-list-subtitle {
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.35;
}

.dashboard-attention-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.dashboard-attention-filters {
    flex: 1 1 auto;
    min-width: 0;
}

.dashboard-attention-filters .btn {
    font-size: 0.72rem;
    padding: 0.28rem 0.45rem;
    border-color: #cbd5e1;
    color: #475569;
}

.dashboard-attention-filters .btn.active {
    background: #4f46e5;
    border-color: #4f46e5;
    color: #fff;
}

.dashboard-attention-sort {
    width: auto;
    min-width: 170px;
    max-width: 100%;
    font-size: 0.8rem;
}

.caspero-attention-reasons {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 6px;
    margin-top: 6px;
}

.caspero-attention-reasons .badge {
    font-weight: 500;
    font-size: 0.68rem;
}

.caspero-attention-item .btn[data-attention-profile] {
    flex-shrink: 0;
    font-size: 0.72rem;
    padding: 0.25rem 0.5rem;
}

.caspero-list-action {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: #f1f5f9;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.caspero-list-action:hover {
    background: #e2e8f0;
    color: #475569;
    transform: translateX(4px);
}

.caspero-list-body {
    max-height: 400px;
    overflow-y: auto;
}

.caspero-list-empty {
    text-align: center;
    padding: 40px 20px;
    color: #94a3b8;
}

.caspero-list-empty i {
    font-size: 3rem;
    margin-bottom: 12px;
    display: block;
}

.caspero-list-empty p {
    margin: 0;
    font-size: 0.95rem;
}

/* Recent Students List Items */
.caspero-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 10px;
    transition: all 0.3s ease;
    margin-bottom: 8px;
}

.caspero-list-item:hover {
    background: #f8fafc;
    transform: translateX(4px);
}

.caspero-list-item-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.caspero-list-item-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.caspero-avatar-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
}

.caspero-list-item-content {
    flex: 1;
    min-width: 0;
}

.caspero-list-item-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.caspero-list-item-meta {
    font-size: 0.8rem;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.caspero-list-item-action {
    color: #94a3b8;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.caspero-list-item:hover .caspero-list-item-action {
    color: #667eea;
    transform: translateX(4px);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .dashboard-charts-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-bottom-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .caspero-dashboard {
        padding: 16px;
    }
    
    .dashboard-title {
        font-size: 1.5rem;
    }
    
    .dashboard-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .dashboard-secondary-metrics {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .caspero-card-value {
        font-size: 1.5rem;
    }
    
    .caspero-card-icon {
        width: 36px;
        height: 36px;
        font-size: 1.2rem;
    }
    
    .caspero-chart-body {
        height: 250px;
    }
    
    .caspero-chart-full .caspero-chart-body {
        height: 280px;
    }
}

@media (max-width: 480px) {
    .dashboard-secondary-metrics {
        grid-template-columns: 1fr;
    }
    
    .dashboard-header-content {
        flex-direction: column;
    }
}

.pluto-menu-btn {
    background: #f35a23;
    border-radius: 6px;
    width: 40px;
    height: 40px;
    text-align: center;
}

.pluto-menu-btn i {
    color: #fff;
    font-size: 1.25rem;
}

.pluto-icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: transparent;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
}

.pluto-user-pill {
    background: #f35a23;
    color: #fff;
    border-radius: 22px;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.pluto-user-pill:hover {
    background: #e04a1a;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(243, 90, 35, 0.3);
}

.pluto-user-pill .profile-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.6);
}

.pluto-user-name {
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Logout Button */
.btn-logout {
    background: rgba(239, 68, 68, 0.9);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 8px;
}

.btn-logout:hover {
    background: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
}

.btn-logout:active {
    transform: translateY(0);
}

.btn-logout i {
    font-size: 1rem;
}

/* Navbar right section - ensures icons and actions are at far right */
.navbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    margin-left: auto;
}

/* User Profile Dropdown */
.navbar-user-profile-dropdown {
    position: relative;
    margin-left: 16px;
}

.user-profile-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.user-profile-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.user-profile-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.1);
    display: block !important;
    visibility: visible !important;
}

.user-profile-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff !important;
    display: inline-block !important;
    visibility: visible !important;
}

.user-profile-arrow {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
    color: rgba(255, 255, 255, 0.9) !important;
    display: inline-block !important;
    visibility: visible !important;
}

.navbar-user-profile-dropdown.active .user-profile-arrow {
    transform: rotate(180deg);
}

/* Mobile: hide profile photo and display name in top bar (account menu stays via chevron + dropdown) */
@media (max-width: 767px) {
    .modern-navbar.pluto-topbar .user-profile-avatar,
    .modern-navbar.pluto-topbar .user-profile-name {
        display: none !important;
        visibility: hidden !important;
        width: 0 !important;
        height: 0 !important;
        max-width: 0 !important;
        max-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        overflow: hidden !important;
        position: absolute !important;
        clip: rect(0, 0, 0, 0) !important;
        clip-path: inset(50%) !important;
        white-space: nowrap !important;
    }

    .modern-navbar.pluto-topbar .user-profile-toggle {
        gap: 0;
        padding: 6px 10px;
        min-width: 36px;
        min-height: 36px;
        justify-content: center;
        align-items: center;
    }

    .modern-navbar.pluto-topbar .user-profile-arrow {
        margin: 0 !important;
        font-size: 0.95rem;
    }
}

.user-profile-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 240px;
    background: rgba(15, 32, 58, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: none;
    z-index: 1001;
    animation: slideDownFade 0.3s ease-out;
}

.navbar-user-profile-dropdown.active .user-profile-dropdown-menu {
    display: block;
}

@keyframes slideDownFade {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-profile-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    margin-bottom: 8px;
}

.dropdown-profile-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(102, 126, 234, 0.5);
    background: rgba(255, 255, 255, 0.1);
    display: block !important;
    visibility: visible !important;
}

.dropdown-profile-info {
    flex: 1;
    display: block !important;
    visibility: visible !important;
}

.dropdown-profile-name {
    font-size: 0.95rem;
    color: #ffffff !important;
    display: block !important;
    visibility: visible !important;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 2px;
}

.dropdown-profile-role {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7) !important;
    display: block !important;
    visibility: visible !important;
}

.dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 8px 0;
}

.user-profile-dropdown-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 0.9rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.user-profile-dropdown-menu .dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.user-profile-dropdown-menu .dropdown-item i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.user-profile-dropdown-menu .dropdown-item-danger {
    color: rgba(239, 68, 68, 0.9);
}

.user-profile-dropdown-menu .dropdown-item-danger:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* Group icon buttons */
.navbar-icons-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* User actions group - Admin Profile and Logout at far right */
.navbar-user-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: 24px;
}

.navbar-right * {
    color: #ffffff !important;
}

.pluto-icon-btn {
    color: #ffffff !important;
}

.pluto-icon-btn:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}

/* ============================================================================
   MODERN SIDEBAR - Light Blue Background
   ============================================================================ */
.modern-sidebar {
    position: fixed;
    top: 73px;
    left: 0;
    bottom: 0;
    width: 200px;
    z-index: 100;
    background: linear-gradient(180deg, #0f203a 0%, #0b1a30 100%);
    border-right: 0;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.25);
    overflow-y: auto;
    overflow-x: hidden;
    transition: transform 0.3s ease;
}

.sidebar-menu-wrapper {
    padding: 16px 0;
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-between;
}

/* Desktop - Sidebar always visible */
@media (min-width: 768px) {
    .sidebar,
    .modern-sidebar {
        transform: translateX(0);
    }
}

/* Mobile - Sidebar hidden by default */
@media (max-width: 767px) {
    .sidebar,
    .modern-sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show,
    .modern-sidebar.show {
        transform: translateX(0);
    }
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Mobile - sidebar hidden by default, shown when toggled */
@media (max-width: 767px) {
    .sidebar {
        transform: translateX(-100%);
        display: block !important; /* Override Bootstrap collapse display */
    }
    
    .sidebar.show,
    .sidebar.collapse.show {
        transform: translateX(0);
    }
    
    .sidebar.collapse:not(.show) {
        transform: translateX(-100%);
        display: block !important;
    }
}

.sidebar-menu {
    padding: 12px 8px;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    width: 100%;
}

.sidebar .nav-item {
    margin-bottom: 4px;
    width: 100%;
    min-width: 0; /* Allow flex items to shrink */
}

.sidebar .menu-group {
    width: 100%;
}

/* Main Menu Links */
.sidebar .nav-link,
.sidebar .menu-item,
.modern-sidebar .nav-link {
    color: #e5e9f2;
    padding: 10px 14px;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    font-weight: 500;
    font-size: 0.9rem;
    margin: 2px 6px;
    position: relative;
    border: 1px solid transparent;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 44px; /* Touch target size */
    box-sizing: border-box;
}

.sidebar .nav-link i,
.sidebar .menu-item i,
.modern-sidebar .nav-link i {
    font-size: 1.1rem;
    flex-shrink: 0;
    min-width: 20px;
    text-align: center;
}

.sidebar .nav-link span,
.sidebar .menu-item span,
.modern-sidebar .nav-link span {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.modern-sidebar .nav-link {
    color: #e5e9f2;
}

.sidebar .nav-link:hover,
.sidebar .menu-item:hover,
.modern-sidebar .nav-link:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 50%, rgba(240, 147, 251, 0.2) 100%);
    color: #ffffff;
    transform: translateX(4px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    border-left: 3px solid transparent;
    border-image: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%) 1;
}

.sidebar .nav-link.active,
.sidebar .menu-item.active,
.modern-sidebar .nav-link.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    border-left: 4px solid transparent;
    position: relative;
    overflow: hidden;
}

.sidebar .nav-link.active::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.sidebar .nav-link.active:hover::after {
    left: 100%;
}

.sidebar .nav-link.active::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 60%;
    background: #f35a23;
    border-radius: 3px;
}

/* Icon and text styles are now in the main .nav-link definition above */

/* Menu Group Headers */
.menu-group-header {
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b !important;
    background: #f1f5f9 !important;
    border: 1px solid #e2e8f0;
    margin-bottom: 6px;
    position: relative;
    min-height: 44px;
    padding: 12px 14px !important;
    display: flex !important;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
}

.menu-group-header i:first-child {
    flex-shrink: 0;
    font-size: 1rem;
    min-width: 20px;
}

.menu-group-header span {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.menu-group-header:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%) !important;
    color: #ffffff !important;
    transform: translateX(0) !important;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.2);
}

.menu-group-header[aria-expanded="true"] {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%) !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.menu-group-header[aria-expanded="true"] .menu-arrow {
    transform: rotate(180deg);
}

.menu-arrow {
    margin-left: auto;
    font-size: 0.875rem;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.7;
    flex-shrink: 0;
    transform: rotate(0deg);
}

/* Menu group headers - left aligned */

/* Submenu Styles */
.submenu {
    margin-left: 12px;
    margin-top: 4px;
    margin-bottom: 8px;
    padding-left: 0;
    border-left: 2px solid rgba(255, 255, 255, 0.1);
    padding-left: 12px;
    width: calc(100% - 12px);
    transition: all 0.3s ease-out;
    overflow: hidden;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.submenu-link {
    padding: 10px 14px !important;
    font-size: 0.8rem !important;
    font-weight: 500 !important;
    color: #64748b !important;
    margin-left: 6px !important;
    margin-right: 8px !important;
    border-radius: 8px !important;
    position: relative;
    min-height: 40px;
    display: flex !important;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
}

.submenu-link i {
    flex-shrink: 0;
    font-size: 0.95rem;
    min-width: 18px;
}

.submenu-link span {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.submenu-link::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #cbd5e1;
    transition: all 0.3s ease;
}

.submenu-link:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 50%, rgba(240, 147, 251, 0.2) 100%) !important;
    color: #ffffff !important;
    transform: translateX(4px);
    padding-left: 20px !important;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.25);
}

.submenu-link:hover::before {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: translateY(-50%) scale(1.3);
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
}

.submenu-link.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    font-weight: 600 !important;
    border-left: 3px solid transparent;
    padding-left: 20px !important;
    position: relative;
}

.submenu-link.active::before {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    width: 12px;
    height: 12px;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.6);
}

.submenu-link i {
    font-size: 0.9rem !important;
    width: 18px !important;
}

/* Menu Group Active State */
.menu-group-header.active {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%) !important;
    color: white !important;
}

/* Smooth Transitions */
.menu-group .collapse {
    transition: height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Badge/Indicator for Active Submenu */
.menu-group-header.active::after {
    content: '';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

/* ============================================================================
   MAIN CONTENT - Positioned after sidebar
   ============================================================================ */
main,
.main-content {
    margin-top: 73px;
    padding: 24px;
    padding-bottom: 24px;
    min-height: calc(100vh - 73px);
    background: #f8fafc;
    box-sizing: border-box;
    position: relative;
    overflow-x: hidden;
    width: 100%;
}

/* Ensure hidden sections don't take up any space - completely remove from flow */
.main-content > .content-section[style*="display: none"],
.main-content > .content-section:not(.section-active):not([style*="display: block"]) {
    display: none !important;
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* CRITICAL: Dashboard must be completely removed when hidden */
body.section-loaded #dashboard.caspero-dashboard:not(.section-active) {
    display: none !important;
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Content sections - ensure they start at top when displayed */
.main-content > .content-section {
    margin: 0;
    padding: 0;
    width: 100%;
    box-sizing: border-box;
    /* When hidden, completely remove from flow */
}

/* When section is displayed, position it to start at top of main-content */
/* Use negative margins to offset main-content padding */
/* Use class-based selector for more reliable targeting */
.main-content > .content-section.section-active,
.main-content > .content-section[style*="display: block"],
.main-content > .content-section[style*="display:block"] {
    display: block !important;
    margin-left: -24px !important;
    margin-right: -24px !important;
    margin-top: -24px !important;
    margin-bottom: 0 !important;
    padding: 24px !important;
    width: calc(100% + 48px) !important;
    box-sizing: border-box !important;
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
    min-height: auto !important;
}

/* Ensure tabbed sections also start at top - override Bootstrap tab spacing */
.content-section .nav-tabs {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.content-section .tab-content {
    margin-top: 0 !important;
}

/* Ensure first child in content-section starts at top */
.content-section > *:first-child {
    margin-top: 0 !important;
}

/* Override Bootstrap utility classes that add unwanted spacing in content sections */
.content-section .pt-3 {
    padding-top: 0.75rem !important; /* Keep some padding but not excessive */
}

.content-section .mt-3 {
    margin-top: 1rem !important; /* Reduce margin for tab-content */
}

/* Desktop - Main content offset by left sidebar width */
@media (min-width: 768px) {
    main,
    .main-content {
        margin-left: 250px;
        width: calc(100% - 250px);
    }
    
    .sidebar.caspero-sidebar {
        transform: translateX(0);
    }
}

/* Mobile - Full width, sidebar hidden by default */
@media (max-width: 767px) {
    .sidebar.caspero-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1002;
    }
    
    .sidebar.caspero-sidebar.show {
        transform: translateX(0);
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.5);
    }
    
    /* Overlay when sidebar is open on mobile */
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1001;
        display: none;
    }
    
    .sidebar.caspero-sidebar.show ~ .sidebar-overlay,
    .sidebar-overlay.show {
        display: block;
    }
    
    main,
    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 16px;
    }
    
    .navbar-mobile-toggle {
        display: flex !important;
    }
}

/* Content Sections */
.content-section {
    background: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    margin: 0;
    margin-top: 0;
    min-height: auto;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    display: none;
    position: relative;
    top: 0;
    left: 0;
}

/* Only show section if explicitly set to block via inline style */
.content-section[style*="display: block"],
.content-section[style*="display:block"],
.content-section.section-active {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
    /* DO NOT set margin-top here - let the .main-content rule handle it */
}

/* CRITICAL FIX: Ensure sections in main-content start at top */
/* This rule MUST come after the general rule and have higher specificity */
main .content-section.section-active,
.main-content .content-section.section-active {
    display: block !important;
    margin-left: -24px !important;
    margin-right: -24px !important;
    margin-top: -24px !important;
    margin-bottom: 0 !important;
    padding: 24px !important;
    width: calc(100% + 48px) !important;
    box-sizing: border-box !important;
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 1 !important;
}

/* Dashboard should be visible by default on page load only */
body:not(.section-loaded) #dashboard.caspero-dashboard {
    display: block;
}

/* Once any section is loaded, dashboard must be explicitly shown */
body.section-loaded #dashboard.caspero-dashboard {
    display: none !important;
}

/* Only show dashboard if explicitly set to block via inline style */
body.section-loaded #dashboard.caspero-dashboard[style*="display: block"],
body.section-loaded #dashboard.caspero-dashboard[style*="display:block"] {
    display: block !important;
    visibility: visible !important;
}

/* ============================================================================
   MODERN MINIMALIST DASHBOARD STYLES
   ============================================================================ */
.modern-dashboard {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 24px;
    min-height: calc(100vh - 73px);
}

/* ============================================================================
   NEW DASHBOARD COLOR SCHEME & WELCOME SECTION
   ============================================================================ */

/* Welcome Card */
.dashboard-welcome-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    border-radius: 20px;
    padding: 32px;
    color: white;
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.3);
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.welcome-content {
    flex: 1;
    min-width: 300px;
}

.welcome-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: white;
}

.welcome-subtitle {
    font-size: 1rem;
    margin: 0 0 16px 0;
    opacity: 0.9;
    color: white;
}

.welcome-info {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.welcome-date-time {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    opacity: 0.95;
}

.welcome-date-time i {
    font-size: 1.1rem;
}

.welcome-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
}

.welcome-status-badge i {
    color: #4ade80;
}

/* Navbar Customize Button with Gradient */
.btn-customize-navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    border: none;
    color: #ffffff;
    padding: 0;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-right: 8px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    position: relative;
    overflow: hidden;
}

.btn-customize-navbar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn-customize-navbar:hover::before {
    left: 100%;
}

.btn-customize-navbar:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 50%, #f5576c 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
    color: #ffffff;
}

.btn-customize-navbar:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.4);
}

.btn-customize-navbar i {
    font-size: 1.2rem;
    position: relative;
    z-index: 1;
}

/* Ensure navbar user actions display properly */
.navbar-user-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

@media (max-width: 768px) {
    .btn-customize-navbar {
        width: 36px;
        height: 36px;
        margin-right: 6px;
    }
    
    .btn-customize-navbar i {
        font-size: 1rem;
    }
}

/* Dashboard Customization Panel */
.dashboard-customize-panel {
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.customize-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f1f5f9;
}

.customize-header h5 {
    margin: 0;
    color: #1e293b;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-close-customize {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #64748b;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: all 0.2s;
}

.btn-close-customize:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.customize-body {
    margin-bottom: 20px;
}

.customize-section h6 {
    color: #475569;
    font-weight: 600;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.widget-toggle-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.widget-toggle-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s;
}

.widget-toggle-item:hover {
    background: #f8fafc;
}

.widget-toggle-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #667eea;
}

.widget-toggle-item span {
    color: #334155;
    font-weight: 500;
    cursor: pointer;
}

.customize-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

/* New Gradient Color Scheme for Metric Cards */
.bg-gradient-1 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.bg-gradient-2 {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.bg-gradient-3 {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.bg-gradient-4 {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: white;
}

/* Interactive Metric Cards */
.pluto-metric-card.interactive-card {
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.pluto-metric-card.interactive-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.pluto-metric-card.interactive-card:hover::before {
    left: 100%;
}

.pluto-metric-card.interactive-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.25);
}

.pluto-metric-card.interactive-card:active {
    transform: translateY(-4px) scale(1.01);
}

/* Empty States */
.metric-empty-state {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.98);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.empty-message {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 12px;
    font-weight: 500;
}

.empty-action {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s;
}

.empty-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

/* Dashboard Widget Visibility Control */
.dashboard-widget[style*="display: none"] {
    display: none !important;
}

/* Responsive Design for Welcome Section */
@media (max-width: 768px) {
    .dashboard-welcome-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 24px;
    }
    
    .welcome-title {
        font-size: 1.5rem;
    }
    
    .welcome-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .dashboard-customize-panel {
        padding: 20px;
    }
    
    .customize-footer {
        flex-direction: column;
    }
    
    .customize-footer .btn {
        width: 100%;
    }
}

/* Enhanced Secondary Cards with New Colors */
.pluto-secondary-card.pluto-card-departments {
    border-left: 4px solid #667eea;
}

.pluto-secondary-card.pluto-card-streams {
    border-left: 4px solid #f093fb;
}

.pluto-secondary-card.pluto-card-assessments {
    border-left: 4px solid #4facfe;
}

.pluto-secondary-card.pluto-card-promotions {
    border-left: 4px solid #43e97b;
}

/* Updated Section Cards */
.pluto-section-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.pluto-section-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.pluto-section-header {
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 16px;
    margin-bottom: 20px;
}

.pluto-section-header h5 {
    color: #1e293b;
    font-weight: 700;
    font-size: 1.1rem;
    margin: 0;
}

/* Smooth animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dashboard-widget {
    animation: fadeIn 0.5s ease-out;
}

/* Updated Metric Card Styles */
.pluto-metric-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
}

.pluto-metric-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.pluto-metric-value {
    font-size: 2rem;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.2;
}

.pluto-metric-label {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dashboard-filters {
    display: flex;
    gap: 16px;
    align-items: end;
    margin-bottom: 32px;
    padding: 20px 24px;
    background: linear-gradient(135deg, #f9fbff 0%, #eef2ff 100%);
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(31, 45, 61, 0.08);
    border: 1px solid #dce6f5;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-select {
    min-width: 200px;
    padding: 10px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 0.875rem;
    background: white;
    color: #0f172a;
    transition: all 0.2s;
}

.filter-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

#refreshDashboardBtn {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    height: fit-content;
}

#refreshDashboardBtn:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

#refreshDashboardBtn:active {
    transform: translateY(0);
}

.spin {
    animation: spin 1s linear infinite;
    display: inline-block;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.dashboard-cards-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.dashboard-card {
    background: linear-gradient(160deg, #f9fbff 0%, #eef4ff 50%, #ffffff 100%);
    border-radius: 18px;
    padding: 26px;
    display: flex;
    align-items: center;
    gap: 18px;
    box-shadow: 0 12px 30px rgba(13, 110, 253, 0.12);
    border: 1px solid #dce6f5;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #0d6efd, #5c7cfa);
    opacity: 1;
    transition: opacity 0.3s;
}

.dashboard-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 34px rgba(13, 110, 253, 0.16);
    border-color: #0d6efd;
}

.dashboard-card:hover::before {
    opacity: 1;
}

.dashboard-card-highlight {
    background: linear-gradient(135deg, #1d4ed8 0%, #0ea5e9 100%);
    color: white;
    border: none;
}

.dashboard-card-highlight::before {
    opacity: 1;
    background: rgba(255, 255, 255, 0.3);
}

.dashboard-card-highlight .dashboard-card-icon {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.dashboard-card-highlight .dashboard-card-value,
.dashboard-card-highlight .dashboard-card-label {
    color: white;
}

.dashboard-card-highlight:hover {
    box-shadow: 0 12px 32px rgba(59, 130, 246, 0.25);
}

.dashboard-card-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #e5edff 0%, #f8fbff 100%);
    font-size: 1.75rem;
    color: #0d6efd;
    flex-shrink: 0;
    transition: transform 0.3s;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.8), 0 8px 16px rgba(13,110,253,0.12);
}

.dashboard-card:hover .dashboard-card-icon {
    transform: scale(1.05);
}

.dashboard-card-content {
    flex: 1;
    min-width: 0;
}

.dashboard-card-value {
    font-size: 2.35rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 6px;
    line-height: 1.1;
    letter-spacing: -0.01em;
}

.dashboard-card-label {
    font-size: 0.9rem;
    color: #4b5563;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.dashboard-charts-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.dashboard-chart-card {
    background: linear-gradient(155deg, #f9fbff 0%, #eef4ff 50%, #ffffff 100%);
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 12px 28px rgba(13, 110, 253, 0.12);
    border: 1px solid #dce6f5;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dashboard-chart-card:hover {
    box-shadow: 0 18px 34px rgba(13, 110, 253, 0.16);
    border-color: #0d6efd;
}

.chart-card-header {
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e5edff;
}

.chart-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    letter-spacing: 0.02em;
}

.chart-card-body {
    height: 320px;
    position: relative;
}

.dashboard-tables-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 24px;
}

.dashboard-table-card {
    background: linear-gradient(160deg, #f9fbff 0%, #eef4ff 55%, #ffffff 100%);
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 12px 28px rgba(13, 110, 253, 0.12);
    border: 1px solid #dce6f5;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dashboard-table-card:hover {
    box-shadow: 0 18px 34px rgba(13, 110, 253, 0.16);
    border-color: #0d6efd;
}

.table-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5edff;
}

.table-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    letter-spacing: 0.02em;
}

.btn-view-all {
    background: transparent;
    color: #3b82f6;
    border: 1px solid #e5e7eb;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-view-all:hover {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.table-card-body {
    overflow-x: auto;
}

.modern-table {
    width: 100%;
    border-collapse: collapse;
}

.modern-table thead {
    background: transparent;
}

.modern-table th {
    padding: 12px 0;
    text-align: left;
    font-weight: 600;
    font-size: 0.6875rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-bottom: 1px solid #f1f5f9;
}

.modern-table td {
    padding: 16px 0;
    border-bottom: 1px solid #f8fafc;
    color: #0f172a;
    font-size: 0.875rem;
    font-weight: 500;
}

.modern-table tbody tr:hover {
    background: transparent;
}

.modern-table tbody tr:hover td {
    color: #3b82f6;
}

.modern-table tbody tr:last-child td {
    border-bottom: none;
}

.customers-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.customer-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border-radius: 12px;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.customer-item:hover {
    background: #fafbfc;
    border-color: #f1f5f9;
    transform: translateX(4px);
}

.customer-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid #f1f5f9;
    transition: border-color 0.2s;
}

.customer-item:hover .customer-avatar {
    border-color: #e5e7eb;
}

.customer-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.customer-info {
    flex: 1;
    min-width: 0;
}

.customer-name {
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 4px;
    font-size: 0.875rem;
    letter-spacing: -0.01em;
}

.customer-location {
    font-size: 0.8125rem;
    color: #64748b;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .dashboard-charts-row {
        grid-template-columns: 1fr;
    }
    
    .dashboard-tables-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .modern-dashboard {
        padding: 20px;
    }
    
    .dashboard-cards-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .dashboard-card {
        padding: 24px;
    }
    
    .dashboard-card-value {
        font-size: 1.875rem;
    }
    
    .dashboard-card-icon {
        width: 56px;
        height: 56px;
        font-size: 1.5rem;
    }
    
    .dashboard-charts-row,
    .dashboard-tables-row {
        gap: 16px;
    }
    
    .dashboard-chart-card,
    .dashboard-table-card {
        padding: 20px;
    }
    
    .chart-card-body {
        height: 280px;
    }
    
    .navbar-center {
        display: none;
    }
    
    .navbar-container {
        padding: 0 16px;
    }
}

@media (max-width: 480px) {
    .modern-dashboard {
        padding: 16px;
    }
    
    .dashboard-cards-row,
    .dashboard-charts-row,
    .dashboard-tables-row {
        gap: 12px;
    }
    
    .dashboard-card {
        padding: 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .dashboard-card-icon {
        width: 48px;
        height: 48px;
        font-size: 1.375rem;
    }
    
    .dashboard-card-value {
        font-size: 1.625rem;
    }
    
    .chart-card-body {
        height: 240px;
    }
}

/* Welcome Section */
.welcome-section {
    margin-bottom: 24px;
}

.welcome-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 16px;
    color: white;
}

.welcome-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.welcome-avatar i {
    font-size: 3rem;
    opacity: 0.9;
}

.welcome-title {
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0;
}

.breadcrumb-nav {
    padding: 0 4px;
}

.breadcrumb {
    margin: 0;
    background: transparent;
    padding: 0;
}

.breadcrumb-item {
    font-size: 14px;
    color: #64748b;
}

.breadcrumb-item.active {
    color: #2563eb;
    font-weight: 500;
}

.breadcrumb-item i {
    margin-right: 4px;
}

/* Dashboard Selector */
.dashboard-selector {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.dashboard-btn {
    padding: 10px 24px;
    border: 1px solid #e2e8f0;
    background: white;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
}

.dashboard-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.dashboard-btn.active {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

/* Metric Cards */
.metric-card {
    border-radius: 12px;
    padding: 24px;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
}

.metric-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.metric-card-blue {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.metric-card-orange {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
}

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

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

.metric-card-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.metric-info {
    flex: 1;
}

.metric-label {
    font-size: 14px;
    font-weight: 500;
    opacity: 0.9;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    line-height: 1;
}

.metric-icon {
    font-size: 3.5rem;
    opacity: 0.3;
}

.metric-icon i {
    display: block;
}

/* Chart Cards */
.chart-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    height: 100%;
}

.chart-card-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.chart-title {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.chart-card-body {
    padding: 24px;
    height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-card-body canvas {
    max-height: 100%;
}

/* Export Buttons */
#exportButtonsContainer {
    gap: 8px;
    flex-wrap: wrap;
}

#exportButtonsContainer .btn {
    white-space: nowrap;
}

.dropdown-menu {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid #e2e8f0;
}

.dropdown-item {
    padding: 10px 16px;
    transition: background-color 0.2s;
}

.dropdown-item:hover {
    background-color: #f1f5f9;
}

.dropdown-item i {
    margin-right: 8px;
    width: 18px;
}

/* Email Progress */
#emailProgress {
    margin-top: 20px;
}

#emailProgress .progress {
    height: 25px;
    border-radius: 8px;
    background-color: #e2e8f0;
}

#emailProgress .progress-bar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

#emailProgressText {
    font-size: 14px;
    color: #475569;
    margin-top: 8px;
}

/* Cloud Backup Modal */
#cloudBackupModal .alert {
    border-radius: 8px;
}

#cloudBackupModal ol {
    padding-left: 20px;
}

/* Email Config Modal */
#emailConfigModal .alert {
    border-radius: 8px;
}

#emailConfigModal .form-control {
    border-radius: 8px;
}

#emailConfigModal .form-control:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Multi-select styling */
select[multiple] {
    min-height: 120px;
    padding: 8px;
}

select[multiple] option {
    padding: 8px 12px;
    border-radius: 4px;
    margin: 2px 0;
}

select[multiple] option:checked {
    background: #2563eb linear-gradient(0deg, #2563eb 0%, #2563eb 100%);
    color: white;
}

select[multiple] option:hover {
    background-color: #f1f5f9;
}

/* Dashboard Cards */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.card-body h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
}

/* Tables */
.table {
    background: white;
}

.table thead {
    background-color: #f8f9fa;
    font-weight: 600;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

.table-responsive {
    border-radius: var(--border-radius);
    overflow: hidden;
}

/* Results Table Alignment */
/* Fullscreen Results Section */
#results.content-section {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: #f8fafc;
    z-index: 1050;
    overflow: hidden;
    padding: 0;
    margin: 0 !important;
}

#results.content-section .border-bottom {
    position: sticky;
    top: 0;
    background: #ffffff;
    z-index: 10;
    padding: 15px 0;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#exitFullscreenBtn {
    margin-left: auto;
}

body:has(#results.content-section:not([style*="display: none"])) {
    overflow: hidden;
}

/* Results Table - Using same approach as score-entry-table */
#resultsTable {
    table-layout: fixed;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
    background: #ffffff;
}

#resultsTable thead {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #f8f9fa;
    box-shadow: 0 2px 2px -1px rgba(0, 0, 0, 0.1);
}

#resultsTable thead th {
    background: #f8f9fa !important;
    color: #202124 !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    padding: 12px 16px !important;
    border-right: 1px solid #e0e0e0 !important;
    border-bottom: 2px solid #dadce0 !important;
    white-space: nowrap !important;
    overflow: visible !important;
    vertical-align: middle !important;
    text-align: center !important;
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
    transform: none !important;
    height: auto !important;
    line-height: 1.5 !important;
    word-wrap: normal !important;
    word-break: normal !important;
    display: table-cell !important;
}

#resultsTable thead th:first-child {
    border-left: 1px solid #e0e0e0;
    text-align: left;
}

#resultsTable thead th:last-child {
    border-right: 1px solid #e0e0e0;
}

#resultsTable thead th:nth-child(2) {
    text-align: left;
}

#resultsTable thead th:nth-child(3),
#resultsTable thead th:nth-child(4),
#resultsTable thead th:nth-child(5),
#resultsTable thead th:nth-child(6) {
    text-align: center;
}

/* Fixed column widths using nth-child - same approach as score-entry-table */
#resultsTable th:nth-child(1),
#resultsTable td:nth-child(1) {
    width: 18%;
    min-width: 150px;
}

#resultsTable th:nth-child(2),
#resultsTable td:nth-child(2) {
    width: 25%;
    min-width: 250px;
}

#resultsTable th:nth-child(3),
#resultsTable td:nth-child(3) {
    width: 15%;
    min-width: 130px;
}

#resultsTable th:nth-child(4),
#resultsTable td:nth-child(4) {
    width: 15%;
    min-width: 130px;
}

#resultsTable th:nth-child(5),
#resultsTable td:nth-child(5) {
    width: 15%;
    min-width: 130px;
}

#resultsTable th:nth-child(6),
#resultsTable td:nth-child(6) {
    width: 12%;
    min-width: 100px;
}

#resultsTable tbody tr {
    background-color: #ffffff;
    transition: background-color 0.1s ease;
    border-bottom: 1px solid #e0e0e0;
}

#resultsTable tbody tr:nth-child(even) {
    background-color: #fafafa;
}

#resultsTable tbody tr:hover {
    background-color: #f1f3f4;
}

#resultsTable tbody td {
    padding: 8px 12px;
    vertical-align: middle;
    color: #202124;
    border-right: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    font-size: 13px;
    line-height: 1.4;
}

#resultsTable tbody td:first-child {
    border-left: 1px solid #e0e0e0;
    text-align: left;
}

#resultsTable tbody td:last-child {
    border-right: 1px solid #e0e0e0;
}

#resultsTable tbody td:nth-child(2) {
    text-align: left;
}

#resultsTable tbody td:nth-child(3),
#resultsTable tbody td:nth-child(4),
#resultsTable tbody td:nth-child(5),
#resultsTable tbody td:nth-child(6) {
    text-align: center;
}

/* Buttons */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    padding: 8px 16px;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Forms */
.form-control,
.form-select {
    border-radius: var(--border-radius);
    border: 1px solid #ced4da;
    padding: 8px 12px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-label {
    font-weight: 500;
    margin-bottom: 8px;
    color: #495057;
}

/* Modals */
.modal-content {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.modal-header {
    border-bottom: 1px solid #dee2e6;
    padding: 1rem 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid #dee2e6;
    padding: 1rem 1.5rem;
}

/* Navbar - do NOT override modern-navbar/pluto-topbar (dark header) */
.navbar:not(.modern-navbar):not(.pluto-topbar) {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    padding: 1rem 1.5rem;
    background: white !important;
    border-bottom: 1px solid #e9ecef;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2563eb !important;
}

/* Header Search Box */
.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box i {
    position: absolute;
    left: 12px;
    color: #6c757d;
    z-index: 1;
}

.search-box input {
    padding-left: 40px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    width: 300px;
    height: 40px;
    font-size: 14px;
}

.search-box input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Notification Icon */
.notification-icon {
    position: relative;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.notification-icon:hover {
    background-color: #f1f5f9;
}

.notification-icon i {
    font-size: 1.3rem;
    color: #475569;
}

.notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* User Profile */
.user-profile {
    padding: 0 12px;
}

.profile-avatar i {
    font-size: 2rem;
    color: #2563eb;
}

.profile-info {
    text-align: left;
}

.profile-name {
    font-weight: 600;
    font-size: 14px;
    color: #1e293b;
    line-height: 1.2;
}

.profile-date {
    font-size: 12px;
    color: #64748b;
    line-height: 1.2;
}

/* Alerts */
.alert {
    border-radius: var(--border-radius);
    border: none;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

/* Admin / teacher scoresheet: layout from .tp-score-table in .scoresheet-ui-scope (see SCORE ENTRY STYLES) */

/* Report Card Styles */
.report-card {
    background: white;
    padding: 30px;
    max-width: 800px;
    margin: 0 auto;
}

.report-card-header {
    text-align: center;
    border-bottom: 2px solid #333;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.report-card-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.report-card-header .school-info {
    font-size: 0.9rem;
    color: #666;
}

.report-card-student-info {
    margin-bottom: 20px;
}

.report-card-student-info table {
    width: 100%;
    margin-bottom: 20px;
}

.report-card-student-info td {
    padding: 8px;
    border-bottom: 1px solid #eee;
}

.report-card-subjects {
    margin-bottom: 20px;
}

.report-card-subjects table {
    width: 100%;
    border-collapse: collapse;
}

.report-card-subjects th {
    background-color: #f8f9fa;
    padding: 10px;
    text-align: left;
    border: 1px solid #dee2e6;
    font-weight: 600;
}

.report-card-subjects td {
    padding: 10px;
    border: 1px solid #dee2e6;
}

.report-card-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
    font-size: 0.9rem;
}

/* Print Styles */
@media print {
    body {
        background: white;
    }
    
    .sidebar,
    .navbar,
    .btn,
    .modal-footer {
        display: none !important;
    }
    
    main {
        margin: 0;
        padding: 0;
    }
    
    .report-card {
        box-shadow: none;
        border: none;
    }
    
    .page-break {
        page-break-after: always;
    }
}

/* JHS Report Card Specific Styles */
.jhs-report-card {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 14px;
    line-height: 1.6;
    color: #2c3e50;
}

.jhs-header {
    border-bottom: 3px solid #333;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.jhs-logo {
    max-width: 100px;
    max-height: 100px;
    object-fit: contain;
}

.jhs-school-name {
    font-size: 22px;
    font-weight: bold;
    margin: 12px 0;
    color: #1a1a1a;
    letter-spacing: 0.5px;
}

.jhs-school-address {
    font-size: 12px;
    margin: 5px 0;
    color: #555;
}

.jhs-school-contact {
    font-size: 11px;
    margin: 5px 0;
    color: #666;
}

.jhs-school-contact span {
    margin: 0 10px;
}

.jhs-motto {
    font-size: 11px;
    font-style: italic;
    margin: 10px 0 0 0;
    color: #666;
}

.jhs-student-photo {
    width: 100px;
    height: 120px;
    object-fit: cover;
    border: 2px solid #333;
    border-radius: 4px;
}

.jhs-student-photo-placeholder {
    width: 100px;
    height: 120px;
    border: 2px dashed #ccc;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    margin: 0 auto;
}

.jhs-student-photo-placeholder i {
    font-size: 40px;
    color: #adb5bd;
}

.jhs-student-section {
    margin: 20px 0;
}

.jhs-student-info-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 10px;
    font-family: 'Times New Roman', Times, serif;
    font-size: 13pt;
    border: 1px solid #000;
}

.jhs-student-info-table td {
    padding: 4px 8px;
    border: 1px solid #000;
    text-align: left;
}

.jhs-student-info-table tr {
    border: 1px solid #000;
}

.jhs-student-info-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.jhs-section-title {
    background-color: #004a99;
    color: #fff;
    padding: 8px 12px;
    margin-top: 12px;
    margin-bottom: 8px;
    font-weight: bold;
    border-radius: 4px;
    font-size: 1.1em;
    text-transform: uppercase;
}

.jhs-student-info {
    font-size: 13px;
    line-height: 1.8;
}

.jhs-student-info p {
    margin: 10px 0;
    line-height: 1.8;
}

.jhs-subjects-section {
    margin: 20px 0;
}

.jhs-subject-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #1a1a1a;
}

.jhs-subjects-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 10px;
    border: 1px solid #999;
    font-family: 'Times New Roman', Times, serif;
    font-size: 13pt;
}

.jhs-subjects-table thead {
    background-color: #f8f9fa;
}

.jhs-subjects-table th {
    border: 1px solid #999;
    padding: 5px;
    text-align: center;
    font-weight: bold;
    background-color: #f8f9fa !important;
    color: #000 !important;
}

.jhs-subjects-table td {
    border: 1px solid #999;
    padding: 5px;
    text-align: center;
    background-color: #ffffff !important;
    color: #000 !important;
}

.jhs-subjects-table td:first-child {
    text-align: left;
}

.jhs-subjects-table tbody tr:nth-child(even) {
    background-color: #ffffff !important;
}

.jhs-subjects-table tbody tr:hover {
    background-color: #ffffff !important;
}

.jhs-category-row {
    background-color: #dde2e6 !important;
    font-weight: bold;
}

.jhs-category-row td {
    text-align: center;
    background-color: #dde2e6 !important;
    border: 1px solid #999;
}

.jhs-summary-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 10px;
    font-family: 'Times New Roman', Times, serif;
    font-size: 13pt;
}

.jhs-summary-table td {
    padding: 4px 8px;
    border: none;
    text-align: left;
}

.jhs-summary-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.jhs-remarks-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 10px;
    font-family: 'Times New Roman', Times, serif;
    font-size: 13pt;
}

.jhs-remarks-table td {
    padding: 4px 8px;
    border: none;
    text-align: left;
}

.jhs-signature-section {
    text-align: center;
    margin-top: 25px;
}

.jhs-signature-line {
    border-top: 1px solid #999;
    margin: 2px auto 0 auto;
    width: 60%;
}

.jhs-signature-details {
    font-size: 0.9em;
    margin-top: 8px;
}

.jhs-headteacher-name {
    font-weight: bold;
}

.jhs-headteacher-title {
    font-style: italic;
    color: #555;
}

/* Primary Report Card Specific Styles */
.primary-report-card {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 14px;
    line-height: 1.6;
    color: #2c3e50;
}

.primary-header {
    border-bottom: 3px solid #333;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.primary-logo {
    max-width: 100px;
    max-height: 100px;
    object-fit: contain;
}

.primary-school-name {
    font-size: 22px;
    font-weight: bold;
    margin: 12px 0 8px 0;
    color: #1a1a1a;
    letter-spacing: 0.5px;
}

.primary-school-header-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #555;
    line-height: 1.6;
}

.primary-header-item {
    display: block;
    margin: 2px 0;
}

.primary-header-item.primary-motto {
    font-style: italic;
    color: #666;
    margin-top: 4px;
}

.primary-school-address {
    font-size: 12px;
    margin: 5px 0;
    color: #555;
}

.primary-school-contact {
    font-size: 11px;
    margin: 5px 0;
    color: #666;
}

.primary-school-contact span {
    margin: 0 10px;
}

.primary-motto {
    font-size: 11px;
    font-style: italic;
    color: #777;
    margin-top: 5px;
}

.primary-student-photo {
    width: 100px;
    height: 120px;
    object-fit: cover;
    border: 2px solid #333;
    border-radius: 4px;
}

.primary-student-photo-placeholder {
    width: 100px;
    height: 120px;
    border: 2px dashed #ccc;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    margin: 0 auto;
}

.primary-student-photo-placeholder i {
    font-size: 40px;
    color: #adb5bd;
}

.primary-student-section {
    margin: 20px 0 30px 0;
    border: 3px solid #333;
    border-radius: 4px;
    padding: 15px;
    background-color: #fff;
}

.primary-student-info-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.primary-section-title {
    background-color: #004a99;
    color: #fff;
    padding: 8px 12px;
    margin-top: 12px;
    margin-bottom: 8px;
    font-weight: bold;
    border-radius: 4px;
    font-size: 1.1em;
    text-transform: uppercase;
}

.primary-student-info-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 10px;
    font-family: 'Times New Roman', Times, serif;
    font-size: 13pt;
    border: 1px solid #000;
}

.primary-student-info-table td {
    padding: 4px 8px;
    border: 1px solid #000;
    text-align: left;
}

.primary-student-info-table tr {
    border: 1px solid #000;
}

.primary-subjects-section {
    margin: 20px 0 30px 0;
    border: 3px solid #333;
    border-radius: 4px;
    padding: 15px;
    background-color: #fff;
}

.primary-subjects-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 10px;
    border: 3px solid #333;
    font-family: 'Times New Roman', Times, serif;
    font-size: 13pt;
    background-color: #fff;
}

.primary-subjects-table thead {
    background-color: #f8f9fa;
}

.primary-subjects-table th {
    border: 1px solid #999;
    padding: 8px 5px;
    text-align: center;
    font-weight: bold;
    background-color: #f8f9fa !important;
    color: #000 !important;
    word-wrap: break-word;
    white-space: normal;
}

.primary-subjects-table td {
    border: 1px solid #999;
    padding: 8px 5px;
    text-align: center;
    background-color: #ffffff !important;
    color: #000 !important;
    word-wrap: break-word;
    white-space: normal;
    vertical-align: middle;
}

.primary-subjects-table td:first-child {
    text-align: left;
}

.primary-subjects-table tbody tr:nth-child(even) {
    background-color: #ffffff !important;
}

.primary-subjects-table tbody tr:hover {
    background-color: #ffffff !important;
}

.primary-performance-summary {
    margin: 20px 0 30px 0;
    border: 3px solid #333;
    border-radius: 4px;
    padding: 15px;
    background-color: #fff;
}

.primary-summary-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 10px;
    font-family: 'Times New Roman', Times, serif;
    font-size: 13pt;
}

.primary-summary-table td {
    padding: 4px 8px;
    border: none;
    text-align: left;
}

.primary-summary-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.primary-remarks-section {
    margin: 20px 0 30px 0;
    border: 3px solid #333;
    border-radius: 4px;
    padding: 15px;
    background-color: #fff;
}

.primary-remarks-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 10px;
    font-family: 'Times New Roman', Times, serif;
    font-size: 13pt;
}

.primary-remarks-table td {
    padding: 4px 8px;
    border: none;
    text-align: left;
}

.primary-signature-section {
    text-align: center;
    margin-top: 25px;
}

.primary-signature-line {
    border-top: 1px solid #999;
    margin: 2px auto 0 auto;
    width: 60%;
}

.primary-signature-details {
    font-size: 0.9em;
    margin-top: 8px;
}

.primary-signature-image {
    margin-bottom: 5px;
}

.primary-signature-image img {
    max-width: 80px;
    max-height: 30px;
    margin-bottom: 5px;
}

.primary-headteacher-name {
    font-weight: bold;
}

.primary-headteacher-title {
    font-style: italic;
    color: #555;
}

.jhs-performance-title {
    font-size: 18px;
    font-weight: bold;
    margin: 20px 0 15px 0;
    color: #1a1a1a;
    background: #0d6efd;
    color: white;
    padding: 10px 15px;
    border-radius: 4px 4px 0 0;
}

.jhs-performance-summary {
    margin: 30px 0;
    padding: 15px;
    background: #f8f9fa;
    border-left: 4px solid #0d6efd;
}

.jhs-summary-info {
    font-size: 13px;
}

.jhs-summary-info p {
    margin: 10px 0;
    line-height: 1.8;
    padding: 5px 0;
    border-bottom: 1px solid #e0e0e0;
}

.jhs-summary-info p:last-child {
    border-bottom: none;
}

.jhs-grading-system {
    margin: 30px 0;
    padding: 15px;
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

.jhs-grading-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #1a1a1a;
    padding-bottom: 8px;
    border-bottom: 2px solid #0d6efd;
}

.jhs-grading-table {
    font-size: 12px;
    width: 100%;
    margin-top: 10px;
}

.jhs-grading-table th {
    background: #f8f9fa;
    font-weight: 600;
    padding: 10px;
    text-align: center;
    border: 1px solid #dee2e6;
}

.jhs-grading-table td {
    padding: 8px;
    text-align: center;
    border: 1px solid #dee2e6;
}

.jhs-grading-table tbody tr:nth-child(even) {
    background: #f8f9fa;
}

.jhs-headteacher-section {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid #dee2e6;
}

.jhs-headteacher-signature {
    max-width: 150px;
    max-height: 60px;
    object-fit: contain;
    margin-bottom: 10px;
}

.jhs-headteacher-name {
    font-size: 14px;
    font-weight: 600;
    margin: 5px 0;
    color: #1a1a1a;
}

.jhs-headteacher-title {
    font-size: 12px;
    color: #666;
    margin: 0;
    font-style: italic;
}

/* Loading Spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* Badges */
.badge {
    padding: 0.35em 0.65em;
    font-weight: 500;
    border-radius: var(--border-radius);
}

/* Tabs */
.nav-tabs {
    border-bottom: 2px solid #dee2e6;
}

.nav-tabs .nav-link {
    border: none;
    border-bottom: 2px solid transparent;
    color: #495057;
    font-weight: 500;
    padding: 12px 20px;
    transition: all 0.3s ease;
}

.nav-tabs .nav-link:hover {
    border-bottom-color: var(--primary-color);
    color: var(--primary-color);
}

.nav-tabs .nav-link.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background-color: transparent;
}

/* Responsive - Additional mobile styles */
@media (max-width: 767px) {
    /* Sidebar styles are already defined above, just ensure consistency */
    .sidebar.show {
        transform: translateX(0);
    }
    
    .card-body h2 {
        font-size: 2rem;
    }
    
    .search-box input {
        width: 200px;
    }
    
    .user-profile {
        display: none;
    }
    
    .welcome-card {
        padding: 16px;
    }
    
    .welcome-title {
        font-size: 1.5rem;
    }
    
    .metric-card {
        padding: 20px;
    }
    
    .metric-value {
        font-size: 2rem;
    }
    
    .metric-icon {
        font-size: 2.5rem;
    }
    
    .chart-card-body {
        height: 300px;
        padding: 16px;
    }
    
    .dashboard-selector {
        flex-direction: column;
    }
    
    .dashboard-btn {
        width: 100%;
    }
}

/* Utility Classes */
.text-muted {
    color: #6c757d !important;
}

.bg-light {
    background-color: #f8f9fa !important;
}

.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

/* Login Modal - Ensure it can be shown */
#loginModal.show {
    display: block !important;
}

#loginModal.show .modal-dialog {
    display: block;
}

/* Ensure modal backdrop is visible */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1040;
    width: 100vw;
    height: 100vh;
    background-color: #000;
}

.modal-backdrop.show {
    opacity: 0.5;
}

/* Custom Scrollbar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* ============================================================================
   LOGIN PAGE STYLES - PLUTO DESIGN
   ============================================================================ */

/* ============================================================================
   MODERN LOGIN PAGE - Redesigned with Advanced Animations
   ============================================================================ */

.login-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 9999;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    animation: fadeIn 0.6s ease-out;
}

/* Animated Background - 3D perspective context */
.login-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    perspective: 1200px;
    perspective-origin: 50% 50%;
}

.gradient-mesh {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #667eea 75%, #764ba2 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    opacity: 0.9;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Floating Shapes */
.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    transform-style: preserve-3d;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    animation: float3d 20s infinite ease-in-out;
}

.shape-1 {
    width: 300px;
    height: 300px;
    top: -150px;
    left: -150px;
    animation-delay: 0s;
}

.shape-2 {
    width: 200px;
    height: 200px;
    top: 20%;
    right: -100px;
    animation-delay: 2s;
}

.shape-3 {
    width: 150px;
    height: 150px;
    bottom: 10%;
    left: 10%;
    animation-delay: 4s;
}

.shape-4 {
    width: 250px;
    height: 250px;
    bottom: -125px;
    right: 20%;
    animation-delay: 6s;
}

.shape-5 {
    width: 180px;
    height: 180px;
    top: 50%;
    left: 50%;
    animation-delay: 8s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0.3;
    }
    25% {
        transform: translate(50px, -50px) rotate(90deg);
        opacity: 0.5;
    }
    50% {
        transform: translate(-30px, 30px) rotate(180deg);
        opacity: 0.4;
    }
    75% {
        transform: translate(30px, 50px) rotate(270deg);
        opacity: 0.6;
    }
}

@keyframes float3d {
    0%, 100% {
        transform: translate3d(0, 0, 0) rotateX(0deg) rotateY(0deg);
        opacity: 0.3;
    }
    25% {
        transform: translate3d(50px, -50px, 30px) rotateX(15deg) rotateY(90deg);
        opacity: 0.5;
    }
    50% {
        transform: translate3d(-30px, 30px, -20px) rotateX(-10deg) rotateY(180deg);
        opacity: 0.4;
    }
    75% {
        transform: translate3d(30px, 50px, 25px) rotateX(5deg) rotateY(270deg);
        opacity: 0.6;
    }
}

/* 3D Geometric Shapes */
.shape-3d {
    position: absolute;
    transform-style: preserve-3d;
    animation: float3dShape 18s infinite ease-in-out;
}

/* 3D Cube */
.shape-3d-cube {
    width: 60px;
    height: 60px;
    top: 15%;
    left: 15%;
    animation-delay: 0s;
    transform-origin: 50% 50%;
}

.cube-face {
    position: absolute;
    left: 0;
    top: 0;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(8px);
}

.cube-front  { transform: translateZ(30px); }
.cube-back   { transform: rotateY(180deg) translateZ(30px); }
.cube-right  { transform: rotateY(90deg) translateZ(30px); }
.cube-left   { transform: rotateY(-90deg) translateZ(30px); }
.cube-top    { transform: rotateX(90deg) translateZ(30px); }
.cube-bottom { transform: rotateX(-90deg) translateZ(30px); }

/* 3D Ring (torus-like) */
.shape-3d-ring {
    width: 120px;
    height: 120px;
    top: 60%;
    right: 10%;
    animation-delay: 3s;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 30px rgba(240, 147, 251, 0.3);
}

/* 3D Pyramid (diamond crystal) */
.shape-3d-pyramid {
    width: 50px;
    height: 50px;
    bottom: 25%;
    left: 30%;
    animation-delay: 6s;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(240,147,251,0.1) 100%);
    transform: rotate(45deg);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 25px rgba(118, 75, 162, 0.35);
}

/* 3D Sphere (gradient orb) */
.shape-3d-sphere {
    width: 100px;
    height: 100px;
    top: 35%;
    right: 30%;
    animation-delay: 4s;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.25), rgba(240, 147, 251, 0.15));
    box-shadow: 
        inset -10px -10px 30px rgba(0, 0, 0, 0.2),
        inset 10px 10px 30px rgba(255, 255, 255, 0.2),
        0 0 40px rgba(118, 75, 162, 0.4);
}

@keyframes float3dShape {
    0%, 100% {
        transform: translate3d(0, 0, 0) rotateX(0deg) rotateY(0deg) rotateZ(0deg);
    }
    33% {
        transform: translate3d(20px, -30px, 50px) rotateX(20deg) rotateY(120deg) rotateZ(30deg);
    }
    66% {
        transform: translate3d(-25px, 20px, -30px) rotateX(-15deg) rotateY(240deg) rotateZ(-20deg);
    }
}

/* Split Screen Container */
.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1400px;
    height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin: 0 auto;
}

/* Brand Panel (Left Side - Desktop) */
.login-brand-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideInLeft 0.8s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.brand-content {
    text-align: center;
    color: white;
    max-width: 500px;
}

.logo-icon-wrapper {
    margin-bottom: 30px;
    animation: scaleIn 0.8s ease-out 0.2s both;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.brand-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #ffffff 0%, rgba(255, 255, 255, 0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.8s ease-out 0.3s both;
    letter-spacing: -1px;
}

.brand-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.brand-features {
    display: flex;
    flex-direction: column;
    gap: 20px;
    animation: fadeInUp 0.8s ease-out 0.5s both;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    transition: all 0.3s;
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(10px);
}

.feature-item i {
    font-size: 1.3rem;
    color: #f093fb;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form Panel (Right Side) */
.login-form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    animation: slideInRight 0.8s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Glassmorphic Card - 3D ready */
.glassmorphic-card {
    width: 100%;
    max-width: 480px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 48px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.5);
    animation: cardFadeIn 0.8s ease-out 0.2s both;
    transform-style: preserve-3d;
    transition: box-shadow 0.4s ease;
}

.glassmorphic-card:hover {
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.5);
}

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.form-header {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeIn 0.6s ease-out 0.4s both;
}

.form-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.form-subtitle {
    font-size: 0.95rem;
    color: #64748b;
    margin: 0;
}

/* Login Banner with Blurred Background */
.login-banner {
    position: relative;
    height: 180px;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 50%, #06b6d4 100%);
    background-image: 
        linear-gradient(rgba(30, 58, 138, 0.85), rgba(59, 130, 246, 0.85)),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 400"><rect fill="%231e3a8a" width="1200" height="400"/><path d="M0,200 Q300,100 600,200 T1200,200 L1200,400 L0,400 Z" fill="%233b82f6" opacity="0.3"/><circle cx="200" cy="150" r="80" fill="%2306b6d4" opacity="0.2"/><circle cx="900" cy="250" r="100" fill="%233b82f6" opacity="0.2"/></svg>');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
}

.login-banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(2px);
}

.login-logo-container {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.pluto-logo-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pluto-logo-icon svg {
    width: 100%;
    height: 100%;
}

.pluto-logo-text {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.5px;
    font-family: 'Poppins', sans-serif;
}

/* Modern Login Form */
.modern-login-form {
    width: 100%;
}

/* Input Group with Floating Labels */
.input-group-modern {
    margin-bottom: 28px;
    animation: fadeInUp 0.6s ease-out both;
}

.input-group-modern:nth-child(1) { animation-delay: 0.5s; }
.input-group-modern:nth-child(2) { animation-delay: 0.6s; }

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 16px;
    color: #94a3b8;
    font-size: 1.1rem;
    z-index: 2;
    transition: all 0.3s;
    pointer-events: none;
}

.modern-input {
    width: 100%;
    padding: 16px 16px 16px 48px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    font-size: 1rem;
    color: #1e293b;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Poppins', sans-serif;
}

.modern-input:focus {
    border-color: #667eea;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.modern-input:focus + .floating-label,
.modern-input.has-value + .floating-label,
.modern-input:not(:placeholder-shown) + .floating-label {
    top: -10px;
    left: 48px;
    font-size: 0.75rem;
    color: #667eea;
    background: white;
    padding: 0 6px;
    transform: translateY(0);
}

.modern-input:focus ~ .input-icon {
    color: #667eea;
    transform: scale(1.1);
}

.floating-label {
    position: absolute;
    left: 48px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1rem;
    font-weight: 500;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.input-underline {
    position: absolute;
    bottom: 0;
    left: 48px;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.modern-input:focus ~ .input-underline {
    width: calc(100% - 48px);
}

/* Password Toggle */
.password-toggle {
    position: absolute;
    right: 16px;
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 8px;
    z-index: 2;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    color: #667eea;
    transform: scale(1.1);
}

/* Error Messages */
.error-message {
    display: block;
    color: #ef4444;
    font-size: 0.85rem;
    margin-top: 6px;
    padding-left: 48px;
    animation: shake 0.4s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Form Options */
.form-options-modern {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    margin-top: 8px;
    animation: fadeIn 0.6s ease-out 0.7s both;
}

/* Modern Checkbox Toggle */
.modern-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.modern-checkbox input[type="checkbox"] {
    display: none;
}

.checkbox-slider {
    position: relative;
    width: 44px;
    height: 24px;
    background: #cbd5e1;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.checkbox-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    top: 2px;
    left: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.modern-checkbox input[type="checkbox"]:checked + .checkbox-slider {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.modern-checkbox input[type="checkbox"]:checked + .checkbox-slider::before {
    transform: translateX(20px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

.checkbox-label {
    font-size: 0.9rem;
    color: #475569;
    font-weight: 500;
}

.forgot-link-modern {
    color: #667eea;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s;
    position: relative;
}

.forgot-link-modern::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s;
}

.forgot-link-modern:hover {
    color: #764ba2;
}

.forgot-link-modern:hover::after {
    width: 100%;
}

/* Submit Button */
.form-submit-modern {
    margin-top: 8px;
    animation: fadeIn 0.6s ease-out 0.8s both;
}

.gradient-button {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    border: none;
    border-radius: 12px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: 'Poppins', sans-serif;
}

.gradient-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.gradient-button:hover::before {
    left: 100%;
}

.gradient-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 50%, #f5576c 100%);
}

.gradient-button:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.gradient-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.button-text {
    position: relative;
    z-index: 1;
}

.button-loader {
    position: relative;
    z-index: 1;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Form Messages */
.form-message {
    margin-top: 20px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.9rem;
    text-align: center;
    animation: slideDown 0.3s ease-out;
}

.form-message.success {
    background: rgba(67, 233, 123, 0.1);
    color: #059669;
    border: 1px solid rgba(67, 233, 123, 0.3);
}

.form-message.error {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.signin-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Responsive Design for Pluto Login */
@media (max-width: 768px) {
    .login-container {
        max-width: 100%;
        padding: 10px;
    }
    
    .login-card {
        border-radius: 8px;
    }
    
    .login-banner {
        height: 150px;
        padding: 20px;
    }
    
    .pluto-logo-text {
        font-size: 24px;
    }
    
    .pluto-logo-icon {
        width: 40px;
        height: 40px;
    }
    
    .login-form-wrapper {
        padding: 30px 25px;
    }
}


/* Hide login page when authenticated */
.login-page.hidden {
    display: none;
}

/* Show main app when authenticated */
#mainApp {
    display: none;
}

#mainApp.visible {
    display: block;
}

/* ============================================================================
   RESPONSIVE DESIGN FOR LOGIN PAGE
   ============================================================================ */

/* Tablet & small desktop */
@media (max-width: 1024px) {
    .login-container {
        grid-template-columns: 1fr;
        max-width: 540px;
        padding: 20px;
    }
    
    .login-brand-panel {
        display: none;
    }
    
    .login-form-panel {
        padding: 30px 24px;
    }
    
    .glassmorphic-card {
        padding: 40px 32px;
    }

    /* Reduce 3D shapes on tablet for performance */
    .shape-3d-cube,
    .shape-3d-ring,
    .shape-3d-pyramid {
        opacity: 0.7;
    }
}

/* Mobile landscape & large phones */
@media (max-width: 768px) {
    .login-page {
        min-height: 100vh;
        min-height: 100dvh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    }

    .login-container {
        max-width: 100%;
        padding: 16px;
        min-height: auto;
        height: auto;
        align-content: center;
    }
    
    .login-form-panel {
        padding: 20px 16px;
        align-items: flex-start;
        padding-top: max(20px, env(safe-area-inset-top));
    }
    
    .glassmorphic-card {
        padding: 32px 24px;
        border-radius: 20px;
        margin: auto 0;
    }
    
    .form-title {
        font-size: 1.75rem;
    }
    
    .form-subtitle {
        font-size: 0.85rem;
    }
    
    .modern-input {
        padding: 16px 16px 16px 48px;
        font-size: 16px; /* Prevents zoom on iOS */
        min-height: 48px;
    }
    
    .input-icon {
        left: 16px;
        font-size: 1rem;
    }
    
    .floating-label {
        left: 48px;
    }
    
    .modern-input:focus + .floating-label,
    .modern-input.has-value + .floating-label,
    .modern-input:not(:placeholder-shown) + .floating-label {
        left: 48px;
    }
    
    .gradient-button {
        padding: 16px 24px;
        font-size: 1rem;
        min-height: 52px;
    }
    
    .brand-title {
        font-size: 2.5rem;
    }
    
    .brand-subtitle {
        font-size: 1rem;
    }

    /* Hide some 3D shapes on mobile for performance */
    .shape-3d-cube,
    .shape-3d-ring {
        display: none;
    }

    .shape-3d-sphere,
    .shape-3d-pyramid {
        opacity: 0.5;
    }

    .shape-1, .shape-2, .shape-3, .shape-4, .shape-5 {
        opacity: 0.4;
    }
}

/* Small phones */
@media (max-width: 480px) {
    .login-container {
        padding: 12px;
    }
    
    .login-form-panel {
        padding: 16px 12px;
    }
    
    .glassmorphic-card {
        padding: 28px 20px;
        border-radius: 18px;
    }
    
    .form-title {
        font-size: 1.5rem;
    }
    
    .form-header {
        margin-bottom: 28px;
    }
    
    .form-options-modern {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .forgot-link-modern {
        align-self: flex-end;
        padding: 8px 0; /* Larger touch target */
    }

    .modern-checkbox {
        padding: 8px 0;
    }

    .input-group-modern {
        margin-bottom: 20px;
    }
}

/* Very small screens (e.g. iPhone SE) */
@media (max-width: 360px) {
    .glassmorphic-card {
        padding: 24px 16px;
    }
    
    .form-title {
        font-size: 1.35rem;
    }
    
    .gradient-button {
        padding: 14px 20px;
    }
}

/* Landscape on phones - ensure form is scrollable */
@media (max-height: 500px) and (orientation: landscape) {
    .login-page {
        overflow-y: auto;
        align-items: flex-start;
    }
    
    .login-container {
        height: auto;
        min-height: 100vh;
        padding: 20px 16px;
    }
    
    .login-form-panel {
        padding: 16px;
    }
    
    .glassmorphic-card {
        padding: 24px 28px;
        margin: 20px 0;
    }
    
    .form-header {
        margin-bottom: 20px;
    }
    
    .input-group-modern {
        margin-bottom: 16px;
    }
}

/* Accessibility Improvements - respects user preference */
@media (prefers-reduced-motion: reduce) {
    .login-page *,
    .login-page *::before,
    .login-page *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .shape-3d,
    .shape-3d-cube .cube-face {
        display: none !important;
    }
}

/* Focus States for Accessibility */
.modern-input:focus-visible,
.gradient-button:focus-visible,
.password-toggle:focus-visible {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

/* Settings Page Styles */
.card-header {
    font-weight: 600;
}

.logo-preview,
.signature-preview {
    transition: all 0.3s ease;
}

.logo-preview:hover,
.signature-preview:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.student-photo-preview {
    transition: all 0.3s ease;
}

.student-photo-preview:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.student-photo-placeholder {
    transition: all 0.3s ease;
}

.student-photo-placeholder:hover {
    border-color: var(--primary-color);
    background: #f0f4ff;
}

.form-label .text-danger {
    font-size: 0.9em;
}

/* File input styling */
input[type="file"] {
    cursor: pointer;
}

input[type="file"]::-webkit-file-upload-button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 10px;
}

input[type="file"]::-webkit-file-upload-button:hover {
    background: #0b5ed7;
}

/* Settings card improvements */
.card.shadow-sm {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card.shadow-sm:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* Preview containers */
.logo-preview-container,
.signature-preview-container,
.student-photo-container {
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================================================
   SCORE ENTRY STYLES
   ============================================================================ */

/* Filter Section */
.score-entry-filters {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

/* Full-screen score sheet: viewport overlay; z-index above navbar (1000) & sidebar (999), below Bootstrap modals (1055) */
.score-entry-container {
    position: fixed;
    inset: 0;
    background: #f8f9fa;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    padding: 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    margin: 0;
    box-sizing: border-box;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
}

.score-entry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: #ffffff;
    border-bottom: 2px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
}

.score-entry-header-left {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.score-entry-title {
    font-size: 26px;
    font-weight: 700;
    color: #212529;
    margin: 0;
    line-height: 1.2;
}

.score-entry-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.score-entry-info-badge {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.score-entry-info-badge .badge {
    font-size: 12px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.score-entry-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.score-entry-table-wrapper {
    flex: 1 1 0;
    overflow-y: auto !important;
    overflow-x: auto !important;
    background: #ffffff;
    margin: 0;
    padding: 0 0 max(1rem, env(safe-area-inset-bottom, 0px)) 0;
    min-height: 0;
    max-height: none;
    height: 100%;
    overscroll-behavior: contain;
    position: relative;
    cursor: default;
    scrollbar-width: thin;
    scrollbar-color: #888 #f1f1f1;
    border-top: 1px solid #e0e0e0;
}

.score-entry-container .score-entry-header {
    flex: 0 0 auto;
}

.score-entry-container .score-entry-table-wrapper {
    flex: 1 1 0;
    overflow-y: scroll !important;
    overflow-x: auto !important;
    min-height: 0;
}

/* Modern spreadsheet-style scrollbar */
.score-entry-table-wrapper::-webkit-scrollbar {
    width: 16px;
    height: 16px;
    background-color: #fafafa;
}

.score-entry-table-wrapper::-webkit-scrollbar-track {
    background: #fafafa;
    border-left: 1px solid #e0e0e0;
}

.score-entry-table-wrapper::-webkit-scrollbar-thumb {
    background: #dadce0;
    border: 3px solid #fafafa;
    border-radius: 8px;
    min-height: 40px;
    min-width: 40px;
}

.score-entry-table-wrapper::-webkit-scrollbar-thumb:hover {
    background: #bdc1c6;
}

.score-entry-table-wrapper::-webkit-scrollbar-thumb:active {
    background: #9aa0a6;
}

.score-entry-table-wrapper::-webkit-scrollbar-corner {
    background: #fafafa;
    border-top: 1px solid #e0e0e0;
    border-left: 1px solid #e0e0e0;
}

/* Shared scoresheet UI: sticky index + name, compact inputs (admin + teachers portal) */
.scoresheet-ui-scope .admin-score-entry-table {
    --tp-score-idx-w: 4rem;
}

.scoresheet-ui-scope.score-entry-table-wrapper.tp-score-sheet-card {
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin: 0 16px 16px;
    border: 0;
}

@media (min-width: 769px) {
    .scoresheet-ui-scope.score-entry-table-wrapper.tp-score-sheet-card {
        margin: 0 24px max(1rem, env(safe-area-inset-bottom, 0px));
    }
}

.scoresheet-ui-scope .tp-score-table {
    table-layout: fixed;
    width: 100%;
    min-width: 680px;
    font-size: 0.8125rem;
    margin-bottom: 0;
    /* Sticky thead + sticky first columns need separate borders (collapse breaks sticky in most engines). */
    border-collapse: separate;
    border-spacing: 0;
}

.scoresheet-ui-scope .tp-score-table thead th {
    position: sticky;
    top: 0;
    z-index: 4;
    font-weight: 600;
    font-size: 0.72rem;
    line-height: 1.25;
    white-space: normal;
    word-break: break-word;
    hyphens: auto;
    padding: 0.45rem 0.3rem;
    vertical-align: bottom;
    text-align: center;
    background-color: var(--bs-table-bg, #f8f9fa);
    box-shadow: 0 2px 2px -1px rgba(0, 0, 0, 0.08);
}

.scoresheet-ui-scope .tp-score-table tbody td {
    padding: 0.28rem 0.28rem;
    vertical-align: middle;
    background-color: #fff;
}

.scoresheet-ui-scope .tp-sc-col--idx {
    width: var(--tp-score-idx-w);
    min-width: var(--tp-score-idx-w);
    max-width: var(--tp-score-idx-w);
    box-sizing: border-box;
    text-align: center;
    color: #64748b;
    font-variant-numeric: tabular-nums;
}

.scoresheet-ui-scope .tp-score-table tbody td.tp-sc-col--idx {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
    background-color: #f8fafc;
}

.scoresheet-ui-scope .tp-sc-col--student {
    text-align: left;
    width: 22%;
    min-width: 7.5rem;
    max-width: 11rem;
}

.scoresheet-ui-scope .tp-sc-student-name {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
    color: #0f172a;
}

.scoresheet-ui-scope .tp-sc-col--assess {
    width: 3.85rem;
    min-width: 3.5rem;
    max-width: 4.75rem;
}

.scoresheet-ui-scope .tp-sc-col--exam {
    width: 3.75rem;
    min-width: 3.5rem;
    max-width: 4.35rem;
}

.scoresheet-ui-scope .tp-sc-col--readonly {
    width: 3.35rem;
    min-width: 3rem;
    max-width: 3.85rem;
}

.scoresheet-ui-scope .tp-sc-input {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding: 0.22rem 0.2rem;
    font-size: 0.8125rem;
    box-sizing: border-box;
}

.scoresheet-ui-scope .tp-sc-input--readonly {
    padding: 0.22rem 0.12rem;
    background: #f1f5f9 !important;
    border-color: #e2e8f0 !important;
    color: #1e293b;
    font-variant-numeric: tabular-nums;
    font-weight: 500;
}

.scoresheet-ui-scope .tp-score-table .tp-assess:focus,
.scoresheet-ui-scope .tp-score-table .tp-exam:focus,
.scoresheet-ui-scope .tp-score-table .assessment-input:focus,
.scoresheet-ui-scope .tp-score-table .exam-input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 0.12rem rgba(99, 102, 241, 0.22);
}

.scoresheet-ui-scope .tp-score-table input[type='number'] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.scoresheet-ui-scope .tp-score-table input[type='number']::-webkit-outer-spin-button,
.scoresheet-ui-scope .tp-score-table input[type='number']::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.scoresheet-ui-scope .tp-score-table thead th.tp-sc-col--idx {
    position: sticky;
    left: 0;
    top: 0;
    z-index: 5;
    box-shadow: 4px 0 6px -4px rgba(15, 23, 42, 0.12);
    background-color: var(--bs-table-bg, #f8f9fa);
}

.scoresheet-ui-scope .tp-score-table tbody td.tp-sc-col--idx {
    position: sticky;
    left: 0;
    z-index: 2;
    box-shadow: 4px 0 6px -4px rgba(15, 23, 42, 0.12);
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.scoresheet-ui-scope .tp-score-table thead th.tp-sc-col--student {
    position: sticky;
    left: var(--tp-score-idx-w);
    top: 0;
    z-index: 6;
    box-shadow: 4px 0 8px -4px rgba(15, 23, 42, 0.15);
    background-color: var(--bs-table-bg, #f8f9fa);
}

.scoresheet-ui-scope .tp-score-table tbody td.tp-sc-col--student {
    position: sticky;
    left: var(--tp-score-idx-w);
    z-index: 3;
    box-shadow: 4px 0 8px -4px rgba(15, 23, 42, 0.15);
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.scoresheet-ui-scope .tp-score-table tbody td.tp-sc-col--student {
    z-index: 3;
    background-color: #fff;
}

.scoresheet-ui-scope .tp-score-table tbody tr:nth-child(even) td {
    background-color: #fafafa;
}

.scoresheet-ui-scope .tp-score-table tbody tr:nth-child(even) td.tp-sc-col--idx {
    background-color: #f1f5f9;
}

.scoresheet-ui-scope .tp-score-table tbody tr:nth-child(even) td.tp-sc-col--student {
    background-color: #fafafa;
}

.scoresheet-ui-scope .tp-score-table tbody tr:hover td {
    background-color: #f1f3f4;
}

.scoresheet-ui-scope .tp-score-table tbody tr:hover td.tp-sc-col--idx {
    background-color: #e8eaed;
}

.scoresheet-ui-scope .tp-score-table tbody tr:hover td.tp-sc-col--student {
    background-color: #f1f3f4;
}

.scoresheet-ui-scope .tp-score-table tbody tr.active-row td {
    background-color: #e8f0fe !important;
}

.scoresheet-ui-scope .score-entry-input.tp-sc-input.changed {
    background: #fff8e1;
    border-color: #fbc02d;
}

.scoresheet-ui-scope .score-entry-input.tp-sc-input.error {
    background: #ffebee;
    border-color: #e53935;
}

.scoresheet-ui-scope .score-entry-input.tp-sc-input.max-reached {
    background: #e8f5e9;
    border-color: #43a047;
}

.scoresheet-ui-scope .score-entry-input.tp-sc-input.score-valid {
    background: #e8f5e9;
    border-color: #43a047;
}

.scoresheet-ui-scope .score-entry-input.tp-sc-input.score-warning {
    background: #fff8e1;
    border-color: #fbc02d;
}

.scoresheet-ui-scope .score-entry-input.tp-sc-input.score-error {
    background: #ffebee;
    border-color: #e53935;
}

.scoresheet-ui-scope .score-entry-input.tp-sc-input.score-excellent {
    background: #e3f2fd;
    border-color: #1976d2;
}

.scoresheet-ui-scope .score-entry-readonly {
    text-align: center;
    padding: 0;
    background-color: transparent;
    border: none;
    border-radius: 0;
}

.scoresheet-ui-scope .score-entry-readonly.high .tp-sc-input--readonly {
    color: #198754 !important;
    font-weight: 600;
}

.scoresheet-ui-scope .score-entry-readonly.medium .tp-sc-input--readonly {
    color: #856404 !important;
    font-weight: 500;
}

.scoresheet-ui-scope .score-entry-readonly.low .tp-sc-input--readonly {
    color: #dc3545 !important;
    font-weight: 500;
}

/* Modern Button Styles */
.score-entry-actions .btn {
    font-weight: 500;
    border-radius: 8px;
    padding: 10px 20px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.score-entry-actions .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.score-entry-actions .btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.score-entry-actions .btn-primary {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    border: none;
}

.score-entry-actions .btn-success {
    background: linear-gradient(135deg, #198754 0%, #146c43 100%);
    border: none;
}

.score-entry-actions .btn-info {
    background: linear-gradient(135deg, #0dcaf0 0%, #0aa2c0 100%);
    border: none;
}

.score-entry-actions .btn-outline-primary,
.score-entry-actions .btn-outline-danger {
    border-width: 2px;
}

/* Filter Section Enhancements */
.score-entry-filters .btn-primary {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    border: none;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
    transition: all 0.2s ease;
}

.score-entry-filters .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(13, 110, 253, 0.4);
}

.score-entry-filters .form-select,
.score-entry-filters .form-control {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    transition: all 0.2s ease;
}

.score-entry-filters .form-select:focus,
.score-entry-filters .form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

/* Responsive adjustments (align with mobile.css ≤767px) */
@media (max-width: 767.98px) {
    .score-entry-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 12px 14px;
    }

    .score-entry-header-left {
        width: 100%;
        min-width: 0;
    }

    .score-entry-title {
        font-size: 18px;
        line-height: 1.2;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }

    .score-entry-actions {
        width: 100%;
        justify-content: flex-start;
        gap: 6px;
    }

    .score-entry-actions .btn {
        flex: 1 1 auto;
        min-width: 0;
        padding: 7px 10px;
        font-size: 0.8rem;
    }

    .scoresheet-ui-scope.score-entry-table-wrapper {
        overflow-x: auto !important;
        overflow-y: auto !important;
        overscroll-behavior-x: contain;
    }

    .score-entry-info-badge {
        font-size: 11px;
        gap: 4px;
        flex-wrap: wrap;
    }

    .score-entry-info-badge .badge {
        font-size: 10px;
        padding: 4px 8px;
        letter-spacing: 0;
    }

    .scoresheet-ui-scope .admin-score-entry-table thead th.tp-sc-col--idx,
    .scoresheet-ui-scope .admin-score-entry-table tbody td.tp-sc-col--idx {
        display: none !important;
    }

    .scoresheet-ui-scope .admin-score-entry-table {
        --tp-score-idx-w: 0px;
    }

    .scoresheet-ui-scope .admin-score-entry-table thead th.tp-sc-col--student,
    .scoresheet-ui-scope .admin-score-entry-table tbody td.tp-sc-col--student {
        left: 0 !important;
    }

    .scoresheet-ui-scope .tp-sc-input:not(.tp-sc-input--readonly) {
        min-height: 44px;
        font-size: 16px;
        padding: 0.35rem 0.25rem;
    }

    .scoresheet-ui-scope .tp-sc-input--readonly {
        min-height: 40px;
        font-size: 0.8rem;
    }

    .scoresheet-ui-scope .tp-score-table {
        font-size: 0.75rem;
        min-width: 600px;
        table-layout: auto;
    }

    .scoresheet-ui-scope .tp-sc-col--student {
        min-width: 8.5rem;
        max-width: none;
        width: 10rem;
    }

    .scoresheet-ui-scope .tp-score-table .tp-sc-student-name {
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        word-break: break-word;
        line-height: 1.3;
        max-width: none;
    }

    .scoresheet-ui-scope .tp-sc-col--assess {
        width: 3.5rem;
        min-width: 3.25rem;
        max-width: 4rem;
    }
}

/* ≤575px: compact header, tight spacing */
@media (max-width: 575px) {
    .score-entry-header {
        padding: 8px 10px;
        gap: 8px;
    }

    .score-entry-title {
        font-size: 15px;
    }

    /* Scope to admin scoresheet only — teacher-portal.css handles its own badge sizing */
    .scoresheet-ui-scope .score-entry-info-badge .badge {
        font-size: 9px;
        padding: 3px 7px;
    }

    .score-entry-actions {
        gap: 5px;
    }

    .score-entry-actions .btn {
        padding: 6px 8px;
        font-size: 0.75rem;
        border-radius: 6px;
    }

    .scoresheet-ui-scope.score-entry-table-wrapper.tp-score-sheet-card {
        margin: 0 6px 6px;
        border-radius: 8px;
    }
}

/* ≤400px: very small phones */
@media (max-width: 400px) {
    .score-entry-header {
        padding: 6px 8px;
        gap: 6px;
    }

    .score-entry-title {
        font-size: 13px;
    }

    .scoresheet-ui-scope .score-entry-info-badge .badge {
        font-size: 8px;
        padding: 2px 5px;
    }

    .score-entry-actions .btn {
        padding: 5px 6px;
        font-size: 0.7rem;
    }

    .scoresheet-ui-scope.score-entry-table-wrapper.tp-score-sheet-card {
        margin: 0 2px 2px;
        border-radius: 6px;
    }

    .scoresheet-ui-scope .tp-score-table {
        min-width: 520px;
        font-size: 0.7rem;
    }

    .scoresheet-ui-scope .tp-sc-col--student {
        min-width: 7rem;
        width: 8rem;
    }

    .scoresheet-ui-scope .tp-sc-col--assess,
    .scoresheet-ui-scope .tp-sc-col--exam,
    .scoresheet-ui-scope .tp-sc-col--readonly {
        min-width: 2.9rem;
        width: 3rem;
        max-width: 3.5rem;
    }
}

/* Landscape on mobile phones only (max-width: 991px prevents firing on small desktop windows) */
@media (max-height: 500px) and (orientation: landscape) and (max-width: 991px) {
    .score-entry-container {
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    .score-entry-header {
        flex-direction: row;
        align-items: center;
        padding: 6px 12px;
        gap: 10px;
        flex-wrap: nowrap;
    }

    .score-entry-header-left {
        flex: 1 1 auto;
        min-width: 0;
        flex-direction: row;
        display: flex;
        align-items: center;
        gap: 8px;
        overflow: hidden;
    }

    .score-entry-title {
        font-size: 13px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        flex-shrink: 1;
        min-width: 0;
    }

    .score-entry-info {
        flex-shrink: 0;
    }

    .score-entry-info-badge .badge {
        font-size: 8px;
        padding: 2px 5px;
    }

    .score-entry-actions {
        flex: 0 0 auto;
        width: auto;
        gap: 4px;
        flex-wrap: nowrap;
    }

    .score-entry-actions .btn {
        padding: 4px 7px;
        font-size: 0.68rem;
        flex: none;
    }

    .scoresheet-ui-scope.score-entry-table-wrapper.tp-score-sheet-card {
        margin: 0 8px 4px;
    }
}

/* ============================================================================
   PHASE 1: QUICK WINS - Toast Notifications, Validation, Auto-save
   ============================================================================ */

/* Toast Notification Styles */
.toast {
    min-width: 300px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    margin-bottom: 10px;
}

.toast-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    font-weight: 600;
}

.toast-success {
    border-left: 4px solid #28a745;
}

.toast-error {
    border-left: 4px solid #dc3545;
}

.toast-warning {
    border-left: 4px solid #ffc107;
}

.toast-info {
    border-left: 4px solid #17a2b8;
}

/* Real-time score validation (admin score entry sheet) */
.scoresheet-ui-scope .score-entry-input.score-valid {
    border-color: #28a745;
    background-color: #f0fff4;
}

.scoresheet-ui-scope .score-entry-input.score-warning {
    border-color: #ffc107;
    background-color: #fffbf0;
}

.scoresheet-ui-scope .score-entry-input.score-error {
    border-color: #dc3545;
    background-color: #fff5f5;
}

.scoresheet-ui-scope .score-entry-input.score-excellent {
    border-color: #17a2b8;
    background-color: #f0f9ff;
}

/* Auto-save Indicator */
.auto-save-indicator {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    z-index: 1000;
    display: none;
    align-items: center;
    gap: 10px;
    animation: slideInUp 0.3s ease;
}

.auto-save-indicator.show {
    display: flex;
}

.auto-save-indicator.saving {
    background: rgba(13, 110, 253, 0.9);
}

.auto-save-indicator.saved {
    background: rgba(40, 167, 69, 0.9);
}

.auto-save-indicator.error {
    background: rgba(220, 53, 69, 0.9);
}

@keyframes slideInUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Loading Skeletons */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
    border-radius: 4px;
}

.skeleton-text {
    height: 16px;
    margin-bottom: 8px;
}

.skeleton-title {
    height: 24px;
    width: 60%;
    margin-bottom: 16px;
}

.skeleton-table-row {
    height: 48px;
    margin-bottom: 8px;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Progress Indicators */
.progress-container {
    position: relative;
    margin: 20px 0;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
}

.progress-bar-animated {
    transition: width 0.3s ease;
}

/* ============================================================================
   PHASE 2: VISUALIZATION - Charts and Analytics
   ============================================================================ */

/* Analytics Dashboard */
.analytics-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.analytics-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.analytics-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.analytics-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.analytics-card-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.analytics-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.analytics-card-value {
    font-size: 32px;
    font-weight: 700;
    color: #0d6efd;
    margin: 10px 0;
}

.analytics-card-change {
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.analytics-card-change.positive {
    color: #28a745;
}

.analytics-card-change.negative {
    color: #dc3545;
}

.chart-container {
    position: relative;
    height: 300px;
    margin-top: 20px;
}

/* Performance Indicators */
.performance-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.performance-badge.excellent {
    background: #d4edda;
    color: #155724;
}

.performance-badge.good {
    background: #d1ecf1;
    color: #0c5460;
}

.performance-badge.average {
    background: #fff3cd;
    color: #856404;
}

.performance-badge.poor {
    background: #f8d7da;
    color: #721c24;
}

/* ============================================================================
   PHASE 3: ADVANCED FEATURES - Search, Filters, Batch Operations
   ============================================================================ */

/* Advanced Search Bar */
.advanced-search-container {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.search-bar-wrapper {
    position: relative;
}

.search-bar-wrapper .form-control {
    padding-left: 45px;
    border-radius: 25px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.search-bar-wrapper .form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

.search-bar-wrapper .search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 18px;
}

.quick-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.filter-chip {
    padding: 6px 16px;
    border-radius: 20px;
    border: 2px solid #e9ecef;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-chip:hover {
    border-color: #0d6efd;
    color: #0d6efd;
}

.filter-chip.active {
    background: #0d6efd;
    color: white;
    border-color: #0d6efd;
}

/* Batch Selection */
.batch-actions-bar {
    background: #f8f9fa;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.batch-actions-bar.show {
    display: flex;
}

.batch-selection-info {
    font-weight: 600;
    color: #495057;
}

.batch-actions-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Student Selection Checkbox */
.student-select-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #0d6efd;
}

/* ============================================================================
   PHASE 4: POLISH - Animations, Accessibility, Modern UI
   ============================================================================ */

/* Smooth Animations */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

.slide-in-right {
    animation: slideInRight 0.3s ease-out;
}

.slide-in-left {
    animation: slideInLeft 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Card-based Layouts */
.modern-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.modern-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.card-header-modern {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 2px solid #f0f0f0;
}

/* Focus States for Accessibility */
*:focus-visible {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Skip to Content Link */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: #0d6efd;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 10000;
    border-radius: 0 0 4px 0;
}

.skip-to-content:focus {
    top: 0;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .analytics-dashboard {
        grid-template-columns: 1fr;
    }
    
    .modern-card {
        padding: 16px;
    }
    
    .batch-actions-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .batch-actions-group {
        width: 100%;
        flex-direction: column;
    }
    
    .batch-actions-group .btn {
        width: 100%;
    }
    
    .toast {
        min-width: auto;
        width: calc(100% - 20px);
        margin: 0 10px 10px 10px;
    }
}

/* ============================================================================
   MODERN REPORT CARD WORKFLOW
   ============================================================================ */

.workflow-header {
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 20px;
}

.workflow-steps {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    padding: 20px 0;
}

.workflow-steps::before {
    content: '';
    position: absolute;
    top: 35px;
    left: 0;
    right: 0;
    height: 2px;
    background: #e9ecef;
    z-index: 0;
}

.step-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    cursor: pointer;
    transition: all 0.3s ease;
}

.step-number {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    color: #6c757d;
    margin-bottom: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.step-item.active .step-number {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    border-color: #0d6efd;
    color: #ffffff;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

.step-item.completed .step-number {
    background: #28a745;
    border-color: #28a745;
    color: #ffffff;
}

.step-item.completed .step-number::after {
    content: '✓';
    font-size: 32px;
}

.step-content {
    text-align: center;
    max-width: 150px;
}

.step-content h6 {
    font-size: 14px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 4px;
}

.step-item.active .step-content h6 {
    color: #0d6efd;
}

.step-content small {
    font-size: 12px;
    color: #6c757d;
}

.workflow-step-content {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 24px;
    margin-top: 20px;
    border: 1px solid #e9ecef;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.action-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.action-card:hover {
    border-color: #0d6efd;
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.action-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    margin-bottom: 16px;
}

.action-icon.bg-primary {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
}

.action-icon.bg-success {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
}

.action-icon.bg-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
}

.action-card h6 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #212529;
}

.action-card .text-muted {
    font-size: 13px;
    margin-bottom: 16px;
    flex: 1;
}

/* Quick Actions Bar */
#quickActionsBar {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 1px solid #e9ecef;
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge.ready {
    background: #d4edda;
    color: #155724;
}

.status-badge.processing {
    background: #fff3cd;
    color: #856404;
}

.status-badge.completed {
    background: #d1ecf1;
    color: #0c5460;
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .score-entry-container {
        overflow: visible;
    }

    /* Print: show all columns; disable sticky positioning */
    .scoresheet-ui-scope .admin-score-entry-table {
        --tp-score-idx-w: 4rem;
    }

    .scoresheet-ui-scope .admin-score-entry-table thead th.tp-sc-col--idx,
    .scoresheet-ui-scope .admin-score-entry-table tbody td.tp-sc-col--idx {
        display: table-cell !important;
    }

    .scoresheet-ui-scope .tp-score-table thead th.tp-sc-col--idx,
    .scoresheet-ui-scope .tp-score-table tbody td.tp-sc-col--idx,
    .scoresheet-ui-scope .tp-score-table thead th.tp-sc-col--student,
    .scoresheet-ui-scope .tp-score-table tbody td.tp-sc-col--student {
        position: static !important;
        left: auto !important;
        box-shadow: none !important;
        transform: none !important;
        -webkit-transform: none !important;
    }
}

@media (max-width: 768px) {
    .workflow-steps {
        flex-direction: column;
        gap: 20px;
    }
    
    .workflow-steps::before {
        display: none;
    }
    
    .step-item {
        flex-direction: row;
        width: 100%;
        text-align: left;
    }
    
    .step-number {
        margin-right: 16px;
        margin-bottom: 0;
    }
    
    .step-content {
        text-align: left;
        max-width: none;
    }
    
    .action-card {
        margin-bottom: 16px;
    }
}

/* ============================================================================
   ENHANCED FEATURES - Search, Notifications, Analytics, Gradebook
   ============================================================================ */

/* Advanced Search Dropdown */
.search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-height: 500px;
    overflow-y: auto;
    z-index: 1000;
    margin-top: 5px;
    display: none;
}

.search-results-header {
    background: #f8f9fa;
    font-weight: 600;
}

.search-results-section {
    border-bottom: 1px solid #e9ecef;
}

.search-section-title {
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    color: #6c757d;
}

.search-result-item {
    cursor: pointer;
    transition: background-color 0.2s;
    border-bottom: 1px solid #f1f5f9;
}

.search-result-item:hover {
    background-color: #f8f9fa;
}

.search-result-item:last-child {
    border-bottom: none;
}

/* Notification Center */
.notification-item {
    padding: 12px;
    cursor: pointer;
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s;
}

.notification-item:hover {
    background-color: #f8f9fa;
}

.notification-item.unread {
    background-color: #e7f3ff;
    font-weight: 600;
}

.notification-item.unread:hover {
    background-color: #d0e7ff;
}

/* Analytics Dashboard */
.analytics-dashboard {
    margin-top: 20px;
}

.analytics-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.analytics-card h5 {
    margin-bottom: 15px;
    color: #2563eb;
}

.chart-container {
    position: relative;
    height: 300px;
    margin-top: 20px;
}

/* Gradebook View */
.gradebook-container {
    overflow-x: auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.gradebook-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.gradebook-table th {
    background: #f8f9fa;
    padding: 12px;
    text-align: center;
    font-weight: 600;
    border: 1px solid #dee2e6;
    position: sticky;
    top: 0;
    z-index: 10;
}

.gradebook-table td {
    padding: 10px;
    border: 1px solid #dee2e6;
    text-align: center;
}

.gradebook-table td:first-child,
.gradebook-table th:first-child {
    position: sticky;
    left: 0;
    background: white;
    z-index: 5;
    text-align: left;
    min-width: 200px;
}

.gradebook-table th:first-child {
    background: #f8f9fa;
}

.gradebook-input {
    width: 80px;
    padding: 6px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    text-align: center;
}

.gradebook-input:focus {
    border-color: #2563eb;
    outline: none;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.gradebook-cell-excellent {
    background-color: #d4edda;
}

.gradebook-cell-good {
    background-color: #d1ecf1;
}

.gradebook-cell-average {
    background-color: #fff3cd;
}

.gradebook-cell-poor {
    background-color: #f8d7da;
}

/* Bulk Operations */
.bulk-actions-bar {
    background: #f8f9fa;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.bulk-actions-bar.active {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bulk-selection-count {
    font-weight: 600;
    color: #2563eb;
}

/* Ensure action buttons stay on same line */
#studentsTable td:last-child {
    white-space: nowrap;
}

#studentsTable td:last-child .d-flex {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 0.25rem;
}

/* Checkbox styling */
.student-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #0d6efd;
}

#selectAllStudents,
#selectAllStudentsGrid {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #0d6efd;
}

/* Grid View Styles */
.students-grid-view {
    margin-top: 12px;
}

.students-search-wrap {
    position: relative;
    min-width: 280px;
}

#students .students-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    background: linear-gradient(180deg, #f8fbff 0%, #f1f7ff 100%);
    border: 1px solid #dbeafe;
    border-radius: 14px;
    padding: 0.75rem 0.9rem;
}

#students .students-toolbar #studentsPaginationBar {
    margin-left: auto;
}

#students #studentsPagePrev,
#students #studentsPageNext {
    border-radius: 999px;
    padding: 0.35rem 0.85rem;
    border-color: #c7d2fe;
    background: #ffffff;
}

#students #studentsPageLabel {
    font-weight: 600;
    color: #334155 !important;
}

#students #studentClassFilter {
    border-radius: 10px;
    border-color: #bfdbfe;
    background: #ffffff;
}

#students #clearStudentFiltersBtn {
    border-radius: 10px;
}

#studentSearchInput {
    padding-left: 0.75rem;
}

.students-empty-state {
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    background: #f8fafc;
    color: #475569;
    text-align: center;
    padding: 1.25rem;
}

/* Teachers management refresh */
.teacher-admin-controls-card .form-select,
.teacher-admin-controls-card .form-control {
    min-height: 40px;
}

.teacher-admin-search-wrap {
    width: 100%;
    max-width: 460px;
}

.teachers-mobile-list {
    display: none;
    padding: 0.75rem;
}

.teacher-mobile-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    padding: 0.875rem;
    margin-bottom: 0.625rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.teacher-mobile-card:hover {
    transform: translateY(-2px);
    border-color: #bfdbfe;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.15);
}

.teacher-mobile-head {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.teacher-mobile-main {
    flex: 1;
    min-width: 0;
}

.teacher-mobile-name {
    font-weight: 600;
    color: #0f172a;
}

.teacher-mobile-user {
    font-size: 0.8rem;
    color: #64748b;
}

.teacher-mobile-roles .badge {
    margin-top: 0.35rem;
    margin-right: 0.25rem;
}

.teacher-mobile-status .badge {
    white-space: nowrap;
}

.teacher-mobile-assignments {
    margin-top: 0.625rem;
}

.teacher-mobile-actions {
    margin-top: 0.75rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem;
}

.teacher-stats-chart-wrap {
    position: relative;
    min-height: 220px;
}

.teacher-stat-tile {
    border-radius: 12px;
    padding: 0.75rem;
    border: 1px solid transparent;
}

.teacher-stat-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.teacher-stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.1;
    margin-top: 0.3rem;
}

.teacher-stat-tile--blue {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1e3a8a;
}
.teacher-stat-tile--green {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #065f46;
}
.teacher-stat-tile--red {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}
.teacher-stat-tile--indigo {
    background: #eef2ff;
    border-color: #c7d2fe;
    color: #3730a3;
}

/* Consultant-inspired teachers styling */
#teachers .h2 {
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #0f172a;
}

#teachers .text-muted {
    color: #64748b !important;
}

#teachers .teacher-admin-controls-card,
#teachers #teacherStatsSection,
#teachers > .card.shadow-sm {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

#teachers .table thead.table-light th {
    background: #f8fafc !important;
    color: #475569;
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
}

#teachers {
    background: linear-gradient(180deg, #f8fbff 0%, #f8fafc 40%, #ffffff 100%);
    border-radius: 16px;
    padding: 0.25rem 0.4rem 1rem;
}

#teachers .btn-primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border-color: #1d4ed8;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.25);
}

#teachers .btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    border-color: #1e40af;
}

#teachers .teacher-admin-controls-card .card-body {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

#teachers #teachersAdminTable {
    min-width: 980px;
    border-collapse: separate;
    border-spacing: 0;
}

#teachers #teachersAdminTable tbody tr {
    vertical-align: middle;
    transition: transform 0.18s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

#teachers #teachersAdminTable tbody tr:hover {
    background: #f8fbff;
    transform: translateY(-1px);
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.1);
}

#teachers #teachersAdminTable thead th {
    position: sticky;
    top: 0;
    z-index: 3;
}

#teachers #teachersAdminTable th:last-child,
#teachers #teachersAdminTable td:last-child {
    position: sticky;
    right: 0;
    z-index: 2;
    background: #ffffff;
    box-shadow: -8px 0 12px -10px rgba(15, 23, 42, 0.25);
}

#teachers #teachersAdminTable thead th:last-child {
    z-index: 4;
    background: #f8fafc !important;
}

#teachers .teacher-actions-cell {
    min-width: 270px;
}

#teachers .teacher-actions-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.35rem;
}

#teachers .teacher-actions-group .btn {
    min-width: 74px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s ease;
}

#teachers .teacher-actions-group .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.12);
}

#teachers .badge.bg-primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
    border: 1px solid #1d4ed8;
    color: #fff;
    font-weight: 700;
}

#teachers .badge.bg-warning {
    background: linear-gradient(135deg, #fde68a, #f59e0b) !important;
    border: 1px solid #d97706;
    color: #111827 !important;
    font-weight: 700;
}

#teachers .badge.bg-success {
    background: linear-gradient(135deg, #34d399, #059669) !important;
    border: 1px solid #047857;
    color: #fff;
    font-weight: 700;
}

#teachers .badge.bg-danger {
    background: linear-gradient(135deg, #fda4af, #e11d48) !important;
    border: 1px solid #be123c;
    color: #fff;
    font-weight: 700;
}

/* Teacher add/edit modal visual emphasis */
#teacherModal .modal-dialog {
    transform: translateY(0) !important;
}

#teacherModal .modal-content {
    border: 1px solid #dbe3ef !important;
    border-radius: 16px !important;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.4) !important;
    overflow: hidden;
    background: #ffffff;
}

#teacherModal .modal-header,
#teacherModal .modal-footer {
    background: #f8fafc !important;
}

#teacherModal .modal-header {
    border-bottom: 1px solid #e2e8f0 !important;
}

#teacherModal .modal-body {
    background: #ffffff !important;
}

#teacherModal .modal-title {
    font-weight: 700;
    color: #0f172a;
}

#teacherModal .teacher-modal-body .form-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #475569;
}

#teacherModal .teacher-modal-body .form-control,
#teacherModal .teacher-modal-body .form-select {
    min-height: 44px;
    border-radius: 10px;
    border: 1px solid #dbe3ef;
    background: #f8fafc;
}

#teacherModal .teacher-modal-body .form-control:focus,
#teacherModal .teacher-modal-body .form-select:focus {
    border-color: #3b82f6;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

#teacherModal #teacherModalPhotoPreview {
    border: 3px solid #e2e8f0;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
}

.modal-backdrop.teacher-modal-backdrop.show {
    background-color: rgba(15, 23, 42, 0.58) !important;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

body.teacher-modal-open #mainApp {
    filter: blur(3px);
    transition: filter 0.2s ease;
}

.students-empty-state .btn {
    margin-top: 0.5rem;
}

.student-card {
    border: 1px solid #dce6f5;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.08);
    overflow: hidden;
    background: linear-gradient(160deg, #f9fbff 0%, #eef4ff 50%, #fdfdff 100%);
}

.student-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 28px rgba(13, 110, 253, 0.18);
    border-color: #0d6efd;
    background: linear-gradient(160deg, #f1f6ff 0%, #e4edff 50%, #f9fbff 100%);
}

.student-card .card-body {
    padding: 12px;
}

.student-card-photo {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #0d6efd;
    margin: 0 auto;
    display: block;
    box-shadow: 0 3px 7px rgba(0, 0, 0, 0.1);
}

.student-card-photo-placeholder {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    border: 2px solid #0d6efd;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 7px rgba(0, 0, 0, 0.1);
}

.student-card-photo-placeholder i {
    font-size: 50px;
    color: #6c757d;
}

.student-card .card-title {
    font-size: 0.96rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 6px;
}

.student-card-details {
    font-size: 0.8rem;
    color: #495057;
    margin-top: 10px;
}

.student-card-details div {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
}

.student-card-details i {
    color: #0d6efd;
    width: 18px;
    text-align: center;
}

.student-card .badge {
    font-size: 0.7rem;
    padding: 4px 8px;
}

.student-card .btn {
    font-size: 0.78rem;
    padding: 6px 8px;
}

#studentsGridContainer.row {
    --bs-gutter-x: 0.9rem;
    --bs-gutter-y: 0.9rem;
}

/* Navbar items */
.navbar-right .navbar-item {
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
    padding: 6px 10px;
    border-radius: 8px;
}

.navbar-right .navbar-item:hover {
    background: rgba(255, 255, 255, 0.12);
}

.navbar-item-label {
    font-size: 0.85rem;
    color: #e5e7eb;
}

/* View Toggle Buttons */
.btn-group .btn.active {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: white;
}

.btn-group .btn.active:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

/* Pluto-inspired dashboard */
.pluto-dashboard .pluto-filters {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.pluto-counter {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px;
    height: 140px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
    border: 1px solid #e9edf3;
}

.pluto-counter-icon {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f4f7fb;
    color: #1d4ed8;
    font-size: 1.4rem;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), 0 4px 10px rgba(13,110,253,0.12);
}

.pluto-counter-value {
    font-size: 1.75rem;
    font-weight: 800;
    margin: 0;
    color: #111827;
    line-height: 1.1;
}

.pluto-counter-label {
    margin: 0;
    color: #6b7280;
    font-weight: 600;
    font-size: 0.95rem;
}

/* Updated styles are in the new section above - keeping for backward compatibility */

.pluto-section-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 6px 14px rgba(0,0,0,0.06);
}

.pluto-section-header {
    border-bottom: 1px solid #eef2f7;
    padding-bottom: 10px;
    margin-bottom: 12px;
    color: #1f2937;
    font-weight: 700;
}

.pluto-chart-body {
    height: 320px;
    position: relative;
}

/* Secondary Quick-Insight Cards */
.pluto-secondary-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    transition: transform 0.2s, box-shadow 0.2s;
}

.pluto-secondary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}

.pluto-secondary-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: #111827;
    line-height: 1.2;
    margin-bottom: 4px;
}

.pluto-secondary-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pluto-secondary-icon {
    font-size: 2.5rem;
    opacity: 0.15;
}

.pluto-card-departments {
    border-left: 4px solid #3b82f6;
}

.pluto-card-departments .pluto-secondary-icon {
    color: #3b82f6;
}

.pluto-card-streams {
    border-left: 4px solid #10b981;
}

.pluto-card-streams .pluto-secondary-icon {
    color: #10b981;
}

.pluto-card-assessments {
    border-left: 4px solid #f59e0b;
}

.pluto-card-assessments .pluto-secondary-icon {
    color: #f59e0b;
}

.pluto-card-promotions {
    border-left: 4px solid #8b5cf6;
}

.pluto-card-promotions .pluto-secondary-icon {
    color: #8b5cf6;
}

/* System Status Section */
.pluto-status-body {
    padding: 8px 0;
}

.pluto-status-item {
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
}

.pluto-status-item:last-child {
    border-bottom: none;
}

.pluto-status-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.pluto-status-value {
    font-size: 1rem;
    font-weight: 700;
    color: #1f2937;
}

/* Dashboard Header Enhancement */
.pluto-header h5 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.pluto-header p {
    margin-top: 4px;
    font-size: 0.875rem;
}

/* Chart Progress Text Overlay */
.chart-progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    pointer-events: none;
    z-index: 10;
}

/* Enhanced Metric Cards Hover Effect */
.pluto-metric-card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.pluto-metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}

/* Responsive adjustments for dashboard */
@media (max-width: 768px) {
    .pluto-chart-body {
        height: 250px;
    }
    
    .pluto-secondary-value {
        font-size: 1.5rem;
    }
    
    .pluto-metric-value {
        font-size: 1.4rem;
    }
}

.pluto-social-row .pluto-social-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-radius: 10px;
    color: #fff;
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}

.pluto-social-row .social_icon i {
    font-size: 1.6rem;
    color: #fff;
}

.pluto-social-row ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 12px;
}

.pluto-social-row ul li {
    display: flex;
    flex-direction: column;
    font-weight: 600;
}

.pluto-social-row .fb { background: #3b5998; }
.pluto-social-row .tw { background: #1da1f2; }
.pluto-social-row .ln { background: #0a66c2; }
.pluto-social-row .gp { background: #db4437; }

.pluto-section-card table thead th {
    font-size: 0.85rem;
    font-weight: 700;
    color: #4b5563;
    border-bottom: 1px solid #eef2f7;
}

.pluto-section-card table tbody td {
    color: #1f2937;
    font-weight: 500;
}

.pluto-section-card .customers-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Responsive Grid */
@media (max-width: 768px) {
    .student-card {
        margin-bottom: 8px;
    }
    
    .student-card-photo,
    .student-card-photo-placeholder {
        width: 70px;
        height: 70px;
    }
    
    .student-card-photo-placeholder i {
        font-size: 42px;
    }
}

/* Progress Indicators */
.progress-container {
    margin: 20px 0;
}

.progress-step {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.progress-step-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    background: #e9ecef;
    color: #6c757d;
}

.progress-step-icon.completed {
    background: #28a745;
    color: white;
}

.progress-step-icon.active {
    background: #2563eb;
    color: white;
}

/* ============================================================================
   STUDENT PROFILE PAGE
   ============================================================================ */

/* Student Photo */
.student-photo-lg {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #2563eb;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s;
}

.student-photo-lg:hover {
    transform: scale(1.05);
}

.student-photo-placeholder-lg {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid #2563eb;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.student-photo-placeholder-lg i {
    font-size: 100px;
    color: #6c757d;
}

/* ============================================================================
   RESULTS & REPORT CARDS - ENHANCED UI/UX IMPROVEMENTS
   ============================================================================ */

/* 1. Enhanced Step Progression with Visual Indicators */
.workflow-steps-enhanced {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    margin: 40px 0;
    padding: 0 20px;
}

.step-item-enhanced {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

.step-connector-left,
.step-connector-right {
    position: absolute;
    top: 25px;
    height: 3px;
    background: #e0e0e0;
    transition: all 0.5s ease;
    z-index: 0;
}

.step-connector-left {
    left: 0;
    right: 50%;
    border-radius: 0 3px 3px 0;
}

.step-connector-right {
    right: 0;
    left: 50%;
    border-radius: 3px 0 0 3px;
}

.step-item-enhanced:first-child .step-connector-left {
    display: none;
}

.step-item-enhanced:last-child .step-connector-right {
    display: none;
}

.step-item-enhanced.active .step-connector-left,
.step-item-enhanced.completed .step-connector-left,
.step-item-enhanced.completed .step-connector-right {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
}

.step-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 4px solid #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.step-item-enhanced.active .step-circle {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    animation: pulse 2s infinite;
}

.step-item-enhanced.completed .step-circle {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    transform: scale(1);
}

.step-number {
    font-size: 1.2rem;
    font-weight: 700;
    color: #64748b;
    transition: all 0.3s;
}

.step-item-enhanced.active .step-number {
    color: #ffffff;
}

.step-item-enhanced.completed .step-number {
    display: none;
}

.step-checkmark {
    position: absolute;
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: bold;
}

.step-item-enhanced.completed .step-checkmark {
    display: block !important;
}

.step-content {
    margin-top: 16px;
    text-align: center;
    max-width: 150px;
}

.step-content h6 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 4px;
    transition: color 0.3s;
}

.step-item-enhanced.active .step-content h6 {
    color: #667eea;
    font-weight: 700;
}

.step-item-enhanced.completed .step-content h6 {
    color: #43e97b;
}

.step-content small {
    font-size: 0.75rem;
    color: #94a3b8;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    }
    50% {
        box-shadow: 0 8px 30px rgba(102, 126, 234, 0.6);
    }
}

/* 2. Improved Filter Grouping & Quick Select Options */
.quick-select-bar {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.quick-select-label {
    font-weight: 600;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 8px;
}

.quick-select-label i {
    color: #667eea;
    font-size: 1.1rem;
}

.quick-select-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.quick-select-btn {
    border: 1px solid #cbd5e1;
    transition: all 0.3s;
}

.quick-select-btn:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.filter-groups-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.filter-group-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
}

.filter-group-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e1;
}

.filter-group-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f1f5f9;
}

.filter-group-header i {
    font-size: 1.3rem;
    color: #667eea;
}

.filter-group-header h6 {
    margin: 0;
    font-weight: 700;
    color: #1e293b;
    font-size: 1rem;
}

.selected-filters-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.filter-tag {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-tag i {
    font-size: 0.75rem;
    cursor: pointer;
}

.gradient-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    border: none;
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s;
}

.gradient-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
    color: white;
}

/* 3. Color-Coded Results Table with Better Visual Feedback */
.results-table-container {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.results-table-enhanced {
    margin: 0;
}

.table-header-sticky {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.results-table-enhanced thead th {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%) !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    border-bottom: 3px solid #e2e8f0 !important;
    position: relative;
}

.results-table-enhanced tbody tr {
    transition: all 0.2s;
    cursor: pointer;
}

.results-table-enhanced tbody tr:hover {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.results-table-enhanced tbody tr.selected {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
    border-left: 4px solid #667eea;
}

.performance-excellent {
    background: linear-gradient(90deg, rgba(67, 233, 123, 0.1) 0%, rgba(56, 249, 215, 0.1) 100%);
    color: #059669;
    font-weight: 600;
}

.performance-good {
    background: linear-gradient(90deg, rgba(79, 172, 254, 0.1) 0%, rgba(0, 242, 254, 0.1) 100%);
    color: #0284c7;
    font-weight: 600;
}

.performance-average {
    background: linear-gradient(90deg, rgba(251, 191, 36, 0.1) 0%, rgba(245, 158, 11, 0.1) 100%);
    color: #d97706;
    font-weight: 600;
}

.performance-poor {
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.1) 100%);
    color: #dc2626;
    font-weight: 600;
}

.top-performer-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    margin-left: 6px;
}

/* 4. Enhanced Batch Selection with Summary Card */
.batch-actions-bar-enhanced {
    background: white;
    border: 2px solid #667eea;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.15);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.batch-summary-card {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f1f5f9;
}

.batch-summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.selection-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.selection-badge i {
    font-size: 1.1rem;
}

.btn-close-batch {
    background: none;
    border: none;
    color: #64748b;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: all 0.2s;
}

.btn-close-batch:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.batch-summary-body {
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    min-height: 50px;
}

.selected-student-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: white;
    padding: 6px 12px;
    border-radius: 20px;
    margin: 4px;
    font-size: 0.85rem;
    border: 1px solid #e2e8f0;
}

.batch-actions-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.batch-action-divider {
    width: 1px;
    height: 30px;
    background: #e2e8f0;
    margin: 0 4px;
}

/* 5. Progress Indicators for Long Operations */
#progressModal .modal-content {
    border: none;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.progress-spinner {
    margin: 20px 0;
}

.progress-spinner .spinner-border {
    width: 60px;
    height: 60px;
    border-width: 4px;
}

#progressBar {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    transition: width 0.3s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    .workflow-steps-enhanced {
        flex-direction: column;
        gap: 20px;
    }
    
    .step-connector-left,
    .step-connector-right {
        display: none;
    }
    
    .filter-groups-container {
        gap: 16px;
    }
    
    .quick-select-bar {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .batch-actions-group {
        flex-direction: column;
    }
    
    .batch-action-divider {
        display: none;
    }
}

.student-photo-container {
    margin: 0 auto;
    position: relative;
}

/* Profile Header Card */
#studentProfileHeader {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    overflow: hidden;
}

#studentProfileHeader .card-body {
    padding: 30px;
    color: white;
}

#studentProfileHeader h3 {
    color: white;
    font-weight: 700;
    font-size: 2rem;
    margin-bottom: 10px;
}

#studentProfileHeader .text-muted {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 1rem;
}

#studentProfileHeader .badge {
    background: rgba(255, 255, 255, 0.25) !important;
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 20px;
    transition: transform 0.2s, background 0.2s;
}

#studentProfileHeader .badge:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.35) !important;
}

/* Profile Tabs */
#studentProfileTabs {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 15px 15px 0 0;
    padding: 0 20px;
    margin-bottom: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

#studentProfileTabs .nav-link {
    color: #718096;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 15px 25px;
    transition: all 0.3s;
    font-weight: 500;
    margin-right: 5px;
    border-radius: 10px 10px 0 0;
}

#studentProfileTabs .nav-link:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    border-bottom-color: rgba(102, 126, 234, 0.3);
}

#studentProfileTabs .nav-link.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    font-weight: 700;
}

#studentProfileTabs .nav-link i {
    margin-right: 8px;
    font-size: 1.1rem;
}

/* Tab Content Container */
#studentProfileTabContent {
    background: white;
    border-radius: 0 0 8px 8px;
    padding: 30px;
    border: 1px solid #dee2e6;
    border-top: none;
    min-height: 500px;
    color: #2d3748;
}

/* Overview Tab */
.stat-box {
    padding: 30px;
    border-radius: 15px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7));
    backdrop-filter: blur(10px);
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.stat-box:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.stat-box h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.stat-box p {
    font-size: 1rem;
    font-weight: 500;
    color: #718096;
}

/* Cards in Overview */
#overview .card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    transition: transform 0.3s;
    overflow: hidden;
}

#overview .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

#overview .card-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #ffffff;
    border: none;
    padding: 20px;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

#overview .card-header i {
    margin-right: 10px;
    font-size: 1.2rem;
    color: #ffffff;
}

#overview .card-body {
    padding: 25px;
    background: #ffffff;
    color: #2d3748;
}

#overview .table-borderless th {
    color: #1a202c;
    font-weight: 700;
}

#overview .table-borderless td {
    color: #4a5568;
}

/* Academic Records */
.academic-term-card {
    animation: fadeIn 0.5s ease-in;
    margin-bottom: 25px;
}

.academic-term-card .card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.95);
}

.academic-term-card .card-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-weight: 600;
    padding: 20px;
    border: none;
}

.academic-term-card .card-header i {
    margin-right: 10px;
    font-size: 1.2rem;
}

.academic-term-card table {
    margin-bottom: 0;
}

.academic-term-card .table th {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    font-weight: 700;
    color: #2d3748;
    border-bottom: 3px solid #667eea;
    padding: 15px;
}

.academic-term-card .table td {
    padding: 15px;
    border-bottom: 1px solid #e2e8f0;
}

.academic-term-card .table tbody tr:hover {
    background: rgba(102, 126, 234, 0.05);
    transition: background 0.2s;
}

/* Performance Trends */
#performanceTrendsContent {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

#performanceTrendsContent .chart-container {
    height: 350px;
    margin-bottom: 30px;
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

#performanceTrendsContent .chart-container canvas {
    max-height: 100%;
}

/* Timeline for Promotion History */
.timeline {
    position: relative;
    padding-left: 40px;
    padding-top: 20px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #667eea, #764ba2, #f093fb);
    border-radius: 3px;
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
    padding-left: 40px;
}

.timeline-marker {
    position: absolute;
    left: -32px;
    top: 8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.timeline-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #667eea;
    transition: transform 0.3s, box-shadow 0.3s;
}

.timeline-content:hover {
    transform: translateX(10px);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.2);
}

.timeline-content h6 {
    color: #667eea;
    font-weight: 700;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

/* Report Cards Grid */
#reportCardsContent .card {
    transition: all 0.3s;
    border: none;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

#reportCardsContent .card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.3);
}

#reportCardsContent .card-body {
    padding: 30px;
    text-align: center;
}

#reportCardsContent .card h5 {
    color: #2d3748;
    font-weight: 700;
    margin-bottom: 10px;
}

#reportCardsContent .card .btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    border-radius: 25px;
    padding: 10px 25px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s;
}

#reportCardsContent .card .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

/* Profile Table Styles */
.table-borderless th {
    font-weight: 700;
    color: #2d3748;
    padding: 15px 0;
    font-size: 0.95rem;
}

.table-borderless td {
    padding: 15px 0;
    color: #4a5568;
    font-size: 1rem;
}

/* Fee manager — data cards */
#fees-manager .card.shadow-sm {
    border: none;
    border-radius: 12px;
    overflow: hidden;
}

#fees-manager .card.shadow-sm > .card-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    padding: 0.85rem 1.25rem;
    font-weight: 600;
}

#fees-manager .card.shadow-sm > .card-header .card-title {
    color: #fff;
}

#fees-manager .card.shadow-sm > .card-header .btn-outline-secondary {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.55);
}

#fees-manager .card.shadow-sm > .card-header .btn-outline-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border-color: #fff;
}

/* Student profile — report cards / promotion cards */
#report-cards .card,
#promotion-history .card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

#report-cards .card-header,
#promotion-history .card-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 20px 25px;
    border-radius: 15px 15px 0 0;
    font-weight: 600;
}

#report-cards .card-header i,
#promotion-history .card-header i {
    margin-right: 10px;
    font-size: 1.2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .student-photo-lg,
    .student-photo-placeholder-lg {
        width: 120px;
        height: 120px;
    }
    
    .student-photo-placeholder-lg i {
        font-size: 80px;
    }
    
    #studentProfileHeader .row {
        text-align: center;
    }
    
    #studentProfileHeader h3 {
        font-size: 1.5rem;
    }
    
    .stat-box {
        padding: 20px;
        margin-bottom: 15px;
    }
    
    .stat-box h3 {
        font-size: 2rem;
    }
    
    #studentProfileTabs .nav-link {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    #studentProfileTabContent {
        padding: 20px 15px;
    }
    
    .timeline {
        padding-left: 25px;
    }
    
    .timeline-marker {
        left: -20px;
        width: 18px;
        height: 18px;
    }
    
    .timeline-content {
        padding: 20px;
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.academic-term-card {
    animation: fadeIn 0.5s ease-in;
}

/* ============================================================================
   REPORT CARD WIZARD - MODERN UI/UX
   ============================================================================ */

.rcg-wrap {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    background-color: #f8fafc;
    overflow: hidden;
    font-family: 'Poppins', sans-serif;
}

/* ── TOPBAR ── */
.rcg-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.rcg-topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.rcg-topbar-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.25);
}

.rcg-page-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 2px 0;
    letter-spacing: -0.3px;
}

.rcg-page-sub {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0;
    font-weight: 500;
}

.rcg-close-btn {
    background: #f1f5f9;
    border: 1px solid transparent;
    color: #64748b;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1.1rem;
}

.rcg-close-btn:hover {
    background: #fee2e2;
    color: #ef4444;
    border-color: #fca5a5;
    transform: rotate(90deg);
}

/* ── FILTERBAR ── */
.rcg-filterbar {
    background: #ffffff;
    padding: 16px 24px 20px;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 10;
}

.rcg-chips-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.rcg-chips-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 4px;
}

.rcg-chip {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
    padding: 4px 14px;
    border-radius: 100px;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.rcg-chip i { font-size: 0.95rem; }
.rcg-chip:hover { background: #f1f5f9; border-color: #cbd5e1; color: #1e293b; }
.rcg-chip.c-green:hover { color: #059669; border-color: #34d399; background: #ecfdf5; }
.rcg-chip.c-blue:hover { color: #2563eb; border-color: #93c5fd; background: #eff6ff; }
.rcg-chip.c-ghost { border: none; background: transparent; padding: 4px 8px; }
.rcg-chip.c-ghost:hover { background: #f1f5f9; }
.rcg-chip.c-danger:hover { color: #ef4444; background: #fef2f2; }

.rcg-chip-sep {
    width: 1px;
    height: 16px;
    background: #e2e8f0;
    margin: 0 4px;
}

.rcg-preset-sel {
    border: none;
    background: transparent;
    font-size: 0.85rem;
    color: #475569;
    font-weight: 500;
    outline: none;
    cursor: pointer;
}

.rcg-selects-row {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
}

.rcg-sel-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 180px;
}

.rcg-sel-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 6px;
}

.rcg-sel {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #1e293b;
    font-weight: 500;
    background-color: #ffffff;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.rcg-sel:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.rcg-status-wrap {
    display: flex;
    align-items: center;
    height: 42px;
    padding-left: 8px;
}

.rcg-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
}

.rcg-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.rcg-status-dot.idle { background: #cbd5e1; }
.rcg-status-dot.busy { background: #f59e0b; animation: rcgPulse 1.5s infinite; }
.rcg-status-dot.ready { background: #10b981; }

@keyframes rcgPulse {
    0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(245, 158, 11, 0); }
    100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

/* ── EMPTY STATE ── */
.rcg-empty {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.rcg-empty-inner {
    text-align: center;
    max-width: 400px;
}

.rcg-empty-icon {
    font-size: 4rem;
    color: #cbd5e1;
    margin-bottom: 16px;
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.05));
}

.rcg-empty-inner h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
}
.rcg-empty-inner p {
    font-size: 0.95rem;
    color: #64748b;
}

/* ── BODY LAYOUT ── */
.rcg-body {
    flex: 1;
    display: flex;
    overflow: hidden;
    padding: 24px;
    gap: 24px;
}

.rcg-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.rcg-right {
    width: 320px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
    padding-right: 4px;
}

/* ── STATS ROW ── */
.rcg-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    flex-shrink: 0;
}

.rcg-stat-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
    transition: transform 0.2s;
}
.rcg-stat-card:hover { transform: translateY(-2px); }

.rcg-stat-card.rcg-stat-top {
    background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
    border-color: #cbd5e1;
}

.rcg-stat-val {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.rcg-stat-lbl {
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── TABLE & TOOLBAR ── */
.rcg-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px 16px;
    flex-shrink: 0;
}

.rcg-sel-pill {
    background: #eff6ff;
    color: #1d4ed8;
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.rcg-toolbar-right {
    display: flex;
    gap: 8px;
}

.rcg-tb-btn {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #475569;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.rcg-tb-btn:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #1e293b;
}

.rcg-tb-btn.rcg-tb-icon { padding: 6px 10px; }

.rcg-search-bar {
    position: relative;
    flex-shrink: 0;
    animation: slideDownRcg 0.2s ease-out;
}

@keyframes slideDownRcg {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.rcg-search-bar i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

.rcg-search-input {
    width: 100%;
    padding: 10px 12px 10px 40px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    outline: none;
    font-size: 0.95rem;
    font-family: inherit;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02) inset;
}

.rcg-search-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.rcg-table-outer {
    flex: 1;
    overflow: auto;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
}

.rcg-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

.rcg-table th {
    position: sticky;
    top: 0;
    background: #f8fafc;
    padding: 14px 16px;
    font-weight: 600;
    color: #475569;
    border-bottom: 2px solid #e2e8f0;
    z-index: 1;
    white-space: nowrap;
}

.rcg-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    color: #1e293b;
    vertical-align: middle;
}

.rcg-table tr:hover td { background: #f8fafc; }
.rcg-table tr.rcg-selected td { background: #eff6ff; }

.rcg-cb { accent-color: #667eea; width: 16px; height: 16px; cursor: pointer; }
.col-cb { width: 44px; text-align: center; }
.col-rank { width: 55px; }
.col-num { width: 85px; text-align: right; }
.col-pos { width: 85px; text-align: right; }
.rcg-table th.col-num, .rcg-table th.col-pos { text-align: right; }

.rcg-pos {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 700;
}

.rcg-pos.gold { background: #fef08a; color: #b45309; }
.rcg-pos.silver { background: #e2e8f0; color: #475569; }
.rcg-pos.bronze { background: #fed7aa; color: #9a3412; }

.rcg-score { font-weight: 600; }
.rcg-score.excellent { color: #059669; }
.rcg-score.good { color: #2563eb; }
.rcg-score.average { color: #d97706; }
.rcg-score.poor { color: #dc2626; }

/* ── ACTION CARDS (RIGHT SIDE) ── */
.rcg-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.03);
}

.rcg-pdf-card {
    border-color: #c7d2fe;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.08);
}

.rcg-card-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.rcg-mini-card .rcg-card-header {
    margin-bottom: 0;
    align-items: center;
}

.rcg-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
}

.rcg-card-icon.c-pdf { background: #fee2e2; color: #dc2626; }
.rcg-card-icon.c-check { background: #fef3c7; color: #d97706; }
.rcg-card-icon.c-excel { background: #dcfce7; color: #059669; }
.rcg-card-icon.c-email { background: #e0e7ff; color: #2563eb; }

.rcg-card-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 2px;
}

.rcg-card-sub {
    font-size: 0.8rem;
    color: #64748b;
}

.rcg-action-btn {
    margin-left: auto;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.rcg-action-btn.c-excel:hover { background: #ecfdf5; border-color: #34d399; color: #059669; }
.rcg-action-btn.c-email:hover { background: #eff6ff; border-color: #93c5fd; color: #2563eb; }

.rcg-icon-btn {
    margin-left: auto;
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.2s;
}

.rcg-icon-btn:hover { background: #f1f5f9; color: #1e293b; }

.rcg-check-body {
    font-size: 0.85rem;
    background: #f8fafc;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #f1f5f9;
}

.rcg-check-idle { color: #64748b; margin: 0; }
.rcw-checklist-summary { padding: 10px; border-radius: 8px; margin-bottom: 8px; }
.rcw-checklist-summary.success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.rcw-checklist-summary.warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.rcw-checklist-list li { margin-bottom: 4px; color: #475569; }

.rcg-fmt-row {
    display: flex;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 10px;
    margin-bottom: 16px;
}

.rcg-fmt-btn {
    flex: 1;
    background: transparent;
    border: none;
    padding: 10px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #64748b;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.rcg-fmt-btn.active {
    background: #ffffff;
    color: #1e293b;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.rcg-pdf-count {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #3b82f6;
    margin-bottom: 16px;
    padding: 12px;
    background: #eff6ff;
    border-radius: 10px;
}

.rcg-gen-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.rcg-gen-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.45);
}

.rcg-gen-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.rcg-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: rcgSpin 1s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes rcgSpin { to { transform: rotate(360deg); } }

.rcg-progress-wrap { margin-top: 14px; }
.rcg-progress-track {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.rcg-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #f093fb);
    width: 0%;
    transition: width 0.3s ease;
}

.rcg-progress-pct {
    font-size: 0.8rem;
    color: #64748b;
    text-align: right;
    margin-top: 6px;
    font-weight: 500;
}

.rcg-preview-link {
    width: 100%;
    background: transparent;
    border: 2px dashed #cbd5e1;
    color: #64748b;
    padding: 14px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 4px;
}

.rcg-preview-link:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #1e293b;
}

/* ── SKELETON LOADER ── */
.rcw-skeleton-row td { padding: 12px 16px; }
.rcw-skel-line {
    height: 18px;
    background: #e2e8f0;
    border-radius: 6px;
    animation: rcgSkelPulse 1.5s infinite;
}

@keyframes rcgSkelPulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* ── RESPONSIVE DESIGN ── */
@media (max-width: 1024px) {
    .rcg-body { flex-direction: column; overflow-y: auto; }
    .rcg-left { min-height: 500px; flex: none; }
    .rcg-right { width: 100%; flex-direction: row; flex-wrap: wrap; overflow-y: visible; }
    .rcg-card { flex: 1; min-width: 300px; }
}

@media (max-width: 768px) {
    .rcg-stats-row { grid-template-columns: repeat(2, 1fr); }
    .rcg-selects-row { flex-direction: column; align-items: stretch; }
    .rcg-sel-wrap { min-width: 100%; }
    .rcg-right { flex-direction: column; }
    .rcg-card { min-width: 100%; }
    .rcg-topbar { padding: 12px 16px; }
    .rcg-filterbar { padding: 12px 16px 16px; }
    .rcg-body { padding: 16px; gap: 16px; }
    .rcg-page-title { font-size: 1.15rem; }
}

/* Parent feedback — unread row + nav / card message alerts */
.admin-fb-row-unread {
    box-shadow: inset 3px 0 0 0 rgba(220, 53, 69, 0.65);
    background-color: rgba(255, 243, 205, 0.35);
}

.sbapro-card-msg-alert {
    font-size: 1rem;
}

.sbapro-msg-bell-pulse {
    color: #dc3545;
    animation: sbaproMsgBellShake 2.2s ease-in-out infinite;
}

@keyframes sbaproMsgBellShake {
    0%, 100% { transform: rotate(0deg) scale(1); opacity: 1; }
    12% { transform: rotate(-14deg) scale(1.08); }
    24% { transform: rotate(12deg) scale(1.08); }
    36% { transform: rotate(-8deg); }
    48% { transform: rotate(0deg); }
    55% { opacity: 0.85; }
}

.sidebar-submenu-link .sbapro-nav-msg-pulse,
.sidebar-nav-link.position-relative .sbapro-nav-msg-pulse {
    position: absolute;
    top: 50%;
    right: 10px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #dc3545;
    transform: translateY(-50%);
    box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.55);
    animation: sbaproNavDotPulse 1.8s ease-out infinite;
}

.sba-admin-msg-table thead th {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    font-weight: 700;
}

.sba-admin-msg-inbox-card,
.sba-admin-msg-broadcast-card {
    border-radius: 14px;
    overflow: hidden;
}

@keyframes sbaproNavDotPulse {
    0% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.5); }
    70% { box-shadow: 0 0 0 8px rgba(220, 53, 69, 0); }
    100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0); }
}
