/* Global Overrides for consistency */
:root {
    --color-gray-200: #e2e8f0;
    --color-gray-400: #94a3b8;
    --color-blue-200: #bfdbfe;
    
    /* Theme Variables */
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --bg-sidebar: #ffffff;
    --bg-header: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #f1f5f9;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --shadow-soft: 0 4px 15px rgba(0,0,0,0.03);
}

[data-bs-theme="dark"] {
    --bg-body: #0f172a;
    --bg-card: #1e293b;
    --bg-sidebar: #1e293b;
    --bg-header: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --shadow-soft: 0 4px 20px rgba(0,0,0,0.2);
}

.fw-bold {
    font-weight: 500 !important;
}

.hero-banner {
    position: relative;
    padding: 60px 40px;
    background: #1e40af;
    background: linear-gradient(135deg, #1e40af 0%, #111827 100%);
    overflow: hidden;
    border-radius: 25px;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-banner::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><g fill="%23ffffff" fill-opacity="0.03" fill-rule="evenodd"><circle cx="3" cy="3" r="1"/></g></svg>');
    pointer-events: none;
}

.hero-banner::after {
    display: none;
}

.hero-aurora {
    display: none;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 500;
    margin-bottom: 10px;
    color: #ffffff !important;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.85) !important;
    max-width: 700px;
    margin: 0 auto;
}

.text-gradient {
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.level-header-final {
    position: relative;
    padding: 20px 15px;
    background: #1e40af !important;
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%) !important;
    border-radius: 25px !important;
    overflow: hidden;
    margin-top: 15px;
    margin-bottom: 20px;
    color: white !important;
}

@media (min-width: 768px) {
    .level-header-final {
        padding: 25px 30px !important;
        margin: 15px -10px 20px -10px;
    }
}

.breadcrumb-nav-pill {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(5px);
    font-size: 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.breadcrumb-item-stage {
    padding-right: 8px;
}

.glass-icon-box {
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: none !important;
    width: 75px;
    height: 75px;
    border: 1.5px solid rgba(255,255,255,0.25);
    border-radius: 1rem !important;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-icon-box:hover {
    transform: rotate(5deg) scale(1.05);
    background: rgba(255, 255, 255, 0.25);
}

.level-icon-img {
    width: 45px;
    height: 45px;
    object-fit: contain;
}

.level-icon-fa {
    font-size: 38px;
}

.level-icon-lucide {
    width: 38px;
    height: 38px;
}

.level-title {
    font-size: 1.2rem;
    letter-spacing: -0.5px;
    line-height: 1.3;
    color: #ffffff !important;
}

@media (min-width: 992px) {
    .level-title {
        font-size: 1.4rem;
    }
}

.pdf-main-container {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    margin: 0;
    border: none !important;
    border-radius: 0 !important;
    overflow: hidden;
    background: transparent;
}

.pdf-viewer-area {
    position: relative;
    width: 100%;
    height: 850px;
    background: #fff;
    border-radius: 0 !important;
    overflow: hidden;
    border: none !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.pdf-frame-container {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    background: #fff;
}

.viewer-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    z-index: 5;
    transition: opacity 0.3s ease;
}

.viewer-loader.hidden {
    display: none !important;
    opacity: 0;
    pointer-events: none;
}

.doc-preview-wrapper:hover {
    border-color: #bfdbfe;
    background: #fff;
}

.bg-light-box {
    background-color: #f8fafc;
    border-radius: 1.25rem;
    padding: 1.25rem;
    border: 1px solid #f1f5f9;
}

.bg-card-box {
    width: 48px;
    height: 48px;
    background: #fff;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: 1px solid #f1f5f9;
}

.info-note-box {
    background: #f0f7ff;
    padding: 1.5rem;
    border-radius: 1.25rem;
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
}

.pdf-icon-large {
    filter: drop-shadow(0 4px 12px rgba(220, 38, 38, 0.15));
}

.transition-all {
    transition: all 0.3s ease;
}

.transform-hover {
    transition: all 0.3s ease;
}

.transform-hover:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.2) !important;
}

.level-subtitle {
    font-size: 0.95rem;
    color: #ffffff !important;
    margin-top: 1px;
    opacity: 0.9;
}

.vertical-divider {
    background-color: rgba(255, 255, 255, 0.2);
    width: 1.2px;
    height: 50px;
    margin: 0 5px;
}

.section-icon-container {
    background: rgba(var(--bs-primary-rgb), 0.08) !important;
    padding: 0.5rem;
    border-radius: 0.75rem;
    color: var(--bs-primary) !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.section-icon-box {
    width: 18px;
    height: 18px;
}

.section-title {
    font-size: 1.05rem;
}

.subject-card-final {
    background-color: var(--bg-card);
    border-radius: 1rem !important;
    padding: 0.75rem !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: var(--shadow-soft);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.subject-card-final:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(37, 99, 235, 0.1);
    border-color: rgba(37, 99, 235, 0.1) !important;
}

.subject-card-final:hover .tag-box-final {
    transform: scale(1.08) rotate(-3deg);
    background: #dbeafe;
}

/* ==========================================================================
   Urgent Mobile Structural Fixes
   ========================================================================== */
.search-submit-btn {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all 0.2s ease;
    cursor: pointer;
    z-index: 2;
}

.search-submit-btn:hover {
    color: #2563eb;
    transform: scale(1.1);
}

[dir="rtl"] .search-submit-btn {
    order: -1;
    margin-left: 10px;
    margin-right: 0;
}

[dir="rtl"] .search-shortcut {
    order: 1;
    margin-right: 10px;
    margin-left: 0;
}

[dir="rtl"] .search-input {
    order: 0;
    text-align: right;
    padding: 0 10px !important;
}

@media (max-width: 991px) {
    /* ÃƒËœÃ‚ÂªÃƒËœÃ‚ÂµÃƒâ„¢Ã‚ÂÃƒâ„¢Ã…Â ÃƒËœÃ‚Â± ÃƒËœÃ‚Â§Ãƒâ„¢Ã¢â‚¬Å¾Ãƒâ„¢Ã¢â‚¬Â¡Ãƒâ„¢Ã‹â€ ÃƒËœÃ‚Â§Ãƒâ„¢Ã¢â‚¬Â¦ÃƒËœÃ‚Â´ ÃƒËœÃ‚Â§Ãƒâ„¢Ã¢â‚¬Å¾ÃƒËœÃ‚Â®ÃƒËœÃ‚Â§ÃƒËœÃ‚Â±ÃƒËœÃ‚Â¬Ãƒâ„¢Ã…Â ÃƒËœÃ‚Â© Ãƒâ„¢Ã¢â‚¬Å¾Ãƒâ„¢Ã¢â‚¬Å¾ÃƒËœÃ‚Â¬ÃƒËœÃ‚Â³Ãƒâ„¢Ã¢â‚¬Â¦ Ãƒâ„¢Ã¢â‚¬Å¾ÃƒËœÃ‚Â¶Ãƒâ„¢Ã¢â‚¬Â¦ÃƒËœÃ‚Â§Ãƒâ„¢Ã¢â‚¬Â  ÃƒËœÃ‚Â¹ÃƒËœÃ‚Â¯Ãƒâ„¢Ã¢â‚¬Â¦ Ãƒâ„¢Ã‹â€ ÃƒËœÃ‚Â¬Ãƒâ„¢Ã‹â€ ÃƒËœÃ‚Â¯ Ãƒâ„¢Ã‚ÂÃƒËœÃ‚Â±ÃƒËœÃ‚Â§ÃƒËœÃ‚Âº ÃƒËœÃ‚Â£ÃƒËœÃ‚Â¨Ãƒâ„¢Ã…Â ÃƒËœÃ‚Â¶ */
    body {
        margin: 0 !important;
        padding: 0 !important;
        overflow-x: hidden !important;
        width: 100% !important;
    }

    .main-content {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        min-width: 100% !important;
        position: relative !important;
    }

    .sidebar {
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        width: 280px !important;
        height: 100vh !important;
        z-index: 999999 !important;
        background: var(--bg-sidebar) !important;
        transform: translateX(100%) !important;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        border-radius: 0 !important;
    }

    [dir="ltr"] .sidebar {
        left: 0 !important;
        right: auto !important;
        transform: translateX(-100%) !important;
    }

    .sidebar.show {
        transform: translateX(0) !important;
        box-shadow: -10px 0 50px rgba(0,0,0,0.1) !important;
    }

    .mobile-overlay {
        position: fixed !important;
        inset: 0 !important;
        background: rgba(0,0,0,0.4) !important;
        backdrop-filter: blur(4px) !important;
        z-index: 999998 !important;
        display: none !important;
    }

    .mobile-overlay.show {
        display: block !important;
    }

    .content-header {
        position: sticky !important;
        top: 0 !important;
        width: 100% !important;
        background: #ffffff !important;
        z-index: 1000 !important;
        padding: 10px 15px !important;
        margin: 0 !important; /* ÃƒËœÃ‚Â¥ÃƒËœÃ‚Â²ÃƒËœÃ‚Â§Ãƒâ„¢Ã¢â‚¬Å¾ÃƒËœÃ‚Â© ÃƒËœÃ‚Â£Ãƒâ„¢Ã…Â  Ãƒâ„¢Ã¢â‚¬Â¡ÃƒËœÃ‚Â§Ãƒâ„¢Ã¢â‚¬Â¦ÃƒËœÃ‚Â´ ÃƒËœÃ‚Â¹Ãƒâ„¢Ã¢â‚¬Å¾Ãƒâ„¢Ã‹â€ Ãƒâ„¢Ã…Â  Ãƒâ„¢Ã…Â ÃƒËœÃ‚Â³ÃƒËœÃ‚Â¨ÃƒËœÃ‚Â¨ ÃƒËœÃ‚Â§Ãƒâ„¢Ã¢â‚¬Å¾Ãƒâ„¢Ã‚ÂÃƒËœÃ‚Â±ÃƒËœÃ‚Â§ÃƒËœÃ‚Âº ÃƒËœÃ‚Â§Ãƒâ„¢Ã¢â‚¬Å¾ÃƒËœÃ‚Â£ÃƒËœÃ‚Â¨Ãƒâ„¢Ã…Â ÃƒËœÃ‚Â¶ */
        height: 60px !important;
        display: flex !important;
        align-items: center !important;
        border-bottom: 1px solid #f1f5f9 !important;
    }

    .container-fluid {
        padding-left: 15px !important;
        padding-right: 15px !important;
        width: 100% !important;
    }

    /* Header Adjustments */
    .content-header {
        padding: 5px 12px !important;
        gap: 8px !important;
        height: 60px !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
    }

    .header-icon-link, .header-v-divider {
        display: none !important; 
    }

    .search-container {
        flex: 1 !important;
        width: auto !important;
        margin: 0 !important;
    }

    .search-input-group {
        width: 100% !important;
        height: 38px !important;
    }

    .header-btn {
        flex-shrink: 0 !important;
    }

    /* Hero Banner Structural Fix */
    .level-header-final {
        margin: 0 0 15px 0 !important; /* ÃƒËœÃ‚Â¥ÃƒËœÃ‚Â²ÃƒËœÃ‚Â§Ãƒâ„¢Ã¢â‚¬Å¾ÃƒËœÃ‚Â© ÃƒËœÃ‚Â§Ãƒâ„¢Ã¢â‚¬Å¾Ãƒâ„¢Ã¢â‚¬Â¡Ãƒâ„¢Ã‹â€ ÃƒËœÃ‚Â§Ãƒâ„¢Ã¢â‚¬Â¦ÃƒËœÃ‚Â´ ÃƒËœÃ‚Â§Ãƒâ„¢Ã¢â‚¬Å¾ÃƒËœÃ‚Â¬ÃƒËœÃ‚Â§Ãƒâ„¢Ã¢â‚¬Â ÃƒËœÃ‚Â¨Ãƒâ„¢Ã…Â ÃƒËœÃ‚Â© */
        padding: 30px 15px !important;
        width: 100% !important;
        border-radius: 0 !important; /* ÃƒËœÃ‚Â¬ÃƒËœÃ‚Â¹Ãƒâ„¢Ã¢â‚¬Å¾ ÃƒËœÃ‚Â§Ãƒâ„¢Ã¢â‚¬Å¾ÃƒËœÃ‚Â²Ãƒâ„¢Ã‹â€ ÃƒËœÃ‚Â§Ãƒâ„¢Ã…Â ÃƒËœÃ‚Â§ Ãƒâ„¢Ã¢â‚¬Â¦ÃƒËœÃ‚Â³ÃƒËœÃ‚ÂªÃƒâ„¢Ã¢â‚¬Å¡Ãƒâ„¢Ã…Â Ãƒâ„¢Ã¢â‚¬Â¦ÃƒËœÃ‚Â© Ãƒâ„¢Ã‚ÂÃƒâ„¢Ã…Â  ÃƒËœÃ‚Â§Ãƒâ„¢Ã¢â‚¬Å¾Ãƒâ„¢Ã¢â‚¬Â¦Ãƒâ„¢Ã‹â€ ÃƒËœÃ‚Â¨ÃƒËœÃ‚Â§Ãƒâ„¢Ã…Â Ãƒâ„¢Ã¢â‚¬Å¾ Ãƒâ„¢Ã¢â‚¬Å¾Ãƒâ„¢Ã¢â‚¬Â¦Ãƒâ„¢Ã¢â‚¬Å¾ÃƒËœÃ‚Â¡ ÃƒËœÃ‚Â§Ãƒâ„¢Ã¢â‚¬Å¾Ãƒâ„¢Ã‚ÂÃƒËœÃ‚Â±ÃƒËœÃ‚Â§ÃƒËœÃ‚Âº ÃƒËœÃ‚Â§Ãƒâ„¢Ã¢â‚¬Å¾ÃƒËœÃ‚Â¬ÃƒËœÃ‚Â§Ãƒâ„¢Ã¢â‚¬Â ÃƒËœÃ‚Â¨Ãƒâ„¢Ã…Â  */
        display: block !important;
    }

    .level-header-final .row {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        width: 100% !important;
        margin: 0 !important;
    }

    .level-header-final [class*="col-"] {
        width: 100% !important;
        padding: 0 !important;
        margin-bottom: 10px !important;
    }

    .glass-icon-box {
        margin: 0 auto 15px auto !important;
    }

    .vertical-divider {
        display: none !important;
    }
}

/* Base Responsive Improvements */
.border-dashed {
    border-style: dashed !important;
}

@media (max-width: 767px) {
    .level-header-final {
        padding: 25px 20px !important;
        border-radius: 20px !important;
        margin: 10px 0 20px 0 !important;
        text-align: center;
    }
    
    .level-header-final .row {
        justify-content: center !important;
    }
    
    .level-header-final .col-lg-auto {
        flex-direction: column !important;
        text-align: center !important;
        gap: 15px !important;
    }
    
    .level-header-final .text-start {
        text-align: center !important;
        margin: 0 !important;
    }

    .level-title {
        font-size: 1.4rem !important;
        line-height: 1.2;
    }
    
    .level-subtitle {
        font-size: 0.9rem !important;
        margin-top: 5px;
    }
    
    .glass-icon-box {
        width: 65px !important;
        height: 65px !important;
        margin: 0 auto;
    }
    
    .level-card-premium {
        padding: 20px !important;
        margin-bottom: 5px;
    }
    
    .level-card-title {
        font-size: 1.1rem !important;
        display: block;
        width: 100%;
    }

    .file-pill-modern {
        margin-top: 8px;
        align-self: flex-start;
    }
    
    .subject-preview-grid {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .level-header-final {
        padding: 20px 15px !important;
    }
    
    .level-title {
        font-size: 1.25rem !important;
    }
}

@media (max-width: 576px) {
    .level-header-final {
        margin: 10px 0 20px 0 !important;
    }
    
    .breadcrumb-nav-pill {
        font-size: 0.65rem !important;
        padding: 0.2rem 0.6rem !important;
    }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes glowPulse {
    0% { box-shadow: 0 4px 20px rgba(15, 23, 42, 0.03); }
    50% { box-shadow: 0 4px 25px rgba(37, 99, 235, 0.1); }
    100% { box-shadow: 0 4px 20px rgba(15, 23, 42, 0.03); }
}

.level-card-premium {
    position: relative;
    background: var(--bg-card);
    border-radius: 24px;
    padding: 24px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    z-index: 1;
    animation: fadeInUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: var(--delay, 0ms);
}

.level-card-premium::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.03) 0%, transparent 50%);
    z-index: -1;
    transition: transform 0.8s ease;
    pointer-events: none;
}

.level-card-premium:hover::before {
    transform: translate(10%, 10%);
}

.level-card-premium:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
    border-color: rgba(37, 99, 235, 0.12);
}

.card-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent 0%, rgba(37, 99, 235, 0.02) 50%, transparent 100%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.level-card-premium:hover .card-glow {
    opacity: 1;
}

.level-card-title {
    font-size: 1.1rem;
    color: #1e293b;
    font-weight: 500;
    transition: color 0.3s;
}

.level-card-premium:hover .level-card-title {
    color: #2563eb;
}

.file-pill-modern {
    background: #eff6ff;
    color: #2563eb;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #dbeafe;
    transition: all 0.3s ease;
}



.subject-bubble {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(226, 232, 240, 0.6);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: #475569;
    position: relative;
    background: #ffffff;
}

.subject-bubble:hover {
    transform: translateY(-4px) scale(1.1) !important;
    background: #2563eb;
    color: #ffffff !important;
    border-color: #2563eb;
    box-shadow: 0 8px 15px rgba(37, 99, 235, 0.2);
}

.subject-bubble.more-count {
    font-size: 0.75rem;
    font-weight: 500;
    background: #f1f5f9;
    color: #64748b;
    border: 1px dashed #cbd5e1;
}

.card-footer-explore {
    border-top: 1px solid #f1f5f9;
    transition: all 0.3s ease;
}

.level-card-premium:hover .subject-bubble {
    border-color: rgba(59, 130, 246, 0.2);
}

.subject-bubble:hover {
    transform: translateY(-5px) scale(1.08) !important;
    background: #2563eb;
    color: #ffffff !important;
    border-color: #2563eb;
    box-shadow: 0 8px 15px rgba(37, 99, 235, 0.15);
    z-index: 10;
}

.subject-bubble-link {
    position: relative;
    z-index: 5;
}

.explore-text {
    font-size: 0.85rem;
    font-weight: 500;
    color: #475569;
    transition: all 0.3s ease;
}

.explore-icon-wrapper {
    width: 28px;
    height: 28px;
    background: #f1f5f9;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.explore-icon {
    width: 16px;
    height: 16px;
    color: #64748b;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.level-card-premium:hover .explore-text {
    color: #2563eb;
}

.level-card-premium:hover .explore-icon-wrapper {
    background: #2563eb;
    transform: rotate(-10deg);
}

.level-card-premium:hover .explore-icon {
    color: #ffffff;
}

[dir="rtl"] .level-card-premium:hover .explore-icon {
    transform: translateX(-2px);
}

[dir="ltr"] .level-card-premium:hover .explore-icon,
body:not([dir="rtl"]) .level-card-premium:hover .explore-icon {
    transform: translateX(2px);
}

body {
    background-color: var(--bg-body);
    background-image: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%232563eb" fill-opacity="0.02"><path d="M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z"/></g></g></svg>');
    color: var(--text-main);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    letter-spacing: -0.02em;
    color: var(--text-main);
}

.text-muted {
    color: #64748b !important;
}

.subjects-grid-final {
    position: relative;
    padding-top: 10px;
}

.subjects-grid-final::before {
    content: "";
    position: absolute;
    top: 50px;
    right: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.03) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

.bubble-img { 
    width: 32px; 
    height: 32px; 
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.05));
    transition: all 0.3s;
}

