/* Custom Stylesheet for E-Learning SMK Muthia Harapan Cicalengka */
:root {
    --primary-color: #0D6EFD;
    --secondary-color: #198754;
    --warning-color: #FFC107;
    --danger-color: #DC3545;
    --bg-color: #F8F9FA;
    --card-radius: 15px;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    --text-color: #212529;
    --sidebar-width: 260px;
    --navbar-height: 70px;
}

[data-bs-theme="dark"] {
    --bg-color: #0f172a;
    --text-color: #f8fafc;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

body {
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

/* Navbar */
.app-navbar {
    height: var(--navbar-height);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    z-index: 1020;
}
[data-bs-theme="dark"] .app-navbar {
    background: rgba(15, 23, 42, 0.85);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* Responsive Navbar Dropdowns */
.notif-dropdown-menu {
    width: 360px;
    max-width: calc(100vw - 32px);
    max-height: 82vh;
    overflow-y: auto;
    scrollbar-width: thin;
}

.notif-dropdown-menu::-webkit-scrollbar {
    width: 5px;
}

.notif-dropdown-menu::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 999px;
}

.notif-item-desc {
    font-size: 0.78rem;
    line-height: 1.35;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 575.98px) {
    .app-navbar {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }
    .notif-dropdown-menu {
        position: fixed !important;
        top: calc(var(--navbar-height) + 6px) !important;
        left: 12px !important;
        right: 12px !important;
        width: auto !important;
        max-width: none !important;
        transform: none !important;
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25) !important;
    }
}

/* Sidebar Layout */
.app-sidebar {
    width: var(--sidebar-width);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    background: #ffffff;
    box-shadow: 2px 0 15px rgba(0,0,0,0.03);
    z-index: 1030;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
[data-bs-theme="dark"] .app-sidebar {
    background: #1e293b;
}

.main-content {
    margin-left: var(--sidebar-width);
    padding-top: calc(var(--navbar-height) + 24px) !important;
    padding-bottom: 40px;
    transition: margin-left 0.3s ease;
}

@media (max-width: 991.98px) {
    .app-sidebar {
        transform: translateX(-100%);
    }
    .main-content {
        margin-left: 0;
    }
    .app-sidebar.show {
        transform: translateX(0);
    }
}

/* Cards & Containers */
.card-custom {
    border: none;
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    background: #ffffff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
[data-bs-theme="dark"] .card-custom {
    background: #1e293b;
}
.card-custom:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.08);
}

/* Stat Cards */
.stat-card {
    border-radius: var(--card-radius);
    padding: 24px;
    color: #ffffff;
    position: relative;
    overflow: hidden;
}
.stat-card .icon {
    font-size: 3rem;
    position: absolute;
    right: 20px;
    bottom: 10px;
    opacity: 0.25;
}

/* Modern Buttons */
.btn {
    border-radius: 10px;
    padding: 10px 20px;
    font-weight: 600;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 8px;
}
@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Chat UI */
.chat-box {
    height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.chat-bubble {
    max-width: 75%;
    padding: 12px 18px;
    border-radius: 18px;
    font-size: 0.95rem;
    line-height: 1.4;
}
.chat-bubble.sent {
    background: var(--primary-color);
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}
.chat-bubble.received {
    background: #e2e8f0;
    color: #0f172a;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}
[data-bs-theme="dark"] .chat-bubble.received {
    background: #334155;
    color: #f8fafc;
}

/* ============== Sidebar Nav Section Titles ============== */
.nav-section-title {
    font-size: 0.62rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #94a3b8;
    padding: 12px 12px 4px 12px;
    list-style: none;
    pointer-events: none;
}
[data-bs-theme="dark"] .nav-section-title { color: #64748b; }

.app-sidebar .nav-link {
    font-size: 0.845rem;
    font-weight: 500;
    color: #475569;
    border-radius: 10px;
    padding: 8px 12px;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: 9px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
[data-bs-theme="dark"] .app-sidebar .nav-link { color: #94a3b8; }
.app-sidebar .nav-link:hover {
    background: rgba(13, 110, 253, 0.08);
    color: #0D6EFD;
}
.app-sidebar .nav-link.active {
    background: linear-gradient(135deg, #0D6EFD 0%, #0056d3 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(13,110,253,0.3);
}
.app-sidebar .nav-link i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}
.app-sidebar .overflow-auto::-webkit-scrollbar { width: 3px; }
.app-sidebar .overflow-auto::-webkit-scrollbar-track { background: transparent; }
.app-sidebar .overflow-auto::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

/* ============== Print Styles ============== */
@media print {
    .app-sidebar, .app-navbar, .no-print { display: none !important; }
    .main-content { margin-left: 0 !important; padding-top: 0 !important; }
}

/* ============== Library & E-Book Cards ============== */
.book-card { transition: transform 0.25s ease, box-shadow 0.25s ease; cursor: pointer; }
.book-card:hover { transform: translateY(-6px); box-shadow: 0 20px 40px rgba(0,0,0,0.12); }
.book-cover { object-fit: cover; height: 180px; width: 100%; border-radius: 10px 10px 0 0; }

/* ============== Rapor / Grade Table ============== */
.grade-table td, .grade-table th { padding: 10px 14px; vertical-align: middle; }
.predikat-badge { font-size: 1rem; font-weight: 800; padding: 5px 12px; border-radius: 8px; }

/* ============== Kartu Pelajar Digital ============== */
.kartu-wrapper { max-width: 380px; }
.kartu-pelajar {
    background: linear-gradient(135deg, #0D6EFD 0%, #0056d3 60%, #003d99 100%);
    border-radius: 20px;
    color: #fff;
    padding: 24px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(13,110,253,0.35);
}
.kartu-pelajar::before {
    content: '';
    position: absolute;
    top: -40px; right: -40px;
    width: 150px; height: 150px;
    border-radius: 50%;
    background: rgba(255,255,255,0.07);
}
.kartu-pelajar::after {
    content: '';
    position: absolute;
    bottom: -50px; left: -30px;
    width: 180px; height: 180px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
}

/* ============== Sertifikat Digital ============== */
.sertifikat-wrapper {
    border: 8px double #0D6EFD;
    border-radius: 20px;
    padding: 40px;
    position: relative;
    background: #fff;
}
[data-bs-theme="dark"] .sertifikat-wrapper { background: #1e293b; }

/* ============== Timeline (Kalender Akademik) ============== */
.timeline { position: relative; padding-left: 28px; }
.timeline::before { content: ''; position: absolute; left: 10px; top: 0; bottom: 0; width: 2px; background: #e2e8f0; }
[data-bs-theme="dark"] .timeline::before { background: #334155; }
.timeline-item { position: relative; margin-bottom: 20px; }
.timeline-dot { position: absolute; left: -24px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: #0D6EFD; border: 2px solid #fff; box-shadow: 0 0 0 3px rgba(13,110,253,.2); }

/* ============== Progress Bar Custom ============== */
.progress-custom { height: 10px; border-radius: 999px; }
.progress-custom .progress-bar { border-radius: 999px; }

/* ============== Badge Pill Large ============== */
.badge-pill-lg { padding: 8px 18px; border-radius: 999px; font-size: 0.85rem; font-weight: 600; }

/* ============== Landing Page Modern Styles & Misi Formatting ============== */
h1, h2, h3, h4, h5, h6, .font-heading {
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
    letter-spacing: -0.02em;
}

/* Clean Nav Link Styling for Landing Page */
#mainNavbar .nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9) !important;
    transition: opacity 0.2s ease, color 0.2s ease;
}
#mainNavbar .nav-link:hover {
    color: #ffffff !important;
    opacity: 1 !important;
}

.landing-navbar {
    transition: all 0.3s ease;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    background: rgba(15, 23, 42, 0.88) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.landing-navbar.scrolled {
    background: rgba(15, 23, 42, 0.96) !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.landing-hero {
    background: radial-gradient(circle at 80% 20%, rgba(13, 110, 253, 0.25) 0%, rgba(0, 0, 0, 0) 50%),
                linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0d1b3e 100%);
    position: relative;
    overflow: hidden;
}
.landing-hero::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -15%;
    width: 650px;
    height: 650px;
    background: radial-gradient(circle, rgba(255, 193, 7, 0.18) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
}
.landing-hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(13, 110, 253, 0.25) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

.glass-card {
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
}

.card-hover-effect {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(226, 232, 240, 0.8);
    background: #ffffff;
}
.card-hover-effect:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 25px 40px -15px rgba(13, 110, 253, 0.15);
    border-color: rgba(13, 110, 253, 0.4);
}

.icon-gradient-primary {
    background: linear-gradient(135deg, #0d6efd 0%, #0056d3 100%);
    color: #ffffff;
}
.icon-gradient-success {
    background: linear-gradient(135deg, #198754 0%, #146c43 100%);
    color: #ffffff;
}
.icon-gradient-warning {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    color: #212529;
}

/* Styled Lists for Misi & Visi Content */
.landing-misi-content {
    font-size: 0.95rem;
    color: #1e293b !important;
    line-height: 1.65;
}
.landing-misi-content ol {
    padding-left: 1.4rem;
    margin-bottom: 0.75rem;
    list-style-type: decimal;
}
.landing-misi-content ol[type="a"] {
    list-style-type: lower-alpha;
}
.landing-misi-content ol[type="A"] {
    list-style-type: upper-alpha;
}
.landing-misi-content ul {
    padding-left: 1.4rem;
    margin-bottom: 0.75rem;
    list-style-type: disc;
}
.landing-misi-content li {
    margin-bottom: 0.5rem;
    padding-left: 0.2rem;
    color: #1e293b !important;
}
.landing-misi-content li::marker {
    color: #0d6efd !important;
    font-weight: 700;
}
.landing-misi-content b, 
.landing-misi-content strong {
    font-weight: 700;
    color: #0f172a !important;
}
.landing-misi-content i, 
.landing-misi-content em {
    font-style: italic;
    color: #334155 !important;
}
.landing-misi-content u {
    text-decoration: underline;
/* ============== Library & E-Book Cards ============== */
.book-card { transition: transform 0.25s ease, box-shadow 0.25s ease; cursor: pointer; }
.book-card:hover { transform: translateY(-6px); box-shadow: 0 20px 40px rgba(0,0,0,0.12); }
.book-cover { object-fit: cover; height: 180px; width: 100%; border-radius: 10px 10px 0 0; }

/* ============== Rapor / Grade Table ============== */
.grade-table td, .grade-table th { padding: 10px 14px; vertical-align: middle; }
.predikat-badge { font-size: 1rem; font-weight: 800; padding: 5px 12px; border-radius: 8px; }

/* ============== Kartu Pelajar Digital ============== */
.kartu-wrapper { max-width: 380px; }
.kartu-pelajar {
    background: linear-gradient(135deg, #0D6EFD 0%, #0056d3 60%, #003d99 100%);
    border-radius: 20px;
    color: #fff;
    padding: 24px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(13,110,253,0.35);
}
.kartu-pelajar::before {
    content: '';
    position: absolute;
    top: -40px; right: -40px;
    width: 150px; height: 150px;
    border-radius: 50%;
    background: rgba(255,255,255,0.07);
}
.kartu-pelajar::after {
    content: '';
    position: absolute;
    bottom: -50px; left: -30px;
    width: 180px; height: 180px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
}

/* ============== Sertifikat Digital ============== */
.sertifikat-wrapper {
    border: 8px double #0D6EFD;
    border-radius: 20px;
    padding: 40px;
    position: relative;
    background: #fff;
}
[data-bs-theme="dark"] .sertifikat-wrapper { background: #1e293b; }

/* ============== Timeline (Kalender Akademik) ============== */
.timeline { position: relative; padding-left: 28px; }
.timeline::before { content: ''; position: absolute; left: 10px; top: 0; bottom: 0; width: 2px; background: #e2e8f0; }
[data-bs-theme="dark"] .timeline::before { background: #334155; }
.timeline-item { position: relative; margin-bottom: 20px; }
.timeline-dot { position: absolute; left: -24px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: #0D6EFD; border: 2px solid #fff; box-shadow: 0 0 0 3px rgba(13,110,253,.2); }

/* ============== Progress Bar Custom ============== */
.progress-custom { height: 10px; border-radius: 999px; }
.progress-custom .progress-bar { border-radius: 999px; }

/* ============== Badge Pill Large ============== */
.badge-pill-lg { padding: 8px 18px; border-radius: 999px; font-size: 0.85rem; font-weight: 600; }

/* ============== Landing Page Modern Styles & Misi Formatting ============== */
h1, h2, h3, h4, h5, h6, .font-heading {
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
    letter-spacing: -0.02em;
}

/* Clean Nav Link Styling for Landing Page */
#mainNavbar .nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9) !important;
    transition: opacity 0.2s ease, color 0.2s ease;
}
#mainNavbar .nav-link:hover {
    color: #ffffff !important;
    opacity: 1 !important;
}

.landing-navbar {
    transition: all 0.3s ease;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    background: rgba(15, 23, 42, 0.88) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.landing-navbar.scrolled {
    background: rgba(15, 23, 42, 0.96) !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.landing-hero {
    background: radial-gradient(circle at 80% 20%, rgba(13, 110, 253, 0.25) 0%, rgba(0, 0, 0, 0) 50%),
                linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0d1b3e 100%);
    position: relative;
    overflow: hidden;
}
.landing-hero::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -15%;
    width: 650px;
    height: 650px;
    background: radial-gradient(circle, rgba(255, 193, 7, 0.18) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
}
.landing-hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(13, 110, 253, 0.25) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

.glass-card {
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
}

.card-hover-effect {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(226, 232, 240, 0.8);
    background: #ffffff;
}
.card-hover-effect:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 25px 40px -15px rgba(13, 110, 253, 0.15);
    border-color: rgba(13, 110, 253, 0.4);
}

.icon-gradient-primary {
    background: linear-gradient(135deg, #0d6efd 0%, #0056d3 100%);
    color: #ffffff;
}
.icon-gradient-success {
    background: linear-gradient(135deg, #198754 0%, #146c43 100%);
    color: #ffffff;
}
.icon-gradient-warning {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    color: #212529;
}

/* Styled Lists for Misi & Visi Content (Presisi Justify Alignment) */
.landing-misi-content {
    font-size: 0.95rem;
    color: #1e293b !important;
    line-height: 1.75 !important;
    text-align: justify !important;
    text-justify: inter-word !important;
}
.landing-misi-content p {
    margin-bottom: 0.75rem;
    line-height: 1.75 !important;
    color: #1e293b !important;
    text-align: justify !important;
    text-justify: inter-word !important;
}
.landing-misi-content ol {
    padding-left: 1.4rem;
    margin-bottom: 0.75rem;
    list-style-type: decimal;
}
.landing-misi-content ol[type="a"] {
    list-style-type: lower-alpha;
}
.landing-misi-content ol[type="A"] {
    list-style-type: upper-alpha;
}
.landing-misi-content ul {
    padding-left: 1.4rem;
    margin-bottom: 0.75rem;
    list-style-type: disc;
}
.landing-misi-content li {
    margin-bottom: 0.5rem;
    padding-left: 0.2rem;
    color: #1e293b !important;
    text-align: justify !important;
    text-justify: inter-word !important;
    line-height: 1.7 !important;
}
.landing-misi-content li::marker {
    color: #0d6efd !important;
    font-weight: 700;
}
.landing-misi-content b, 
.landing-misi-content strong {
    font-weight: 700;
    color: #0f172a !important;
}
.landing-misi-content i, 
.landing-misi-content em {
    font-style: italic;
    color: #334155 !important;
}
.landing-misi-content u {
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-color: #0d6efd !important;
    text-decoration-thickness: 2px;
    color: #0f172a !important;
}

.guru-card-img {
    width: 84px !important;
    height: 84px !important;
    max-width: 84px !important;
    max-height: 84px !important;
    object-fit: cover !important;
    border-radius: 50% !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12) !important;
    border: 3px solid #ffffff !important;
    transition: transform 0.3s ease !important;
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.guru-card-img:hover {
    transform: scale(1.08) !important;
}

.border-dashed {
    border-style: dashed !important;
}

/* ==========================================================================
   Forum Diskusi - Modern Design System & Premium Styling
   ========================================================================== */
.forum-hero-banner {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 40%, #312e81 70%, #4338ca 100%);
    border-radius: 24px;
    color: #ffffff;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(30, 27, 75, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.forum-hero-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -15%;
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.4) 0%, rgba(139, 92, 246, 0.15) 50%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
    animation: floatGlow 8s ease-in-out infinite alternate;
}

@keyframes floatGlow {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-20px, 20px) scale(1.08); }
}

.forum-hero-stat-chip {
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 50px;
    padding: 6px 18px;
    font-size: 0.825rem;
    font-weight: 600;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.25s ease;
}

.forum-hero-stat-chip:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: translateY(-1px);
}

.forum-search-box {
    background: #ffffff;
    border-radius: 50px;
    padding: 6px 8px 6px 22px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1.5px solid #e2e8f0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-bs-theme="dark"] .forum-search-box {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.12);
}

.forum-search-box:focus-within {
    border-color: #6366f1;
    box-shadow: 0 12px 35px rgba(99, 102, 241, 0.22);
    transform: translateY(-1px);
}

.forum-search-box input {
    border: none;
    background: transparent;
    outline: none;
    box-shadow: none;
    font-size: 0.925rem;
    color: #1e293b;
}

[data-bs-theme="dark"] .forum-search-box input {
    color: #f8fafc;
}

.forum-filter-chip {
    border-radius: 50px;
    padding: 8px 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

[data-bs-theme="dark"] .forum-filter-chip {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.08);
    color: #94a3b8;
}

.forum-filter-chip:hover {
    color: #4f46e5;
    background: #e0e7ff;
    border-color: #c7d2fe;
    transform: translateY(-2px);
}

.forum-filter-chip.active {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    color: #ffffff !important;
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.35);
    border-color: transparent;
}

/* Forum Hero Banner Upgrade */
.forum-hero-banner {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 35%, #312e81 70%, #4338ca 100%) !important;
    color: #ffffff !important;
    border-radius: 28px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.forum-hero-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.3) 0%, rgba(0, 0, 0, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

.forum-hero-stat-chip {
    background: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50px;
    padding: 6px 18px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.25s ease;
}

.forum-hero-stat-chip:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    transform: translateY(-2px);
}

/* Forum Topic Card Overhaul */
.forum-topic-card {
    background: #ffffff;
    border-radius: 24px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden !important;
    word-wrap: break-word;
    word-break: break-word;
}

[data-bs-theme="dark"] .forum-topic-card {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.forum-topic-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #4f46e5, #ec4899);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.forum-topic-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.16);
    border-color: rgba(99, 102, 241, 0.4);
}

.forum-topic-card:hover::after {
    opacity: 1;
}

.avatar-ring {
    position: relative;
    border-radius: 50%;
    padding: 2px;
}

.avatar-ring-admin {
    background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
    box-shadow: 0 4px 14px rgba(168, 85, 247, 0.35);
}

.avatar-ring-guru {
    background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
}

.avatar-ring-siswa {
    background: linear-gradient(135deg, #10b981 0%, #14b8a6 100%);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.avatar-inner {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    color: #312e81;
    overflow: hidden;
    padding: 0;
}

.avatar-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

[data-bs-theme="dark"] .avatar-inner {
    background: #0f172a;
    color: #e0e7ff;
}

/* /* Image Attachment Wrapper - Full View Uncropped */
.forum-image-preview-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100% !important;
    max-height: 350px !important;
    border-radius: 16px;
    overflow: hidden !important;
    cursor: pointer;
    border: 1px solid rgba(226, 232, 240, 0.9);
    background: #f1f5f9;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

[data-bs-theme="dark"] .forum-image-preview-wrapper {
    background: #0f172a;
    border-color: rgba(255, 255, 255, 0.08);
}

.forum-image-preview-wrapper:hover {
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.25);
    border-color: #6366f1;
}

.forum-image-preview-wrapper img {
    width: 100% !important;
    height: auto !important;
    max-height: 340px !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 auto !important;
    border-radius: 14px;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.forum-image-preview-wrapper:hover img {
    transform: scale(1.03);
}

@media (max-width: 768px) {
    .forum-image-preview-wrapper {
        max-height: 260px !important;
    }
    .forum-image-preview-wrapper img {
        height: auto !important;
        max-height: 250px !important;
    }
}


.forum-image-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    transition: opacity 0.25s ease;
}

.forum-image-overlay .lens-icon-btn {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.25);
    border: 1.5px solid rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.forum-image-preview-wrapper:hover .forum-image-overlay {
    opacity: 1;
}

.forum-image-preview-wrapper:hover .lens-icon-btn {
    transform: scale(1.12);
}

.btn-emoji-react {
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-emoji-react:hover {
    transform: translateY(-2px) scale(1.12);
}

.btn-emoji-react:active {
    transform: scale(0.92);
}

/* Comment Thread Item Styling */
.comment-card-item {
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid rgba(226, 232, 240, 0.85);
    border-left: 5px solid #6366f1 !important;
    padding: 20px 24px;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

[data-bs-theme="dark"] .comment-card-item {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.08);
}

.comment-card-item:hover {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

/* Lightbox Modal Styling */
.lightbox-modal .modal-content {
    background: rgba(15, 23, 42, 0.96) !important;
    color: #ffffff !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 24px !important;
}

.lightbox-modal img {
    max-height: 75vh !important;
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 auto !important;
    border-radius: 14px !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6) !important;
}

/* Sidebar & Multi-Column Grid Components */
.forum-sidebar-card {
    background: #ffffff;
    border-radius: 24px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.03);
    overflow: hidden;
    transition: all 0.25s ease;
}

[data-bs-theme="dark"] .forum-sidebar-card {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.08);
}

.forum-sidebar-card .card-header {
    background: transparent;
    border-bottom: 1px solid rgba(226, 232, 240, 0.7);
    padding: 18px 22px;
}

[data-bs-theme="dark"] .forum-sidebar-card .card-header {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.trending-topic-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 16px;
    transition: background-color 0.2s ease, transform 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.trending-topic-item:hover {
    background: #f1f5f9;
    transform: translateX(4px);
    color: inherit;
}

[data-bs-theme="dark"] .trending-topic-item:hover {
    background: #334155;
}

.trending-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #e0e7ff;
    color: #4338ca;
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mapel-tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    background: #f1f5f9;
    color: #475569;
    font-size: 0.82rem;
    font-weight: 600;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
}

.mapel-tag-chip:hover {
    background: #4f46e5;
    color: #ffffff;
    border-color: #4f46e5;
    transform: translateY(-2px);
}

.forum-grid-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.forum-grid-card .forum-topic-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Comment Thread Role Accents */
.comment-card-guru {
    border-left: 5px solid #f59e0b !important;
    background: #fffdf5 !important;
}

[data-bs-theme="dark"] .comment-card-guru {
    background: #451a03 !important;
}

.comment-card-admin {
    border-left: 5px solid #a855f7 !important;
    background: #faf5ff !important;
}

[data-bs-theme="dark"] .comment-card-admin {
    background: #2e1065 !important;
}

.comment-card-siswa {
    border-left: 5px solid #10b981 !important;
    background: #ffffff !important;
}

/* Comment Number & Quote Badge */
.comment-number-badge {
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
    background: #f1f5f9;
    padding: 3px 10px;
    border-radius: 12px;
}

/* Floating Actions Styling */
.forum-floating-actions {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.floating-btn-reply {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    box-shadow: 0 10px 28px rgba(79, 70, 229, 0.45);
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.floating-btn-reply:hover {
    transform: scale(1.12) translateY(-2px);
    box-shadow: 0 14px 35px rgba(79, 70, 229, 0.55);
    color: #ffffff;
}

.floating-btn-top {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #ffffff;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12);
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.25s ease;
}

.floating-btn-top:hover {
    background: #f8fafc;
    transform: translateY(-2px);
    color: #4f46e5;
}

.comment-quote-btn {
    font-size: 0.72rem;
    padding: 3px 12px;
    border-radius: 14px;
    transition: all 0.2s ease;
}

.comment-quote-btn:hover {
    background: #6366f1;
    color: #ffffff;
}