.subject-bubble:hover .bubble-img {
    filter: brightness(0) invert(1) drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

.bubble-fa { font-size: 1.4rem; }
.bubble-lucide { width: 28px; height: 28px; stroke-width: 2px; }

.subject-bubble.more-count {
    font-size: 0.75rem;
    font-weight: 500;
    background: #f1f5f9;
    color: #64748b;
    border: 1px dashed #cbd5e1;
}

.card-footer-explore {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
    opacity: 0.6;
    transition: opacity 0.3s, transform 0.3s;
}

.level-card-premium:hover .card-footer-explore {
    opacity: 1;
}

.explore-text {
    font-size: 0.85rem;
    font-weight: 500;
    color: #64748b;
}

.explore-icon {
    width: 18px;
    height: 18px;
    color: #2563eb;
    transition: transform 0.3s;
}

.level-card-premium:hover .explore-icon {
    transform: translateX(5px);
}

[dir="rtl"] .level-card-premium:hover .explore-icon {
    transform: translateX(-5px);
}

[data-bs-theme="dark"] .level-card-premium {
    background: #1e293b;
    border-color: #334155;
}

[data-bs-theme="dark"] .level-card-title { color: #f8fafc; }
[data-bs-theme="dark"] .subject-bubble { background: linear-gradient(145deg, #1e293b, #0f172a); border-color: rgba(51, 65, 85, 0.5); color: #94a3b8; }
[data-bs-theme="dark"] .subject-bubble:hover { background: #3b82f6; color: #fff !important; }
[data-bs-theme="dark"] .card-footer-explore { border-color: #334155; }
[data-bs-theme="dark"] .file-pill-modern { background: rgba(37, 99, 235, 0.15); border-color: rgba(37, 99, 235, 0.2); color: #60a5fa; }


.subject-divider {
    height: 1px;
    background: linear-gradient(to right, rgba(0,0,0,0.08), transparent);
    width: 100%;
}

.tag-box-final {
    width: 50px;
    height: 50px;
    background: #eff6ff;
    border-radius: 0.85rem !important;
    transition: all 0.3s ease;
}

.subject-name {
    font-size: 0.95rem;
}

.subject-meta {
    font-size: 0.75rem;
    opacity: 0.8;
}

.subject-meta .fw-bold {
    font-size: 0.85rem;
    color: #000;
}

.subject-meta-icon {
    width: 10px;
    height: 10px;
}

.btn-icon-box {
    width: 40px;
    height: 40px;
    background-color: #2563eb;
    border-radius: 0.75rem !important;
}

.btn-icon {
    width: 20px;
    height: 20px;
}

.btn-text {
    font-size: 0.85rem;
}

.btn-chevron {
    width: 18px;
    height: 18px;
}

/* Dark Mode Calculator & Recommendation Styles */
[data-bs-theme="dark"] .calculator-card { background: #1e293b; border-color: #334155; box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4); }
[data-bs-theme="dark"] .grade-row { background: #0f172a; border-color: #334155; }
[data-bs-theme="dark"] .grade-input-box { background: #1e293b; border-color: #334155; color: #f1f5f9; }
[data-bs-theme="dark"] .grade-input-box:focus { background: #0f172a; border-color: #3b82f6; box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2); }
[data-bs-theme="dark"] .final-result-box { background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%); border-color: #334155; }
[data-bs-theme="dark"] .recommendation-card { background: rgba(30, 41, 59, 0.8); border-color: #1e40af; }
[data-bs-theme="dark"] .rec-item { background: #0f172a; border-color: #334155; }
[data-bs-theme="dark"] .rec-item:hover { background: #1e293b; border-color: #3b82f6; }
[data-bs-theme="dark"] .rec-item .item-name { color: #f1f5f9; }
[data-bs-theme="dark"] .interaction-item { background: #1e293b; border-color: #334155; color: #94a3b8; }
[data-bs-theme="dark"] .interaction-btn-circle { background: #1e293b; border-color: #334155; color: #94a3b8; }
[data-bs-theme="dark"] .related-sujets-container { background: #1e293b; border-color: #334155; }
[data-bs-theme="dark"] .related-item-new { background: #0f172a; border-color: #334155; color: #cbd5e1; }
[data-bs-theme="dark"] .related-item-new:hover { background: #1e293b; }
[data-bs-theme="dark"] .related-item-new.active { background: rgba(37, 99, 235, 0.2); border-color: #3b82f6; color: #3b82f6; }
[data-bs-theme="dark"] .custom-modal .modal-content { background: #1e293b; border-color: #334155; }
[data-bs-theme="dark"] .modal-header { border-color: #334155; }
[data-bs-theme="dark"] .modal-footer-custom { border-color: #334155; }
[data-bs-theme="dark"] .comment-textarea { background: #0f172a; border-color: #334155; color: #f1f5f9; }
[data-bs-theme="dark"] .sidebar-nav { background: #1e293b; border-color: #334155; }
[data-bs-theme="dark"] .nav-link-modern:hover { background: #0f172a; }
[data-bs-theme="dark"] .nav-link-modern.active { background: #2563eb; color: #fff; }
[data-bs-theme="dark"] .countdown-pill { background: rgba(15, 23, 42, 0.5); border-color: rgba(255, 255, 255, 0.1); }
[data-bs-theme="dark"] .countdown-label { color: #94a3b8; }

.countdown-pill {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 6px 14px;
    border-radius: 50px;
    margin-right: 15px;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 45px;
}

.countdown-value {
    font-weight: 700;
    font-size: 1.1rem;
    color: #fff;
    line-height: 1;
}

.countdown-label {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
}

.countdown-divider {
    color: rgba(255, 255, 255, 0.3);
    font-weight: 300;
}
    color: rgba(255,255,255,0.4) !important;
}

[data-bs-theme="dark"] .subject-card-final {
    background-color: #1e293b !important;
    border-color: #334155 !important;
}

[data-bs-theme="dark"] .text-dark {
    color: #f8fafc !important;
}

/* Exam Countdown Styles */
.exam-countdown-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 12px 20px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.countdown-icon-box {
    width: 40px;
    height: 40px;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timer-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.timer-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.timer-values {
    display: flex;
    gap: 8px;
}

.timer-unit {
    background: var(--bg-body);
    padding: 4px 8px;
    border-radius: 8px;
    min-width: 40px;
    text-align: center;
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.timer-unit span {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-main);
}

.timer-unit small {
    font-size: 0.55rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-top: 2px;
}

.timer-v-divider {
    width: 1px;
    height: 30px;
    background: var(--border-color);
}
.term-card {
    position: relative;
    background: #fff;
    border-radius: 15px;
    padding: 0.8rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e2e8f0;
    margin-bottom: 10px;
    overflow: hidden;
}

.term-bg-number {
    position: absolute;
    right: 15%;
    font-size: 5rem;
    font-weight: 900;
    color: rgba(0, 0, 0, 0.03);
    pointer-events: none;
    line-height: 1;
    z-index: 0;
}

.term-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    border-color: #cbd5e1;
}

.term-icon-box {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    z-index: 1;
}

/* Term Colors */
.term-id-1 .term-icon-box { background: linear-gradient(135deg, #2563eb, #3b82f6); color: #fff; }
.term-id-2 .term-icon-box { background: linear-gradient(135deg, #059669, #10b981); color: #fff; }
.term-id-3 .term-icon-box { background: linear-gradient(135deg, #d97706, #f59e0b); color: #fff; }

.term-card:hover .term-icon-box {
    transform: scale(1.1) rotate(5deg);
}

.term-id-1:hover .term-icon-box { box-shadow: 0 0 20px rgba(37, 99, 235, 0.3); }
.term-id-2:hover .term-icon-box { box-shadow: 0 0 20px rgba(16, 185, 129, 0.3); }
.term-id-3:hover .term-icon-box { box-shadow: 0 0 20px rgba(245, 158, 11, 0.3); }

.term-title {
    font-size: 1rem;
    font-weight: 500;
    color: #1e293b;
}

.term-arrow-box {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.term-card:hover .term-arrow-box {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
    transform: translateX(-5px);
}

[data-bs-theme="dark"] .term-arrow-box {
    background: #0f172a;
    border-color: #334155;
    color: #64748b;
}

.term-badge {
    background: rgba(37, 99, 235, 0.05);
    color: #475569;
    padding: 4px 14px;
    border-radius: 50px;
    font-size: 0.825rem;
    border: 1px solid rgba(37, 99, 235, 0.1);
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.3s ease;
}

.term-id-2 .term-badge { background: rgba(16, 185, 129, 0.05); border-color: rgba(16, 185, 129, 0.1); }
.term-id-3 .term-badge { background: rgba(245, 158, 11, 0.05); border-color: rgba(245, 158, 11, 0.1); }

[data-bs-theme="dark"] .term-badge {
    background: rgba(22, 163, 74, 0.1);
    color: #4ade80;
    border-color: rgba(74, 222, 128, 0.2);
}

.file-count-number {
    font-size: 0.85rem;
    font-weight: 500;
}

.file-text-small {
    font-size: 0.85rem;
    color: inherit;
    font-weight: 500;
}

[data-bs-theme="dark"] .term-card {
    background: #1e293b;
    border-color: #334155;
}

[data-bs-theme="dark"] .term-title {
    color: #f8fafc;
}

[data-bs-theme="dark"] .term-badge {
    background: #334155;
    color: #94a3b8;
}

@media (hover: hover) { 
    .hover\:border-blue-200:hover { 
        border-color: var(--color-blue-200) !important; 
    } 
}

/* Sujet List Items */
.sujet-list-item {
    transition: all 0.2s ease;
    border: 1.5px solid var(--color-gray-200) !important;
}

.sujet-list-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border-color: #e2e8f0 !important;
    background-color: #fff !important;
}

.icon-box i {
    color: #94a3b8 !important;
}

.sujet-list-item:hover .icon-box {
    background-color: #eff6ff !important;
    border-color: #bfdbfe !important;
    color: #2563eb !important;
}

.sujet-list-item:hover .icon-box i {
    color: #2563eb !important;
}

.sujet-list-item:hover .btn-view-circle {
    background-color: #eff6ff !important;
    border-color: #bfdbfe !important;
    color: #2563eb !important;
}

.icon-box {
    width: 44px;
    height: 44px;
    border-radius: 8px !important;
    background-color: #f8fafc;
    color: #94a3b8 !important;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-view-circle {
    width: 44px;
    height: 44px;
    border-radius: 12px !important;
    background-color: #f8fafc;
    color: #94a3b8 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-view-circle:hover {
    background-color: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.btn-favorite-circle {
    width: 44px;
    height: 44px;
    border-radius: 12px !important;
    background-color: var(--bg-body);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-favorite-circle:hover {
    background-color: #fef2f2;
    color: #ef4444;
    border-color: #fee2e2;
    transform: scale(1.05);
}

.btn-favorite-circle.active-heart {
    background-color: #fef2f2;
    color: #ef4444 !important;
    border-color: #ef4444;
}

/* PDF Viewer Styles */
.viewer-container {
    border: none;
    border-radius: 0;
    overflow: hidden;
    background: transparent;
    box-shadow: none;
    margin-bottom: 2rem;
}

.top-nav-segmented {
    display: flex;
    background: #2563eb !important;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
    border: none;
}

.nav-segment {
    flex: 1;
    text-align: center;
    padding: 12px 10px;
    color: white !important;
    font-weight: 500;
    font-size: 0.85rem;
    text-decoration: none;
    border-inline-start: 1px solid rgba(255,255,255,0.2);
    transition: background 0.2s;
}

.nav-segment:first-child {
    border-inline-start: none;
}

.nav-segment:hover {
    background: rgba(255,255,255,0.1);
}

.header-info-bar {
    background: #2563eb;
    color: white;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 50px;
}

.header-title-text {
    font-size: 0.95rem;
    font-weight: 500;
    text-align: center;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 15px;
    gap: 15px;
}

.header-arrow {
    color: white !important;
    text-decoration: none;
    opacity: 0.8;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.year-badge-viewer {
    background: rgba(255,255,255,0.2);
    padding: 2px 12px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #fff;
}

/* Removed duplicate definition */
.bottom-action-bar {
    display: flex;
    background: #3b82f6;
    padding: 0;
    margin: 0;
    border: none !important;
    border-radius: 0 0 12px 12px !important;
}

.action-btn-viewer {
    flex: 1;
    text-align: center;
    padding: 12px;
    color: white !important;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-right: 1px solid rgba(255,255,255,0.2);
    transition: background 0.2s;
    font-size: 0.9rem;
}

.action-btn-viewer:first-child {
    border-right: none;
}

.action-btn-viewer:hover {
    background: rgba(255,255,255,0.1);
}

/* Badge Custom Styles */
.badge-custom {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 14px;
    border-radius: 50px;
    font-size: 0.825rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.badge-success-light {
    background-color: #ecfdf5 !important;
    color: #059669 !important;
    border: 1px solid #d1fae5;
}

.badge-danger-light {
    background-color: #fef2f2 !important;
    color: #dc2626 !important;
    border: 1px solid #fee2e2;
}

.badge-secondary-light {
    background-color: #f8fafc !important;
    color: #64748b !important;
    border: 1px solid #f1f5f9;
}

.badge-custom .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

.filter-select {
    height: 48px;
    border: 1.5px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    font-size: 0.95rem;
    color: #1e293b;
    background-color: #fff;
    transition: all 0.2s ease;
    border-radius: 10px !important;
}

.filter-select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.filter-group label {
    font-weight: 500;
    color: #64748b;
}

/* Comments Modal Styles */
#comments-modal .modal-content {
    max-width: 500px !important;
    border-radius: 20px !important;
    overflow: hidden !important;
    direction: rtl !important;
}

#comments-modal .modal-header {
    background: #2563eb !important;
    color: #ffffff !important;
    padding: 15px 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

#comments-modal .header-main-title {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    font-size: 1rem !important;
    font-weight: 500;
}

#comments-modal .close-modal {
    background: rgba(255,255,255,0.2) !important;
    border: none !important;
    color: #ffffff !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    font-size: 20px !important;
    cursor: pointer !important;
}

.comments-list-container {
    max-height: 400px !important;
    overflow-y: auto !important;
    padding: 15px !important;
}

.comment-item {
    display: flex !important;
    gap: 12px !important;
    margin-bottom: 20px !important;
    padding-bottom: 15px !important;
    border-bottom: 1px solid #f1f5f9 !important;
}

.comment-user-avatar {
    width: 40px !important;
    height: 40px !important;
    background: #eff6ff !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #2563eb !important;
    flex-shrink: 0 !important;
}

.comment-content {
    flex-grow: 1 !important;
}

.comment-meta {
    display: flex !important;
    justify-content: space-between !important;
    margin-bottom: 5px !important;
}

.user-name {
    font-weight: 500;
    font-size: 0.9rem !important;
    color: #1e293b !important;
}

.comment-date {
    font-size: 0.75rem !important;
    color: #94a3b8 !important;
}

.comment-text {
    font-size: 0.9rem !important;
    color: #475569 !important;
    line-height: 1.5 !important;
}

.modal-footer-custom {
    padding: 15px 20px !important;
    background: #f8fafc !important;
    border-top: 1px solid #e2e8f0 !important;
}

.comment-input-wrapper {
    display: flex !important;
    gap: 10px !important;
    align-items: flex-end !important;
}

.comment-textarea {
    flex-grow: 1 !important;
    height: 55px !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 10px 15px !important;
    font-size: 0.95rem !important;
    resize: none !important;
    outline: none !important;
    transition: border-color 0.2s !important;
}

.comment-textarea:focus {
    border-color: #2563eb !important;
}

.btn-submit-comment {
    width: 65px !important;
    height: 65px !important;
    background: #2563eb !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: background 0.2s !important;
}

.btn-submit-comment:hover {
    background: #1d4ed8 !important;
}

.btn-submit-comment i,
.btn-submit-comment svg {
    width: 48px !important;
    height: 48px !important;
    stroke-width: 2.5px !important;
}

/* Generic Custom Modal Styles */
.custom-modal {
    display: none;
    position: fixed;
    z-index: 99999 !important;
    left: 0;
    top: 0;
    width: 100% !important;
    height: 100% !important;
    background-color: rgba(0,0,0,0.85) !important;
    backdrop-filter: blur(8px) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    justify-content: center;
    align-items: center;
}

.custom-modal.flex {
    display: flex !important;
}

.custom-modal .modal-content {
    background-color: #ffffff !important;
    margin: auto !important;
    padding: 0 !important;
    border: none !important;
    width: 95% !important;
    max-width: 650px !important;
    border-radius: 20px !important;
    overflow: hidden !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
    direction: rtl !important;
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
}

.loading-comments, .no-comments {
    text-align: center !important;
    padding: 30px !important;
    color: #64748b !important;
    font-size: 0.9rem !important;
}

/* Dark Mode Support for Comments */
[data-bs-theme="dark"] #comments-modal .modal-content {
    background-color: #1e293b !important;
}
[data-bs-theme="dark"] .modal-footer-custom {
    background-color: #1e293b !important;
    border-color: #334155 !important;
}
[data-bs-theme="dark"] .comment-textarea {
    background-color: #0f172a !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
}
[data-bs-theme="dark"] .user-name {
    color: #f8fafc !important;
}
[data-bs-theme="dark"] .comment-text {
    color: #cbd5e1 !important;
}
[data-bs-theme="dark"] .comment-item {
    border-color: #334155 !important;
}
[data-bs-theme="dark"] .comment-user-avatar {
    background: #334155 !important;
    color: #60a5fa !important;
}

/* Report Modal Final Fix */
.report-modal {
    display: none;
    position: fixed;
    z-index: 99999 !important;
    left: 0;
    top: 0;
    width: 100% !important;
    height: 100% !important;
    background-color: rgba(0,0,0,0.85) !important;
    backdrop-filter: blur(8px) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
}

.report-modal * {
    box-sizing: border-box !important;
}

.report-modal .modal-content {
    background-color: #ffffff !important;
}

.report-header {
    background: #6a26cd !important;
    color: #ffffff !important;
    padding: 15px 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    border: none !important;
    width: 100% !important;
}

.report-header .header-main-title {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    font-size: 0.85rem !important;
    font-weight: 500;
    margin: 0 !important;
    color: #ffffff !important;
}

.report-header .header-main-title svg,
.report-header .header-main-title i {
    width: 22px !important;
    height: 22px !important;
    stroke-width: 2.5px !important;
}

.report-header .close-modal {
    background: rgba(255,255,255,0.2) !important;
    border: none !important;
    color: #ffffff !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 20px !important;
    cursor: pointer !important;
    padding: 0 !important;
    transition: all 0.2s !important;
}

.report-modal .modal-body {
    padding: 25px 25px 0 25px !important;
    width: 100% !important;
    background: #ffffff !important;
    display: block !important;
}

.report-alert-box {
    background: #fff5f5 !important;
    border: 1px solid #fed7d7 !important;
    color: #e53e3e !important;
    padding: 10px !important;
    border-radius: 10px !important;
    margin-bottom: 20px !important;
    text-align: center !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    width: 100% !important;
}

.report-form-group {
    margin-bottom: 20px !important;
    width: 100% !important;
    display: block !important;
}

.report-label {
    display: block !important;
    font-weight: 500;
    color: #1e293b !important;
    margin-bottom: 10px !important;
    font-size: 0.8rem !important;
    text-align: right !important;
}

.report-select {
    width: 100% !important;
    height: 48px !important;
    padding: 0 15px !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 12px !important;
    font-size: 0.95rem !important;
    background-color: #f8fafc !important;
    color: #1e293b !important;
    cursor: pointer !important;
    outline: none !important;
    display: block !important;
    margin: 0 !important;
}

.report-textarea {
    width: 100% !important;
    min-height: 120px !important;
    padding: 15px !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 12px !important;
    font-size: 0.95rem !important;
    background-color: #f8fafc !important;
    color: #1e293b !important;
    resize: none !important;
    outline: none !important;
    display: block !important;
    margin: 0 !important;
}

.report-char-limit {
    font-size: 0.8rem !important;
    color: #94a3b8 !important;
    text-align: right !important;
    margin-top: 8px !important;
}

.report-actions {
    display: flex !important;
    gap: 12px !important;
    width: 100% !important;
    padding-bottom: 25px !important;
}

.btn-submit-report {
    flex: 1 !important;
    padding: 10px !important;
    background: #ff6b6b !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 12px !important;
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    display: block !important;
}

.btn-submit-report:hover {
    background: #ee5253 !important;
    transform: translateY(-2px) !important;
}

.btn-back-modal {
    flex: 1 !important;
    padding: 10px !important;
    background: #6a26cd !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 12px !important;
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    transition: all 0.2s !important;
}

.btn-back-modal:hover {
    background: #5a1fbd !important;
    transform: translateY(-2px) !important;
}

.btn-back-modal svg,
.btn-back-modal i {
    width: 20px !important;
    height: 20px !important;
}

/* Dark Mode Fixes */
[data-bs-theme="dark"] .report-modal .modal-content {
    background-color: #1e293b !important;
}
[data-bs-theme="dark"] .report-select,
[data-bs-theme="dark"] .report-textarea {
    background-color: #0f172a !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
}
[data-bs-theme="dark"] .report-label {
    color: #f8fafc !important;
}
[data-bs-theme="dark"] .report-alert-box {
    background: rgba(229, 62, 62, 0.1) !important;
    border-color: rgba(229, 62, 62, 0.2) !important;
}

/* Active states for interactions */
.active-like {
    color: #2563eb !important;
    border-color: #2563eb !important;
}
.active-like i, .active-like svg {
    fill: #2563eb !important;
    stroke: #2563eb !important;
}

.active-dislike {
    color: #ef4444 !important;
    border-color: #ef4444 !important;
}
.active-dislike i, .active-dislike svg {
    fill: #ef4444 !important;
    stroke: #ef4444 !important;
}

.active-heart {
    background: #fff1f2 !important;
    border-color: #f43f5e !important;
    color: #f43f5e !important;
}
.active-heart i, .active-heart svg {
    fill: #f43f5e !important;
    stroke: #f43f5e !important;
}

[data-bs-theme="dark"] .active-heart {
    background: rgba(244, 63, 94, 0.1) !important;
}

.interaction-item i, .interaction-item svg,
.interaction-btn-circle i, .interaction-btn-circle svg {
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

.interaction-item:active svg,
.interaction-btn-circle:active svg {
    transform: scale(0.8) !important;
}
.suggested-modal .modal-content {
    max-width: 650px !important;
    border-radius: 20px !important;
    overflow: hidden !important;
}

.suggested-header {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%) !important;
    padding: 18px 25px !important;
}

.suggested-list-container {
    max-height: 400px !important;
    overflow-y: auto !important;
    padding: 10px 5px !important;
}

.suggested-item {
    display: flex !important;
    align-items: center !important;
    padding: 12px 15px !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    margin-bottom: 10px !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    gap: 12px !important;
}

.suggested-item:hover {
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
    transform: translateX(-5px) !important;
}

.suggested-icon-wrapper {
    width: 40px !important;
    height: 40px !important;
    background: white !important;
    border-radius: 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #6366f1 !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05) !important;
}

.suggested-item-info {
    flex: 1 !important;
}

.suggested-item-title {
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    color: #1e293b !important;
    margin-bottom: 3px !important;
    display: block !important;
}

.suggested-item-meta {
    font-size: 0.75rem !important;
    color: #64748b !important;
    display: flex !important;
    gap: 10px !important;
}

.suggested-item-arrow {
    color: #94a3b8 !important;
}

/* Dark Mode */
[data-bs-theme="dark"] .suggested-item {
    background: #0f172a !important;
    border-color: #334155 !important;
}

[data-bs-theme="dark"] .suggested-item:hover {
    background: #1e293b !important;
}

[data-bs-theme="dark"] .suggested-item-title {
    color: #f8fafc !important;
}

[data-bs-theme="dark"] .suggested-icon-wrapper {
    background: #1e293b !important;
}
.search-input-group { background: rgba(241, 245, 249, 0.6) !important; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid rgba(226, 232, 240, 0.8) !important; border-radius: 12px; padding: 0 16px; height: 42px; display: flex; align-items: center; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); position: relative; }  
.search-input-group:focus-within { background: #ffffff !important; border-color: #2563eb !important; box-shadow: 0 4px 20px rgba(37, 99, 235, 0.1) !important; transform: translateY(-1px); }  

.search-shortcut {
    display: flex;
    gap: 4px;
    margin-inline-start: auto;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.search-input-group:focus-within .search-shortcut {
    opacity: 0.6;
    pointer-events: auto;
}

.shortcut-key {
    background: rgba(226, 232, 240, 0.8);
    border: none;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 0.65rem;
    font-weight: 700;
    color: #64748b;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
}
.search-input { background: transparent !important; border: none !important; box-shadow: none !important; padding-inline-start: 10px !important; flex: 1; }  
.search-icon { position: static !important; transform: none !important; color: #64748b; display: flex; align-items: center; }
.search-icon svg { width: 18px !important; height: 18px !important; }
.fab-container { position: fixed; bottom: 30px; left: 30px; z-index: 1000; display: flex; flex-direction: column; gap: 12px; }  
.fab-button { width: 48px; height: 48px; background: #ffffff; color: #1e293b; border-radius: 16px; display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08); cursor: pointer; transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); text-decoration: none; border: 1px solid rgba(255, 255, 255, 0.8); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }  
.fab-button i { width: 20px; height: 20px; transition: transform 0.3s ease; }
.fab-button:hover { transform: translateY(-5px); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12); color: #2563eb; }
.fab-button:hover i { transform: scale(1.1); }
.fab-top { opacity: 0; visibility: hidden; transform: translateY(20px); background: #ffffff; }
.fab-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
[dir="rtl"] .fab-container { left: auto; right: 30px; } 
.fab-facebook { color: #1877f2 !important; }
.fab-facebook:hover { background: #1877f2 !important; color: #ffffff !important; }
.fab-facebook:hover i { fill: #ffffff !important; color: #ffffff !important; }

/* === News Ticker === */
.news-ticker-container {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 16px;
    overflow: hidden;
    height: 45px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.02);
}

[data-bs-theme="dark"] .news-ticker-container {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.ticker-label {
    background: var(--bs-primary);
    color: white;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 0.85rem;
    z-index: 2;
    white-space: nowrap;
    position: relative;
    box-shadow: 10px 0 20px rgba(0, 0, 0, 0.05);
}

.ticker-icon {
    width: 22px;
    height: 22px;
    animation: ring 4s ease infinite;
}

.ticker-content {
    flex: 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 0 20px;
}

.ticker-track {
    display: flex;
    align-items: center;
    gap: 60px;
    white-space: nowrap;
    animation: ticker 40s linear infinite;
}

.ticker-track:hover {
    animation-play-state: paused;
}

.ticker-item {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--bs-emphasis-color);
    display: flex;
    align-items: center;
    gap: 15px;
}

.ticker-item a {
    color: inherit;
    transition: all 0.3s ease;
}

.ticker-item a:hover {
    color: var(--bs-primary) !important;
    text-decoration: underline !important;
}

.dot-sep {
    width: 18px;
    height: 18px;
    color: var(--bs-primary);
    opacity: 0.8;
}

@keyframes ticker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

[dir="rtl"] .ticker-track {
    animation: ticker-rtl 40s linear infinite;
}

[dir="rtl"] .ticker-track:hover {
    animation-play-state: paused;
}

@keyframes ticker-rtl {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}

@keyframes ring {
    0% { transform: rotate(0); }
    1% { transform: rotate(30deg); }
    3% { transform: rotate(-28deg); }
    5% { transform: rotate(34deg); }
    7% { transform: rotate(-32deg); }
    9% { transform: rotate(30deg); }
    11% { transform: rotate(-28deg); }
    13% { transform: rotate(26deg); }
    15% { transform: rotate(-24deg); }
    17% { transform: rotate(22deg); }
    19% { transform: rotate(-20deg); }
    21% { transform: rotate(18deg); }
    23% { transform: rotate(-16deg); }
    25% { transform: rotate(14deg); }
    27% { transform: rotate(-12deg); }
    29% { transform: rotate(10deg); }
    31% { transform: rotate(-8deg); }
    33% { transform: rotate(6deg); }
    35% { transform: rotate(-4deg); }
    37% { transform: rotate(2deg); }
    39% { transform: rotate(-1deg); }
    41% { transform: rotate(1deg); }
    43% { transform: rotate(0); }
    100% { transform: rotate(0); }
}

/* === Notifications Dropdown === */
@keyframes pulse-red {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.notif-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 10px;
    height: 10px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid white;
    animation: pulse-red 2s infinite;
}

[data-bs-theme="dark"] .notif-badge {
    border-color: #1e293b;
}

.notif-dropdown {
    width: 350px;
    border: none;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    padding: 0;
    overflow: hidden;
    margin-top: 15px !important;
}

.notif-header {
    padding: 15px 20px;
    background: var(--bs-primary);
    color: white;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.notif-list {
    max-height: 350px;
    overflow-y: auto;
}

.notif-item {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: all 0.2s ease;
    cursor: pointer;
    display: flex;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

.notif-item:hover {
    background: rgba(13, 110, 253, 0.03);
    color: inherit;
}

.notif-icon-circle {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notif-info .notif-icon-circle { background: rgba(13, 110, 253, 0.1); color: var(--bs-primary); }
.notif-success .notif-icon-circle { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.notif-warning .notif-icon-circle { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.notif-danger .notif-icon-circle { background: rgba(239, 68, 68, 0.1); color: #ef4444; }

.notif-body { flex: 1; }
.notif-title { font-size: 0.85rem; font-weight: 700; margin-bottom: 2px; display: block; }
.notif-text { font-size: 0.75rem; color: var(--bs-secondary-color); margin: 0; line-height: 1.4; white-space: normal; }
.notif-time { font-size: 0.65rem; color: var(--bs-secondary-color); opacity: 0.7; margin-top: 4px; display: block; }

.notif-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--bs-secondary-color);
}

/* === Countdown / Exam Timer === */
.premium-exam-card {
    position: relative;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7));
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 24px;
    padding: 20px;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.04);
    animation: slideUpFade 0.8s ease-out;
}

@keyframes slideUpFade {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

[data-bs-theme="dark"] .premium-exam-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.7));
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.glass-overlay {
    position: absolute;
    top: -50%;
    right: -10%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(13, 110, 253, 0.12) 0%, transparent 70%);
    z-index: 0;
    pointer-events: none;
}

.card-content { position: relative; z-index: 1; }

.exam-header-info { display: flex; align-items: center; gap: 15px; }

.premium-icon-box {
    position: relative;
    width: 45px;
    height: 45px;
    background: var(--bs-primary);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 8px 15px rgba(13, 110, 253, 0.25);
}

.sparkle-icon {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 16px;
    height: 16px;
    color: #ffc107;
    animation: pulse 2s infinite;
}

.exam-title-main { font-weight: 700; font-size: 0.95rem; margin-bottom: 0; }
.exam-subtitle-main { font-size: 0.65rem; color: var(--bs-secondary-color); font-weight: 500; }

.exam-timers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 15px;
    width: 100%;
}

.premium-timer-item {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 18px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: fadeInScale 0.6s ease-out backwards;
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.premium-timer-item:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: var(--bs-primary);
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 30px rgba(13, 110, 253, 0.1);
    z-index: 2;
}

[data-bs-theme="dark"] .premium-timer-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .premium-timer-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.timer-info-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    width: 100%;
    justify-content: space-between;
}

[dir="rtl"] .timer-info-top {
    flex-direction: row-reverse;
}

.exam-badge-name { 
    font-size: 0.8rem;
    color: var(--bs-emphasis-color);
    margin: 0;
    line-height: 1.2;
    font-weight: 600;
}

.exam-time-pill {
    background: var(--bs-primary);
    color: white;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.exam-time-pill svg { width: 10px; height: 10px; }

.timer-display-modern {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    direction: ltr !important;
    justify-content: center;
}

.modern-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: white;
    padding: 6px;
    border-radius: 10px;
    min-width: 45px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.02);
}

[data-bs-theme="dark"] .modern-unit { background: rgba(15, 23, 42, 0.5); }

.modern-unit.highlight .num { color: var(--bs-primary); }

.num { 
    font-size: 1.1rem; 
    font-weight: 800; 
    line-height: 1; 
    margin-bottom: 2px;
    transition: all 0.3s ease;
}

.seconds.num {
    animation: pulseSimple 1s infinite;
}

@keyframes pulseSimple {
    0% { opacity: 1; }
    50% { opacity: 0.7; transform: scale(1.05); }
    100% { opacity: 1; }
}
.lab { font-size: 0.6rem; font-weight: 700; text-transform: uppercase; color: var(--bs-secondary-color); letter-spacing: 0.3px; }

.unit-sep { font-weight: 800; font-size: 1rem; color: var(--bs-secondary-color); padding-bottom: 14px; opacity: 0.4; }

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

@media (max-width: 991px) {
    .premium-exam-card { padding: 20px; }
    .exam-header-info { margin-bottom: 10px; }
}

.report-modal .modal-content { border-radius: 24px !important; }

/* === Lazy Loading === */
.lazy-img {
    filter: blur(30px);
    transition: filter 1.2s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1),
                transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: scale(0.92);
    will-change: filter, opacity, transform;
}

.lazy-img.loaded {
    filter: blur(0);
    opacity: 1;
    transform: scale(1);
}

.img-loader-container {
    position: relative;
    overflow: hidden;
    background: rgba(0,0,0,0.05);
    border-radius: inherit;
}

/* === Content Header & Search === */
[dir="rtl"] .search-submit-btn {
    order: -1 !important;
    margin-left: 10px !important;
    margin-right: 0 !important;
}

[dir="rtl"] .search-shortcut {
    flex-direction: row-reverse !important;
    order: 1 !important;
    margin-right: 10px !important;
    margin-left: 0 !important;
    display: flex !important;
}

[dir="rtl"] .search-input {
    order: 0 !important;
    text-align: right !important;
}

[dir="rtl"] .search-input-group {
    display: flex !important;
    flex-direction: row !important;
}

.content-header {
    background: #ffffff !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
    padding: 0.6rem 1.5rem !important;
    position: fixed !important;
    top: 0;
    left: var(--sidebar-width, 250px);
    right: 0;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    margin: 0 !important;
    border-radius: 0 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02) !important;
}

[dir="rtl"] .content-header {
    left: 0;
    right: var(--sidebar-width, 250px);
}

@media (max-width: 991px) {
    .content-header {
        left: 0 !important;
        right: 0 !important;
    }
}

[data-bs-theme="dark"] .content-header {
    background: #1e293b !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.header-icon-link {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    color: var(--bs-secondary-color);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    background: transparent;
    border: 1px solid transparent;
    text-decoration: none;
    overflow: hidden;
}

.header-icon-link:hover {
    background: rgba(var(--bs-primary-rgb), 0.05);
    color: var(--bs-primary) !important;
    transform: translateY(-2px);
}

.header-v-divider {
    width: 1px;
    height: 28px;
    background: rgba(0, 0, 0, 0.05);
    margin: 0 8px;
}

.auth-group {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    background: transparent;
    border-radius: 0;
    border: none;
    box-shadow: none;
}

[data-bs-theme="dark"] .auth-group {
    background: transparent;
    border-color: transparent;
}

#userMenuDropdown:hover {
    transform: scale(1.02);
}

.search-input-group {
    background: rgba(0, 0, 0, 0.04) !important;
    border: 1px solid transparent !important;
    border-radius: 18px !important;
    padding: 2px 10px !important;
    transition: all 0.4s ease !important;
}

.search-input-group:focus-within {
    background: white !important;
    border-color: var(--bs-primary) !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.04) !important;
    transform: scale(1.01);
}

[data-bs-theme="dark"] .search-input-group {
    background: rgba(255, 255, 255, 0.06) !important;
}

/* === Utility Classes === */
.rounded-12 { border-radius: 12px !important; }
.rounded-16 { border-radius: 16px !important; }
.rounded-20 { border-radius: 20px !important; }
.rounded-24 { border-radius: 24px !important; }

/* === User Dropdown === */
.user-dropdown-menu {
    border: none !important;
    border-radius: 20px !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1) !important;
    padding: 12px !important;
    min-width: 240px !important;
}
.user-dropdown-header {
    padding: 8px 12px 12px !important;
    margin-bottom: 8px !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
    text-align: inherit !important;
}
.user-dropdown-name {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    margin-bottom: 2px !important;
}
.user-dropdown-email {
    font-size: 12px !important;
    color: #64748b !important;
    margin-bottom: 0 !important;
}
.user-dropdown-item {
    border-radius: 12px !important;
    padding: 10px 14px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #475569 !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    transition: all 0.2s ease !important;
    margin-bottom: 2px !important;
}
.user-dropdown-item:hover {
    background-color: rgba(37, 99, 235, 0.06) !important;
    color: #2563eb !important;
}
.user-dropdown-item.text-danger:hover {
    background-color: rgba(239, 68, 68, 0.06) !important;
    color: #ef4444 !important;
}
.user-dropdown-divider {
    height: 1px !important;
    background-color: rgba(0, 0, 0, 0.05) !important;
    margin: 8px 4px !important;
}

.user-nav-trigger {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 4px 8px !important;
    text-decoration: none !important;
    background: none !important;
    border: none !important;
    transition: all 0.2s ease !important;
    height: 44px !important;

}
.user-nav-trigger:hover {
    opacity: 0.8 !important;
    transform: translateY(-1px) !important;
}
.user-nav-avatar {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    background: rgba(var(--bs-primary-rgb), 0.12) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 2px solid rgba(var(--bs-primary-rgb), 0.15) !important;
    flex-shrink: 0 !important;
}
.user-nav-name {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #1e293b !important;
}
[data-bs-theme="dark"] .user-nav-name {
    color: #f1f5f9 !important;
}
.user-nav-chevron {
    color: #94a3b8 !important;
    width: 14px !important;
    height: 14px !important;
}

/* === Search Autocomplete === */
.search-container {
    position: relative;
}
.search-autocomplete-dropdown {
    position: absolute;
    top: 105%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    max-height: 380px;
    overflow-y: auto;
    z-index: 1100;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
[data-bs-theme="dark"] .search-autocomplete-dropdown {
    background: rgba(30, 41, 59, 0.95);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}
.search-autocomplete-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 14px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    text-align: right;
    cursor: pointer;
}
[dir="ltr"] .search-autocomplete-item {
    text-align: left;
}
.search-autocomplete-item:hover,
.search-autocomplete-item.active {
    background: rgba(37, 99, 235, 0.06);
    color: #2563eb !important;
    transform: scale(1.005);
}
[data-bs-theme="dark"] .search-autocomplete-item:hover,
[data-bs-theme="dark"] .search-autocomplete-item.active {
    background: rgba(59, 130, 246, 0.12);
    color: #60a5fa !important;
    transform: scale(1.005);
}
.search-autocomplete-icon-box {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(37, 99, 235, 0.08);
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
[data-bs-theme="dark"] .search-autocomplete-icon-box {
    background: rgba(96, 165, 250, 0.12);
    color: #60a5fa;
}
.search-autocomplete-details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.search-autocomplete-title {
    font-size: 13.5px;
    font-weight: 700;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.search-autocomplete-meta {
    font-size: 11px;
    color: var(--bs-secondary-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.search-autocomplete-badge {
    font-size: 9.5px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.04);
    color: var(--bs-secondary-color);
    white-space: nowrap;
}
[data-bs-theme="dark"] .search-autocomplete-badge {
    background: rgba(255, 255, 255, 0.08);
}
.search-autocomplete-loading {
    padding: 24px;
    text-align: center;
    color: var(--bs-secondary-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.search-autocomplete-empty {
    padding: 24px;
    text-align: center;
    color: var(--bs-secondary-color);
}
.search-autocomplete-spinner {
    width: 24px;
    height: 24px;
    border: 2.5px solid rgba(37, 99, 235, 0.1);
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: spinSearch 0.8s linear infinite;
}
@keyframes spinSearch {
    to { transform: rotate(360deg); }
}

/* === Search Page Styles === */
.sujet-item {
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
}
.sujet-item:hover {
    transform: translateY(-3px);
    background-color: #f8faff !important;
    border-color: var(--bs-primary);
}
.sujet-title {
    font-size: 1.05rem;
    line-height: 1.4;
}
@media (max-width: 768px) {
    .sujet-item {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 15px;
    }
    .sujet-action {
        align-self: flex-end;
    }
}

/* === Favorites Page Styles === */
.empty-icon-box {
    width: 120px;
    height: 120px;
    background: var(--bg-card);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--border-color);
}

/* === Notifications Center Styles === */
.notifications-center { min-height: 80vh; background: #fcfdfe; }

/* Alert Styling */
.alert { margin-top: 0 !important; margin-bottom: 2rem !important; }

/* Tabs Styling */
.tab-link {
    padding: 6px 18px; border-radius: 50px;
    text-decoration: none; color: #64748b;
    font-weight: 700; font-size: 0.7rem;
    transition: all 0.3s ease;
}
.tab-link.active { background: #2563eb; color: #fff; }

.btn-mark-read {
    font-size: 0.7rem !important;
    padding: 6px 16px !important;
}

/* Wrapper to handle delete button without breaking flex layout */
.related-item-new-wrapper {
    display: block;
    width: 100%;
}

/* Lucide adjustments */
.related-item-new .file-icon-wrapper-new i, 
.related-item-new .file-icon-wrapper-new svg {
    width: 20px;
    height: 20px;
}

/* === GPA Tracker styles from UserGpas/history.php === */
/* CSS master styles for Premium dashboard */
.pdf-export-content {
    display: none !important;
}

/* Premium Custom Glassmorphic Insights Cards */
.insight-item-premium {
    background-color: rgba(255, 255, 255, 0.15) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 20px;
    padding: 1rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}
.insight-item-premium:hover {
    background-color: rgba(255, 255, 255, 0.22) !important;
}

.metric-card-glass {
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.metric-card-glass:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(13, 110, 253, 0.08) !important;
}

/* Light / Dark Mode adaptive base card styles */
.bg-card-body {
    background-color: #ffffff !important;
    color: #1e293b !important;
}

/* Adapt standard texts */
.text-dark-mode-adapt {
    color: #1e293b !important;
}

/* Dynamic Bootstrap Dark Mode overrides */
[data-bs-theme="dark"] .bg-card-body {
    background-color: #1e293b !important;
    color: #f8fafc !important;
}
[data-bs-theme="dark"] .text-dark-mode-adapt {
    color: #f8fafc !important;
}
[data-bs-theme="dark"] .text-dark {
    color: #f8fafc !important;
}
[data-bs-theme="dark"] .metric-card-glass {
    background-color: #1e293b !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: #f8fafc !important;
}
[data-bs-theme="dark"] .card {
    background-color: #1e293b !important;
    color: #f8fafc !important;
}
[data-bs-theme="dark"] .border {
    border-color: rgba(255, 255, 255, 0.08) !important;
}
[data-bs-theme="dark"] .bg-light {
    background-color: #0f172a !important;
}
[data-bs-theme="dark"] .table-light {
    background-color: #0f172a !important;
    color: #f8fafc !important;
}
[data-bs-theme="dark"] .custom-stats-table td {
    border-color: rgba(255, 255, 255, 0.08) !important;
}
[data-bs-theme="dark"] .pagination .page-link {
    background-color: #1e293b !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: #94a3b8 !important;
}
[data-bs-theme="dark"] .pagination .page-item.active .page-link {
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
    color: #ffffff !important;
}
[data-bs-theme="dark"] .level-selector-glass {
    background-color: rgba(30, 41, 59, 0.4) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

/* Linear background gradients matching theme */
.bg-gradient-blue {
    background: linear-gradient(
150deg, var(--bs-primary) 0%, color-mix(in srgb, var(--bs-primary) 50%, #000000) 100%) !important;
}
.bg-gradient-purple {
    background: linear-gradient(135deg, #6f42c1 0%, #59359a 100%) !important;
    background: linear-gradient(
    135deg, 
    var(--bs-primary) 0%, 
    color-mix(in srgb, var(--bs-primary) 60%, black) 100%
) !important;
}

.text-purple { color: #6f42c1 !important; }
.bg-purple { background-color: #6f42c1 !important; }

/* Decorative watermarks in metric cards */
.metric-icon-bg {
    position: absolute;
    right: -10px;
    bottom: -15px;
    font-size: 80px;
    color: rgba(255, 255, 255, 0.1);
    pointer-events: none;
    z-index: 1;
}
.metric-icon-bg-soft {
    position: absolute;
    right: -10px;
    bottom: -15px;
    font-size: 80px;
    color: rgba(0, 0, 0, 0.03);
    pointer-events: none;
    z-index: 1;
}
[data-bs-theme="dark"] .metric-icon-bg-soft {
    color: rgba(255, 255, 255, 0.02) !important;
}
.metric-icon-bg i, .metric-icon-bg-soft i {
    width: 90px;
    height: 90px;
    transform: rotate(-12deg);
}

/* Slider elements customization */
.custom-range::-webkit-slider-thumb {
    background: var(--bs-primary);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.2);
    border: 2px solid white;
}
.custom-range::-moz-range-thumb {
    background: var(--bs-primary);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.2);
    border: 2px solid white;
}

/* Circular GPA Progress widget */
.progress-ring-container {
    position: relative;
    width: 80px;
    height: 80px;
}
.progress-ring {
    transform: rotate(-90deg);
    transform-origin: center;
}
.progress-ring__circle {
    transition: stroke-dashoffset 0.35s;
    transform-origin: 50% 50%;
}
.progress-ring-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 15px;
    color: var(--bs-primary);
}

/* Pulse animation for Sparkles */
.pulse-sparkle {
    display: inline-flex;
    animation: pulseGlow 3s infinite ease-in-out;
}
@keyframes pulseGlow {
    0%, 100% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.15); opacity: 1; }
}

/* Circular Metric GPA presentation */
.gpa-value-circle-large {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 8px solid rgba(13, 110, 253, 0.05);
    background: white;
}
[data-bs-theme="dark"] .gpa-value-circle-large {
    background-color: #1e293b !important;
    border-color: rgba(255, 255, 255, 0.05) !important;
}

/* Tab selector customization */
.dashboard-tabs {
    background: rgba(248, 250, 252, 0.8);
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
}
[data-bs-theme="dark"] .dashboard-tabs {
    background: rgba(30, 41, 59, 0.6) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}
.tab-btn {
    background: transparent;
    color: #64748b;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.tab-btn.active {
    background: var(--bs-primary) !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.2);
}
.tab-btn:hover:not(.active) {
    background: rgba(13, 110, 253, 0.05);
    color: var(--bs-primary);
}

/* Tab contents styling visibility trigger */
.tab-content {
    display: none;
}
.tab-content.active {
    display: block;
}

/* Stats table elements styles */
.custom-stats-table th {
    padding: 12px;
}
.custom-stats-table td {
    padding: 14px 12px;
    border-color: #f1f5f9;
}

/* GPA Card premium timeline elements */
.gpa-card-premium {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.gpa-card-premium:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08) !important;
}

/* Staggered load effect */
.animate-card-fade {
    animation: fadeIn 0.4s ease-out forwards;
}

/* Standard utilities adjustments */
.rounded-24 { border-radius: 24px !important; }
.rounded-20 { border-radius: 20px !important; }
.fs-13 { font-size: 0.82rem; }
.fs-15 { font-size: 0.95rem; }
.fs-18 { font-size: 1.15rem; }
.fs-12 { font-size: 0.72rem; }
.last-child-mb-0:last-child { margin-bottom: 0 !important; border-bottom: none !important; }
.font-monospace { font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace !important; }

/* Micro-animations list */
.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}
.animate-slide-up {
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Print-specific layout styling */
@media print {
    body {
        background: white !important;
        color: black !important;
    }
    .level-header-final,
    .dashboard-tabs,
    .tab-btn,
    .custom-range,
    .target-slider-group,
    .btn,
    .paginator,
    .breadcrumb-glass,
    header,
    footer,
    nav,
    #level-selector-wrapper {
        display: none !important;
    }
    .tab-content {
        display: none !important;
    }
    .pdf-export-content {
        display: block !important;
        visibility: visible !important;
        background: white !important;
        color: black !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 20px !important;
    }
    .grade-tracker-wrapper {
        padding: 0 !important;
    }
}

/* === GPA Calculator styles from Tools/calculator.php === */

    * {
        box-sizing: border-box;
    }

    html, body {
        width: 100%;
        overflow-x: hidden;
    }

    @media print {
        @page { 
            margin: 0; 
            size: auto;
        }
        body { 
            margin: 0; 
            padding: 0;
        }
        body > * { display: none !important; }
        html, body { 
            height: auto !important; 
            overflow: visible !important; 
            background: white !important;
        }
        #pdf-print-section { 
            display: block !important;
            visibility: visible !important;
            position: absolute !important;
            left: 0 !important;
            top: 0 !important;
            width: 210mm !important;
            min-height: 297mm !important;
            margin: 0 !important;
            padding: 0 !important;
            background: white !important;
            color: black !important;
            direction: rtl !important;
            z-index: 99999;
        }
        #pdf-print-section * { visibility: visible !important; -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
    }



.pdf-export-content { display: none; }
.opacity-05 { opacity: 0.05 !important; }
.rounded-12 { border-radius: 12px !important; }

/* Dark Mode Styles */
body.dark-mode {
    background: #1f2937 !important;
    color: #e5e7eb !important;
}

body.dark-mode .calculator-wrapper {
    background: #111827 !important;
}

body.dark-mode .premium-card {
    background: #1f2937 !important;
    border-color: #374151 !important;
}

body.dark-mode .minimal-input {
    background: #374151 !important;
    color: #e5e7eb !important;
    border-color: #4b5563 !important;
}

body.dark-mode .minimal-input::placeholder {
    color: #9ca3af !important;
}

body.dark-mode .modern-table-minimal th {
    background: #374151 !important;
    color: #e5e7eb !important;
    border-color: #4b5563 !important;
}

body.dark-mode .modern-table-minimal td {
    background: #1f2937 !important;
    border-color: #374151 !important;
    color: #e5e7eb !important;
}

body.dark-mode .modern-table-minimal tbody tr:hover td {
    background: #374151 !important;
}

body.dark-mode .card-header-soft {
    background: #374151 !important;
    border-color: #4b5563 !important;
    color: #e5e7eb !important;
}

body.dark-mode .btn-outline-secondary,
body.dark-mode .btn-outline-info,
body.dark-mode .btn-outline-warning,
body.dark-mode .btn-outline-primary {
    color: #e5e7eb !important;
    border-color: #4b5563 !important;
}

body.dark-mode .btn-outline-secondary:hover,
body.dark-mode .btn-outline-info:hover,
body.dark-mode .btn-outline-warning:hover,
body.dark-mode .btn-outline-primary:hover {
    background: #374151 !important;
}

body.dark-mode .alert {
    background: #1f2937 !important;
    border-color: #374151 !important;
    color: #e5e7eb !important;
}

body.dark-mode .alert-warning {
    background: #78350f !important;
    border-color: #92400e !important;
    color: #fef3c7 !important;
}

body.dark-mode .alert-info {
    background: #0c4a6e !important;
    border-color: #082f49 !important;
    color: #bae6fd !important;
}

body.dark-mode .text-muted {
    color: #9ca3af !important;
}

body.dark-mode h5, body.dark-mode h6 {
    color: #e5e7eb !important;
}

body.dark-mode .premium-card.hover\:shadow-lg:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3) !important;
}

/* Dark Mode - Fix white backgrounds */
body.dark-mode .pdf-viewer-area {
    background: #1f2937 !important;
}

body.dark-mode .pdf-frame-container {
    background: #1f2937 !important;
}

body.dark-mode .doc-preview-wrapper:hover {
    background: #1f2937 !important;
}

body.dark-mode .bg-card-box {
    background: #1f2937 !important;
}

body.dark-mode .content-header {
    background: #1f2937 !important;
}

body.dark-mode .subject-bubble {
    background: #374151 !important;
}

body.dark-mode .term-card {
    background: #1f2937 !important;
}

body.dark-mode .sujet-list-item:hover {
    background-color: #374151 !important;
}

body.dark-mode .filter-select {
    background-color: #374151 !important;
    color: #e5e7eb !important;
    border-color: #4b5563 !important;
}

body.dark-mode .custom-modal .modal-content {
    background-color: #1f2937 !important;
    color: #e5e7eb !important;
    border-color: #374151 !important;
}

body.dark-mode .fab-button {
    background: #374151 !important;
    color: #e5e7eb !important;
    border-color: #4b5563 !important;
}

body.dark-mode .fab-top {
    background: #374151 !important;
}

body.dark-mode .search-input-group:focus-within {
    background: #374151 !important;
    border-color: #2563eb !important;
}

body.dark-mode .search-input-group {
    background: #1f2937 !important;
    color: #e5e7eb !important;
}

body.dark-mode .modal-header {
    background: #374151 !important;
    color: #e5e7eb !important;
    border-color: #4b5563 !important;
}

body.dark-mode .modal-body {
    background: #1f2937 !important;
    color: #e5e7eb !important;
}

body.dark-mode .modal-footer {
    background: #374151 !important;
    border-color: #4b5563 !important;
}

body.dark-mode .card {
    background: #1f2937 !important;
    color: #e5e7eb !important;
    border-color: #374151 !important;
}

body.dark-mode .dropdown-menu {
    background: #1f2937 !important;
    color: #e5e7eb !important;
    border-color: #374151 !important;
}

body.dark-mode .dropdown-item {
    color: #e5e7eb !important;
}

body.dark-mode .dropdown-item:hover {
    background: #374151 !important;
    color: #e5e7eb !important;
}

body.dark-mode input, 
body.dark-mode textarea, 
body.dark-mode select {
    background: #374151 !important;
    color: #e5e7eb !important;
    border-color: #4b5563 !important;
}

body.dark-mode input::placeholder,
body.dark-mode textarea::placeholder {
    color: #9ca3af !important;
}

body.dark-mode .form-control {
    background: #374151 !important;
    color: #e5e7eb !important;
    border-color: #4b5563 !important;
}

body.dark-mode .form-control:focus {
    background: #3f444d !important;
    color: #e5e7eb !important;
    border-color: #2563eb !important;
}

/* Enhanced Button Animations */
.btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.btn:hover {
    transform: translateY(-2px) !important;
}

.btn:active {
    transform: translateY(0) !important;
}

/* Table Row Animation */
.subject-row {
    transition: background-color 0.2s ease !important;
}

.subject-row:hover {
    background-color: rgba(59, 130, 246, 0.05) !important;
}

/* Input Focus Animation */
.minimal-input:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
    transform: scale(1.01) !important;
    outline: none !important;
}

/* Input Validation Styles */
.minimal-input.is-invalid {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.minimal-input.is-valid {
    /* border-color: #10b981 !important; */
    /* box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important; */
}

/* Smooth Grade Display */
#grade-rating-display {
    animation: slideInDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Calculator Tabs Styling */
.calc-tabs-pill {
    background: #ffffff;
    border-radius: 50px;
    display: inline-flex;
    gap: 4px;
}
.calc-tab-btn {
    border: none;
    background: transparent;
    padding: 10px 24px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.calc-tab-btn i { width: 16px; height: 16px; opacity: 0.7; }
.calc-tab-btn.active {
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}
.calc-tab-btn.active i { opacity: 1; }
.calc-tab-btn:hover:not(.active) {
    background: #f1f5f9;
    color: #1e293b;
}

/* Mode Content Visibility */
.calc-mode-content { display: none; }
.calc-mode-content.active { display: block; }

.calc-mode-content .row {
    margin: 1rem 0 !important;
}

.calc-mode-content .col-12,
.calc-mode-content .col-md-6,
.calc-mode-content .col-lg-4,
.calc-mode-content .col-lg-5,
.calc-mode-content .col-lg-8 {
    padding: 0 0.75rem !important;
}

/* Large Grade Inputs for Annual Calc */
.large-input .minimal-input {
    border: 2px solid #f1f5f9;
}
.large-input .minimal-input:focus {
    border-color: #2563eb;
}
.large-input .grade-max-label {
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
    opacity: 0.4;
}

/* Hero Section Enhancements */
.level-header-final {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    padding: 2rem 1.8rem;
    color: white;
    border-radius: 1.5rem;
    position: relative;
}

.breadcrumb-glass {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: inline-flex;
    align-items: center;
    z-index: 5;
}
.v-divider-glass {
    width: 1px;
    height: 35px;
    background: rgba(255, 255, 255, 0.2);
}
.glass-icon-box {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.glass-icon-box i {
    width: 32px !important;
    height: 32px !important;
}

/* Hide number arrows globally in this page */
input[type=number]::-webkit-inner-spin-button, 
input[type=number]::-webkit-outer-spin-button { 
  -webkit-appearance: none; 
  margin: 0; 
}

/* Refined Typography & Utilities */
.fs-10 { font-size: 0.62rem !important; }
.fs-11 { font-size: 0.68rem !important; }
.fs-12 { font-size: 0.75rem !important; }
.fs-13 { font-size: 0.82rem !important; }
.fs-14 { font-size: 0.88rem !important; }
.fw-500 { font-weight: 500 !important; }
.fw-600 { font-weight: 600 !important; }
.fw-700 { font-weight: 700 !important; }
.uppercase { text-transform: uppercase; letter-spacing: 0.05em; }

/* Premium Cards */
.premium-card {
    background: #fff;
    width: 100%;
}

.border-light-glow { border: none !important; }

.card-header-soft {
    padding: 18px 22px;
    background: transparent;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-body-soft { padding: 20px; }

/* Result Circle Premium */
.result-display-wrapper { width: 160px; height: 160px; margin: 0 auto 2rem; position: relative; }

.average-circle-premium {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ring-decoration {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 160px;
    height: 160px;
    border-radius: 50%;
    border: 2px dashed rgba(37, 99, 235, 0.12);
    z-index: 1;
    animation: rotateRing 20s linear infinite;
}

.avg-value-lg {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -1px;
}

.avg-label-sm {
    font-size: 0.65rem;
    text-transform: uppercase;
    color: #94a3b8;
    font-weight: 600;
    margin-top: -2px;
}

.stat-v-divider { width: 1px; height: 30px; background: var(--border-color); align-self: center; }

@keyframes rotateRing { from { transform: translate(-50%, -50%) rotate(0deg); } to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes pulse-soft { 0% { transform: scale(1); } 50% { transform: scale(1.02); } 100% { transform: scale(1); } }
.animate-pulse-soft { animation: pulse-soft 3s ease-in-out infinite; }
.tracking-wider { letter-spacing: 0.1em; }

/* Minimal Table & Inputs */
.modern-table-minimal {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: auto;
}

.modern-table-minimal th {
    background: linear-gradient(180deg, #f9fafb 0%, #f3f4f6 100%);
    padding: 12px 8px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #374151;
    text-transform: uppercase;
    border-bottom: 2px solid #e5e7eb;
    white-space: normal;
    word-wrap: break-word;
    overflow: visible;
    text-overflow: clip;
    cursor: help;
    letter-spacing: 0.5px;
    line-height: 1.2;
    min-width: max-content;
}

.modern-table-minimal th[title]:hover {
    background: rgba(37, 99, 235, 0.05);
    transition: all 0.2s ease;
}

/* Desktop: Show full headers */
.header-full { display: inline; }
.header-short { display: none; }

/* Tablet: Show abbreviated headers */
@media (max-width: 768px) and (min-width: 577px) {
    .header-full { display: none; }
    .header-short { display: inline; font-size: 0.85rem; }
    
    .modern-table-minimal th {
        padding: 10px 6px;
        font-size: 0.8rem;
    }
}

/* Mobile: Show very short headers only */
@media (max-width: 576px) {
    .header-full { display: none; }
    .header-short { display: inline; line-height: 1.2; font-size: 0.75rem; }
    
    .modern-table-minimal th {
        padding: 8px 4px;
        font-size: 0.75rem;
        word-break: break-word;
        min-width: max-content;
    }
}

.modern-table-minimal td {
    padding: 10px 8px;
    border-bottom: 1px solid #eff2f5;
    color: var(--text-main);
    vertical-align: middle;
    height: auto;
    min-height: 50px;
    transition: background-color 0.2s ease;
}

.modern-table-minimal tbody tr {
    transition: all 0.2s ease;
    border-bottom: 1px solid #f0f1f3;
}

.modern-table-minimal tbody tr:hover {
    background-color: #f8f9fc;
    box-shadow: inset 0 0 8px rgba(37, 99, 235, 0.04);
}

.modern-table-minimal tbody tr:nth-child(even) {
    background-color: #fafbfc;
}

.minimal-input {
    width: 100% !important;
    height: 36px;
    background: #ffffff;
    padding: 0 8px !important;
    border-radius: 8px;
    border: 2px solid #e1e1e1;
    transition: all 0.2s ease;
    color: #1f2937;
    display: block;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
    box-sizing: border-box;
}

.minimal-input::-webkit-outer-spin-button,
.minimal-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.minimal-input.centered { 
    text-align: center !important; 
    padding: 0 4px !important;
}

.minimal-input::placeholder {
    color: #9ca3af;
    opacity: 1;
}

.minimal-input.coef-input,
.minimal-input.grade-reading,
.minimal-input.grade-listening,
.minimal-input.grade-oral,
.minimal-input.grade-dictation,
.minimal-input.grade-memorization,
.minimal-input.grade-exam,
.minimal-input.grade-ca,
.minimal-input.grade-test {
    color: #1f2937 !important;
    font-weight: 700 !important;
}

.minimal-input:hover { 
    background: #f9fafb;
    border-color: #e1e1e1;
}

.minimal-input:focus {
    background: #ffffff;
    border-color: #e1e1e1;
    outline: none;
}

.minimal-input:disabled {
    background: #f5f5f5;
    color: #1f2937 !important;
    opacity: 1 !important;
    cursor: not-allowed;
    border-color: #d1d5db;
    font-weight: 600 !important;
}

.input-minimal-group {
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    padding: 0;
    min-width: 0;
    width: 100%;
}

.input-minimal-group i,
.input-minimal-group svg {
    width: 14px !important;
    height: 14px !important;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-minimal-group .minimal-input {
    flex: 1;
    min-width: 60px;
    overflow: visible;
    white-space: normal;
    word-break: break-word;
    height: 36px !important;
    min-height: 36px !important;
    color: #1f2937 !important;
    font-weight: 500 !important;
    width: 100% !important;
    padding: 4px 6px !important;
    box-sizing: border-box;
    line-height: 1.4;
}

.grade-input-wrapper {
    position: relative;
    height: 36px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border-radius: 8px;
}

.grade-input-wrapper:hover {
}

.grade-input-wrapper .minimal-input {
    width: 100% !important;
    padding: 0 8px !important;
}

[dir="rtl"] .grade-input-wrapper .minimal-input {
    width: 100% !important;
    padding: 0 8px !important;
}

.grade-max-label {
    position: absolute;
    right: 8px;
    font-size: 0.65rem;
    color: #94a3b8;
    pointer-events: none;
    font-weight: 600;
    opacity: 0;
    z-index: -1;
    transition: all 0.2s ease;
    background: transparent;
    line-height: 1;
    top: 50%;
    transform: translateY(-50%);
    display: none;
}

[dir="rtl"] .grade-max-label {
    right: auto;
    left: 8px;
    display: none;
}

.minimal-input:focus ~ .grade-max-label,
.minimal-input:not(:placeholder-shown) ~ .grade-max-label {
    opacity: 0;
}

/* Components */
.info-alert-soft {
    display: flex;
    gap: 8px;
    padding: 12px;
    background: rgba(var(--bs-primary-rgb), 0.08) !important;
    border-radius: 10px;
    color: var(--bs-primary) !important;
}

.modern-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background-color: #f8fafc;
    font-size: 0.85rem;
}

.modern-progress-soft {
    height: 6px;
    background: #f1f5f9;
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill-glow {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #2563eb, #3b82f6);
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.3);
    transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-premium-soft {
    background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

.btn-premium-soft:hover { 
    background: linear-gradient(180deg, #1d4ed8 0%, #1e40af 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 10px;
    border: none;
    font-weight: 600;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn:hover {
    opacity: 0.9;
}

.action-btn-reset {
    background: #efefef;
    color: #555;
}

.action-btn-reset:hover {
    background: #e0e0e0;
}

.action-btn-copy {
    background: #bbdefb;
    color: #1565c0;
}

.action-btn-copy:hover {
    background: #90caf9;
}

.action-btn-print {
    background: #ffe0b2;
    color: #e65100;
}

.action-btn-print:hover {
    background: #ffb74d;
}

.action-btn-pdf {
    background: #c8e6c9;
    color: #2e7d32;
}

.action-btn-pdf:hover {
    background: #81c784;
}

.action-btn-save {
    background: #e1bee7;
    color: #6a1b9a;
}

.action-btn-save:hover {
    background: #ce93d8;
}

.action-btn-primary {
    background: #2563eb;
    color: white;
}

.action-btn-primary:hover {
    background: #1d4ed8;
}

.btn-icon-delete {
    background: transparent;
    border: none;
    color: #cbd5e1;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon-delete:hover { 
    background: #fee2e2;
    color: #dc2626;
    transform: scale(1.1);
}
.btn-icon-delete i { width: 16px; height: 16px; }

/* Status Badges */
.modern-status-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.status-idle { background: #f1f5f9; color: #64748b; }
.status-success { background: #dcfce7; color: #166534; box-shadow: 0 4px 15px rgba(22, 101, 52, 0.1); }
.status-primary { background: #e0e7ff; color: #3730a3; box-shadow: 0 4px 15px rgba(55, 48, 163, 0.1); }
.status-danger { background: #fee2e2; color: #991b1b; box-shadow: 0 4px 15px rgba(153, 27, 27, 0.1); }

/* Recommendation Pill */
.recommendation-pill {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-main);
    text-decoration: none;
    transition: all 0.3s ease;
}

.recommendation-pill:hover {
    background: #eff6ff;
    border-color: #2563eb;
    color: #2563eb;
    transform: translateX(-5px);
}

[dir="ltr"] .recommendation-pill:hover {
    transform: translateX(5px);
}

.pill-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
}

.icon-xs { width: 14px; height: 14px; }

.pulse-warning-dot {
    width: 8px;
    height: 8px;
    background: #f59e0b;
    border-radius: 50%;
    box-shadow: 0 0 0 rgba(245, 158, 11, 0.4);
    animation: pulse-warning 2s infinite;
}

@keyframes pulse-warning {
    0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(245, 158, 11, 0); }
    100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

/* Animations */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideRight { 0%, 100% { opacity: 0.5; transform: translateX(0); } 50% { opacity: 1; transform: translateX(4px); } }
@keyframes slideLeft { 0%, 100% { opacity: 0.5; transform: translateX(0); } 50% { opacity: 1; transform: translateX(-4px); } }

.animate-fade-in { animation: fadeIn 0.8s ease-out both; }
.animate-slide-up { animation: slideUp 0.6s ease-out both; }

.grade-row-staggered {
    animation: slideUp 0.4s ease-out both;
}

[dir="rtl"] .avg-value-lg { letter-spacing: 0; }

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .action-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
        gap: 6px;
    }

    .action-btn i {
        width: 14px !important;
    }

    .modern-table-minimal {
        font-size: 0.8rem;
    }

    .modern-table-minimal th {
        padding: 10px 6px;
        font-size: 0.75rem;
        white-space: normal;
        word-wrap: break-word;
    }

    .modern-table-minimal td {
        padding: 8px 5px;
        height: auto;
        min-height: 45px;
    }

    .minimal-input {
        height: 32px;
        padding: 0 6px;
        font-size: 0.75rem;
    }

    .input-minimal-group {
        height: 32px;
        gap: 4px;
    }

    .input-minimal-group i {
        width: 12px !important;
        height: 12px !important;
    }

    .grade-input-wrapper {
        height: 32px;
    }

    .grade-max-label {
        font-size: 0.55rem;
    }

    .btn-icon-delete i {
        width: 14px !important;
        height: 14px !important;
    }

    .calculator-wrapper {
        padding: 0.5rem;
        width: 100%;
        margin: 0;
    }

    .level-header-final {
        padding: 1.2rem 0.8rem;
        margin: 0 -0.5rem 1rem -0.5rem;
        width: calc(100% + 1rem);
    }

    .hero-title {
        font-size: 1.2rem !important;
    }

    .premium-card {
        margin-bottom: 1rem;
    }

    .card-body-soft {
        padding: 1rem;
    }

    .col-lg-4, .col-lg-5, .col-lg-8, .col-md-6, .col-12 {
        padding: 0.75rem !important;
        margin-bottom: 0;
        width: 100% !important;
    }

    .calc-mode-content .row {
        margin: 0.75rem 0 !important;
    }

    .row {
        width: 100%;
        margin: 0 !important;
        padding: 0;
    }

    .btn-premium-soft {
        padding: 4px 10px;
        font-size: 0.75rem;
    }

    .table-responsive {
        border-radius: 12px;
        overflow: hidden;
        width: 100%;
    }

    .container-fluid {
        padding: 0;
        width: 100%;
    }

    .result-display-wrapper {
        width: 130px;
        height: 130px;
    }

    .average-circle-premium {
        width: 120px;
        height: 120px;
    }

    .ring-decoration {
        width: 130px !important;
        height: 130px !important;
    }
}

@media (max-width: 576px) {
    html, body {
        width: 100vw;
        overflow-x: hidden;
        padding: 0;
        margin: 0;
    }

    .calculator-wrapper {
        padding: 0.5rem;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        margin: 0;
    }

    .row {
        width: 100%;
        margin: 0 !important;
        padding: 0 !important;
        display: flex;
        flex-direction: column;
    }

    .calc-mode-content .row {
        margin: 0.5rem 0 !important;
    }

    .col-12, .col-md-6, .col-lg-4, .col-lg-5, .col-lg-8 {
        width: 100% !important;
        padding: 0.5rem !important;
        margin: 0 !important;
        margin-bottom: 0 !important;
        flex: 0 0 100%;
    }

    .modern-table-minimal {
        font-size: 0.8rem;
        table-layout: auto;
        width: 100%;
        border-collapse: separate;
        border-spacing: 0;
    }

    .modern-table-minimal th {
        padding: 8px 4px;
        font-size: 0.7rem;
        white-space: normal;
        word-wrap: break-word;
        line-height: 1.2;
    }

    .modern-table-minimal td {
        padding: 6px 4px;
        overflow: visible;
        min-height: 42px;
    }

    .modern-table-minimal td:first-child {
        padding: 6px 4px;
        min-width: 120px;
        width: auto;
        max-width: 50%;
        overflow: visible;
    }

    .modern-table-minimal tbody td:first-child {
        display: table-cell;
        width: auto;
    }

    .minimal-input {
        height: 30px;
        padding: 0 4px;
        font-size: 0.7rem;
    }

    .input-minimal-group {
        height: auto;
        min-height: 32px;
        gap: 6px;
        flex-wrap: nowrap;
        width: 100%;
    }

    .input-minimal-group i {
        width: 14px !important;
        height: 14px !important;
        flex-shrink: 0;
    }

    .input-minimal-group .minimal-input {
        min-height: 32px;
        height: auto;
        padding: 4px 6px;
        font-size: 0.7rem;
        flex: 1;
        min-width: 0;
        white-space: normal;
        word-break: break-word;
        overflow: visible;
        text-overflow: clip;
    }

    .input-minimal-group .minimal-input:disabled {
        background: rgba(0,0,0,0.02);
        opacity: 1;
        color: var(--text-main);
        font-weight: 500;
    }

    .grade-input-wrapper {
        height: 30px;
    }

    .grade-input-wrapper .minimal-input {
        padding-right: 20px;
    }

    [dir="rtl"] .grade-input-wrapper .minimal-input {
        padding-right: 4px;
        padding-left: 20px;
    }

    .grade-max-label {
        font-size: 0.5rem;
        right: 4px;
    }

    [dir="rtl"] .grade-max-label {
        left: 4px;
    }

    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 12px;
        margin: 0;
        padding: 0;
        width: 100%;
    }

    .level-header-final {
        padding: 1rem 0.8rem;
        border-radius: 1rem;
        margin: 0 -0.5rem 1rem -0.5rem;
        width: 100%;
    }

    .hero-title {
        font-size: 1rem !important;
    }

    .hero-subtitle {
        font-size: 0.75rem !important;
    }

    .card-header-soft {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 10px;
    }

    .card-body-soft {
        padding: 0.8rem;
    }

    .premium-card {
        border-radius: 12px;
        margin-bottom: 0.8rem;
        width: 100%;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 0;
    }

    .btn-premium-soft {
        padding: 3px 8px;
        font-size: 0.7rem;
    }

    .btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.7rem;
    }

    .result-display-wrapper {
        width: 110px;
        height: 110px;
    }

    .average-circle-premium {
        width: 100px;
        height: 100px;
    }

    .ring-decoration {
        width: 110px !important;
        height: 110px !important;
    }

    .avg-value-lg {
        font-size: 1.5rem;
    }

    .avg-label-sm {
        font-size: 0.55rem;
    }

    .calc-tabs-pill {
        width: 100%;
    }



    .card-header-soft {
        flex-direction: column;
    }

    .card-header-soft 

    

    .container-fluid {
        padding: 0 !important;
        width: 100% !important;
        margin: 0 !important;
    }

    .container-lg, .container-md, .container-sm, .container-xl, .container-xxl {
        padding: 0 !important;
        width: 100% !important;
        margin: 0 !important;
    }

    .calc-tabs-pill {
        width: 100%;
        max-width: 100%;
    }

    

    /* ÃƒËœÃ‚Â¹ÃƒËœÃ‚Â§Ãƒâ„¢Ã¢â‚¬Â¦ Ãƒâ„¢Ã¢â‚¬Å¾ÃƒËœÃ‚Â¥ÃƒËœÃ‚ÂµÃƒâ„¢Ã¢â‚¬Å¾ÃƒËœÃ‚Â§ÃƒËœÃ‚Â­ overflow ÃƒËœÃ‚Â¹Ãƒâ„¢Ã¢â‚¬Å¾Ãƒâ„¢Ã¢â‚¬Â° ÃƒËœÃ‚Â§Ãƒâ„¢Ã¢â‚¬Å¾Ãƒâ„¢Ã¢â‚¬Â¡ÃƒËœÃ‚Â§ÃƒËœÃ‚ÂªÃƒâ„¢Ã‚Â */
    .h-100 {
        height: auto !important;
    }

    img, svg, video, canvas {
        max-width: 100%;
        height: auto;
    }

    input, select, textarea, button {
        max-width: 100%;
    }

    .table-responsive {
        margin-right: 0;
        margin-left: 0;
        width: 100%;
    }

    /* ÃƒËœÃ‚ÂªÃƒËœÃ‚Â£Ãƒâ„¢Ã†â€™Ãƒâ„¢Ã…Â ÃƒËœÃ‚Â¯ ÃƒËœÃ‚Â¹ÃƒËœÃ‚Â±ÃƒËœÃ‚Â¶ ÃƒËœÃ‚Â£ÃƒËœÃ‚Â³Ãƒâ„¢Ã¢â‚¬Â¦ÃƒËœÃ‚Â§ÃƒËœÃ‚Â¡ ÃƒËœÃ‚Â§Ãƒâ„¢Ã¢â‚¬Å¾Ãƒâ„¢Ã¢â‚¬Â¦Ãƒâ„¢Ã‹â€ ÃƒËœÃ‚Â§ÃƒËœÃ‚Â¯ */
    td .input-minimal-group .minimal-input {
        visibility: visible;
        display: block;
    }

    .ps-4 {
        padding-left: 4px !important;
    }
}


body {font-family: Arial; padding: 20px;} h1 {text-align: center;} .info {border: 1px solid #ccc; padding: 15px; margin: 20px 0;}


/* === Brand Logo Cleanups & Icon Size Utilities === */
.brand-logo img {
    max-width: 40px;
    height: auto;
}

.brand-logo-svg {
    fill-rule: evenodd;
    clip-rule: evenodd;
    stroke-linejoin: round;
    stroke-miterlimit: 2;
}

.brand-logo-svg path,
.brand-logo-svg rect,
.brand-logo-svg ellipse {
    fill: #fff;
}

.icon-16 {
    width: 16px;
    height: 16px;
}

.icon-18 {
    width: 18px;
    height: 18px;
}

.icon-20 {
    width: 20px;
    height: 20px;
}

.icon-32 {
    width: 32px;
    height: 32px;
}

.user-avatar-icon {
    width: 20px;
    height: 20px;
    color: #2563eb;
    stroke-width: 2;
}


/* === View Page Custom classes & Icon Sizes === */
.icon-12 {
    width: 12px;
    height: 12px;
}

.icon-48 {
    width: 48px;
    height: 48px;
}

.pdf-watermark-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}

.pdf-watermark-text {
    font-weight: bold;
    white-space: nowrap;
    text-transform: uppercase;
    font-family: Arial, sans-serif;
}

/* Fix Calculator Table Column Display */
#grades-table th {
    padding: 12px 8px !important;
    font-size: 0.85rem !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    line-height: 1.2 !important;
}

#grades-table td {
    padding: 10px 6px !important;
    min-height: 50px !important;
}

#grades-table thead tr th:first-child {
    min-width: 120px !important;
}

#grades-table tbody tr td:first-child {
    min-width: 120px !important;
}

#grades-table .input-minimal-group {
    height: auto !important;
    min-height: 36px !important;
    gap: 4px !important;
}

#grades-table .minimal-input {
    height: auto !important;
    min-height: 36px !important;
    padding: 6px 4px !important;
    font-size: 0.9rem !important;
}

/* Mobile optimization for calculator table */
@media (max-width: 576px) {
    #grades-table th {
        padding: 8px 3px !important;
        font-size: 0.75rem !important;
    }
    
    #grades-table td {
        padding: 8px 3px !important;
        min-height: 45px !important;
    }
    
    #grades-table .minimal-input {
        height: 32px !important;
        min-height: 32px !important;
        padding: 4px 3px !important;
        font-size: 0.85rem !important;
    }
}

/* Override: Reduce padding and fix icon alignment */
#grades-table th {
    padding: 8px 5px !important;
    font-size: 0.85rem !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    line-height: 1.2 !important;
}

#grades-table td {
    padding: 6px 4px !important;
    min-height: 42px !important;
}

#grades-table .input-minimal-group {
    height: 36px !important;
    min-height: 36px !important;
    gap: 4px !important;
    align-items: center !important;
}

#grades-table .input-minimal-group i {
    width: 14px !important;
    height: 14px !important;
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

#grades-table .minimal-input {
    height: 36px !important;
    min-height: 36px !important;
    padding: 4px 6px !important;
    font-size: 0.9rem !important;
    line-height: 1.4 !important;
}

/* Mobile optimization for calculator table */
@media (max-width: 576px) {
    #grades-table th {
        padding: 6px 3px !important;
        font-size: 0.7rem !important;
    }
    
    #grades-table td {
        padding: 5px 2px !important;
        min-height: 40px !important;
    }
    
    #grades-table .input-minimal-group {
        height: 32px !important;
        min-height: 32px !important;
        gap: 3px !important;
    }
    
    #grades-table .minimal-input {
        height: 32px !important;
        min-height: 32px !important;
        padding: 2px 4px !important;
        font-size: 0.8rem !important;
    }
}

/* Compact Font Sizes for Better Consistency */
#grades-table {
    font-size: 0.8rem !important;
}

#grades-table th {
    padding: 6px 4px !important;
    font-size: 0.75rem !important;
    font-weight: 500 !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    line-height: 1.1 !important;
}

#grades-table td {
    padding: 5px 3px !important;
    min-height: 38px !important;
}

#grades-table .input-minimal-group {
    height: 32px !important;
    min-height: 32px !important;
    gap: 3px !important;
}

#grades-table .input-minimal-group i,
#grades-table .input-minimal-group svg {
    width: 12px !important;
    height: 12px !important;
}

#grades-table .minimal-input {
    height: 32px !important;
    min-height: 32px !important;
    padding: 3px 4px !important;
    font-size: 0.8rem !important;
    line-height: 1.2 !important;
}

#grades-table .fs-13 {
    font-size: 0.7rem !important;
}

#grades-table .centered {
    text-align: center !important;
}

#grades-table .grade-input-wrapper {
    height: 32px !important;
    min-height: 32px !important;
}

#grades-table .grade-input-wrapper .minimal-input {
    height: 32px !important;
    min-height: 32px !important;
    font-size: 0.8rem !important;
    padding: 2px 4px !important;
}

@media (max-width: 768px) {
    #grades-table th {
        padding: 5px 3px !important;
        font-size: 0.7rem !important;
    }
    
    #grades-table td {
        padding: 4px 2px !important;
        min-height: 36px !important;
    }
    
    #grades-table .minimal-input {
        height: 30px !important;
        min-height: 30px !important;
        padding: 2px 3px !important;
        font-size: 0.75rem !important;
    }
}

@media (max-width: 576px) {
    #grades-table th {
        padding: 4px 2px !important;
        font-size: 0.65rem !important;
        line-height: 1.1 !important;
    }
    
    #grades-table td {
        padding: 3px 2px !important;
        min-height: 35px !important;
    }
    
    #grades-table .input-minimal-group {
        height: 28px !important;
        min-height: 28px !important;
        gap: 2px !important;
    }
    
    #grades-table .input-minimal-group i,
    #grades-table .input-minimal-group svg {
        width: 10px !important;
        height: 10px !important;
    }
    
    #grades-table .minimal-input {
        height: 28px !important;
        min-height: 28px !important;
        padding: 2px 3px !important;
        font-size: 0.7rem !important;
    }
}

/* Fix icon overlap with text in calculator table */
#grades-table td:first-child .input-minimal-group {
    position: relative;
    padding-right: 24px;
}

#grades-table td:first-child .input-minimal-group i {
    position: static !important;
    width: 12px !important;
    height: 12px !important;
    flex-shrink: 0;
    margin-right: 4px;
}

#grades-table td:first-child .minimal-input {
    padding-right: 4px !important;
    padding-left: 4px !important;
    text-align: right !important;
}

[dir="rtl"] #grades-table td:first-child .input-minimal-group {
    padding-right: 5px;
    padding-left: 5px;
}

[dir="rtl"] #grades-table td:first-child .input-minimal-group i {
    margin-right: 0;
    margin-left: 4px;
}


/* =============================================
   Calculator Components Dark Mode Overrides
   ============================================= */
[data-bs-theme="dark"] .calc-tabs-pill,
body.dark-mode .calc-tabs-pill {
    background: #1e293b !important;
    border: 1px solid #334155 !important;
}

[data-bs-theme="dark"] .calc-tab-btn:hover:not(.active),
body.dark-mode .calc-tab-btn:hover:not(.active) {
    background: #334155 !important;
    color: #f8fafc !important;
}

[data-bs-theme="dark"] .info-alert-soft,
body.dark-mode .info-alert-soft {
    background: rgba(37, 99, 235, 0.15) !important;
    color: #93c5fd !important;
    border: 1px solid rgba(37, 99, 235, 0.3) !important;
}

[data-bs-theme="dark"] .action-btn-reset,
body.dark-mode .action-btn-reset {
    background: #334155 !important;
    color: #cbd5e1 !important;
    border: 1px solid #4b5563 !important;
}

[data-bs-theme="dark"] .action-btn-reset:hover,
body.dark-mode .action-btn-reset:hover {
    background: #475569 !important;
}

[data-bs-theme="dark"] .average-circle-premium,
body.dark-mode .average-circle-premium {
    background: #0f172a !important;
    border: 2px solid #334155 !important;
}

[data-bs-theme="dark"] .average-circle-premium .avg-value-lg,
body.dark-mode .average-circle-premium .avg-value-lg {
    color: #60a5fa !important;
}

[data-bs-theme="dark"] .average-circle-premium .lab,
body.dark-mode .average-circle-premium .lab {
    color: #94a3b8 !important;
}

[data-bs-theme="dark"] .ring-decoration,
body.dark-mode .ring-decoration {
    border-color: rgba(37, 99, 235, 0.3) !important;
}

/* ==========================================================================
   Universal High-Fidelity Dark Mode Adaptations & Utility Overrides
   ========================================================================== */

/* Universal Overrides for White/Light Background Utility Classes */
[data-bs-theme="dark"] .bg-white:not([class*="bg-opacity-"]),
body.dark-mode .bg-white:not([class*="bg-opacity-"]) {
    background-color: #1e293b !important;
}

[data-bs-theme="dark"] .bg-light:not([class*="bg-opacity-"]),
body.dark-mode .bg-light:not([class*="bg-opacity-"]) {
    background-color: #0f172a !important;
}

/* Form Controls & Inputs */
[data-bs-theme="dark"] input,
[data-bs-theme="dark"] textarea,
[data-bs-theme="dark"] select,
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select,
body.dark-mode input,
body.dark-mode textarea,
body.dark-mode select,
body.dark-mode .form-control,
body.dark-mode .form-select {
    background-color: #1e293b !important;
    color: #f8fafc !important;
    border-color: #334155 !important;
}

[data-bs-theme="dark"] input::placeholder,
[data-bs-theme="dark"] textarea::placeholder,
body.dark-mode input::placeholder,
body.dark-mode textarea::placeholder {
    color: #64748b !important;
}

[data-bs-theme="dark"] input:focus,
[data-bs-theme="dark"] textarea:focus,
[data-bs-theme="dark"] select:focus,
[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus,
body.dark-mode input:focus,
body.dark-mode textarea:focus,
body.dark-mode select:focus,
body.dark-mode .form-control:focus,
body.dark-mode .form-select:focus {
    background-color: #0f172a !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2) !important;
    color: #f8fafc !important;
}

/* Light Outline and Grey Buttons */
[data-bs-theme="dark"] .btn-light,
body.dark-mode .btn-light {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
}

[data-bs-theme="dark"] .btn-light:hover,
body.dark-mode .btn-light:hover {
    background-color: #334155 !important;
    border-color: #4b5563 !important;
    color: #ffffff !important;
}

/* Light Borders & Headers */
[data-bs-theme="dark"] .border-light,
body.dark-mode .border-light {
    border-color: #334155 !important;
}

[data-bs-theme="dark"] .card-header,
body.dark-mode .card-header {
    background-color: #1e293b !important;
    border-color: #334155 !important;
}

/* Text Adaptations */
[data-bs-theme="dark"] .text-dark,
body.dark-mode .text-dark {
    color: #f8fafc !important;
}

[data-bs-theme="dark"] .text-muted,
body.dark-mode .text-muted {
    color: #94a3b8 !important;
}

/* Cards & Lists Specific Improvements */
[data-bs-theme="dark"] .sujet-list-item,
body.dark-mode .sujet-list-item {
    background-color: #1e293b !important;
    border-color: #334155 !important;
}

[data-bs-theme="dark"] .sujet-list-item:hover,
body.dark-mode .sujet-list-item:hover {
    background-color: #243249 !important;
    border-color: #3b82f6 !important;
}

[data-bs-theme="dark"] .sujet-list-item .icon-box,
body.dark-mode .sujet-list-item .icon-box,
[data-bs-theme="dark"] .sujet-list-item .btn-view-circle,
body.dark-mode .sujet-list-item .btn-view-circle {
    background-color: #0f172a !important;
    border-color: #334155 !important;
}

[data-bs-theme="dark"] .sujet-list-item:hover .icon-box,
body.dark-mode .sujet-list-item:hover .icon-box,
[data-bs-theme="dark"] .sujet-list-item:hover .btn-view-circle,
body.dark-mode .sujet-list-item:hover .btn-view-circle {
    background-color: rgba(59, 130, 246, 0.15) !important;
    border-color: #3b82f6 !important;
    color: #60a5fa !important;
}

[data-bs-theme="dark"] .sujet-list-item:hover .icon-box i,
body.dark-mode .sujet-list-item:hover .icon-box i {
    color: #60a5fa !important;
}

/* Subject view level and study elements */
[data-bs-theme="dark"] .subject-card-final.border-dashed,
body.dark-mode .subject-card-final.border-dashed {
    background-color: rgba(30, 41, 59, 0.4) !important;
    border-color: #334155 !important;
}

[data-bs-theme="dark"] .subject-card-final:hover,
body.dark-mode .subject-card-final:hover {
    background-color: #243249 !important;
    border-color: #3b82f6 !important;
}

/* Glass icon and tag boxes overrides */
[data-bs-theme="dark"] .tag-box-final,
body.dark-mode .tag-box-final {
    background-color: #0f172a !important;
    border-color: #334155 !important;
    color: #60a5fa !important;
}

[data-bs-theme="dark"] .subject-card-final:hover .tag-box-final,
body.dark-mode .subject-card-final:hover .tag-box-final {
    background-color: #2563eb !important;
    color: #ffffff !important;
}

/* Filter controls adaptive layout styling */
[data-bs-theme="dark"] .filter-select,
body.dark-mode .filter-select {
    background-color: #1e293b !important;
    color: #f8fafc !important;
    border-color: #334155 !important;
}

/* Related Topics accordion section dark-mode improvements */
[data-bs-theme="dark"] .related-sujets-container,
body.dark-mode .related-sujets-container {
    background: #1e293b !important;
    border-color: #334155 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
}

[data-bs-theme="dark"] .related-header,
body.dark-mode .related-header {
    background: #1e293b !important;
    border-bottom: 1px solid #334155 !important;
    color: #f8fafc !important;
}

[data-bs-theme="dark"] .related-header .header-text,
body.dark-mode .related-header .header-text {
    color: #f8fafc !important;
}

[data-bs-theme="dark"] .related-header .header-icon,
body.dark-mode .related-header .header-icon {
    color: #3b82f6 !important;
}

[data-bs-theme="dark"] .related-header .header-badge,
body.dark-mode .related-header .header-badge {
    background: #0f172a !important;
    color: #94a3b8 !important;
}

[data-bs-theme="dark"] .related-header .toggle-icon,
body.dark-mode .related-header .toggle-icon {
    color: #94a3b8 !important;
}

[data-bs-theme="dark"] .related-body,
body.dark-mode .related-body {
    background: #1e293b !important;
}

[data-bs-theme="dark"] .related-item-new,
body.dark-mode .related-item-new {
    background: #1e293b !important;
    border-bottom: 1px solid #334155 !important;
    color: #cbd5e1 !important;
}

[data-bs-theme="dark"] .related-item-new:hover,
body.dark-mode .related-item-new:hover {
    background: #243249 !important;
}

[data-bs-theme="dark"] .related-item-new.active,
body.dark-mode .related-item-new.active {
    background: rgba(37, 99, 235, 0.15) !important;
    border-inline-start: 4px solid #3b82f6 !important;
    border-right: none !important;
    color: #60a5fa !important;
}

[dir="rtl"] [data-bs-theme="dark"] .related-item-new.active,
[dir="rtl"] body.dark-mode .related-item-new.active {
    border-right: 4px solid #3b82f6 !important;
    border-left: none !important;
}

[data-bs-theme="dark"] .related-item-new.active .item-title-text,
body.dark-mode .related-item-new.active .item-title-text {
    color: #60a5fa !important;
}

[data-bs-theme="dark"] .file-icon-wrapper-new,
body.dark-mode .file-icon-wrapper-new {
    background: #0f172a !important;
    color: #94a3b8 !important;
}

[data-bs-theme="dark"] .related-item-new.active .file-icon-wrapper-new,
body.dark-mode .related-item-new.active .file-icon-wrapper-new {
    background: rgba(37, 99, 235, 0.2) !important;
    color: #60a5fa !important;
}

[data-bs-theme="dark"] .eye-view-icon-small,
body.dark-mode .eye-view-icon-small {
    background: #0f172a !important;
    color: #94a3b8 !important;
}

[data-bs-theme="dark"] .related-item-new:hover .eye-view-icon-small,
body.dark-mode .related-item-new:hover .eye-view-icon-small {
    background: #334155 !important;
    color: #f8fafc !important;
}

[data-bs-theme="dark"] .related-item-new.active .eye-view-icon-small,
body.dark-mode .related-item-new.active .eye-view-icon-small {
    background: rgba(37, 99, 235, 0.2) !important;
    color: #60a5fa !important;
}

[data-bs-theme="dark"] .badge-year-pill,
body.dark-mode .badge-year-pill {
    background: #0f172a !important;
    color: #94a3b8 !important;
}

[data-bs-theme="dark"] .badge-solution-pill.with,
body.dark-mode .badge-solution-pill.with {
    background: rgba(22, 163, 74, 0.1) !important;
    color: #4ade80 !important;
    border-color: rgba(74, 222, 128, 0.2) !important;
}

[data-bs-theme="dark"] .badge-solution-pill.with .dot,
body.dark-mode .badge-solution-pill.with .dot {
    background: #4ade80 !important;
}

[data-bs-theme="dark"] .badge-solution-pill.without,
body.dark-mode .badge-solution-pill.without {
    background: rgba(239, 68, 68, 0.1) !important;
    color: #f87171 !important;
    border-color: rgba(248, 113, 113, 0.2) !important;
}

[data-bs-theme="dark"] .badge-solution-pill.without .dot,
body.dark-mode .badge-solution-pill.without .dot {
    background: #f87171 !important;
}

[data-bs-theme="dark"] .scrollable-related-list::-webkit-scrollbar-track,
body.dark-mode .scrollable-related-list::-webkit-scrollbar-track {
    background: #1e293b !important;
}

[data-bs-theme="dark"] .scrollable-related-list::-webkit-scrollbar-thumb,
body.dark-mode .scrollable-related-list::-webkit-scrollbar-thumb {
    background: #334155 !important;
}

/* Header vertical divider and search input adaptations for dark mode */
[data-bs-theme="dark"] .header-v-divider,
body.dark-mode .header-v-divider {
    background: rgba(255, 255, 255, 0.15) !important;
}

[data-bs-theme="dark"] .search-input-group,
body.dark-mode .search-input-group {
    background: #0f172a !important;
    border: 1px solid #334155 !important;
    color: #f8fafc !important;
}

[data-bs-theme="dark"] .search-input-group:focus-within,
body.dark-mode .search-input-group:focus-within {
    background: #0f172a !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2) !important;
}

[data-bs-theme="dark"] .search-input,
body.dark-mode .search-input {
    color: #f8fafc !important;
}

[data-bs-theme="dark"] .search-input::placeholder,
body.dark-mode .search-input::placeholder {
    color: #64748b !important;
}

[data-bs-theme="dark"] .search-input-group .search-icon,
body.dark-mode .search-input-group .search-icon {
    color: #94a3b8 !important;
}

[data-bs-theme="dark"] .shortcut-key,
body.dark-mode .shortcut-key {
    background: #1e293b !important;
    color: #94a3b8 !important;
    box-shadow: none !important;
}

/* Dark mode override for progress bar background track */
[data-bs-theme="dark"] .modern-progress-soft,
body.dark-mode .modern-progress-soft {
    background: #0f172a !important;
}

/* Level header banner dark mode gradient and border */
[data-bs-theme="dark"] .level-header-final,
body.dark-mode .level-header-final {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
    border: 1px solid #334155 !important;
}

/* Custom Badges Dark Mode overrides */
[data-bs-theme="dark"] .badge-success-light,
body.dark-mode .badge-success-light {
    background-color: rgba(16, 185, 129, 0.1) !important;
    color: #4ade80 !important;
    border-color: rgba(74, 222, 128, 0.2) !important;
}

[data-bs-theme="dark"] .badge-danger-light,
body.dark-mode .badge-danger-light {
    background-color: rgba(239, 68, 68, 0.1) !important;
    color: #f87171 !important;
    border-color: rgba(248, 113, 113, 0.2) !important;
}

[data-bs-theme="dark"] .badge-secondary-light,
body.dark-mode .badge-secondary-light {
    background-color: #0f172a !important;
    color: #94a3b8 !important;
    border: 1px solid #334155 !important;
}

/* Dark mode override for term watermarks */
[data-bs-theme="dark"] .term-bg-number,
body.dark-mode .term-bg-number {
    color: rgba(255, 255, 255, 0.03) !important;
}

/* PDF Viewer headers and layout dark-mode overrides */
[data-bs-theme="dark"] .top-nav-segmented,
body.dark-mode .top-nav-segmented {
    background: #1e293b !important;
    border: 1px solid #334155 !important;
}

[data-bs-theme="dark"] .nav-segment,
body.dark-mode .nav-segment {
    color: #cbd5e1 !important;
    border-inline-end: 1px solid #334155 !important;
}

[data-bs-theme="dark"] .nav-segment:last-child,
body.dark-mode .nav-segment:last-child {
    border-inline-end: none !important;
}

[data-bs-theme="dark"] .nav-segment:hover,
body.dark-mode .nav-segment:hover {
    background: #243249 !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .nav-chevron,
body.dark-mode .nav-chevron {
    color: #64748b !important;
}

[data-bs-theme="dark"] .header-info-bar,
body.dark-mode .header-info-bar {
    background: #0f172a !important;
    border: 1px solid #334155 !important;
    border-bottom: none !important;
    color: #f8fafc !important;
}

[data-bs-theme="dark"] .header-info-bar .title-main,
body.dark-mode .header-info-bar .title-main {
    color: #f8fafc !important;
}

[data-bs-theme="dark"] .header-info-bar .year-badge-viewer,
body.dark-mode .header-info-bar .year-badge-viewer {
    background: #1e293b !important;
    color: #94a3b8 !important;
    border: 1px solid #334155 !important;
}

[data-bs-theme="dark"] .header-arrow,
body.dark-mode .header-arrow {
    color: #cbd5e1 !important;
}

[data-bs-theme="dark"] .header-arrow:hover:not(.disabled),
body.dark-mode .header-arrow:hover:not(.disabled) {
    background: #243249 !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .header-arrow.disabled,
body.dark-mode .header-arrow.disabled {
    opacity: 0.3 !important;
}

[data-bs-theme="dark"] .header-v-sep,
body.dark-mode .header-v-sep,
[data-bs-theme="dark"] .header-v-sep-inner,
body.dark-mode .header-v-sep-inner {
    background: #334155 !important;
}

[data-bs-theme="dark"] .bottom-action-bar,
body.dark-mode .bottom-action-bar {
    background: #0f172a !important;
    border: 1px solid #334155 !important;
    border-top: none !important;
}

[data-bs-theme="dark"] .action-btn-viewer,
body.dark-mode .action-btn-viewer {
    color: #cbd5e1 !important;
    border-inline-end: 1px solid #334155 !important;
}

[data-bs-theme="dark"] .action-btn-viewer:last-child,
body.dark-mode .action-btn-viewer:last-child {
    border-inline-end: none !important;
}

[data-bs-theme="dark"] .action-btn-viewer:hover,
body.dark-mode .action-btn-viewer:hover {
    background: #243249 !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .action-v-sep,
body.dark-mode .action-v-sep {
    background: #334155 !important;
}

/* Custom Paginator fixes for Arabic wrapping and dark mode compatibility */
.pagination-rounded .page-link {
    width: auto !important;
    min-width: 42px;
    padding: 0 16px !important;
    white-space: nowrap !important;
    border-radius: 30px !important;
}

[data-bs-theme="dark"] .pagination-rounded .page-link,
body.dark-mode .pagination-rounded .page-link {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #cbd5e1 !important;
}

[data-bs-theme="dark"] .pagination-rounded .page-link:hover,
body.dark-mode .pagination-rounded .page-link:hover {
    background-color: #243249 !important;
    border-color: #3b82f6 !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .pagination-rounded .page-item.active .page-link,
body.dark-mode .pagination-rounded .page-item.active .page-link {
    background-color: #2563eb !important;
    border-color: #2563eb !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3) !important;
}

[data-bs-theme="dark"] .pagination-rounded .page-item.disabled .page-link,
body.dark-mode .pagination-rounded .page-item.disabled .page-link {
    background-color: #0f172a !important;
    border-color: #1e293b !important;
    color: #475569 !important;
    opacity: 0.5 !important;
}

/* ÃƒËœÃ‚ÂªÃƒâ„¢Ã¢â‚¬Å¾Ãƒâ„¢Ã‹â€ Ãƒâ„¢Ã…Â Ãƒâ„¢Ã¢â‚¬Â  Ãƒâ„¢Ã†â€™ÃƒËœÃ‚Â±ÃƒËœÃ‚Âª ÃƒËœÃ‚Â§Ãƒâ„¢Ã¢â‚¬Å¾ÃƒËœÃ‚ÂªÃƒâ„¢Ã‹â€ ÃƒËœÃ‚ÂµÃƒâ„¢Ã…Â ÃƒËœÃ‚Â§ÃƒËœÃ‚Âª Ãƒâ„¢Ã‹â€ ÃƒËœÃ‚Â§Ãƒâ„¢Ã¢â‚¬Å¾ÃƒËœÃ‚ÂªÃƒËœÃ‚Â­Ãƒâ„¢Ã¢â‚¬Å¾Ãƒâ„¢Ã…Â Ãƒâ„¢Ã¢â‚¬Å¾ÃƒËœÃ‚Â§ÃƒËœÃ‚Âª ÃƒËœÃ‚Â¨ÃƒËœÃ‚Â§Ãƒâ„¢Ã¢â‚¬Å¾Ãƒâ„¢Ã‹â€ ÃƒËœÃ‚Â¶ÃƒËœÃ‚Â¹ ÃƒËœÃ‚Â§Ãƒâ„¢Ã¢â‚¬Å¾ÃƒËœÃ‚Â¯ÃƒËœÃ‚Â§Ãƒâ„¢Ã†â€™Ãƒâ„¢Ã¢â‚¬Â  */
[data-bs-theme="dark"] .card.bg-gradient-purple,
body.dark-mode .card.bg-gradient-purple {
    background: linear-gradient(135deg, #1e1b4b 0%, #0f172a 100%) !important;
    border: 1px solid rgba(139, 92, 246, 0.2) !important;
}
[data-bs-theme="dark"] .card.bg-gradient-blue,
body.dark-mode .card.bg-gradient-blue {
    background: linear-gradient(135deg, #1e3a8a 0%, #0f172a 100%) !important;
    border: 1px solid rgba(59, 130, 246, 0.2) !important;
}

/* ÃƒËœÃ‚ÂªÃƒâ„¢Ã¢â‚¬Å¾Ãƒâ„¢Ã‹â€ Ãƒâ„¢Ã…Â Ãƒâ„¢Ã¢â‚¬Â  Ãƒâ„¢Ã‚ÂÃƒËœÃ‚Â¦ÃƒËœÃ‚Â© ÃƒËœÃ‚Â¨ÃƒËœÃ‚Â·ÃƒËœÃ‚Â§Ãƒâ„¢Ã¢â‚¬Å¡ÃƒËœÃ‚Â§ÃƒËœÃ‚Âª ÃƒËœÃ‚Â§Ãƒâ„¢Ã¢â‚¬Å¾ÃƒËœÃ‚ÂªÃƒâ„¢Ã‹â€ ÃƒËœÃ‚ÂµÃƒâ„¢Ã…Â ÃƒËœÃ‚Â§ÃƒËœÃ‚Âª ÃƒËœÃ‚Â§Ãƒâ„¢Ã¢â‚¬Å¾ÃƒËœÃ‚Â²ÃƒËœÃ‚Â¬ÃƒËœÃ‚Â§ÃƒËœÃ‚Â¬Ãƒâ„¢Ã…Â ÃƒËœÃ‚Â© ÃƒËœÃ‚Â¨ÃƒËœÃ‚Â§Ãƒâ„¢Ã¢â‚¬Å¾Ãƒâ„¢Ã‹â€ ÃƒËœÃ‚Â¶ÃƒËœÃ‚Â¹ ÃƒËœÃ‚Â§Ãƒâ„¢Ã¢â‚¬Å¾ÃƒËœÃ‚Â¯ÃƒËœÃ‚Â§Ãƒâ„¢Ã†â€™Ãƒâ„¢Ã¢â‚¬Â  */
[data-bs-theme="dark"] .insight-item-premium,
body.dark-mode .insight-item-premium {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}
[data-bs-theme="dark"] .insight-item-premium:hover,
body.dark-mode .insight-item-premium:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

/* ÃƒËœÃ‚Â£Ãƒâ„¢Ã¢â‚¬Å¾Ãƒâ„¢Ã‹â€ ÃƒËœÃ‚Â§Ãƒâ„¢Ã¢â‚¬Â  ÃƒËœÃ‚Â¯Ãƒâ„¢Ã‹â€ ÃƒËœÃ‚Â§ÃƒËœÃ‚Â¦ÃƒËœÃ‚Â± ÃƒËœÃ‚Â£Ãƒâ„¢Ã…Â Ãƒâ„¢Ã¢â‚¬Å¡Ãƒâ„¢Ã‹â€ Ãƒâ„¢Ã¢â‚¬Â ÃƒËœÃ‚Â§ÃƒËœÃ‚Âª ÃƒËœÃ‚Â§Ãƒâ„¢Ã¢â‚¬Å¾ÃƒËœÃ‚ÂªÃƒâ„¢Ã‹â€ ÃƒËœÃ‚ÂµÃƒâ„¢Ã…Â ÃƒËœÃ‚Â§ÃƒËœÃ‚Âª ÃƒËœÃ‚Â­ÃƒËœÃ‚Â³ÃƒËœÃ‚Â¨ ÃƒËœÃ‚Â§Ãƒâ„¢Ã¢â‚¬Å¾Ãƒâ„¢Ã¢â‚¬Â Ãƒâ„¢Ã‹â€ ÃƒËœÃ‚Â¹ Ãƒâ„¢Ã¢â‚¬Å¾ÃƒËœÃ‚Â­Ãƒâ„¢Ã¢â‚¬Å¾ Ãƒâ„¢Ã¢â‚¬Â¦ÃƒËœÃ‚Â´Ãƒâ„¢Ã†â€™Ãƒâ„¢Ã¢â‚¬Å¾ÃƒËœÃ‚Â© ÃƒËœÃ‚Â¹ÃƒËœÃ‚Â¯Ãƒâ„¢Ã¢â‚¬Â¦ ÃƒËœÃ‚Â§Ãƒâ„¢Ã¢â‚¬Å¾ÃƒËœÃ‚Â±ÃƒËœÃ‚Â¤Ãƒâ„¢Ã…Â ÃƒËœÃ‚Â© */
.insight-icon-box {
    transition: all 0.2s ease;
}
.insight-icon-box svg {
    color: inherit !important;
    stroke: currentColor !important;
}
.insight-icon-success {
    background-color: rgba(74, 222, 128, 0.2) !important;
    color: #4ade80 !important;
}
.insight-icon-warning {
    background-color: rgba(248, 113, 113, 0.2) !important;
    color: #f87171 !important;
}
.insight-icon-info {
    background-color: rgba(96, 165, 250, 0.2) !important;
    color: #60a5fa !important;
}

/* GPA Card Header & Collapse styling for premium dark mode contrast */
[data-bs-theme="dark"] .gpa-card-premium .card-header,
body.dark-mode .gpa-card-premium .card-header {
    background-color: rgba(255, 255, 255, 0.03) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

[data-bs-theme="dark"] .gpa-card-premium .card-header .badge.bg-white,
body.dark-mode .gpa-card-premium .card-header .badge.bg-white {
    background-color: #1e293b !important;
    border: 1px solid #334155 !important;
    color: #cbd5e1 !important;
}

[data-bs-theme="dark"] .gpa-card-premium .collapse .bg-light,
body.dark-mode .gpa-card-premium .collapse .bg-light {
    background-color: #0f172a !important;
    border-color: #334155 !important;
}

[data-bs-theme="dark"] .gpa-card-premium .collapse .border-bottom,
body.dark-mode .gpa-card-premium .collapse .border-bottom {
    border-color: rgba(255, 255, 255, 0.12) !important;
}

[data-bs-theme="dark"] .gpa-card-premium .collapse .badge.bg-white,
body.dark-mode .gpa-card-premium .collapse .badge.bg-white {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #60a5fa !important;
}

/* User Dropdown Menu Dark Mode Overrides */
[data-bs-theme="dark"] .user-dropdown-menu,
body.dark-mode .user-dropdown-menu {
    background-color: #1e293b !important;
    border: 1px solid #334155 !important;
}

[data-bs-theme="dark"] .user-dropdown-header,
body.dark-mode .user-dropdown-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
}

[data-bs-theme="dark"] .user-dropdown-name,
body.dark-mode .user-dropdown-name {
    color: #f8fafc !important;
}

[data-bs-theme="dark"] .user-dropdown-email,
body.dark-mode .user-dropdown-email {
    color: #94a3b8 !important;
}

[data-bs-theme="dark"] .user-dropdown-item,
body.dark-mode .user-dropdown-item {
    color: #cbd5e1 !important;
}

[data-bs-theme="dark"] .user-dropdown-item:hover,
body.dark-mode .user-dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: #3b82f6 !important;
}

[data-bs-theme="dark"] .user-dropdown-divider,
body.dark-mode .user-dropdown-divider {
    background-color: rgba(255, 255, 255, 0.12) !important;
}

/* User Avatar / Profile Styling for Dark Mode */
[data-bs-theme="dark"] .user-nav-avatar,
body.dark-mode .user-nav-avatar {
    background: rgba(59, 130, 246, 0.15) !important;
    border-color: rgba(59, 130, 246, 0.25) !important;
}

[data-bs-theme="dark"] .user-avatar-icon,
body.dark-mode .user-avatar-icon {
    color: #60a5fa !important;
}

/* Notifications Page Dark Mode Overrides */
[data-bs-theme="dark"] .notifications-center,
body.dark-mode .notifications-center {
    background: #0f172a !important;
}

[data-bs-theme="dark"] .notif-tabs,
body.dark-mode .notif-tabs {
    background-color: #1e293b !important;
    border-color: #334155 !important;
}

[data-bs-theme="dark"] .tab-link,
body.dark-mode .tab-link {
    color: #94a3b8 !important;
}

[data-bs-theme="dark"] .tab-link.active,
body.dark-mode .tab-link.active {
    background-color: #2563eb !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .tab-link:hover:not(.active),
body.dark-mode .tab-link:hover:not(.active) {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: #ffffff !important;
}

/* ==========================================================================
   ÃƒËœÃ‚ÂªÃƒËœÃ‚Â¹ÃƒËœÃ‚Â¯Ãƒâ„¢Ã…Â Ãƒâ„¢Ã¢â‚¬Å¾ÃƒËœÃ‚Â§ÃƒËœÃ‚Âª ÃƒËœÃ‚Â­ÃƒËœÃ‚Â§ÃƒËœÃ‚Â³ÃƒËœÃ‚Â¨ÃƒËœÃ‚Â© ÃƒËœÃ‚Â§Ãƒâ„¢Ã¢â‚¬Å¾Ãƒâ„¢Ã¢â‚¬Â¦ÃƒËœÃ‚Â¹ÃƒËœÃ‚Â¯Ãƒâ„¢Ã¢â‚¬Å¾ Ãƒâ„¢Ã‹â€ ÃƒËœÃ‚Â§Ãƒâ„¢Ã¢â‚¬Å¾Ãƒâ„¢Ã‹â€ ÃƒËœÃ‚Â¶ÃƒËœÃ‚Â¹ ÃƒËœÃ‚Â§Ãƒâ„¢Ã¢â‚¬Å¾ÃƒËœÃ‚Â¯ÃƒËœÃ‚Â§Ãƒâ„¢Ã†â€™Ãƒâ„¢Ã¢â‚¬Â  ÃƒËœÃ‚Â§Ãƒâ„¢Ã¢â‚¬Å¾ÃƒËœÃ‚Â¥ÃƒËœÃ‚Â¶ÃƒËœÃ‚Â§Ãƒâ„¢Ã‚ÂÃƒâ„¢Ã…Â ÃƒËœÃ‚Â© (Antigravity Custom)
   ========================================================================== */

/* ÃƒËœÃ‚ÂªÃƒâ„¢Ã¢â‚¬Å¡Ãƒâ„¢Ã¢â‚¬Å¾Ãƒâ„¢Ã…Â Ãƒâ„¢Ã¢â‚¬Å¾ ÃƒËœÃ‚Â­Ãƒâ„¢Ã‹â€ ÃƒËœÃ‚Â§Ãƒâ„¢Ã‚Â ÃƒËœÃ‚Â®Ãƒâ„¢Ã¢â‚¬Å¾ÃƒËœÃ‚Â§Ãƒâ„¢Ã…Â ÃƒËœÃ‚Â§ ÃƒËœÃ‚Â¥ÃƒËœÃ‚Â¯ÃƒËœÃ‚Â®ÃƒËœÃ‚Â§Ãƒâ„¢Ã¢â‚¬Å¾ ÃƒËœÃ‚Â§Ãƒâ„¢Ã¢â‚¬Å¾Ãƒâ„¢Ã¢â‚¬Â Ãƒâ„¢Ã¢â‚¬Å¡ÃƒËœÃ‚Â§ÃƒËœÃ‚Â· Ãƒâ„¢Ã‚ÂÃƒâ„¢Ã…Â  ÃƒËœÃ‚Â­ÃƒËœÃ‚Â§ÃƒËœÃ‚Â³ÃƒËœÃ‚Â¨ÃƒËœÃ‚Â© ÃƒËœÃ‚Â§Ãƒâ„¢Ã¢â‚¬Å¾Ãƒâ„¢Ã¢â‚¬Â¦ÃƒËœÃ‚Â¹ÃƒËœÃ‚Â¯Ãƒâ„¢Ã¢â‚¬Å¾ Ãƒâ„¢Ã¢â‚¬Å¾ÃƒËœÃ‚ÂªÃƒËœÃ‚ÂµÃƒËœÃ‚Â¨ÃƒËœÃ‚Â­ 5px */
#grades-table .minimal-input,
#grades-table input[type="number"],
#grades-table .input-minimal-group,
#grades-table .grade-input-wrapper,
#grades-table .grade-input-wrapper .minimal-input,
#grades-table .input-minimal-group .minimal-input {
    border-radius: 5px !important;
}

/* ÃƒËœÃ‚ÂªÃƒËœÃ‚Â¹ÃƒËœÃ‚Â¯Ãƒâ„¢Ã…Â Ãƒâ„¢Ã¢â‚¬Å¾ ÃƒËœÃ‚Â®Ãƒâ„¢Ã¢â‚¬Å¾Ãƒâ„¢Ã‚ÂÃƒâ„¢Ã…Â ÃƒËœÃ‚Â© badge-count Ãƒâ„¢Ã¢â‚¬Å¾Ãƒâ„¢Ã¢â‚¬Å¾Ãƒâ„¢Ã¢â‚¬Â¦ÃƒËœÃ‚Â±ÃƒËœÃ‚Â§ÃƒËœÃ‚Â­Ãƒâ„¢Ã¢â‚¬Å¾ ÃƒËœÃ‚Â§Ãƒâ„¢Ã¢â‚¬Å¾ÃƒËœÃ‚ÂªÃƒËœÃ‚Â¹Ãƒâ„¢Ã¢â‚¬Å¾Ãƒâ„¢Ã…Â Ãƒâ„¢Ã¢â‚¬Â¦Ãƒâ„¢Ã…Â ÃƒËœÃ‚Â© Ãƒâ„¢Ã‚ÂÃƒâ„¢Ã…Â  ÃƒËœÃ‚Â§Ãƒâ„¢Ã¢â‚¬Å¾Ãƒâ„¢Ã¢â‚¬Å¡ÃƒËœÃ‚Â§ÃƒËœÃ‚Â¦Ãƒâ„¢Ã¢â‚¬Â¦ÃƒËœÃ‚Â© ÃƒËœÃ‚Â§Ãƒâ„¢Ã¢â‚¬Å¾ÃƒËœÃ‚Â¬ÃƒËœÃ‚Â§Ãƒâ„¢Ã¢â‚¬Â ÃƒËœÃ‚Â¨Ãƒâ„¢Ã…Â ÃƒËœÃ‚Â© Ãƒâ„¢Ã¢â‚¬Å¾Ãƒâ„¢Ã¢â‚¬Å¾Ãƒâ„¢Ã‹â€ ÃƒËœÃ‚Â¶ÃƒËœÃ‚Â¹ ÃƒËœÃ‚Â§Ãƒâ„¢Ã¢â‚¬Å¾ÃƒËœÃ‚Â¯ÃƒËœÃ‚Â§Ãƒâ„¢Ã†â€™Ãƒâ„¢Ã¢â‚¬Â  */
[data-bs-theme="dark"] .sidebar-nav .badge-count,
body.dark-mode .sidebar-nav .badge-count {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #94a3b8 !important;
}

[data-bs-theme="dark"] .sidebar-nav .nav-link:hover .badge-count,
body.dark-mode .sidebar-nav .nav-link:hover .badge-count {
    background: rgba(59, 130, 246, 0.2) !important;
    color: #60a5fa !important;
}

[data-bs-theme="dark"] .sidebar-nav .nav-link.active .badge-count,
body.dark-mode .sidebar-nav .nav-link.active .badge-count {
    background: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
}

/* ÃƒËœÃ‚Â¶ÃƒËœÃ‚Â¨ÃƒËœÃ‚Â· ÃƒËœÃ‚ÂªÃƒËœÃ‚Â¨ÃƒËœÃ‚Â§Ãƒâ„¢Ã…Â Ãƒâ„¢Ã¢â‚¬Â  ÃƒËœÃ‚Â£Ãƒâ„¢Ã…Â Ãƒâ„¢Ã¢â‚¬Å¡Ãƒâ„¢Ã‹â€ Ãƒâ„¢Ã¢â‚¬Â ÃƒËœÃ‚Â§ÃƒËœÃ‚Âª ÃƒËœÃ‚Â§Ãƒâ„¢Ã¢â‚¬Å¾ÃƒËœÃ‚ÂªÃƒËœÃ‚Â±Ãƒâ„¢Ã‹â€ Ãƒâ„¢Ã…Â ÃƒËœÃ‚Â³ÃƒËœÃ‚Â© Ãƒâ„¢Ã‹â€ ÃƒËœÃ‚Â§Ãƒâ„¢Ã¢â‚¬Å¾ÃƒËœÃ‚ÂµÃƒâ„¢Ã¢â‚¬Â ÃƒËœÃ‚Â§ÃƒËœÃ‚Â¯Ãƒâ„¢Ã…Â Ãƒâ„¢Ã¢â‚¬Å¡ ÃƒËœÃ‚Â§Ãƒâ„¢Ã¢â‚¬Å¾ÃƒËœÃ‚Â²ÃƒËœÃ‚Â¬ÃƒËœÃ‚Â§ÃƒËœÃ‚Â¬Ãƒâ„¢Ã…Â ÃƒËœÃ‚Â© Ãƒâ„¢Ã‹â€ ÃƒËœÃ‚Â§Ãƒâ„¢Ã¢â‚¬Å¾ÃƒËœÃ‚Â®ÃƒËœÃ‚Â·Ãƒâ„¢Ã‹â€ ÃƒËœÃ‚Â· ÃƒËœÃ‚Â§Ãƒâ„¢Ã¢â‚¬Å¾Ãƒâ„¢Ã‚ÂÃƒËœÃ‚Â§ÃƒËœÃ‚ÂµÃƒâ„¢Ã¢â‚¬Å¾ÃƒËœÃ‚Â© Ãƒâ„¢Ã‚ÂÃƒâ„¢Ã…Â  ÃƒËœÃ‚Â§Ãƒâ„¢Ã¢â‚¬Å¾Ãƒâ„¢Ã¢â‚¬Å¡ÃƒËœÃ‚Â§ÃƒËœÃ‚Â¦Ãƒâ„¢Ã¢â‚¬Â¦ÃƒËœÃ‚Â© ÃƒËœÃ‚Â§Ãƒâ„¢Ã¢â‚¬Å¾Ãƒâ„¢Ã¢â‚¬Â¦Ãƒâ„¢Ã¢â‚¬Â ÃƒËœÃ‚Â³ÃƒËœÃ‚Â¯Ãƒâ„¢Ã¢â‚¬Å¾ÃƒËœÃ‚Â© Ãƒâ„¢Ã¢â‚¬Å¾Ãƒâ„¢Ã¢â‚¬Å¾Ãƒâ„¢Ã‹â€ ÃƒËœÃ‚Â¶ÃƒËœÃ‚Â¹ ÃƒËœÃ‚Â§Ãƒâ„¢Ã¢â‚¬Å¾ÃƒËœÃ‚Â¯ÃƒËœÃ‚Â§Ãƒâ„¢Ã†â€™Ãƒâ„¢Ã¢â‚¬Â  */
[data-bs-theme="dark"] .user-dropdown-header,
body.dark-mode .user-dropdown-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

[data-bs-theme="dark"] .user-dropdown-divider,
body.dark-mode .user-dropdown-divider {
    background-color: rgba(255, 255, 255, 0.08) !important;
}

[data-bs-theme="dark"] .header-v-divider,
body.dark-mode .header-v-divider {
    border-color: rgba(255, 255, 255, 0.08) !important;
}

[data-bs-theme="dark"] .content-header,
body.dark-mode .content-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

[data-bs-theme="dark"] .glass-icon-box,
body.dark-mode .glass-icon-box {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

[data-bs-theme="dark"] .glass-icon-box i,
body.dark-mode .glass-icon-box i {
    color: #60a5fa !important;
}

/* ==========================================================================
   ÃƒËœÃ‚ÂªÃƒâ„¢Ã¢â‚¬Â ÃƒËœÃ‚Â³Ãƒâ„¢Ã…Â Ãƒâ„¢Ã¢â‚¬Å¡ ÃƒËœÃ‚Â£Ãƒâ„¢Ã…Â Ãƒâ„¢Ã¢â‚¬Å¡Ãƒâ„¢Ã‹â€ Ãƒâ„¢Ã¢â‚¬Â ÃƒËœÃ‚Â§ÃƒËœÃ‚Âª ÃƒËœÃ‚Â§Ãƒâ„¢Ã¢â‚¬Å¾Ãƒâ„¢Ã¢â‚¬Â¦ÃƒËœÃ‚Â±ÃƒËœÃ‚Â§ÃƒËœÃ‚Â­Ãƒâ„¢Ã¢â‚¬Å¾ ÃƒËœÃ‚Â§Ãƒâ„¢Ã¢â‚¬Å¾ÃƒËœÃ‚ÂªÃƒËœÃ‚Â¹Ãƒâ„¢Ã¢â‚¬Å¾Ãƒâ„¢Ã…Â Ãƒâ„¢Ã¢â‚¬Â¦Ãƒâ„¢Ã…Â ÃƒËœÃ‚Â© Ãƒâ„¢Ã‚ÂÃƒâ„¢Ã…Â  ÃƒËœÃ‚Â§Ãƒâ„¢Ã¢â‚¬Å¾ÃƒËœÃ‚ÂµÃƒâ„¢Ã‚ÂÃƒËœÃ‚Â­ÃƒËœÃ‚Â© ÃƒËœÃ‚Â§Ãƒâ„¢Ã¢â‚¬Å¾ÃƒËœÃ‚Â±ÃƒËœÃ‚Â¦Ãƒâ„¢Ã…Â ÃƒËœÃ‚Â³Ãƒâ„¢Ã…Â ÃƒËœÃ‚Â© Ãƒâ„¢Ã¢â‚¬Å¾Ãƒâ„¢Ã¢â‚¬Å¾Ãƒâ„¢Ã‹â€ ÃƒËœÃ‚Â¶ÃƒËœÃ‚Â¹ ÃƒËœÃ‚Â§Ãƒâ„¢Ã¢â‚¬Å¾ÃƒËœÃ‚Â¯ÃƒËœÃ‚Â§Ãƒâ„¢Ã†â€™Ãƒâ„¢Ã¢â‚¬Â 
   ========================================================================== */
[data-bs-theme="dark"] .stage-icon,
body.dark-mode .stage-icon {
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

[data-bs-theme="dark"] .stage-primary .stage-icon,
body.dark-mode .stage-primary .stage-icon {
    background: rgba(16, 185, 129, 0.15) !important;
    border-color: rgba(16, 185, 129, 0.25) !important;
}

[data-bs-theme="dark"] .stage-middle .stage-icon,
body.dark-mode .stage-middle .stage-icon {
    background: rgba(59, 130, 246, 0.15) !important;
    border-color: rgba(59, 130, 246, 0.25) !important;
}

[data-bs-theme="dark"] .stage-secondary .stage-icon,
body.dark-mode .stage-secondary .stage-icon {
    background: rgba(168, 85, 247, 0.15) !important;
    border-color: rgba(168, 85, 247, 0.25) !important;
}

[data-bs-theme="dark"] .stage-distance .stage-icon,
body.dark-mode .stage-distance .stage-icon {
    background: rgba(79, 70, 229, 0.15) !important;
    border-color: rgba(79, 70, 229, 0.25) !important;
}

[data-bs-theme="dark"] .stage-other .stage-icon,
body.dark-mode .stage-other .stage-icon {
    background: rgba(148, 163, 184, 0.15) !important;
    border-color: rgba(148, 163, 184, 0.25) !important;
}

/* ÃƒËœÃ‚ÂªÃƒËœÃ‚Â¹ÃƒËœÃ‚Â¯Ãƒâ„¢Ã…Â Ãƒâ„¢Ã¢â‚¬Å¾ Ãƒâ„¢Ã¢â‚¬Å¾Ãƒâ„¢Ã‹â€ Ãƒâ„¢Ã¢â‚¬Â  ÃƒËœÃ‚Â§Ãƒâ„¢Ã¢â‚¬Å¾ÃƒËœÃ‚Â£Ãƒâ„¢Ã…Â Ãƒâ„¢Ã¢â‚¬Å¡Ãƒâ„¢Ã‹â€ Ãƒâ„¢Ã¢â‚¬Â ÃƒËœÃ‚Â© Ãƒâ„¢Ã¢â‚¬Â¦ÃƒËœÃ‚Â¨ÃƒËœÃ‚Â§ÃƒËœÃ‚Â´ÃƒËœÃ‚Â±ÃƒËœÃ‚Â© Ãƒâ„¢Ã¢â‚¬Å¾Ãƒâ„¢Ã¢â‚¬Å¾ÃƒËœÃ‚ÂªÃƒËœÃ‚Â£Ãƒâ„¢Ã†â€™ÃƒËœÃ‚Â¯ Ãƒâ„¢Ã¢â‚¬Â¦Ãƒâ„¢Ã¢â‚¬Â  ÃƒËœÃ‚ÂªÃƒËœÃ‚ÂºÃƒâ„¢Ã…Â ÃƒËœÃ‚Â±Ãƒâ„¢Ã¢â‚¬Â¡ÃƒËœÃ‚Â§ Ãƒâ„¢Ã‚ÂÃƒâ„¢Ã…Â  ÃƒËœÃ‚Â§Ãƒâ„¢Ã¢â‚¬Å¾Ãƒâ„¢Ã‹â€ ÃƒËœÃ‚Â¶ÃƒËœÃ‚Â¹ ÃƒËœÃ‚Â§Ãƒâ„¢Ã¢â‚¬Å¾ÃƒËœÃ‚Â¯ÃƒËœÃ‚Â§Ãƒâ„¢Ã†â€™Ãƒâ„¢Ã¢â‚¬Â  */
[data-bs-theme="dark"] .stage-primary .stage-icon i,
body.dark-mode .stage-primary .stage-icon i,
[data-bs-theme="dark"] .stage-primary .stage-icon svg,
body.dark-mode .stage-primary .stage-icon svg { color: #4ade80 !important; }

[data-bs-theme="dark"] .stage-middle .stage-icon i,
body.dark-mode .stage-middle .stage-icon i,
[data-bs-theme="dark"] .stage-middle .stage-icon svg,
body.dark-mode .stage-middle .stage-icon svg { color: #60a5fa !important; }

[data-bs-theme="dark"] .stage-secondary .stage-icon i,
body.dark-mode .stage-secondary .stage-icon i,
[data-bs-theme="dark"] .stage-secondary .stage-icon svg,
body.dark-mode .stage-secondary .stage-icon svg { color: #c084fc !important; }

[data-bs-theme="dark"] .stage-distance .stage-icon i,
body.dark-mode .stage-distance .stage-icon i,
[data-bs-theme="dark"] .stage-distance .stage-icon svg,
body.dark-mode .stage-distance .stage-icon svg { color: #818cf8 !important; }

[data-bs-theme="dark"] .stage-other .stage-icon i,
body.dark-mode .stage-other .stage-icon i,
[data-bs-theme="dark"] .stage-other .stage-icon svg,
body.dark-mode .stage-other .stage-icon svg { color: #cbd5e1 !important; }

/* ==========================================================================
   Comprehensive Responsive Overrides & Mobile Layout Improvements
   ========================================================================== */

/* 1. Header & Navigation Responsiveness on Mobile/Tablet */
@media (max-width: 991px) {
    .header-icon-link {
        display: flex !important;
        width: 38px !important;
        height: 38px !important;
        border-radius: 12px !important;
        align-items: center !important;
        justify-content: center !important;
    }
    .auth-group {
        display: flex !important;
        gap: 4px !important;
    }
    .header-v-divider {
        display: none !important;
    }
    .content-header {
        padding: 8px 12px !important;
        height: 60px !important;
        gap: 6px !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
    }
    .search-container {
        flex: 1 !important;
        margin: 0 2px !important;
    }
}

@media (max-width: 576px) {
    .search-container {
        max-width: 100% !important;
    }
    .search-input-group {
        height: 36px !important;
        padding: 0 8px !important;
    }
    .search-input {
        font-size: 0.8rem !important;
    }
    .search-shortcut {
        display: none !important;
    }
    .user-nav-avatar {
        width: 32px !important;
        height: 32px !important;
    }
    .user-avatar-icon {
        width: 16px !important;
        height: 16px !important;
    }
    .container-fluid.px-4 {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
    .main-content {
        padding-bottom: 40px !important;
    }
}

@media (max-width: 400px) {
    .search-container {
        max-width: 100% !important;
    }
    .header-icon-link {
        width: 32px !important;
        height: 32px !important;
    }
    .header-icon-link svg, .header-icon-link i {
        width: 16px !important;
        height: 16px !important;
    }
}

/* 2. Notification Dropdown Mobile Tuning */
@media (max-width: 480px) {
    .notif-dropdown {
        width: 290px !important;
        position: fixed !important;
        left: 15px !important;
        right: 15px !important;
        margin-top: 10px !important;
        z-index: 999999 !important;
    }
}

/* 3. Mobile Sidebar 3D Transforms (Ultra-Smooth Animation) */
@media (max-width: 991px) {
    .sidebar {
        position: fixed !important;
        top: 0 !important;
        bottom: 0 !important;
        width: 280px !important;
        height: 100vh !important;
        z-index: 999999 !important;
        background: var(--bg-sidebar) !important;
        transform: translate3d(100%, 0, 0) !important;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        box-shadow: none !important;
    }
    [dir="ltr"] .sidebar {
        transform: translate3d(-100%, 0, 0) !important;
    }
    .sidebar.show {
        transform: translate3d(0, 0, 0) !important;
        box-shadow: 0 0 40px rgba(0, 0, 0, 0.15) !important;
    }
}

/* 4. GPA Calculator Table Responsive Preservation */
.table-responsive {
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    border-radius: 8px;
}

@media (max-width: 768px) {
    #grades-table {
        min-width: 720px !important;
        width: 720px !important;
    }
    /* Disable aggressive font and padding shrinking since table scrolls horizontally */
    #grades-table th, #grades-table td {
        font-size: 0.85rem !important;
        padding: 8px 10px !important;
    }
    #grades-table .minimal-input,
    #grades-table .input-minimal-group,
    #grades-table .grade-input-wrapper {
        height: 36px !important;
        min-height: 36px !important;
        font-size: 0.88rem !important;
        padding: 4px 6px !important;
    }
}

/* 5. Mobile Layout Column Adjustments & Spacings */
@media (max-width: 991px) {
    .stages-row {
        gap: 20px !important;
    }
    .stage-card {
        margin-bottom: 0 !important;
    }
}

/* 6. Color Palette Accent Switcher Styles */
.palette-dropdown {
    width: 180px !important;
    padding: 10px !important;
    border-radius: 16px !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08) !important;
    margin-top: 10px !important;
}

[data-bs-theme="dark"] .palette-dropdown,
body.dark-mode .palette-dropdown {
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    background: rgba(15, 23, 42, 0.85) !important;
}

.palette-header {
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    color: #64748b !important;
    margin-bottom: 8px !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
    padding-bottom: 4px !important;
}

[data-bs-theme="dark"] .palette-header,
body.dark-mode .palette-header {
    color: #94a3b8 !important;
    border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

.palette-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px !important;
    justify-items: center !important;
}

.palette-color-btn {
    width: 28px !important;
    height: 28px !important;
    border-radius: 50% !important;
    border: 2px solid #ffffff !important;
    cursor: pointer !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
    outline: none !important;
    padding: 0 !important;
}

[data-bs-theme="dark"] .palette-color-btn,
body.dark-mode .palette-color-btn {
    border-color: #1e293b !important;
}

.palette-color-btn:hover {
    transform: scale(1.15) !important;
}

.palette-color-btn.active {
    transform: scale(1.1) !important;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.4) !important;
    border-color: #ffffff !important;
}

[data-bs-theme="dark"] .palette-color-btn.active,
body.dark-mode .palette-color-btn.active {
    border-color: #0f172a !important;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.4) !important;
}

/* 7. Accent Color Dynamic CSS Variable Bindings */
:root {
    --bs-primary: #2563eb;
    --bs-primary-rgb: 37, 99, 235;
}

/* Dynamic Accent Styles Overrides */
.text-primary, 
.hover-primary:hover,
a.text-primary:hover,
a.text-primary:focus {
    color: var(--bs-primary) !important;
}

.btn-primary {
    background-color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
    filter: brightness(0.92) !important;
}

.dot-sep {
    color: var(--bs-primary) !important;
}

.sidebar-nav .nav-link.active {
    background-color: rgba(var(--bs-primary-rgb), 0.08) !important;
    color: var(--bs-primary) !important;
    border-inline-start: 4px solid var(--bs-primary) !important;
}

.sidebar-nav .nav-link.active i {
    color: var(--bs-primary) !important;
}

.search-input-group:focus-within {
    border-color: var(--bs-primary) !important;
}

.badge-soon,
.level-badge {
    background-color: rgba(var(--bs-primary-rgb), 0.08) !important;
    color: var(--bs-primary) !important;
}

/* Confetti primary color theme sync can also read this */izontally */
    #grades-table th, #grades-table td {
        font-size: 0.85rem !important;
        padding: 8px 10px !important;
    }
    #grades-table .minimal-input, 
    #grades-table .input-minimal-group,
    #grades-table .grade-input-wrapper {
        height: 36px !important;
        min-height: 36px !important;
        font-size: 0.88rem !important;
        padding: 4px 6px !important;
    }
}

/* 5. Mobile Layout Column Adjustments & Spacings */
@media (max-width: 991px) {
    .stages-row {
        gap: 20px !important;
    }
    .stage-card {
        margin-bottom: 0 !important;
    }
}




/* ==========================================================================
   Comprehensive Dynamic Accent Color Overrides
   (Fixing hardcoded colors from style.css & madrassa.css)
   ========================================================================== */

/* Brand Logo & Subtitle */
.brand-logo,
.btn-icon-box {
    background: var(--bs-primary) !important;
    box-shadow: 0 4px 12px rgba(var(--bs-primary-rgb), 0.3) !important;
}

.brand-text-sub {
    color: var(--bs-primary) !important;
    background: rgba(var(--bs-primary-rgb), 0.1) !important;
}

[data-bs-theme="dark"] .brand-text-sub,
body.dark-mode .brand-text-sub {
    background: rgba(var(--bs-primary-rgb), 0.2) !important;
    color: var(--bs-primary) !important;
}

/* Banners & Gradients */
.hero-banner,
.level-header-final {
    /* background: var(--bs-primary) !important; */
    /* background: linear-gradient(135deg, var(--bs-primary) 0%, rgba(var(--bs-primary-rgb), 0.7) 100%) !important; */
    background: linear-gradient(150deg, var(--bs-primary) 0%, 
color-mix(in srgb, var(--bs-primary) 50%, #000000) 100%) !important;
}

.text-gradient {
    background: linear-gradient(135deg, rgba(var(--bs-primary-rgb), 0.7) 0%, var(--bs-primary) 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

.progress-fill-glow,
.term-id-1 .term-icon-box {
    background: linear-gradient(90deg, var(--bs-primary), rgba(var(--bs-primary-rgb), 0.7)) !important;
    box-shadow: 0 0 10px rgba(var(--bs-primary-rgb), 0.3) !important;
}

.btn-premium-soft {
    background: linear-gradient(180deg, var(--bs-primary) 0%, rgba(var(--bs-primary-rgb), 0.7) 100%) !important;
}
.btn-premium-soft:hover {
    background: linear-gradient(180deg, rgba(var(--bs-primary-rgb), 0.7) 0%, var(--bs-primary) 100%) !important;
}

/* Fix text contrast in banners */
.level-header-final p,
.level-header-final span,
.level-header-final a,
.level-header-final h1,
.level-header-final h5,
.level-header-final .level-description,
.hero-banner .hero-title,
.hero-banner .hero-subtitle {color: #ffff;}
.level-header-final .breadcrumb-glass a,
.level-header-final .breadcrumb-glass i,
.level-header-final .breadcrumb-nav-pill a {
    color: rgba(255, 255, 255, 0.85) !important;
}

/* Viewer & Subject Page (PDF Viewer actions, headers) */
.top-nav-segmented,
.header-info-bar,
.btn-submit-comment,
#comments-modal .modal-header,
.action-btn-primary {
    background: var(--bs-primary) !important;
}

.bottom-action-bar {
    background: rgba(var(--bs-primary-rgb), 0.9) !important;
}

.comment-textarea:focus {
    border-color: var(--bs-primary) !important;
}

.comment-user-avatar {
    color: var(--bs-primary) !important;
    background: rgba(var(--bs-primary-rgb), 0.1) !important;
}

.user-avatar-icon {
    color: var(--bs-primary) !important;
}

/* Interactions */
.active-like {
    color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
}
.active-like i, .active-like svg {
    fill: var(--bs-primary) !important;
    stroke: var(--bs-primary) !important;
}

.recommendation-pill:hover {
    background: rgba(var(--bs-primary-rgb), 0.08) !important;
    border-color: var(--bs-primary) !important;
    color: var(--bs-primary) !important;
}

.user-dropdown-item:hover,
.search-autocomplete-item:hover,
.search-autocomplete-item.active {
    background-color: rgba(var(--bs-primary-rgb), 0.08) !important;
    color: var(--bs-primary) !important;
}

[data-bs-theme="dark"] .search-autocomplete-item:hover,
[data-bs-theme="dark"] .search-autocomplete-item.active,
body.dark-mode .search-autocomplete-item:hover,
body.dark-mode .search-autocomplete-item.active {
    background: rgba(var(--bs-primary-rgb), 0.15) !important;
    color: var(--bs-primary) !important;
}

.search-autocomplete-icon-box {
    background: rgba(var(--bs-primary-rgb), 0.1) !important;
    color: var(--bs-primary) !important;
}
[data-bs-theme="dark"] .search-autocomplete-icon-box,
body.dark-mode .search-autocomplete-icon-box {
    background: rgba(var(--bs-primary-rgb), 0.2) !important;
    color: var(--bs-primary) !important;
}

.search-autocomplete-spinner {
    border: 2.5px solid rgba(var(--bs-primary-rgb), 0.1) !important;
    border-top-color: var(--bs-primary) !important;
}

/* Cards & Bubbles */
.subject-card-final:hover {
    box-shadow: 0 12px 25px rgba(var(--bs-primary-rgb), 0.15) !important;
    border-color: rgba(var(--bs-primary-rgb), 0.3) !important;
}
[data-bs-theme="dark"] .subject-card-final:hover,
body.dark-mode .subject-card-final:hover {
    border-color: var(--bs-primary) !important;
}

.subject-card-final:hover .tag-box-final {
    background: rgba(var(--bs-primary-rgb), 0.15) !important;
    color: var(--bs-primary) !important;
}
[data-bs-theme="dark"] .subject-card-final:hover .tag-box-final,
body.dark-mode .subject-card-final:hover .tag-box-final {
    background: var(--bs-primary) !important;
    color: #ffffff !important;
}

.level-card-premium:hover .level-card-title,
.level-card-premium:hover .explore-text {
    color: var(--bs-primary) !important;
}

.level-card-premium:hover .explore-icon-wrapper {
    background: var(--bs-primary) !important;
}

.explore-icon {
    color: var(--bs-primary);
}

.level-card-premium:hover .explore-icon {
    color: #ffffff !important;
}


.file-pill-modern {
    background: rgba(var(--bs-primary-rgb), 0.1) !important;
    color: var(--bs-primary) !important;
    border-color: rgba(var(--bs-primary-rgb), 0.2) !important;
}

.subject-bubble:hover,
.calc-tab-btn.active {
    background: var(--bs-primary) !important;
    color: #ffffff !important;
    border-color: var(--bs-primary) !important;
    box-shadow: 0 8px 15px rgba(var(--bs-primary-rgb), 0.25) !important;
}

.level-card-premium:hover .subject-bubble {
    border-color: rgba(var(--bs-primary-rgb), 0.3) !important;
}

.term-card:hover .term-arrow-box,
.btn-view-circle:hover {
    background: var(--bs-primary) !important;
    color: #fff !important;
    border-color: var(--bs-primary) !important;
}

.sujet-list-item:hover .icon-box,
.sujet-list-item:hover .btn-view-circle {
    background-color: rgba(var(--bs-primary-rgb), 0.08) !important;
    border-color: rgba(var(--bs-primary-rgb), 0.2) !important;
    color: var(--bs-primary) !important;
}
.sujet-list-item:hover .icon-box i {
    color: var(--bs-primary) !important;
}

/* Related Items (Sujets) */
.related-item-new.active {
    background-color: rgba(var(--bs-primary-rgb), 0.06) !important;
    border-inline-end: 4px solid var(--bs-primary) !important;
    color: var(--bs-primary) !important;
}
[dir="rtl"] .related-item-new.active {
    border-inline-end: 4px solid var(--bs-primary) !important;
}
.related-item-new.active .item-title-text,
.related-item-new.active .file-icon-wrapper-new {
    color: var(--bs-primary) !important;
}
.related-item-new.active .file-icon-wrapper-new {
    background: rgba(var(--bs-primary-rgb), 0.15) !important;
}

[data-bs-theme="dark"] .related-item-new.active,
body.dark-mode .related-item-new.active {
    background-color: rgba(var(--bs-primary-rgb), 0.15) !important;
    border-color: var(--bs-primary) !important;
    color: var(--bs-primary) !important;
}

/* Misc Inputs & Pagination */
.large-input .minimal-input:focus,
.filter-select:focus {
    border-color: var(--bs-primary) !important;
    box-shadow: 0 0 0 4px rgba(var(--bs-primary-rgb), 0.15) !important;
}

.pagination-rounded .page-item.active .page-link,
.tab-link.active,
[data-bs-theme="dark"] .tab-link.active,
body.dark-mode .tab-link.active {
    background-color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .pagination-rounded .page-item.active .page-link,
body.dark-mode .pagination-rounded .page-item.active .page-link {
    background-color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
    box-shadow: 0 4px 12px rgba(var(--bs-primary-rgb), 0.3) !important;
}

/* Prevent flex items in ticker from shrinking or wrapping */
.ticker-item-glass {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}
.ticker-set {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
}





/* Modern Ticker Design */
.news-ticker-modern {
    background: #ffffff;
    border-radius: 10px;
    padding: 12px 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}
[data-bs-theme="dark"] .news-ticker-modern,
body.dark-mode .news-ticker-modern {
    background: #1e293b;
    border-color: rgba(255,255,255,0.05);
}
.ticker-label-modern {
    flex-shrink: 0;
    z-index: 2;
    background: #ffffff;
    padding-inline-end: 12px;
}
[data-bs-theme="dark"] .ticker-label-modern,
body.dark-mode .ticker-label-modern {
    background: #1e293b;
}
.ticker-divider {
    width: 1px;
    height: 24px;
    background: rgba(0,0,0,0.1);
    margin-inline-end: 16px;
    flex-shrink: 0;
}
[data-bs-theme="dark"] .ticker-divider,
body.dark-mode .ticker-divider {
    background: rgba(255,255,255,0.1);
}
.blinking-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #ef4444;
    box-shadow: 0 0 6px #ef4444;
    animation: blinker 1.5s linear infinite;
    margin-inline-end: 8px;
}
.ticker-item-modern {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}
.ticker-content-modern {
    mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
}
.ticker-track-modern {
    animation: scrollTickerModern 25s linear infinite;
    width: fit-content;
}
.ticker-track-modern:hover {
    animation-play-state: paused !important;
}
.news-ticker-modern:hover .ticker-track-modern {
    animation-play-state: paused !important;
}
@keyframes scrollTickerModern {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
[dir="rtl"] .ticker-track-modern {
    animation: scrollTickerModernRtl 25s linear infinite;
}
@keyframes scrollTickerModernRtl {
    0% { transform: translateX(0); }
    100% { transform: translateX(50%); }
}

/* ==========================================================================
   Home Page Enhancements
   ========================================================================== */

/* Hero Search Bar */
.hero-search-wrapper {
    max-width: 650px;
    margin: 30px auto 0;
    position: relative;
    z-index: 10;
}
.hero-search-input {
    width: 100%;
    padding: 20px 25px 20px 60px;
    border-radius: 50px;
    border: none;
    font-size: 1.1rem;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}
[dir="rtl"] .hero-search-input {
    padding: 20px 60px 20px 25px;
}
.hero-search-input:focus {
    outline: none;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}
.hero-search-icon {
    position: absolute;
    top: 50%;
    left: 25px;
    transform: translateY(-50%);
    color: var(--bs-primary);
    width: 24px;
    height: 24px;
}
[dir="rtl"] .hero-search-icon {
    left: auto;
    right: 25px;
}
.hero-search-results {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    z-index: 20;
    display: none;
}
[data-bs-theme="dark"] .hero-search-results,
[data-bs-theme="dark"] .hero-search-input {
    background: rgba(30, 41, 59, 0.95);
    color: #f8fafc;
}
.hero-search-results.active {
    display: block;
    animation: fadeInDown 0.3s ease forwards;
}

/* Daily Tip Glass Card */
.daily-tip-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
}
.daily-tip-card:hover {
    transform: translateY(-3px);
}
[data-bs-theme="dark"] .daily-tip-card {
    background: rgba(30, 41, 59, 0.7);
    border-color: rgba(255, 255, 255, 0.05);
}
.tip-icon-box {
    width: 45px;
    height: 45px;
    background: rgba(var(--bs-primary-rgb), 0.1);
    color: var(--bs-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.tip-content {
    flex: 1;
}
.tip-title {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--bs-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}
.tip-text {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.5;
}

/* Stats Counter */
.stats-section {
    padding: 40px 0;
    position: relative;
}
.stat-box {
    text-align: center;
    padding: 25px 15px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s ease;
}
.stat-box:hover {
    transform: translateY(-5px);
}
[data-bs-theme="dark"] .stat-box {
    background: #1e293b;
}
.stat-icon {
    width: 60px;
    height: 60px;
    background: rgba(var(--bs-primary-rgb), 0.1);
    color: var(--bs-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
}
.stat-icon i {
    width: 28px;
    height: 28px;
}
.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1;
    margin-bottom: 5px;
}
.stat-label {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Latest Files Grid */
.latest-files-section {
    padding: 40px 0;
}
.section-heading-modern {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
}
.heading-icon {
    width: 40px;
    height: 40px;
    background: rgba(var(--bs-primary-rgb), 0.1);
    color: var(--bs-primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.heading-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0;
}
.latest-file-card {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.latest-file-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
}
[data-bs-theme="dark"] .latest-file-card {
    background: #1e293b;
}
.file-meta-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}
.file-type-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    background: rgba(var(--bs-primary-rgb), 0.1);
    color: var(--bs-primary);
}
.file-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}
.file-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.file-footer-meta {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px dashed rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 15px;
}
[data-bs-theme="dark"] .file-footer-meta {
    border-color: rgba(255, 255, 255, 0.05);
}
.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.meta-item i {
    width: 14px;
    height: 14px;
}

/* Horizontal Roadmap Style for Stages */
.roadmap-container {
    position: relative;
    padding: 20px 0 40px;
}
.roadmap-line {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, rgba(var(--bs-primary-rgb), 0.1), var(--bs-primary), rgba(var(--bs-primary-rgb), 0.1));
    transform: translateY(-50%);
    z-index: 1;
    opacity: 0.5;
}
.roadmap-node {
    position: relative;
    z-index: 2;
    background: var(--bg-body);
    border-radius: 24px;
    transition: transform 0.3s ease;
}
.roadmap-node:hover {
    transform: translateY(-10px);
}
.roadmap-dot {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 24px;
    background: #fff;
    border: 4px solid var(--bs-primary);
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(var(--bs-primary-rgb), 0.2);
    z-index: 3;
}
[data-bs-theme="dark"] .roadmap-dot {
    background: #1e293b;
}
@media (max-width: 991px) {
    .roadmap-line {
        display: none;
    }
    .roadmap-dot {
        display: none;
    }
    .roadmap-node:hover {
        transform: translateY(-5px);
    }
}

/* Fix Breadcrumb Separator Encoding Issue */
.breadcrumb-item + .breadcrumb-item::before {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    content: "\f053" !important; /* chevron-left */
    font-size: 0.75rem;
    vertical-align: middle;
    color: inherit;
    opacity: 0.6;
    padding-right: 0.5rem;
    padding-left: 0.5rem;
}
[dir="ltr"] .breadcrumb-item + .breadcrumb-item::before {
    content: "\f054" !important; /* chevron-right */
}


/* Custom Header Overrides */
.search-container { max-width: 600px !important; }
@media (max-width: 991px) { .search-container { max-width: 100% !important; } }
.ticker-content-modern { min-width: 0; display: block; position: relative; }
@media (max-width: 576px) { .ticker-track-modern { width: max-content !important; min-width: 100%; display: flex !important; } }

/* ---- CSS from templates/Themes/Madrassa/Subjects/view.php ---- */
.pointer-events-none { pointer-events: none !important; }

/* Desktop base for Skeleton */
.mobile-skeleton-overlay {
    align-items: center;
}
.mobile-skeleton-left {
    width: 75%;
}

@media (max-width: 768px) {
    /* Mobile Layout Fixes for Subject Items */
    .sujet-item {
        flex-direction: column !important;
        align-items: flex-start !important;
        padding: 1rem !important;
        height: auto !important;
    }
    
    /* Skeleton Layout Fixes for Mobile */
    .mobile-skeleton-overlay {
        flex-direction: column !important;
        align-items: flex-start !important;
        height: 100% !important;
    }
    .mobile-skeleton-left {
        width: 100% !important;
        margin-bottom: 0.75rem !important;
    }
    .mobile-skeleton-right {
        width: 100% !important;
        justify-content: flex-end !important;
    }
    
    .mobile-click-layer {
        z-index: 1 !important;
    }
    
    .mobile-right-side {
        width: 100% !important;
        margin-bottom: 0.35rem !important;
    }
    
    .mobile-title-wrap h6 {
        white-space: normal !important;
        line-height: 1.4 !important;
        word-break: break-word !important;
    }
    
    .mobile-left-side {
        width: 100% !important;
        justify-content: flex-start !important;
        margin-top: 0 !important;
        z-index: 2 !important;
    }
    
    .mobile-action-btn {
        position: relative !important;
        z-index: 3 !important;
    }
}

/* ---- CSS from templates/Themes/Madrassa/Sujets/view.php ---- */
/* Improve background contrast for older monitors globally */
body {
    background-color: #f0f2f5 !important;
}

/* Unify interaction and social buttons globally */
.interaction-btn-circle, .social-icons a {
    width: 42px !important;
    height: 42px !important;
    display: inline-flex !important;
    justify-content: center !important;
    padding: 0 !important;
    position: relative !important;
}
.interaction-btn-circle i {
    width: 20px !important;
    height: 20px !important;
    margin: 0 !important;
}
.social-icons a {
    font-size: 1.25rem !important;
}
.interaction-btn-circle .comment-badge {
    position: absolute !important;
    top: -5px !important;
    right: -5px !important;
    background: #ef4444 !important;
    color: white !important;
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    padding: 2px 6px !important;
    border-radius: 50px !important;
    border: 2px solid #fff !important;
    line-height: 1 !important;
    min-width: 20px !important;
    text-align: center !important;
}
/* Positive action (Like) badge color */
.btn-like .comment-badge {
    background: var(--bs-primary) !important;
}

@media (max-width: 768px) {
    /* Fix missing arrows and date on mobile header */
    .header-title-text {
        overflow: hidden;
    }
    .header-title-text .title-main {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 0.85rem !important;
        max-width: 180px;
    }
    .year-badge-viewer {
        display: none !important;
    }
    .header-v-sep-inner {
        display: none !important;
    }
    .header-arrow {
        width: 40px !important;
        flex-shrink: 0;
    }
    .header-info-bar {
        padding: 0 5px !important;
    }

    /* Fix huge gap between PDF viewer and bottom buttons */
    .pdf-viewer-area {
        height: 60vh !important;
        min-height: 400px !important;
        max-height: 600px !important;
    }
}

