:root {
    /* Color Palette */
    --primary: #004d3d; /* Logo Green */
    --primary-light: #006b54;
    --primary-dark: #003328;
    --secondary: #c5a022; /* Logo Gold */
    --accent: #1a2b48; /* Logo Navy */
    --danger: #e63946; /* Logo Red */
    --success: #2d6a4f;
    --warning: #fca311;
    --info: #00b4d8;

    /* Backgrounds */
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --bg-sidebar: #ffffff;
    --bg-topbar: rgba(255, 255, 255, 0.8);
    
    /* Text */
    --text-main: #1e293b;
    --text-muted: #64748b;
    --text-on-primary: #ffffff;
    
    /* Borders & Shadows */
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    
    /* Layout Constants */
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 80px;
    --topbar-height: 70px;
    --transition-speed: 0.3s;
    --border-radius: 16px;
    --border-radius-sm: 8px;
    --border-radius-lg: 24px;

    /* Glassmorphism Defaults */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-blur: 12px;
}

[data-theme="dark"] {
    --bg-body: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.7);
    --bg-sidebar: #1e293b;
    --bg-topbar: rgba(15, 23, 42, 0.8);
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.1);
    --glass-bg: rgba(15, 23, 42, 0.7);
    --glass-border: rgba(255, 255, 255, 0.05);
}

/* Glassmorphism Utility */
.glass {
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(var(--glass-blur));
    backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-md);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.5;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* --- Preloader --- */
#preloader {
    position: fixed;
    inset: 0;
    background-color: #ffffff;
    background-image: 
        radial-gradient(at 0% 0%, rgba(0, 77, 61, 0.03) 0, transparent 50%), 
        radial-gradient(at 50% 0%, rgba(197, 160, 34, 0.03) 0, transparent 50%), 
        radial-gradient(at 100% 0%, rgba(0, 77, 61, 0.03) 0, transparent 50%);
    background-size: 200% 200%;
    animation: flowBG 15s ease infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

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

.preloader-inner {
    text-align: center;
    cursor: pointer;
}

.preloader-logo, #splashLogoTrigger, .clickable-splash-logo {
    width: 380px;
    height: auto;
    margin-bottom: 20px;
    animation: pulse 2s infinite ease-in-out;
    cursor: pointer !important;
    pointer-events: auto !important;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.preloader-logo:hover, #splashLogoTrigger:hover, .clickable-splash-logo:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 10px 20px rgba(0, 77, 61, 0.25));
}

[data-theme="dark"] .sidebar-logo {
    background: #e2e8f0;
    padding: 4px 6px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] .sidebar-logo img {
    filter: none;
}

[data-theme="dark"] .preloader-logo {
    mix-blend-mode: normal;
    filter: none;
    background: none;
}

.preloader-text {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--primary);
    margin-bottom: 10px;
}

.preloader-text i,
.home-title i,
.home-definition i,
.corpu-gold-italic {
    font-style: italic;
    color: var(--secondary);
}

.preloader-bar {
    width: 300px;
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    margin: 0 auto 15px;
    overflow: hidden;
}

.preloader-bar-fill {
    height: 100%;
    width: 0;
    background: var(--primary);
    animation: load 2s infinite ease-in-out;
}

.preloader-tagline {
    font-size: 1rem;
    color: var(--text-muted);
    letter-spacing: 4px;
    text-transform: uppercase;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
}

@keyframes load {
    0% { width: 0; margin-left: 0; }
    50% { width: 100%; margin-left: 0; }
    100% { width: 0; margin-left: 100%; }
}

/* --- App Layout --- */
.app {
    display: flex;
    min-height: 100vh;
}

/* --- Sidebar --- */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: width var(--transition-speed), transform var(--transition-speed);
}

.sidebar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: padding var(--transition-speed);
}

.sidebar-header:hover {
    background: #f8fafc;
}

.sidebar-logo img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.sidebar-brand {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.brand-name {
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--primary);
    line-height: 1;
    letter-spacing: -0.01em;
}

.brand-sub {
    font-size: 0.58rem;
    font-weight: 700;
    color: var(--secondary);
    font-style: italic;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1;
    margin-top: 3px;
}

.sidebar-close {
    display: none;
    margin-left: auto;
    font-size: 1.5rem;
    color: var(--text-muted);
}

.sidebar-search {
    padding: 16px 24px;
    position: relative;
}

.sidebar-search i {
    position: absolute;
    left: 36px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.sidebar-search input {
    width: 100%;
    padding: 10px 10px 10px 36px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #f1f5f9;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s, opacity var(--transition-speed), width var(--transition-speed);
}

.sidebar-search input:focus {
    border-color: var(--primary);
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 10px 16px;
}

.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

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

.nav-category {
    margin-bottom: 8px;
}

.nav-category-btn {
    width: 100%;
    display: flex;
    align-items: center;
    padding: 12px;
    border-radius: 8px;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.nav-category-btn i:first-child {
    font-size: 1.2rem;
    margin-right: 12px;
    color: var(--primary);
}

.nav-arrow {
    margin-left: auto;
    transition: transform 0.2s;
}

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

.nav-items {
    display: none;
    padding-left: 20px;
    margin-top: 4px;
}

.nav-items.show {
    display: block;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 2px;
    transition: all 0.2s;
}

.nav-item i {
    margin-right: 10px;
    font-size: 1.1rem;
}

.nav-item:hover {
    background: #f1f5f9;
    color: var(--primary);
}

.nav-item.active {
    background: rgba(0, 77, 61, 0.1);
    color: var(--primary);
    font-weight: 600;
}

.sidebar-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border-color);
}

.logout-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    color: #ef4444; /* Permanent Red */
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    width: 100%;
}

.logout-footer:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171; /* Lighter red on hover */
}

.logout-footer i {
    font-size: 1.25rem;
    color: #ef4444; /* Permanent Red Icon */
    transition: all 0.3s ease;
}

.logout-footer:hover i {
    transform: translateX(3px);
    color: #f87171;
}

/* --- Main Content --- */
.main {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: 0; /* Essential for flex-shrink to work properly */
    transition: margin-left var(--transition-speed);
}

/* --- Topbar --- */
.topbar {
    height: var(--topbar-height);
    background: var(--bg-topbar);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 90;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.topbar-menu-btn {
    display: none;
    font-size: 1.5rem;
    color: var(--text-main);
}

.topbar-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.breadcrumb-section {
    font-weight: 500;
}

.breadcrumb-page {
    font-weight: 700;
    color: var(--text-main);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.topbar-btn {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.2rem;
    position: relative;
    transition: background 0.2s, color 0.2s;
}

.topbar-btn:hover {
    background: rgba(0, 77, 61, 0.08);
    color: var(--primary);
}

.notif-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 16px;
    height: 16px;
    background: var(--danger);
    color: white;
    font-size: 10px;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

.topbar-user-wrap {
    position: relative;
    margin-left: 8px;
    flex-shrink: 0;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    flex-shrink: 0;
}

[data-theme="dark"] .topbar-user {
    background: rgba(255, 255, 255, 0.05);
}

.topbar-user:hover {
    background: rgba(0, 77, 61, 0.08);
    border-color: var(--primary);
}

.topbar-user-avatar {
    width: 34px;
    height: 34px;
    background: var(--primary);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.topbar-user-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.2;
}

.topbar-user-name {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: 0.5px;
}

.topbar-user-role {
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--text-muted);
}

.topbar-dropdown-arrow {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-left: 4px;
    transition: transform 0.2s ease;
    display: inline-block;
}

/* --- Content Area --- */
.content {
    padding: 28px 32px;
    flex: 1;
    min-width: 0;
}

@media (max-width: 1366px) {
    .content {
        padding: 20px 22px;
    }
}

@media (max-width: 768px) {
    .content {
        padding: 16px 14px;
    }
}

/* --- Dashboard Styles --- */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-card);
    padding: 24px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 20px;
    border: 1px solid var(--border-color);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

.stat-info h4 {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 4px;
}

.stat-info p {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-main);
}

.bg-blue-light { background: #e0f2fe; color: #0369a1; }
.bg-green-light { background: #dcfce7; color: #15803d; }
.bg-purple-light { background: #f3e8ff; color: #7e22ce; }
.bg-gold-light { background: #fef9c3; color: #a16207; }

/* --- Section Headers --- */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.section-title {
    font-size: 1.4rem;
    color: var(--text-main);
}

/* --- Course Cards --- */
.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.course-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: transform 0.2s, box-shadow 0.2s;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.course-img {
    height: 180px;
    background: #e2e8f0;
    position: relative;
}

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

.course-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 12px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border-radius: 20px;
    font-size: 0.75rem;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.course-content {
    padding: 20px;
}

.course-tag {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 8px;
    display: block;
}

.course-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.course-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.course-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* --- Notification Panel --- */
.notification-panel {
    position: fixed;
    right: -400px;
    top: 0;
    width: 380px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 30px rgba(0,0,0,0.1);
    z-index: 1000;
    transition: right 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
}

.notification-panel.show {
    right: 0;
}

.notif-panel-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.notif-close {
    font-size: 1.5rem;
    color: var(--text-muted);
}

.notif-panel-body {
    flex: 1;
    overflow-y: auto;
}

.notif-item {
    padding: 20px;
    display: flex;
    gap: 16px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background 0.2s;
}

.notif-item:hover {
    background: #f8fafc;
}

.notif-item.unread {
    background: rgba(0, 77, 61, 0.03);
}

.notif-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.bg-blue { background: #3b82f6; }
.bg-green { background: #10b981; }
.bg-gold { background: #f59e0b; }
.bg-purple { background: #8b5cf6; }
.bg-red { background: #ef4444; }

.notif-content {
    flex: 1;
}

.notif-text {
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.notif-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* --- Collapsed State --- */
.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar.collapsed .sidebar-brand,
.sidebar.collapsed .sidebar-search input,
.sidebar.collapsed .nav-category-btn span,
.sidebar.collapsed .nav-item span,
.sidebar.collapsed .nav-arrow,
.sidebar.collapsed .user-info,
.sidebar.collapsed .user-menu-btn {
    display: none;
}

.sidebar.collapsed .sidebar-header {
    justify-content: center;
    padding: 20px 0;
}

.sidebar.collapsed .sidebar-search {
    display: flex;
    justify-content: center;
}

.sidebar.collapsed .sidebar-search i {
    position: static;
    transform: none;
    font-size: 1.2rem;
}

.sidebar.collapsed .nav-category-btn,
.sidebar.collapsed .nav-item {
    justify-content: center;
    padding: 12px 0;
}

.sidebar.collapsed .nav-category-btn i,
.sidebar.collapsed .nav-item i {
    margin-right: 0;
    font-size: 1.4rem;
}

.sidebar.collapsed .nav-items {
    padding-left: 0;
}

.sidebar.collapsed .sidebar-user {
    padding: 10px 0;
    justify-content: center;
}

.main.sidebar-collapsed {
    margin-left: var(--sidebar-collapsed-width);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 0px;
    }
    
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main {
        margin-left: 0;
    }
    
    .topbar-menu-btn {
        display: block;
    }
    
    .sidebar-close {
        display: block;
    }
    
    .sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 95;
        display: none;
    }
    
    .sidebar-overlay.show {
        display: block;
    }
    
    .topbar-search {
        display: none;
    }
}

/* --- Home Page Styles --- */
.home-container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 40px;
    padding-bottom: 60px;
}

.home-hero {
    text-align: center;
    padding: 60px 40px;
    background: linear-gradient(135deg, #eaf0f6 0%, #dee7f0 100%);
    border-radius: 30px;
    border: 1px solid #cbd5e1;
    box-shadow: 0 10px 30px rgba(0, 77, 61, 0.06);
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .home-hero {
    background: linear-gradient(135deg, #1e2e42 0%, #2a3f58 100%);
    border: 1px solid rgba(148, 163, 184, 0.3);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
}

.home-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(197, 160, 34, 0.05) 0%, transparent 70%);
    animation: rotateHero 20s linear infinite;
}

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

.home-logo {
    width: 420px;
    height: auto;
    margin-bottom: 32px;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.08));
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

[data-theme="dark"] .home-logo {
    background: #e2e8f0;
    padding: 18px 28px;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    filter: none;
}

.home-logo:hover {
    transform: scale(1.02);
}

.home-hero .home-title {
    font-size: 2.8rem;
    color: #004d3d;
    margin-bottom: 20px;
    letter-spacing: -1px;
    line-height: 1.1;
    position: relative;
    z-index: 1;
}

.home-hero .home-title i {
    color: #c5a022;
}

[data-theme="dark"] .home-hero .home-title {
    color: #4ade80 !important;
    text-shadow: 0 2px 12px rgba(74, 222, 128, 0.25);
}

[data-theme="dark"] .home-hero .home-title i {
    color: #facc15 !important;
    text-shadow: 0 2px 12px rgba(250, 204, 21, 0.35);
}

.home-hero .home-definition {
    font-size: 1.15rem;
    color: #1e293b;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.7;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

[data-theme="dark"] .home-hero .home-definition {
    color: #ffffff !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .home-hero .home-definition i {
    color: #facc15 !important;
}

.background-card {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.bg-section-title {
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.bg-section-title i {
    color: var(--secondary);
}

.bg-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-main);
}

.bg-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 20px 0;
}

.bg-info-box {
    background: var(--bg-body);
    padding: 24px;
    border-radius: 16px;
    border-left: 4px solid var(--primary);
}

.bg-info-box h3 {
    font-size: 1.2rem;
    margin-bottom: 16px;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.bg-info-box h3 i {
    color: var(--secondary);
}

.bg-info-box ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bg-info-box li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.95rem;
    color: var(--text-main);
}

.bg-info-box li i {
    color: var(--primary);
    margin-top: 3px;
    font-size: 1.1rem;
}

.home-motto {
    text-align: center;
}

.motto-card {
    background: linear-gradient(to right, var(--primary), var(--primary-light));
    padding: 50px 40px;
    border-radius: 24px;
    color: white;
    box-shadow: 0 20px 40px rgba(0, 77, 61, 0.2);
}

.motto-title {
    text-transform: uppercase;
    letter-spacing: 4px;
    font-size: 1rem;
    margin-bottom: 20px;
    opacity: 0.8;
}

.motto-main {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 30px;
    letter-spacing: -1px;
}

.motto-explanation {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.motto-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 12px;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    font-size: 1rem;
    line-height: 1.5;
}

.motto-item strong {
    display: block;
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: var(--secondary);
}

@media (max-width: 768px) {
    .bg-info-grid {
        grid-template-columns: 1fr;
    }
    
    .home-title {
        font-size: 2rem;
    }
    
    .motto-main {
        font-size: 2rem;
    }
    
    .home-hero {
        padding: 40px 20px;
    }
}

/* Philosophy Section Styles */
.home-philosophy {
    animation: fadeInUp 0.8s ease backwards;
    animation-delay: 0.2s;
}

.philosophy-card {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 40px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.philosophy-intro {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-main);
    margin-bottom: 40px;
    padding-left: 20px;
    border-left: 4px solid var(--accent);
}

.philosophy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.ph-item {
    background: rgba(0, 77, 61, 0.02);
    padding: 20px; /* Reduced from 25px */
    border-radius: 20px;
    border: 1px solid rgba(0, 77, 61, 0.05);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 10px; /* Consistent spacing between elements */
}

.ph-item:hover {
    background: rgba(0, 77, 61, 0.04);
    transform: translateY(-5px);
    border-color: var(--primary-light);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.ph-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 5px; /* Reduced from 15px */
}

.ph-icon {
    min-width: 36px; /* Slightly smaller */
    width: 36px;
    height: 36px;
    background: var(--primary);
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.ph-item h3 {
    font-size: 1.05rem; /* Slightly smaller */
    color: var(--primary);
    margin: 0;
    font-weight: 700;
    line-height: 1.3;
}

.ph-item p {
    font-size: 0.92rem;
    line-height: 1.5;
    color: var(--text-main);
    margin-bottom: 0; /* Let flex gap handle it */
}

.ph-list {
    list-style: none;
    padding: 0;
    margin: 0;
    /* Removed margin-top: auto to prevent large gaps */
}

.ph-list li {
    font-size: 0.88rem;
    margin-bottom: 6px; /* Reduced from 8px */
    padding-left: 18px;
    position: relative;
    color: var(--text-main);
    line-height: 1.4;
}

.ph-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

.ph-list li strong {
    color: var(--primary);
}

.philosophy-summary {
    background: linear-gradient(135deg, var(--primary) 0%, #00634f 100%);
    padding: 40px;
    border-radius: 24px;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.philosophy-summary::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
}

.philosophy-summary h3 {
    color: #C5A022; /* Precise match with Corporate University text */
    margin-bottom: 20px;
    font-size: 1.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-family: var(--font-main);
    text-shadow: none; /* Removed shadow to keep color pure */
}

.philosophy-summary p {
    font-size: 1.05rem;
    line-height: 1.8;
    max-width: 850px;
    margin: 0 auto;
    opacity: 0.95;
    font-weight: 400;
}

@media (max-width: 768px) {
    .philosophy-card {
        padding: 25px;
    }
    .philosophy-grid {
        grid-template-columns: 1fr;
    }
    .ph-item {
        padding: 20px;
    }
}

/* --- Global Theme Transition --- */
body {
    transition: background-color 0.3s ease, color 0.3s ease;
}

.sidebar, .main, .topbar, .nav-item, .nav-category-btn, .settings-card, .course-card, .stat-card, .home-philosophy, .philosophy-card, .ph-item {
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

/* --- Dark Theme Variables --- */
[data-theme="dark"] {
    --primary: #004d3d; /* Normal Logo Green for box/card backgrounds */
    --primary-light: #006b54;
    --primary-dark: #003328;
    --success: #2d6a4f;
    --bg-body: #0a0f1d;
    --bg-card: #151c2f;
    --bg-sidebar: #0f172a;
    --bg-topbar: rgba(15, 23, 42, 0.9);
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --border-color: #2d3748;
    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.4);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.6);
    --bg-search: #1e293b;
}

/* Dark Mode Overrides for Specific Components */
[data-theme="dark"] .sidebar-search input {
    background: #1e293b;
    color: white;
    border-color: #334155;
}

[data-theme="dark"] .nav-category-btn i:first-child {
    color: #4ade80; /* Bright Green for better visibility */
    filter: drop-shadow(0 0 5px rgba(74, 222, 128, 0.25));
}

[data-theme="dark"] .nav-category-btn span {
    color: #cbd5e1;
}

[data-theme="dark"] .nav-category-btn:hover {
    background: rgba(74, 222, 128, 0.1);
    color: #4ade80;
}

[data-theme="dark"] .nav-category-btn:hover i:first-child,
[data-theme="dark"] .nav-category-btn:hover span {
    color: #4ade80;
}

[data-theme="dark"] .nav-category-btn.active {
    background: rgba(74, 222, 128, 0.12);
    color: #4ade80;
}

[data-theme="dark"] .nav-category-btn.active i:first-child,
[data-theme="dark"] .nav-category-btn.active span {
    color: #4ade80;
}

/* Sidebar Sub-Menu Dark Mode Overrides */
[data-theme="dark"] .nav-item {
    color: #94a3b8;
}

[data-theme="dark"] .nav-item i {
    color: #94a3b8;
}

[data-theme="dark"] .nav-item:hover {
    background: rgba(74, 222, 128, 0.12);
    color: #4ade80 !important;
}

[data-theme="dark"] .nav-item:hover i,
[data-theme="dark"] .nav-item:hover span {
    color: #4ade80 !important;
}

[data-theme="dark"] .nav-item.active {
    background: rgba(74, 222, 128, 0.18);
    color: #4ade80 !important;
    font-weight: 600;
    border-left: 3px solid #4ade80;
}

[data-theme="dark"] .nav-item.active i,
[data-theme="dark"] .nav-item.active span {
    color: #4ade80 !important;
}

/* Feature Pages & Component Level Bright Green Highlights in Dark Mode */
[data-theme="dark"] .stat-mini-card i,
[data-theme="dark"] .smc-val,
[data-theme="dark"] .stat-card i,
[data-theme="dark"] .stat-value,
[data-theme="dark"] .summary-card i,
[data-theme="dark"] .summary-val,
[data-theme="dark"] .admin-title-wrap i,
[data-theme="dark"] .modal-section-title i,
[data-theme="dark"] .page-header i,
[data-theme="dark"] .section-title i {
    color: #4ade80 !important;
}

[data-theme="dark"] .btn-primary {
    background: #004d3d;
    color: white;
    font-weight: 700;
    border: 1px solid #1f4e3d;
}

[data-theme="dark"] .btn-primary:hover {
    background: #006b54;
    color: white;
}

[data-theme="dark"] .cl-bar-fill,
[data-theme="dark"] .sp-bar-fill,
[data-theme="dark"] .progress-bar-fill {
    background: #4ade80;
}

[data-theme="dark"] .topbar-btn {
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .topbar-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

[data-theme="dark"] .stat-card {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .course-card {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .course-content {
    background: #1e293b;
}

[data-theme="dark"] .course-title {
    color: #f1f5f9;
}

[data-theme="dark"] .course-tag {
    background: rgba(74, 222, 128, 0.1);
    color: #4ade80;
}

[data-theme="dark"] .home-hero {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.8) 0%, rgba(30, 41, 59, 0.8) 100%);
    border-color: #2d3748;
}

[data-theme="dark"] .home-title {
    color: #4ade80;
}

[data-theme="dark"] .home-subtitle {
    color: #cbd5e1;
}

/* Motto & Philosophy Section Dark Mode (Normal Dark Corporate Green Boxes) */
[data-theme="dark"] .motto-card {
    background: linear-gradient(135deg, #003328 0%, #004d3d 100%);
    border: 1px solid #1a4d3e;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .motto-item {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #f1f5f9;
}

[data-theme="dark"] .motto-item strong {
    color: #4ade80;
}

[data-theme="dark"] .philosophy-card {
    background: #151c2f;
    border-color: #2d3748;
}

[data-theme="dark"] .ph-item {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .ph-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: #4ade80;
}

[data-theme="dark"] .ph-item h3 {
    color: #4ade80;
}

[data-theme="dark"] .ph-icon {
    background: #004d3d;
}

[data-theme="dark"] .ph-list li strong {
    color: #4ade80;
}

[data-theme="dark"] .philosophy-summary {
    background: linear-gradient(135deg, #003328 0%, #004d3d 100%);
    border: 1px solid #1a4d3e;
}

[data-theme="dark"] .philosophy-summary h3 {
    color: #fbbf24;
}

/* Settings Specific Dark Mode */
[data-theme="dark"] .theme-btn {
    border-color: #334155;
}

[data-theme="dark"] .theme-btn:hover {
    background: rgba(74, 222, 128, 0.05);
    border-color: #4ade80;
}

[data-theme="dark"] .theme-btn.active {
    background: #004d3d;
    color: white;
    border-color: #4ade80;
}

[data-theme="dark"] .lang-select {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .text-muted {
    color: #94a3b8;
}

[data-theme="dark"] hr {
    border-color: #2d3748;
}
[data-theme="dark"] .background-card {
    background: #151c2f;
    border-color: #2d3748;
}

[data-theme="dark"] .bg-section-title {
    color: #4ade80;
}

[data-theme="dark"] .bg-info-box {
    background: rgba(255, 255, 255, 0.03);
    border-left-color: #4ade80;
}

[data-theme="dark"] .bg-info-box h3 {
    color: #4ade80;
}

[data-theme="dark"] .bg-info-box li i {
    color: #4ade80;
}

[data-theme="dark"] .bg-info-box li {
    color: #f1f5f9;
}
[data-theme="dark"] .topbar-user {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .topbar-user:hover {
    background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .topbar-user-name {
    color: #f1f5f9;
}

[data-theme="dark"] .topbar-user-role {
    color: #94a3b8;
}

[data-theme="dark"] .topbar-user-avatar {
    background: #065f46;
}

[data-theme="dark"] .topbar-breadcrumb {
    color: #94a3b8;
}

[data-theme="dark"] .breadcrumb-page {
    color: #4ade80;
}

/* Force Logout color in Dark Mode */
[data-theme="dark"] .logout-footer,
[data-theme="dark"] .logout-footer i {
    color: #ef4444 !important;
}

[data-theme="dark"] .logout-footer:hover,
[data-theme="dark"] .logout-footer:hover i {
    color: #f87171 !important;
}

/* =========================================
   Smart Dashboard Advanced Styles
   ========================================= */

.smart-dashboard-container {
    display: flex;
    flex-direction: column;
    gap: 32px;
    animation: fadeIn 0.5s ease-out;
}

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

/* Executive Summary Cards */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.summary-card {
    background: var(--bg-card);
    padding: 20px;
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
    gap: 12px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
}

.summary-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
}

.summary-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.summary-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.summary-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.summary-trend {
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
}

.trend-up { color: var(--success); }
.trend-down { color: var(--danger); }

.summary-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1;
}

.summary-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Charts Layout */
.dashboard-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 32px;
}

.dashboard-row.equal {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.dashboard-row.tri {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

@media (max-width: 1200px) {
    .dashboard-row, .dashboard-row.equal, .dashboard-row.tri {
        grid-template-columns: 1fr;
    }
}

.chart-card {
    background: var(--bg-card);
    padding: 24px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0; /* Important for grid/flex items */
    width: 100%;
    overflow: hidden;
}

.chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chart-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
}

.chart-actions {
    display: flex;
    gap: 8px;
}

.chart-btn {
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-muted);
    transition: all 0.2s;
}

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

.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* OPD Analytics Ranking */
.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ranking-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px;
    border-radius: 12px;
    background: #f8fafc;
    transition: background 0.2s;
}

[data-theme="dark"] .ranking-item { background: rgba(255,255,255,0.03); }

.ranking-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.ranking-info {
    flex: 1;
}

.ranking-name {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.ranking-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.ranking-score {
    font-weight: 800;
    color: var(--primary);
    font-size: 1rem;
}

/* AI Recommendations */
.ai-recom-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 24px;
    border-radius: var(--border-radius);
    position: relative;
    overflow: hidden;
}

.ai-recom-card::after {
    content: '\eb6b';
    font-family: 'remixicon';
    position: absolute;
    right: -20px;
    bottom: -20px;
    font-size: 8rem;
    opacity: 0.1;
    transform: rotate(-15deg);
}

.ai-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 12px;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.ai-recom-list {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ai-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 12px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.2s;
}

.ai-item:hover {
    background: rgba(255, 255, 255, 0.2);
}

.ai-item i {
    font-size: 1.2rem;
    color: var(--secondary);
}

/* Learning Calendar */
.calendar-widget {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 20px;
}

.cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.cal-day-label {
    text-align: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
}

.cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.cal-day:hover { background: #f1f5f9; }
.cal-day.today { background: var(--primary); color: white; font-weight: 700; }
.cal-day.has-event { position: relative; font-weight: 700; }
.cal-day.has-event::after {
    content: '';
    position: absolute;
    bottom: 4px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--secondary);
}

/* Strategic Info & Notifications */
.info-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.info-item {
    display: flex;
    gap: 12px;
}

.info-bullet {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    margin-top: 6px;
    flex-shrink: 0;
}

.info-content h5 {
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.info-content p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Heatmap Grid Simulation */
.heatmap-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
}

.heatmap-cell {
    aspect-ratio: 1;
    border-radius: 6px;
    position: relative;
}

.h-1 { background: #dcfce7; }
.h-2 { background: #86efac; }
.h-3 { background: #4ade80; }
.h-4 { background: #22c55e; }
.h-5 { background: #16a34a; }

.heatmap-cell:hover::after {
    content: attr(data-label);
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    white-space: nowrap;
    z-index: 10;
}

/* VIP Dashboard Highlights */
.vip-card {
    background: var(--bg-card);
    border: 2px solid var(--secondary);
    border-radius: var(--border-radius);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.vip-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.2rem;
    color: var(--secondary);
}

.vip-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.vip-metric-item {
    text-align: center;
}

.vip-m-value {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
}

.vip-m-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
}

/* --- My Learning Progress --- */
.learning-progress-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding-bottom: 40px;
}

.learning-header-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 24px;
}

@media (max-width: 1024px) {
    .learning-header-grid { grid-template-columns: 1fr; }
}

.profile-summary-card {
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.profile-main {
    display: flex;
    gap: 24px;
    align-items: center;
}

.profile-avatar {
    position: relative;
    width: 128px;
    height: 128px;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 24px;
    object-fit: cover;
    border: 4px solid var(--primary);
}

.profile-status-badge {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 4px 10px rgba(0, 77, 61, 0.3);
}

.profile-info h2 {
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 4px;
}

.profile-nip {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.profile-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    background: rgba(0, 77, 61, 0.05);
    color: var(--primary);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

[data-theme="dark"] .tag {
    background: rgba(255, 255, 255, 0.05);
    color: #4ade80;
}

.competency-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.chip {
    background: var(--secondary);
    color: #000;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 700;
}

.target-progress-card {
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.progress-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 600;
}

.progress-bar-container {
    height: 10px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    overflow: hidden;
}

[data-theme="dark"] .progress-bar-container {
    background: rgba(255, 255, 255, 0.05);
}

.progress-bar-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 1s ease;
}

/* Stats Mini Cards */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
}

.stat-mini-card {
    background: var(--bg-card);
    padding: 20px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    text-align: center;
    transition: transform 0.3s;
}

.stat-mini-card:hover { transform: translateY(-5px); }

.stat-mini-card i {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 10px;
    display: block;
}

.smc-val {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}

.smc-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Grids */
.progress-main-grid {
    display: grid;
    grid-template-columns: 1.8fr 1fr;
    gap: 24px;
}

@media (max-width: 1024px) {
    .progress-main-grid { grid-template-columns: 1fr; }
}

.progress-left-col, .progress-right-col {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Current Learning */
.current-learning-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cl-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 12px;
}

[data-theme="dark"] .cl-item {
    background: rgba(255, 255, 255, 0.02);
}

.cl-info { flex: 1; }
.cl-info h4 { font-size: 0.95rem; margin-bottom: 4px; }
.cl-info p { font-size: 0.75rem; color: var(--text-muted); }

.cl-progress { width: 120px; }
.cl-percent { font-size: 0.8rem; font-weight: 700; text-align: right; margin-bottom: 4px; }
.cl-bar { height: 6px; background: rgba(0, 0, 0, 0.05); border-radius: 10px; }
.cl-bar-fill { height: 100%; background: var(--primary); border-radius: 10px; }

.cl-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

/* Competency Visual */
.competency-visual-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: center;
}

@media (max-width: 600px) {
    .competency-visual-grid { grid-template-columns: 1fr; }
}

.competency-radar-container {
    height: 220px;
    position: relative;
}

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

.sp-label { display: flex; justify-content: space-between; font-size: 0.8rem; font-weight: 600; }
.sp-bar { height: 6px; background: rgba(0, 0, 0, 0.05); border-radius: 10px; }
.sp-bar-fill { height: 100%; background: var(--primary); border-radius: 10px; }

/* Learning Path */
.learning-path-visual {
    padding: 10px 0;
}

.lp-step {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 2;
}

.lp-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    background: #e2e8f0;
    color: #64748b;
}

.lp-step.completed .lp-icon { background: var(--primary); color: white; }
.lp-step.active .lp-icon { background: var(--secondary); color: #000; box-shadow: 0 0 15px rgba(197, 160, 34, 0.3); }
.lp-step.locked .lp-icon { background: #f1f5f9; color: #cbd5e1; }

.lp-text { font-size: 0.85rem; font-weight: 600; }

.lp-line {
    width: 2px;
    height: 30px;
    background: #e2e8f0;
    margin-left: 15px;
}

.lp-line.active { background: var(--primary); }

/* Timeline */
.vertical-timeline {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-left: 10px;
}

.timeline-item {
    position: relative;
    padding-left: 24px;
    border-left: 2px solid var(--primary);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -7px;
    top: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--primary);
}

[data-theme="dark"] .timeline-item::before { background: var(--bg-card); }

.t-date { font-size: 0.7rem; font-weight: 700; color: var(--primary); text-transform: uppercase; margin-bottom: 4px; }
.t-content { font-size: 0.85rem; color: var(--text-main); }

/* Bottom Grid */
.progress-bottom-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

/* Certificates */
.certificates-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cert-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 10px;
}

.cert-icon { font-size: 1.5rem; color: #ef4444; }
.cert-info h5 { font-size: 0.85rem; margin-bottom: 2px; }
.cert-info p { font-size: 0.7rem; color: var(--text-muted); }

.badge-item {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.badge-item img {
    width: 40px;
    height: 40px;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
}

/* Gamification & Resume */
.progress-footer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    background: var(--primary);
    color: white;
    padding: 24px 32px;
    border-radius: var(--border-radius);
    margin-top: 20px;
}

@media (max-width: 768px) {
    .progress-footer-row { flex-direction: column; text-align: center; }
}

.gamification-summary {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.08); /* Very subtle tint */
    border-radius: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.level-badge {
    width: 54px;
    height: 54px;
    background: linear-gradient(135deg, var(--secondary) 0%, #a6811a 100%);
    color: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.points-info b {
    font-size: 1.4rem;
    letter-spacing: -0.5px;
}

.points-info span {
    display: block;
    font-size: 1rem;
    font-weight: 500;
    opacity: 0.9;
}
.streak { font-size: 0.8rem; font-weight: 600; opacity: 0.9; }

.export-actions { display: flex; gap: 12px; }

.btn-outline,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #e2e8f0 !important;
    color: #0f172a !important;
    border: 1.5px solid #cbd5e1 !important;
    padding: 10px 20px;
    border-radius: 10px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.btn-outline:hover,
.btn-secondary:hover {
    background: #cbd5e1 !important;
    color: #020617 !important;
    border-color: #94a3b8 !important;
    transform: translateY(-1px);
}

.btn-outline i,
.btn-secondary i {
    color: #334155 !important;
}

[data-theme="dark"] .btn-outline,
[data-theme="dark"] .btn-secondary {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
    border: 1.5px solid rgba(255, 255, 255, 0.25) !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] .btn-outline:hover,
[data-theme="dark"] .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.22) !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.45) !important;
}

[data-theme="dark"] .btn-outline i,
[data-theme="dark"] .btn-secondary i {
    color: #cbd5e1 !important;
}

/* ==========================================================================
   LMS Course Catalog & Interactive Classroom Styles
   ========================================================================== */

/* Catalog Layout */
.catalog-container {
    display: flex;
    flex-direction: column;
    gap: 28px;
    animation: fadeIn 0.4s ease-out;
}

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

/* Catalog Hero Banner */
.catalog-hero {
    position: relative;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, #006b54 100%);
    color: white;
    padding: 36px 40px;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(0, 77, 61, 0.25);
}

.catalog-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(197, 160, 34, 0.25) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.catalog-hero-content {
    position: relative;
    z-index: 2;
    max-width: 750px;
}

.catalog-hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    color: var(--secondary);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 30px;
    margin-bottom: 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.catalog-hero-title {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.catalog-hero-desc {
    font-size: 0.95rem;
    opacity: 0.9;
    line-height: 1.6;
    margin-bottom: 24px;
}

.catalog-hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
}

.hero-stat-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hero-stat-icon {
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--secondary);
}

.hero-stat-text strong {
    display: block;
    font-size: 1.1rem;
    font-weight: 800;
}

.hero-stat-text span {
    font-size: 0.75rem;
    opacity: 0.85;
}

/* Filter & Search Bar */
.catalog-toolbar {
    background: var(--bg-card);
    padding: 20px 24px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.search-filter-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 16px;
}

@media (max-width: 768px) {
    .search-filter-row { grid-template-columns: 1fr; }
}

.catalog-search-input {
    position: relative;
}

.catalog-search-input i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.1rem;
}

.catalog-search-input input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-body);
    color: var(--text-main);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.catalog-search-input input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 77, 61, 0.1);
}

.catalog-select {
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-body);
    color: var(--text-main);
    font-size: 0.88rem;
    outline: none;
    cursor: pointer;
}

.catalog-select:focus {
    border-color: var(--primary);
}

/* Category Pills */
.category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pill-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 30px;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.pill-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 77, 61, 0.25);
}

.pill-btn .pill-count {
    background: rgba(0, 0, 0, 0.08);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.72rem;
}

.pill-btn.active .pill-count {
    background: rgba(255, 255, 255, 0.25);
    color: white;
}

/* Course Grid & Cards */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.course-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.course-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.course-thumb-wrap {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.course-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.course-card:hover .course-thumb {
    transform: scale(1.06);
}

.course-badge-category {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.badge-mandatory { background: linear-gradient(135deg, #e63946, #c1121f); }
.badge-leadership { background: linear-gradient(135deg, #c5a022, #99790f); color: #000; }
.badge-technical { background: linear-gradient(135deg, #004d3d, #006b54); }
.badge-functional { background: linear-gradient(135deg, #1a2b48, #2b4570); }
.badge-micro { background: linear-gradient(135deg, #00b4d8, #0077b6); }

.course-jp-tag {
    position: absolute;
    bottom: 14px;
    right: 14px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    color: #ffdf00;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 800;
}

.course-card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.course-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.course-instructor {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.course-instructor i {
    color: var(--primary);
}

.course-card-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.course-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.rating-star {
    color: #f59e0b;
    font-weight: 700;
}

.course-card-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-start-course {
    flex: 1;
    background: var(--primary);
    color: white;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-start-course:hover {
    background: var(--primary-light);
    box-shadow: 0 4px 12px rgba(0, 77, 61, 0.3);
}

.btn-detail-course {
    background: rgba(0, 0, 0, 0.04);
    color: var(--text-main);
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.2s;
    cursor: pointer;
}

[data-theme="dark"] .btn-detail-course {
    background: rgba(255, 255, 255, 0.05);
}

.btn-detail-course:hover {
    background: rgba(0, 0, 0, 0.08);
}

/* Course Detail Modal & Fixed Viewport Overlay System */
body.modal-open {
    overflow: hidden !important;
}

.modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(15, 23, 42, 0.72) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    backdrop-filter: blur(8px) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 100000 !important;
    padding: 20px !important;
    overflow-y: auto !important;
    box-sizing: border-box !important;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-overlay.show {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.course-modal-box {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    max-width: 760px;
    width: 100%;
    max-height: 88vh;
    overflow-y: auto;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    position: relative;
    margin: auto;
    animation: modalSlideUp 0.3s ease-out;
}

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

.modal-header-hero {
    position: relative;
    height: 200px;
    width: 100%;
}

.modal-header-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-header-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--bg-card) 0%, transparent 100%);
}

.modal-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 10;
    transition: transform 0.2s;
}

.modal-close-btn:hover { transform: scale(1.1); }

.modal-body-content {
    padding: 24px 32px 32px;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 12px;
    color: var(--text-main);
}

.modal-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 14px;
    background: var(--bg-body);
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.modal-meta-item small {
    display: block;
    font-size: 0.72rem;
    color: var(--text-muted);
}

.modal-meta-item strong {
    font-size: 0.88rem;
    color: var(--primary);
}

.modal-section-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 20px 0 12px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-section-title i { color: var(--primary); }

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

.syllabus-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-body);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.syllabus-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.syllabus-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(0, 77, 61, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.syllabus-info h5 {
    font-size: 0.88rem;
    margin-bottom: 2px;
}

.syllabus-info p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ==========================================================================
   Interactive LMS Classroom Player (Ruang Belajar Interaktif)
   ========================================================================== */

.classroom-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    animation: fadeIn 0.4s ease-out;
}

.classroom-nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-card);
    padding: 16px 24px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.btn-back-catalog {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    background: transparent;
    border: none;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.btn-back-catalog:hover {
    opacity: 0.85;
}

[data-theme="dark"] .btn-back-catalog {
    color: #34d399;
}

.classroom-course-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-main);
}

.classroom-progress-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.classroom-progress-bar {
    width: 140px;
    height: 8px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    overflow: hidden;
}

.classroom-progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 10px;
    transition: width 0.4s ease;
}

.classroom-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 20px;
    align-items: start;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.classroom-left {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
}

@media (min-width: 1440px) {
    .classroom-grid {
        grid-template-columns: minmax(0, 1fr) 320px;
        gap: 24px;
    }
}

@media (max-width: 1180px) {
    .classroom-grid {
        grid-template-columns: minmax(0, 1fr) 280px;
        gap: 16px;
    }
}

@media (max-width: 960px) {
    .classroom-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .classroom-sidebar {
        position: static !important;
        max-height: none !important;
    }
}

/* Screen Player Box */
.player-box {
    background: #0f172a;
    border-radius: var(--border-radius);
    overflow: hidden;
    position: relative;
    min-height: 380px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    box-shadow: var(--shadow-lg);
}

.player-box.is-reading-mode {
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    min-height: auto;
    overflow: visible;
}

.player-box iframe,
.player-box video {
    width: 100%;
    height: 100%;
    border: none;
}

.player-text-content {
    background: var(--bg-card);
    padding: 32px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    width: 100%;
    color: var(--text-main);
}

.player-text-content h4 {
    font-size: 1.3rem;
    color: var(--primary);
    margin-bottom: 16px;
}

.player-text-content p {
    line-height: 1.7;
    margin-bottom: 14px;
    font-size: 0.92rem;
}

.callout-box {
    background: rgba(0, 77, 61, 0.06);
    border-left: 4px solid var(--primary);
    padding: 16px;
    border-radius: 8px;
    margin: 16px 0;
}

/* Classroom Tabs */
.classroom-tabs-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    padding: 24px;
    margin-top: 20px;
}

.tabs-header {
    display: flex;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
    margin-bottom: 20px;
}

.tab-btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn.active {
    background: rgba(0, 77, 61, 0.1);
    color: var(--primary);
}

.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* Discussion Forum Tab */
.discussion-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 20px;
}

.discussion-item {
    display: flex;
    gap: 14px;
    background: var(--bg-body);
    padding: 14px 18px;
    border-radius: 12px;
}

.discussion-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
}

.discussion-content h6 {
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.discussion-content p {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.discussion-input-box {
    display: flex;
    gap: 10px;
}

.discussion-input-box input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-body);
    color: var(--text-main);
    font-size: 0.85rem;
}

/* Notes Tab */
.notes-textarea {
    width: 100%;
    height: 140px;
    padding: 14px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-body);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.88rem;
    outline: none;
    resize: vertical;
    margin-bottom: 12px;
}

/* Quiz Simulator */
.quiz-container {
    background: var(--bg-body);
    padding: 24px;
    border-radius: 14px;
    border: 1px solid var(--border-color);
}

.quiz-question {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-main);
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.quiz-opt-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-main);
    font-size: 0.88rem;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s;
}

.quiz-opt-btn:hover {
    border-color: var(--primary);
    background: rgba(0, 77, 61, 0.04);
}

.quiz-opt-btn.selected {
    border-color: var(--primary);
    background: rgba(0, 77, 61, 0.1);
    font-weight: 700;
}

.quiz-opt-btn.correct {
    border-color: var(--success);
    background: rgba(45, 106, 79, 0.15);
    color: var(--success);
    font-weight: 700;
}

.quiz-opt-btn.incorrect {
    border-color: var(--danger);
    background: rgba(230, 57, 70, 0.15);
    color: var(--danger);
}

.quiz-feedback {
    padding: 14px;
    border-radius: 10px;
    margin-top: 14px;
    font-size: 0.85rem;
    line-height: 1.5;
}

.quiz-feedback.pass {
    background: rgba(45, 106, 79, 0.15);
    color: var(--success);
    border: 1px solid var(--success);
}

.quiz-feedback.fail {
    background: rgba(230, 57, 70, 0.15);
    color: var(--danger);
    border: 1px solid var(--danger);
}

/* Classroom Sidebar Module Navigator */
.classroom-sidebar {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    position: sticky;
    top: 85px;
    max-height: calc(100vh - 105px);
    overflow-y: auto;
    box-shadow: var(--shadow-sm);
}

.classroom-sidebar::-webkit-scrollbar {
    width: 5px;
}
.classroom-sidebar::-webkit-scrollbar-track {
    background: transparent;
}
.classroom-sidebar::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
}
[data-theme="dark"] .classroom-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
}

.sidebar-module-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-main);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.module-nav-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.module-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    min-width: 0;
    box-sizing: border-box;
}

.module-nav-item:hover {
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.module-nav-item.active {
    background: rgba(0, 77, 61, 0.1);
    border-color: var(--primary);
    font-weight: 700;
}

[data-theme="dark"] .module-nav-item.active {
    background: rgba(0, 77, 61, 0.35);
    border-color: #10b981;
}

.module-status-icon {
    font-size: 1.15rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.module-nav-item.completed .module-status-icon {
    color: var(--success);
}

.module-nav-item.active .module-status-icon {
    color: var(--primary);
}

[data-theme="dark"] .module-nav-item.active .module-status-icon {
    color: #34d399;
}

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

.module-nav-info h6 {
    font-size: 0.8rem;
    line-height: 1.35;
    margin: 0 0 2px 0;
    word-break: break-word;
    overflow-wrap: break-word;
    color: var(--text-main);
}

.module-nav-info span {
    font-size: 0.72rem;
    color: var(--text-muted);
    display: block;
    line-height: 1.3;
}

.btn-complete-module {
    width: 100%;
    background: var(--primary);
    color: white;
    padding: 12px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-complete-module:hover {
    background: var(--primary-light);
}

/* ==========================================================================
   Certificate Center & Landscape A4 E-Certificate System
   ========================================================== */

.cert-modal-overlay {
    position: fixed !important;
    inset: 0 !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(15, 23, 42, 0.82) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 100000 !important;
    padding: 20px !important;
    box-sizing: border-box !important;
    overflow-y: auto !important;
}

.cert-modal-dialog {
    position: relative;
    width: min(880px, 95vw);
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: certModalZoom 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes certModalZoom {
    from { transform: scale(0.92); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.cert-modal-close {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #0f172a;
    color: #ffffff;
    border: 2px solid #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    transition: all 0.2s ease;
    z-index: 10002;
}

.cert-modal-close:hover {
    background: #e63946;
    transform: scale(1.1);
}

/* Landscape A4 Certificate Card - True A4 Proportions (297mm x 210mm = 1.414 : 1) */
.cert-preview-card.landscape {
    width: 100%;
    aspect-ratio: 297 / 210;
    min-height: 480px;
    background: #ffffff;
    color: #1e293b;
    border: 6px solid #004d3d;
    outline: 2px solid #d4af37;
    outline-offset: -5px;
    border-radius: 10px;
    padding: 16px 28px 12px;
    text-align: center;
    position: relative;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

/* Background Abstract SVG Layer */
.cert-abstract-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* Faint Watermark Emblem */
.cert-preview-card.landscape::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('logo.png') no-repeat center center;
    background-size: 210px;
    opacity: 0.035;
    pointer-events: none;
    z-index: 2;
}

/* Ornamental Certificate Corner Accents */
.cert-corner {
    position: absolute;
    width: 28px;
    height: 28px;
    border-color: #d4af37;
    border-style: solid;
    pointer-events: none;
    z-index: 4;
}
.cert-corner.top-left {
    top: 8px;
    left: 8px;
    border-width: 2.5px 0 0 2.5px;
}
.cert-corner.top-right {
    top: 8px;
    right: 8px;
    border-width: 2.5px 2.5px 0 0;
}
.cert-corner.bottom-left {
    bottom: 8px;
    left: 8px;
    border-width: 0 0 2.5px 2.5px;
}
.cert-corner.bottom-right {
    bottom: 8px;
    right: 8px;
    border-width: 0 2.5px 2.5px 0;
}

/* Header Section */
.cert-header-landscape {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cert-header-landscape .cert-logo-img {
    height: 42px;
    width: auto;
    margin-bottom: 2px;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.1));
}

.cert-header-landscape h3,
.cert-gov-title {
    font-size: 1.15rem;
    font-weight: 900;
    color: #004d3d;
    letter-spacing: 1.6px;
    margin: 0;
    line-height: 1.2;
    text-transform: uppercase;
}

.cert-header-landscape h4,
.cert-inst-title {
    font-size: 0.88rem;
    font-weight: 800;
    color: #b45309;
    letter-spacing: 1.4px;
    margin: 2px 0 0;
    text-transform: uppercase;
}

.cert-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 170px;
    margin: 4px auto 3px;
}

.cert-divider-line {
    flex: 1;
    height: 1.5px;
    background: linear-gradient(90deg, transparent, #d4af37, #004d3d);
}

.cert-divider-line:last-child {
    background: linear-gradient(90deg, #004d3d, #d4af37, transparent);
}

.cert-divider-star {
    color: #d4af37;
    font-size: 0.8rem;
    line-height: 1;
}

.cert-badge-wrap {
    margin: 1px 0;
}

.cert-title-type {
    font-size: 0.80rem;
    font-weight: 800;
    letter-spacing: 1.1px;
    text-transform: uppercase;
    color: #1e293b;
    margin: 0;
    background: rgba(0, 77, 61, 0.05);
    padding: 3px 14px;
    border-radius: 20px;
    border: 1px solid rgba(212, 175, 55, 0.35);
    display: inline-block;
}

.cert-number-text {
    font-size: 0.70rem;
    color: #475569;
    font-family: monospace;
    font-weight: 600;
    margin: 3px 0 0;
}

.cert-number-text strong {
    color: #0f172a;
    font-weight: 700;
}

/* Body Section */
.cert-body-landscape {
    position: relative;
    z-index: 3;
    margin: 3px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cert-to-text {
    font-size: 0.78rem;
    color: #475569;
    font-weight: 600;
    margin: 0 0 2px;
}

.cert-user-name {
    font-size: 1.55rem;
    font-weight: 900;
    color: #0f172a;
    display: inline-block;
    border-bottom: 2px solid #004d3d;
    padding-bottom: 2px;
    margin: 2px auto 3px;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.9);
}

.cert-user-opd {
    font-size: 0.86rem;
    color: #475569;
    font-weight: 700;
    margin-bottom: 3px;
}

.cert-completion-desc {
    font-size: 0.80rem;
    color: #334155;
    margin: 2px 0 3px;
}

.cert-course-title-main {
    font-size: 1.15rem;
    font-weight: 900;
    color: #004d3d;
    margin: 2px auto 4px;
    line-height: 1.3;
    max-width: 680px;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
}

.cert-course-meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.76rem;
    font-weight: 700;
    color: #92400e;
    background: rgba(245, 158, 11, 0.12);
    padding: 3px 14px;
    border-radius: 14px;
    border: 1px solid rgba(245, 158, 11, 0.28);
    margin-top: 1px;
}

.cert-course-meta-pill .pill-dot {
    color: #d97706;
    font-size: 0.9rem;
}

/* Footer Section - 2 Columns (QR & TTE) Elevated 1 cm from Bottom Margin */
.cert-footer-landscape {
    position: relative;
    z-index: 3;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    width: 100%;
    margin-top: 4px;
    margin-bottom: 38px; /* Elevated 1 cm (~38px) from bottom border */
    padding-top: 8px;
    border-top: 1px dashed rgba(0, 77, 61, 0.25);
}

/* Left Column: Digital Auth & QR */
.cert-verify-block {
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
}

.cert-verify-qr {
    width: 48px;
    height: 48px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 2px;
    background: #ffffff;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.cert-verify-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 0.66rem;
    color: #475569;
    line-height: 1.3;
}

.cert-verify-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #004d3d;
    font-weight: 800;
    font-size: 0.72rem;
    letter-spacing: 0.4px;
}

.cert-verify-sub {
    font-size: 0.64rem;
    color: #475569;
    font-weight: 600;
}

.cert-verify-id {
    font-size: 0.62rem;
    color: #64748b;
    font-family: monospace;
    font-weight: 700;
    letter-spacing: 0.3px;
}

/* Right Column: Signature Block */
.cert-signature-block {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 220px;
}

.cert-sign-date {
    font-size: 0.74rem;
    color: #1e293b;
    margin-bottom: 2px;
}

.cert-sign-role {
    font-size: 0.82rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 2px;
}

.cert-sign-logo-wrap {
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2px 0 3px;
}

.cert-bsre-img, .cert-besign-img {
    height: 28px;
    width: auto;
    max-width: 110px;
    object-fit: contain;
    filter: drop-shadow(0 1px 3px rgba(0, 77, 61, 0.15));
}

.cert-sign-name {
    font-size: 0.92rem;
    font-weight: 800;
    color: #0f172a;
    white-space: nowrap;
}

.cert-sign-name u {
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: #004d3d;
}

/* Certificate Modal Action Buttons */
.cert-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 10px;
    flex-wrap: wrap;
    z-index: 10001;
}

.btn-cert-act-download {
    background: var(--primary);
    color: #ffffff;
    padding: 8px 18px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.80rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 77, 61, 0.28);
    transition: all 0.2s ease;
}

.btn-cert-act-download:hover {
    background: var(--primary-light);
    transform: translateY(-1.5px);
    box-shadow: 0 6px 18px rgba(0, 77, 61, 0.35);
}

.btn-cert-act-print {
    background: #1e293b;
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.80rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-cert-act-print:hover {
    background: #334155;
    transform: translateY(-1.5px);
}

.btn-cert-act-close {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.80rem;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: all 0.2s ease;
}

.btn-cert-act-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Responsive Rules for Small Devices (Screen Only - Do not affect print) */
@media screen and (max-width: 860px) {
    .cert-preview-card.landscape {
        aspect-ratio: auto;
        min-height: auto;
        padding: 16px 14px 20px;
    }
    .cert-footer-landscape {
        flex-direction: column;
        align-items: center;
        gap: 16px;
        text-align: center;
        margin-bottom: 20px;
    }
    .cert-verify-block {
        justify-content: center;
        text-align: center;
    }
    .cert-modal-close {
        top: -8px;
        right: -8px;
    }
}

/* Print Styles for A4 Landscape Output - Guaranteed 1-Page Exact Fit Matching Preview */
@media print {
    @page {
        size: A4 landscape;
        margin: 0;
    }
    html, body {
        width: 297mm !important;
        height: 210mm !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #ffffff !important;
        overflow: hidden !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    body * {
        visibility: hidden !important;
    }
    #certModal, 
    #certModal .cert-modal-dialog, 
    #certModal .cert-preview-card.landscape, 
    #certModal .cert-preview-card.landscape * {
        visibility: visible !important;
    }
    #certModal {
        position: fixed !important;
        left: 0 !important;
        top: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        max-width: 297mm !important;
        max-height: 210mm !important;
        padding: 5mm 8mm !important;
        margin: 0 auto !important;
        box-sizing: border-box !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: #ffffff !important;
        overflow: hidden !important;
        page-break-inside: avoid !important;
        page-break-before: avoid !important;
        page-break-after: avoid !important;
    }
    .cert-modal-dialog {
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        max-height: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        box-shadow: none !important;
        page-break-inside: avoid !important;
    }
    .cert-modal-close, .cert-modal-actions {
        display: none !important;
    }
    .cert-preview-card.landscape {
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        max-height: 100% !important;
        box-sizing: border-box !important;
        border: 5px solid #004d3d !important;
        box-shadow: inset 0 0 0 2px #d4af37, inset 0 0 0 5px #ffffff !important;
        outline: none !important;
        border-radius: 6px !important;
        padding: 7mm 14mm 6mm !important;
        margin: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        position: relative !important;
        page-break-inside: avoid !important;
        page-break-after: avoid !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        overflow: hidden !important;
    }
    .cert-corner {
        display: block !important;
        position: absolute !important;
        width: 24px !important;
        height: 24px !important;
        border-color: #d4af37 !important;
        border-style: solid !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        z-index: 4 !important;
    }
    .cert-corner.top-left {
        top: 7px !important;
        left: 7px !important;
        border-width: 2.5px 0 0 2.5px !important;
    }
    .cert-corner.top-right {
        top: 7px !important;
        right: 7px !important;
        border-width: 2.5px 2.5px 0 0 !important;
    }
    .cert-corner.bottom-left {
        bottom: 7px !important;
        left: 7px !important;
        border-width: 0 0 2.5px 2.5px !important;
    }
    .cert-corner.bottom-right {
        bottom: 7px !important;
        right: 7px !important;
        border-width: 0 2.5px 2.5px 0 !important;
    }
    .cert-abstract-bg {
        position: absolute !important;
        inset: 0 !important;
        width: 100% !important;
        height: 100% !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        display: block !important;
    }
    .cert-header-landscape {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }
    .cert-header-landscape .cert-logo-img {
        height: 12mm !important;
        width: auto !important;
    }
    .cert-header-landscape h3,
    .cert-gov-title {
        font-size: 14pt !important;
        font-weight: 900 !important;
        color: #004d3d !important;
        margin: 0 !important;
        -webkit-print-color-adjust: exact !important;
    }
    .cert-header-landscape h4,
    .cert-inst-title {
        font-size: 11pt !important;
        font-weight: 800 !important;
        color: #b45309 !important;
        margin: 1.5mm 0 0 !important;
        -webkit-print-color-adjust: exact !important;
    }
    .cert-divider {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 170px !important;
        margin: 2.5mm auto !important;
    }
    .cert-divider-line {
        background: #004d3d !important;
        height: 1.5px !important;
    }
    .cert-divider-star {
        color: #d4af37 !important;
    }
    .cert-title-type {
        font-size: 9.5pt !important;
        padding: 1.5mm 5mm !important;
        border-radius: 20px !important;
        border: 1px solid rgba(212, 175, 55, 0.5) !important;
        background: rgba(0, 77, 61, 0.05) !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    .cert-number-text {
        font-size: 8.5pt !important;
        margin-top: 1.5mm !important;
    }
    .cert-to-text {
        font-size: 9.5pt !important;
        margin: 1.5mm 0 1mm !important;
    }
    .cert-user-name {
        font-size: 20pt !important;
        font-weight: 900 !important;
        padding-bottom: 1.5mm !important;
        border-bottom: 2pt solid #004d3d !important;
        margin: 1.5mm auto !important;
    }
    .cert-user-opd {
        font-size: 10.5pt !important;
        margin-bottom: 2mm !important;
    }
    .cert-completion-desc {
        font-size: 10pt !important;
        margin: 1.5mm 0 !important;
    }
    .cert-course-title-main {
        font-size: 13.5pt !important;
        font-weight: 900 !important;
        color: #004d3d !important;
        margin: 1.5mm auto !important;
        max-width: 90% !important;
    }
    .cert-course-meta-pill {
        font-size: 9pt !important;
        padding: 1.5mm 4mm !important;
        border-radius: 14px !important;
        border: 1px solid rgba(245, 158, 11, 0.4) !important;
        background: rgba(245, 158, 11, 0.12) !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        margin-top: 1.5mm !important;
    }
    .cert-footer-landscape {
        margin-bottom: 8mm !important;
        padding-top: 3mm !important;
        border-top: 1px dashed rgba(0, 77, 61, 0.3) !important;
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: space-between !important;
        align-items: flex-end !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .cert-verify-block {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 3mm !important;
        text-align: left !important;
        justify-content: flex-start !important;
        flex: 0 0 auto !important;
    }
    .cert-verify-qr {
        width: 14mm !important;
        height: 14mm !important;
        flex-shrink: 0 !important;
        display: block !important;
    }
    .cert-verify-info {
        display: flex !important;
        flex-direction: column !important;
        gap: 1mm !important;
        text-align: left !important;
        font-size: 7.5pt !important;
    }
    .cert-verify-badge {
        font-size: 8pt !important;
        font-weight: 800 !important;
        color: #004d3d !important;
    }
    .cert-verify-sub {
        font-size: 7pt !important;
        color: #475569 !important;
    }
    .cert-verify-id {
        font-size: 6.8pt !important;
        font-family: monospace !important;
    }
    .cert-signature-block {
        text-align: center !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        min-width: 55mm !important;
        flex: 0 0 auto !important;
    }
    .cert-sign-date {
        font-size: 9pt !important;
        margin-bottom: 1mm !important;
    }
    .cert-sign-role {
        font-size: 10pt !important;
        font-weight: 800 !important;
        margin-bottom: 1.5mm !important;
    }
    .cert-sign-logo-wrap {
        height: 8.5mm !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 1mm 0 !important;
    }
    .cert-bsre-img, .cert-besign-img {
        height: 8.5mm !important;
        width: auto !important;
        display: block !important;
    }
    .cert-sign-name {
        font-size: 11.5pt !important;
        font-weight: 800 !important;
        white-space: nowrap !important;
    }
}

/* ==========================================================================
   Login Screen & CAPTCHA System Styles
   ========================================================================== */

.login-screen {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 60px 20px 40px;
    background: radial-gradient(circle at 50% 35%, #004d3d 0%, #003026 60%, #001e17 100%);
    background-attachment: fixed;
    overflow-y: auto;
    overflow-x: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.login-screen.hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    display: none !important;
}

.login-bg-overlay {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 50% 20%, rgba(0, 150, 115, 0.2) 0%, transparent 60%),
        radial-gradient(circle at 50% 85%, rgba(197, 160, 34, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

.login-card {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--border-radius-lg);
    padding: 32px 28px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
    color: #1e293b;
    animation: loginCardSlideUp 0.4s ease-out;
}

.register-card {
    max-width: 480px;
}

[data-theme="dark"] .login-card {
    background: rgba(15, 23, 42, 0.95);
    border-color: rgba(255, 255, 255, 0.12);
    color: #f1f5f9;
}

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

.login-header {
    text-align: center;
    margin-bottom: 24px;
}

.login-logo {
    width: 80px;
    height: auto;
    margin-bottom: 10px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.login-logo:hover {
    transform: scale(1.06) rotate(2deg);
}

.login-header h2 {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary);
    letter-spacing: -0.5px;
    line-height: 1.1;
}

[data-theme="dark"] .login-header h2 {
    color: #4ade80;
}

.login-header h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--secondary);
    font-style: italic;
    margin-bottom: 6px;
}

.login-subtitle {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.login-card .form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
    text-align: left;
}

.login-card label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 6px;
}

.login-card label i {
    color: var(--primary);
}

.login-card input[type="text"],
.login-card input[type="password"] {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-body);
    color: var(--text-main);
    font-size: 0.88rem;
    outline: none;
    transition: all 0.2s;
}

.login-card input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 77, 61, 0.15);
}

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

.password-input-wrap input {
    padding-right: 44px;
}

.btn-toggle-pw {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s;
}

.btn-toggle-pw:hover {
    color: var(--primary);
}

/* Captcha Row & Separate Wrap */
.captcha-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.captcha-canvas-wrap {
    flex: 0 0 140px;
    height: 40px;
    background: #f1f5f9;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    overflow: hidden;
}

[data-theme="dark"] .captcha-canvas-wrap {
    background: #1e293b;
}

#captchaCanvas {
    border-radius: 8px;
    display: block;
}

.btn-refresh-captcha {
    flex: 0 0 36px;
    height: 36px;
    background: rgba(0, 77, 61, 0.9);
    color: white;
    border: none;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: transform 0.3s ease, background 0.2s;
}

.btn-refresh-captcha:hover {
    background: var(--primary);
    transform: rotate(180deg);
}

.captcha-note {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.login-alert {
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 20px;
    animation: shake 0.4s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

.login-alert.error {
    background: rgba(230, 57, 70, 0.12);
    color: #dc2626;
    border: 1px solid rgba(230, 57, 70, 0.3);
}

[data-theme="dark"] .login-alert.error {
    color: #f87171;
}

.login-alert.success {
    background: rgba(45, 106, 79, 0.12);
    color: #166534;
    border: 1px solid rgba(45, 106, 79, 0.3);
}

[data-theme="dark"] .login-alert.success {
    color: #4ade80;
}

.btn-login-submit {
    width: 100%;
    background: var(--primary);
    color: white;
    padding: 14px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 800;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.25s ease;
    box-shadow: 0 4px 15px rgba(0, 77, 61, 0.3);
}

.btn-login-submit:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 77, 61, 0.4);
}

.login-register-prompt {
    margin-top: 16px;
    text-align: center;
    font-size: 0.84rem;
    color: var(--text-muted);
}

.link-register {
    color: var(--primary);
    font-weight: 700;
    text-decoration: underline;
    transition: color 0.2s, opacity 0.2s;
}

[data-theme="dark"] .link-register {
    color: var(--secondary);
}

.link-register:hover {
    color: var(--secondary);
    opacity: 0.85;
}

.btn-register-submit {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.login-footer-info {
    margin-top: 24px;
    text-align: center;
    font-size: 0.72rem;
    color: var(--text-muted);
}

.clickable-hero-logo {
    cursor: pointer;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.clickable-hero-logo:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 15px rgba(197, 160, 34, 0.5));
}

.clickable-splash-logo {
    cursor: pointer;
    transition: transform 0.3s ease, filter 0.3s ease;
    animation: splashPulse 2.5s infinite ease-in-out;
}

.clickable-splash-logo:hover {
    transform: scale(1.08);
    filter: drop-shadow(0 0 20px rgba(197, 160, 34, 0.7));
}

@keyframes splashPulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 5px rgba(0, 77, 61, 0.2)); }
    50% { transform: scale(1.04); filter: drop-shadow(0 0 18px rgba(197, 160, 34, 0.5)); }
}

/* ==========================================================================
   Admin Panel & Role Access Control System Styles
   ========================================================================== */

.admin-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    animation: fadeIn 0.4s ease-out;
}

.admin-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.admin-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.admin-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-title-wrap i {
    font-size: 1.8rem;
    color: var(--primary);
}

.admin-title-wrap h2 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-main);
}

.admin-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.role-badge-admin {
    background: rgba(230, 57, 70, 0.12);
    color: #e63946;
    border: 1px solid rgba(230, 57, 70, 0.3);
}

.role-badge-operator {
    background: rgba(0, 180, 216, 0.12);
    color: #00b4d8;
    border: 1px solid rgba(0, 180, 216, 0.3);
}

.role-badge-user {
    background: rgba(45, 106, 79, 0.12);
    color: #2d6a4f;
    border: 1px solid rgba(45, 106, 79, 0.3);
}

[data-theme="dark"] .role-badge-user {
    color: #4ade80;
}

.role-badge-guest {
    background: rgba(148, 163, 184, 0.15);
    color: #64748b;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

.admin-table-wrap {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    text-align: left;
}

.admin-table th {
    background: rgba(0, 77, 61, 0.06);
    color: var(--primary);
    font-weight: 700;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
}

[data-theme="dark"] .admin-table th {
    background: rgba(30, 41, 59, 0.8);
    color: #38bdf8;
}

.admin-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
    vertical-align: middle;
}

.admin-table th.sortable-th {
    cursor: pointer;
    user-select: none;
    transition: background 0.2s, color 0.2s;
}

.admin-table th.sortable-th:hover {
    background: rgba(74, 222, 128, 0.12);
    color: #4ade80;
}

.pw-cell-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.04);
    padding: 5px 10px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .pw-cell-wrap {
    background: rgba(255, 255, 255, 0.05);
}

.btn-toggle-table-pw {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    padding: 2px;
    transition: transform 0.2s, color 0.2s;
}

.btn-toggle-table-pw:hover {
    color: #4ade80;
    transform: scale(1.15);
}

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

.admin-table tr:hover td {
    background: rgba(0, 0, 0, 0.02);
}

[data-theme="dark"] .admin-table tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

.user-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar-badge {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    font-weight: 800;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.user-cell-info h5 {
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.2;
}

.user-cell-info p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.role-sim-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: linear-gradient(135deg, rgba(0, 77, 61, 0.08) 0%, rgba(197, 160, 34, 0.08) 100%);
    border: 1px solid rgba(197, 160, 34, 0.3);
    padding: 16px 20px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.role-sim-btns {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-sim-role {
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-sim-role:hover,
.btn-sim-role.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.select-role-edit {
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-body);
    color: var(--text-main);
    font-size: 0.8rem;
    font-weight: 700;
    outline: none;
    cursor: pointer;
}

/* ==========================================================================
   Table Action Icon Buttons & Hover Info Tooltip (Adaptive Light & Dark)
   ========================================================================== */

.action-btn-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.btn-action-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 1.1rem;
    cursor: pointer;
    border: 1px solid transparent;
    background: transparent;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.btn-action-icon i {
    transition: transform 0.2s ease;
}

.btn-action-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.btn-action-icon:hover i {
    transform: scale(1.15);
}

.btn-action-icon:active {
    transform: translateY(0) scale(0.95);
}

/* --- Edit Button (Green Theme) --- */
.btn-action-edit {
    color: #16a34a;
    border-color: rgba(22, 163, 74, 0.4);
    background: rgba(22, 163, 74, 0.08);
}

.btn-action-edit:hover {
    color: #15803d;
    border-color: #16a34a;
    background: rgba(22, 163, 74, 0.2);
}

[data-theme="dark"] .btn-action-edit {
    color: #4ade80;
    border-color: rgba(74, 222, 128, 0.4);
    background: rgba(74, 222, 128, 0.12);
}

[data-theme="dark"] .btn-action-edit:hover {
    color: #86efac;
    border-color: #4ade80;
    background: rgba(74, 222, 128, 0.28);
    box-shadow: 0 4px 14px rgba(74, 222, 128, 0.25);
}

/* --- Nonaktifkan / Status Toggle Button (Amber/Orange Theme - High Contrast in Light & Dark) --- */
.btn-action-status {
    color: #d97706;
    border-color: rgba(217, 119, 6, 0.4);
    background: rgba(217, 119, 6, 0.08);
}

.btn-action-status:hover {
    color: #b45309;
    border-color: #d97706;
    background: rgba(217, 119, 6, 0.2);
}

[data-theme="dark"] .btn-action-status {
    color: #fbbf24;
    border-color: rgba(251, 191, 36, 0.4);
    background: rgba(251, 191, 36, 0.12);
}

[data-theme="dark"] .btn-action-status:hover {
    color: #fde047;
    border-color: #fbbf24;
    background: rgba(251, 191, 36, 0.28);
    box-shadow: 0 4px 14px rgba(251, 191, 36, 0.25);
}

/* --- Hapus / Delete Button (Red Theme) --- */
.btn-action-delete {
    color: #dc2626;
    border-color: rgba(220, 38, 38, 0.4);
    background: rgba(220, 38, 38, 0.08);
}

.btn-action-delete:hover {
    color: #b91c1c;
    border-color: #dc2626;
    background: rgba(220, 38, 38, 0.2);
}

[data-theme="dark"] .btn-action-delete {
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.4);
    background: rgba(248, 113, 113, 0.12);
}

[data-theme="dark"] .btn-action-delete:hover {
    color: #fca5a5;
    border-color: #f87171;
    background: rgba(248, 113, 113, 0.28);
    box-shadow: 0 4px 14px rgba(248, 113, 113, 0.25);
}

/* --- Floating Info Tooltip on Hover --- */
.btn-action-icon[data-tooltip] {
    position: relative;
}

.btn-action-icon[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 128%;
    left: 50%;
    transform: translateX(-50%) translateY(4px) scale(0.92);
    padding: 6px 11px;
    background: #0f172a;
    color: #ffffff;
    font-size: 0.73rem;
    font-weight: 700;
    white-space: nowrap;
    border-radius: 7px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
    z-index: 999;
    letter-spacing: 0.2px;
}

.btn-action-icon[data-tooltip]::after {
    content: '';
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%) translateY(4px) scale(0.92);
    border-width: 6px 6px 0 6px;
    border-style: solid;
    border-color: #0f172a transparent transparent transparent;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    z-index: 999;
}

[data-theme="dark"] .btn-action-icon[data-tooltip]::before {
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .btn-action-icon[data-tooltip]::after {
    border-color: #ffffff transparent transparent transparent;
}

.btn-action-icon[data-tooltip]:hover::before,
.btn-action-icon[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0) scale(1);
}




.badge-berakhlak { background: linear-gradient(135deg, #4361ee, #3a0ca3); color: #ffffff; }
.badge-smart { background: linear-gradient(135deg, #7209b7, #f72585); color: #ffffff; }
.badge-antikorupsi { background: linear-gradient(135deg, #d90429, #ef233c); color: #ffffff; }


/* Sequential Locking & Quiz Evaluation Styles */
.module-nav-item.locked {
    opacity: 0.55;
    cursor: not-allowed;
    background: rgba(0, 0, 0, 0.02);
    border-left: 3px solid var(--text-muted) !important;
}
.module-nav-item.locked:hover {
    background: rgba(0, 0, 0, 0.02);
}

/* E-Certificate Page Styles */
.ecert-page-container {
    padding: 10px 0;
}
.ecert-hero-banner {
    background: linear-gradient(135deg, var(--primary), #002b22);
    color: white;
    padding: 32px;
    border-radius: 16px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-md);
}
.ecert-hero-tag {
    background: rgba(255, 255, 255, 0.15);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
}
.ecert-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.ecert-stat-card {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 16px;
}
.ecert-stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(0, 77, 61, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}
.cert-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}
.cert-display-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}
.cert-display-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}
.cert-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.cert-badge {
    background: rgba(0, 77, 61, 0.1);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
}
.cert-jp {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--secondary);
}
.cert-course-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 12px;
    line-height: 1.4;
}
.cert-meta-info {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}
.cert-code {
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    color: var(--primary);
}
.cert-card-actions {
    display: flex;
    gap: 10px;
}
.btn-cert-preview, .btn-cert-download {
    flex: 1;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background 0.2s;
}
.btn-cert-preview {
    background: var(--primary);
    color: white;
    border: none;
}
.btn-cert-preview:hover {
    background: var(--primary-dark);
}
.btn-cert-download {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-color);
}
.btn-cert-download:hover {
    background: rgba(0, 0, 0, 0.05);
}
.empty-cert-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border-color);
}


/* RBAC & Guest Promo Sidebar Box Styles */
.guest-sidebar-promo {
    margin: 20px 14px 14px;
    padding: 16px;
    background: linear-gradient(135deg, rgba(0, 77, 61, 0.12), rgba(197, 160, 34, 0.15));
    border: 1px solid rgba(0, 77, 61, 0.2);
    border-radius: 14px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}
.guest-sidebar-promo .promo-icon {
    width: 42px;
    height: 42px;
    margin: 0 auto 10px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}
.guest-sidebar-promo h5 {
    margin: 0 0 6px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary);
}
.guest-sidebar-promo p {
    margin: 0 0 14px;
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.4;
}
.guest-sidebar-promo .btn-guest-register {
    width: 100%;
    padding: 8px 12px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background 0.2s, transform 0.2s;
}
.guest-sidebar-promo .btn-guest-register:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

/* OPD & Role Scope Badges */
.opd-scope-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: 12px;
}
.opd-scope-badge.operator-scope {
    background: rgba(197, 160, 34, 0.15);
    color: #99790f;
    border: 1px solid rgba(197, 160, 34, 0.3);
}
.opd-scope-badge.guest-scope {
    background: rgba(100, 116, 139, 0.15);
    color: var(--text-muted);
    border: 1px solid rgba(100, 116, 139, 0.3);
}


/* Guest Login Button & Welcome Banner Styles */
.btn-guest-login-submit {
    margin-top: 10px;
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 1.5px solid var(--primary);
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.25s ease;
}
.btn-guest-login-submit:hover {
    background: rgba(0, 77, 61, 0.08);
    transform: translateY(-1px);
}

.guest-welcome-banner {
    background: linear-gradient(135deg, rgba(197, 160, 34, 0.15), rgba(0, 77, 61, 0.12));
    border: 1.5px solid var(--secondary);
    border-radius: 14px;
    padding: 16px 20px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    box-shadow: var(--shadow-sm);
    animation: fadeIn 0.3s ease;
}
.guest-welcome-banner h4 {
    margin: 0;
    font-size: 1.02rem;
    color: var(--primary);
    font-weight: 800;
}
.guest-welcome-banner p {
    margin: 4px 0 0;
    font-size: 0.86rem;
    color: var(--text-muted);
    line-height: 1.4;
}
.guest-banner-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--secondary);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
}

/* ==========================================================================
   Topbar User Dropdown Menu & Quick Modals (Profile & Settings)
   ========================================================================== */
.topbar-user-wrap {
    position: relative;
}

.topbar-user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 320px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
    padding: 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.96);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    z-index: 1000;
}

.topbar-user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.dropdown-user-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(0, 77, 61, 0.05);
    border-radius: 12px;
}

[data-theme="dark"] .dropdown-user-header {
    background: rgba(255, 255, 255, 0.05);
}

.dropdown-avatar-big {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--primary);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 800;
    flex-shrink: 0;
}

[data-theme="dark"] .dropdown-avatar-big {
    background: #065f46;
    color: #4ade80;
}

.dropdown-header-name {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.3;
}

.dropdown-header-opd {
    font-size: 0.76rem;
    color: var(--text-muted);
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.dropdown-header-badge {
    margin-top: 6px;
}

.dropdown-menu-divider {
    height: 1px;
    background: var(--border-color);
    margin: 8px 0;
}

.dropdown-menu-body, .dropdown-menu-footer {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dropdown-item-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: none;
    background: transparent;
    border-radius: 10px;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s ease, transform 0.15s ease;
}

.dropdown-item-btn:hover {
    background: rgba(0, 0, 0, 0.04);
    transform: translateX(2px);
}

[data-theme="dark"] .dropdown-item-btn:hover {
    background: rgba(255, 255, 255, 0.06);
}

.dropdown-icon-box {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.dropdown-icon-box.blue { background: rgba(59, 130, 246, 0.1); color: #2563eb; }
.dropdown-icon-box.green { background: rgba(16, 185, 129, 0.1); color: #059669; }
.dropdown-icon-box.red { background: rgba(239, 68, 68, 0.1); color: #dc2626; }

[data-theme="dark"] .dropdown-icon-box.blue { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
[data-theme="dark"] .dropdown-icon-box.green { background: rgba(16, 185, 129, 0.2); color: #34d399; }
[data-theme="dark"] .dropdown-icon-box.red { background: rgba(239, 68, 68, 0.2); color: #f87171; }

.dropdown-item-title {
    display: block;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-main);
}

.dropdown-item-sub {
    display: block;
    font-size: 0.74rem;
    color: var(--text-muted);
    margin-top: 1px;
}

.dropdown-item-btn.logout-item:hover {
    background: rgba(239, 68, 68, 0.08);
}

/* --- Course Catalog Enhanced Workflow Styles --- */
.btn-select-materi, .btn-pilih-materi {
    background: var(--primary) !important;
    color: #ffffff !important;
}

.btn-continue-materi, .btn-lanjutkan-pembelajaran {
    background: #0284c7 !important;
    color: #ffffff !important;
}

.btn-review-materi, .btn-review-pembelajaran {
    background: #c5a022 !important;
    color: #000000 !important;
    font-weight: 800 !important;
}

.course-overview-hero-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 24px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    box-shadow: var(--shadow-sm);
}

@media (max-width: 900px) {
    .course-overview-hero-card {
        flex-direction: column;
        align-items: stretch;
    }
}

.overview-hero-left {
    flex: 1;
}

.overview-hero-right {
    flex: 0 0 300px;
}

.unstarted-action-box, .in-progress-action-box, .completed-action-box {
    background: var(--bg-body);
    border: 1px dashed var(--border-color);
    border-radius: 14px;
    padding: 18px;
    text-align: center;
}

.uab-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--danger);
    background: rgba(230, 57, 70, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 10px;
}

.uab-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 14px;
    line-height: 1.4;
}

.btn-start-learning-now {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 20px;
    background: var(--primary);
    color: #ffffff;
    font-weight: 800;
    font-size: 0.95rem;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 77, 61, 0.25);
}

.btn-start-learning-now:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 77, 61, 0.35);
}

.player-locked-overlay {
    height: 100%;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    text-align: center;
    background: var(--bg-body);
    border-radius: var(--border-radius-sm);
}

.star-rating-picker .star-item {
    transition: transform 0.15s ease, color 0.15s ease;
}

.star-rating-picker .star-item:hover {
    transform: scale(1.2);
}

/* --- LMS Admin Course & Module Management Styles --- */
.btn-auto-quiz-gen {
    background: linear-gradient(135deg, #c5a022 0%, #99790f 100%) !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    border: none !important;
    padding: 10px 18px !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 14px rgba(197, 160, 34, 0.35) !important;
    cursor: pointer !important;
    transition: all 0.25s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.btn-auto-quiz-gen:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 18px rgba(197, 160, 34, 0.45) !important;
}

.bab-sub-badge {
    background: rgba(0, 77, 61, 0.1);
    color: var(--primary);
    font-size: 0.76rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 6px;
    border: 1px solid rgba(0, 77, 61, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.pdf-doc-badge {
    background: rgba(217, 4, 41, 0.1);
    color: #d90429;
    font-size: 0.76rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 6px;
    border: 1px solid rgba(217, 4, 41, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.admin-module-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.admin-module-card:hover {
    box-shadow: var(--shadow-sm);
}

.quiz-q-editor-card {
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    position: relative;
}

/* --- Admin Table Action Icon Buttons --- */
.btn-action-icon {
    width: 34px !important;
    height: 34px !important;
    border-radius: 9px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    font-size: 1rem !important;
    flex-shrink: 0 !important;
}

.btn-action-edit {
    background: rgba(0, 77, 61, 0.1) !important;
    color: var(--primary) !important;
    border: 1px solid rgba(0, 77, 61, 0.25) !important;
}

.btn-action-edit:hover {
    background: var(--primary) !important;
    color: #ffffff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 10px rgba(0, 77, 61, 0.2) !important;
}

.btn-action-delete {
    background: rgba(230, 57, 70, 0.1) !important;
    color: #e63946 !important;
    border: 1px solid rgba(230, 57, 70, 0.25) !important;
}

.btn-action-delete:hover {
    background: #e63946 !important;
    color: #ffffff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 10px rgba(230, 57, 70, 0.2) !important;
}

/* --- High-Contrast Header Action Button --- */
.btn-edit-course-header {
    background: rgba(0, 77, 61, 0.08) !important;
    color: #004d3d !important;
    border: 1.5px solid #004d3d !important;
    padding: 8px 16px !important;
    border-radius: 8px !important;
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.btn-edit-course-header i {
    color: #004d3d !important;
    font-size: 0.95rem !important;
}

.btn-edit-course-header:hover {
    background: #004d3d !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(0, 77, 61, 0.25) !important;
}

.btn-edit-course-header:hover i {
    color: #ffffff !important;
}

[data-theme="dark"] .btn-edit-course-header {
    background: rgba(74, 222, 128, 0.15) !important;
    color: #4ade80 !important;
    border: 1.5px solid #4ade80 !important;
}

[data-theme="dark"] .btn-edit-course-header i {
    color: #4ade80 !important;
}

[data-theme="dark"] .btn-edit-course-header:hover {
    background: #4ade80 !important;
    color: #0a0f1d !important;
    box-shadow: 0 4px 12px rgba(74, 222, 128, 0.3) !important;
}

[data-theme="dark"] .btn-edit-course-header:hover i {
    color: #0a0f1d !important;
}

/* --- Interactive Status Publikasi Badges --- */
.pub-badge-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.25s ease;
    border: 1.5px solid transparent;
    letter-spacing: 0.3px;
}

.pub-badge-btn.pub-published {
    background: rgba(0, 77, 61, 0.1);
    color: #004d3d;
    border-color: rgba(0, 77, 61, 0.3);
}

.pub-badge-btn.pub-published:hover {
    background: #004d3d;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 77, 61, 0.25);
    transform: translateY(-1px);
}

.pub-badge-btn.pub-draft {
    background: rgba(217, 119, 6, 0.12);
    color: #d97706;
    border-color: rgba(217, 119, 6, 0.3);
}

.pub-badge-btn.pub-draft:hover {
    background: #d97706;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.25);
    transform: translateY(-1px);
}

[data-theme="dark"] .pub-badge-btn.pub-published {
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
    border-color: rgba(74, 222, 128, 0.35);
}

[data-theme="dark"] .pub-badge-btn.pub-published:hover {
    background: #4ade80;
    color: #0a0f1d;
}

[data-theme="dark"] .pub-badge-btn.pub-draft {
    background: rgba(251, 191, 36, 0.18);
    color: #fbbf24;
    border-color: rgba(251, 191, 36, 0.35);
}

[data-theme="dark"] .pub-badge-btn.pub-draft:hover {
    background: #fbbf24;
    color: #0a0f1d;
}

/* ==========================================================================
   Redesigned Modern App Settings (Pengaturan Aplikasi & Antarmuka System)
   ========================================================================== */
.settings-container {
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 40px;
}

.settings-header-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 24px 30px;
    border-radius: 16px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.settings-title-wrap h1 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-title-wrap p {
    color: var(--text-muted);
    font-size: 0.88rem;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 24px;
}

.settings-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.settings-card:hover {
    box-shadow: var(--shadow-md);
    border-color: rgba(0, 77, 61, 0.3);
}

[data-theme="dark"] .settings-card:hover {
    border-color: rgba(74, 222, 128, 0.3);
}

.settings-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 16px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--border-color);
}

.settings-card-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(0, 77, 61, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

[data-theme="dark"] .settings-card-icon {
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
}

.settings-card-header h3 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0;
}

.settings-card-header p {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.theme-options-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 14px;
}

.theme-card-btn {
    background: var(--bg-body);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    color: var(--text-main);
}

.theme-card-btn i {
    font-size: 1.5rem;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.theme-card-btn span {
    font-size: 0.84rem;
    font-weight: 700;
}

.theme-card-btn:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.theme-card-btn.active {
    border-color: var(--primary);
    background: rgba(0, 77, 61, 0.06);
    color: var(--primary);
}

.theme-card-btn.active i {
    color: var(--primary);
}

[data-theme="dark"] .theme-card-btn.active {
    border-color: #4ade80;
    background: rgba(74, 222, 128, 0.12);
    color: #4ade80;
}

[data-theme="dark"] .theme-card-btn.active i {
    color: #4ade80;
}

/* Custom Toggle Switch */
.setting-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px dashed var(--border-color);
}

.setting-toggle-row:last-child {
    border-bottom: none;
}

.setting-toggle-info h4 {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 2px;
}

.setting-toggle-info p {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-color);
    transition: .3s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

input:checked + .slider {
    background-color: #004d3d;
}

[data-theme="dark"] input:checked + .slider {
    background-color: #4ade80;
}

[data-theme="dark"] input:checked + .slider:before {
    background-color: #0a0f1d;
}

input:checked + .slider:before {
    transform: translateX(22px);
}

/* Language Choice Buttons */
.lang-quick-btns {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
}

.lang-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 2px solid var(--border-color);
    background: var(--bg-body);
    color: var(--text-main);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.25s ease;
}

.lang-btn:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.lang-btn.active {
    border-color: var(--primary);
    background: rgba(0, 77, 61, 0.08);
    color: var(--primary);
}

[data-theme="dark"] .lang-btn.active {
    border-color: #4ade80;
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
}

/* --- Strict Left Alignment for All Sidebar Categories & Sub-menus --- */
.sidebar-nav,
.nav-category,
.nav-category-btn,
.nav-category-btn span,
.nav-items,
.nav-item,
.nav-item span {
    text-align: left !important;
    justify-content: flex-start !important;
}

.nav-category-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: 100% !important;
    text-align: left !important;
}

.nav-category-btn span {
    flex: 1 !important;
    text-align: left !important;
    white-space: normal !important;
    word-break: break-word !important;
    line-height: 1.3 !important;
}

.nav-item {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: 100% !important;
    text-align: left !important;
}

.nav-item span {
    flex: 1 !important;
    text-align: left !important;
    white-space: normal !important;
    word-break: break-word !important;
    line-height: 1.3 !important;
}

/* ==========================================================================
   Universal High-Contrast Action Buttons (Light & Dark Theme Adaptive)
   ========================================================================== */

.btn-primary {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    background: #059669 !important; /* Deep Emerald Green for high-contrast light mode */
    color: #ffffff !important;
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    padding: 10px 22px !important;
    border-radius: 10px !important;
    border: 1.5px solid #047857 !important;
    box-shadow: 0 3px 10px rgba(5, 150, 105, 0.28) !important;
    cursor: pointer !important;
    transition: all 0.2s ease-in-out !important;
    text-decoration: none !important;
    line-height: 1.4 !important;
}

.btn-primary:hover {
    background: #047857 !important;
    color: #ffffff !important;
    border-color: #065f46 !important;
    box-shadow: 0 5px 15px rgba(5, 150, 105, 0.38) !important;
    transform: translateY(-1px) !important;
}

.btn-primary:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 5px rgba(5, 150, 105, 0.2) !important;
}

.btn-primary i {
    font-size: 1.1rem !important;
    color: #ffffff !important;
}

/* Dark Mode Overrides for Primary Action Buttons */
[data-theme="dark"] .btn-primary {
    background: #10b981 !important; /* Vibrant Emerald Green for Dark Mode */
    color: #042019 !important; /* Dark slate text for maximum legibility on bright green */
    border: 1.5px solid #34d399 !important;
    box-shadow: 0 3px 12px rgba(16, 185, 129, 0.35) !important;
    font-weight: 800 !important;
}

[data-theme="dark"] .btn-primary:hover {
    background: #34d399 !important;
    color: #02120e !important;
    border-color: #6ee7b7 !important;
    box-shadow: 0 5px 18px rgba(52, 211, 153, 0.45) !important;
    transform: translateY(-1px) !important;
}

[data-theme="dark"] .btn-primary i {
    color: #042019 !important;
}

/* --- Notification & Inbox Dropdown Panels --- */
.topbar-notif-wrap,
.topbar-inbox-wrap {
    position: relative;
}

.topbar-dropdown-panel {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 360px;
    max-width: 90vw;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.18);
    padding: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.96);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    z-index: 10000;
    overflow: hidden;
}

.topbar-dropdown-panel.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.dropdown-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: rgba(0, 77, 61, 0.05);
    border-bottom: 1px solid var(--border-color);
}

[data-theme="dark"] .dropdown-panel-header {
    background: rgba(255, 255, 255, 0.04);
}

.btn-panel-action {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 6px;
    transition: all 0.2s;
}

.btn-panel-action:hover {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

[data-theme="dark"] .btn-panel-action:hover {
    background: #10b981;
    color: #042019;
    border-color: #34d399;
}

.dropdown-panel-body {
    max-height: 360px;
    overflow-y: auto;
    padding: 8px;
}

.dropdown-panel-item {
    display: flex;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    transition: background 0.2s;
    cursor: pointer;
    text-decoration: none;
    border-bottom: 1px dashed var(--border-color);
}

.dropdown-panel-item:last-child {
    border-bottom: none;
}

.dropdown-panel-item:hover {
    background: rgba(0, 77, 61, 0.04);
}

[data-theme="dark"] .dropdown-panel-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.dropdown-panel-item.unread {
    background: rgba(5, 150, 105, 0.07);
}

[data-theme="dark"] .dropdown-panel-item.unread {
    background: rgba(16, 185, 129, 0.12);
}

.panel-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.panel-item-icon.notif {
    background: rgba(5, 150, 105, 0.12);
    color: #059669;
}

[data-theme="dark"] .panel-item-icon.notif {
    background: rgba(52, 211, 153, 0.2);
    color: #34d399;
}

.panel-item-icon.inbox {
    background: rgba(59, 130, 246, 0.12);
    color: #2563eb;
}

[data-theme="dark"] .panel-item-icon.inbox {
    background: rgba(96, 165, 250, 0.2);
    color: #60a5fa;
}

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

.panel-item-title {
    font-size: 0.86rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.3;
    margin-bottom: 2px;
}

.panel-item-msg {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
    word-break: break-word;
}

.panel-item-time {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 4px;
    display: block;
}

.dropdown-panel-footer {
    padding: 10px 16px;
    background: rgba(0, 0, 0, 0.02);
    border-top: 1px solid var(--border-color);
    text-align: center;
}

[data-theme="dark"] .dropdown-panel-footer {
    background: rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   ENHANCED LMS PLAYER: YOUTUBE VIDEO PLAYER & ACTION TOOLBAR
   ========================================================================== */
.video-player-card {
    width: 100%;
    display: flex;
    flex-direction: column;
    background: #090d16;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.video-player-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    min-height: 240px;
    background: #000000;
    overflow: hidden;
}

.video-poster-box {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    overflow: hidden;
    background: #050811;
}

.video-poster-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), filter 0.4s ease;
    filter: brightness(0.85);
}

.video-poster-box:hover .video-poster-img {
    transform: scale(1.03);
    filter: brightness(0.95);
}

.video-poster-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.2) 45%, rgba(0, 0, 0, 0.88) 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 22px 26px;
    pointer-events: none;
}

.video-poster-badge-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.video-source-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(220, 38, 38, 0.92);
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 20px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.35);
}

.video-source-badge i {
    font-size: 1.05rem;
}

.video-duration-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(8px);
    color: #f1f5f9;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.video-play-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: auto 0;
    pointer-events: auto;
}

.btn-video-play-pulse {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #c5a022 0%, #004d3d 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 2.4rem;
    padding-left: 6px;
    box-shadow: 0 0 0 0 rgba(197, 160, 34, 0.7);
    animation: pulsePlayBtn 2s infinite;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    border: 3px solid rgba(255, 255, 255, 0.5);
    cursor: pointer;
}

.video-poster-box:hover .btn-video-play-pulse {
    transform: scale(1.12);
    box-shadow: 0 0 35px rgba(197, 160, 34, 0.95);
}

@keyframes pulsePlayBtn {
    0% {
        box-shadow: 0 0 0 0 rgba(197, 160, 34, 0.75);
    }
    70% {
        box-shadow: 0 0 0 22px rgba(197, 160, 34, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(197, 160, 34, 0);
    }
}

.video-play-callout {
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(8px);
    color: #ffffff;
    font-size: 0.86rem;
    font-weight: 700;
    padding: 7px 18px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    letter-spacing: 0.3px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.video-poster-info-bottom {
    margin-top: auto;
}

.video-poster-info-bottom h5 {
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 800;
    margin: 0 0 5px;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.85);
    line-height: 1.35;
}

.video-poster-info-bottom p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.86rem;
    margin: 0;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}

.video-iframe-slot {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
}

.video-responsive-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Video Action Toolbar */
.video-action-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: #111827;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    flex-wrap: wrap;
    gap: 12px;
}

.vat-status {
    display: flex;
    align-items: center;
    gap: 8px;
}

.vat-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 8px #10b981;
    animation: vatPulse 1.8s infinite;
}

@keyframes vatPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.85); }
}

.vat-text {
    font-size: 0.82rem;
    color: #94a3b8;
    font-weight: 600;
}

.vat-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.vat-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.08);
    color: #f1f5f9;
    border: 1px solid rgba(255, 255, 255, 0.14);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.vat-btn:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.28);
    transform: translateY(-1px);
}

.vat-btn-primary {
    background: #dc2626;
    border-color: #ef4444;
    color: #ffffff;
}

.vat-btn-primary:hover {
    background: #b91c1c;
    border-color: #dc2626;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.45);
}

/* ==========================================================================
   PROFESSIONAL PDF & DOCUMENT VIEWER COMPONENT (SCROLLABLE E-MODUL)
   ========================================================================== */
.pdf-reader-card {
    width: 100%;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Toolbar */
.pdf-reader-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: var(--bg-card);
    border-bottom: 2px solid var(--border-color);
    flex-wrap: wrap;
    gap: 12px;
}

.pdf-tb-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.pdf-tb-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
    border: 1px solid rgba(220, 38, 38, 0.25);
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.4px;
}

.pdf-tb-docnum {
    font-size: 0.78rem;
    font-family: monospace;
    color: var(--text-muted);
    font-weight: 600;
}

.pdf-tb-center {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pdf-zoom-group {
    display: flex;
    align-items: center;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2px 4px;
}

.pdf-zoom-btn {
    background: none;
    border: none;
    color: var(--text-main);
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pdf-zoom-btn:hover {
    background: rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .pdf-zoom-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.pdf-zoom-val {
    font-size: 0.8rem;
    font-weight: 700;
    min-width: 48px;
    text-align: center;
    color: var(--text-main);
}

.pdf-tb-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pdf-tb-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid var(--border-color);
    background: var(--bg-body);
    color: var(--text-main);
    transition: all 0.2s ease;
}

.pdf-tb-btn:hover {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

.pdf-tb-btn-primary {
    background: #004d3d;
    color: #ffffff;
    border-color: #004d3d;
}

.pdf-tb-btn-primary:hover {
    background: #00362b;
    border-color: #00362b;
    box-shadow: 0 4px 12px rgba(0, 77, 61, 0.35);
}

/* Scrollable Desk Canvas */
.pdf-reader-scroll-canvas {
    background: #2b3548;
    padding: 36px 20px;
    max-height: 600px;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    scroll-behavior: smooth;
    transition: all 0.3s ease;
}

.pdf-reader-scroll-canvas::-webkit-scrollbar {
    width: 10px;
}
.pdf-reader-scroll-canvas::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.25);
}
.pdf-reader-scroll-canvas::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 6px;
}
.pdf-reader-scroll-canvas::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* Realistic A4 Paper Sheet */
.pdf-paper-sheet {
    background: #ffffff !important;
    color: #1e293b !important;
    max-width: 820px;
    width: 100%;
    margin: 0 auto 30px;
    padding: 48px 56px;
    border-radius: 4px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.35), 0 2px 6px rgba(0, 0, 0, 0.15);
    position: relative;
    transform-origin: top center;
    transition: transform 0.2s ease;
    box-sizing: border-box;
}

/* Watermark */
.pdf-watermark {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    overflow: hidden;
    opacity: 0.035;
    user-select: none;
}

.pdf-watermark span {
    font-size: 3.5rem;
    font-weight: 900;
    color: #000000;
    transform: rotate(-35deg);
    white-space: nowrap;
    letter-spacing: 4px;
    text-transform: uppercase;
}

/* Official Kop Surat */
.pdf-paper-kop {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 8px;
}

.pdf-kop-logo {
    width: 72px;
    height: 72px;
    object-fit: contain;
    flex-shrink: 0;
}

.pdf-kop-text {
    flex: 1;
    text-align: center;
    color: #0f172a;
}

.pdf-kop-text h3 {
    font-size: 1.05rem;
    font-weight: 800;
    margin: 0;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #0f172a;
    line-height: 1.25;
}

.pdf-kop-text h2 {
    font-size: 1.15rem;
    font-weight: 900;
    margin: 3px 0;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #004d3d;
    line-height: 1.25;
}

.pdf-kop-text p {
    font-size: 0.75rem;
    color: #475569;
    margin: 2px 0 0;
    line-height: 1.35;
}

.pdf-kop-divider {
    border: none;
    border-top: 3px solid #0f172a;
    border-bottom: 1px solid #0f172a;
    height: 4px;
    margin: 12px 0 24px;
}

/* Document Meta Box */
.pdf-doc-header-meta {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 26px;
}

.pdf-doc-category-badge {
    display: inline-block;
    background: #004d3d;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.pdf-doc-title-main {
    font-size: 1.22rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 10px;
    line-height: 1.35;
}

.pdf-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 8px 16px;
    font-size: 0.78rem;
    color: #334155;
    border-top: 1px dashed #cbd5e1;
    padding-top: 10px;
}

.pdf-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pdf-meta-item strong {
    color: #0f172a;
}

/* Document Body Typography */
.pdf-paper-body {
    position: relative;
    font-size: 0.92rem;
    line-height: 1.8;
    color: #334155;
}

.pdf-chapter-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 26px 0 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
}

.pdf-chapter-num {
    background: #004d3d;
    color: #ffffff;
    font-weight: 800;
    font-size: 0.78rem;
    padding: 4px 10px;
    border-radius: 6px;
    white-space: nowrap;
}

.pdf-chapter-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
}

.pdf-subchapter-title {
    font-size: 0.96rem;
    font-weight: 700;
    color: #004d3d;
    margin: 18px 0 8px;
}

.pdf-paragraph {
    margin-bottom: 14px;
    text-align: justify;
    color: #334155;
}

.pdf-callout-legal {
    background: #f0fdf4;
    border-left: 4px solid #16a34a;
    padding: 14px 18px;
    border-radius: 6px;
    margin: 16px 0;
    font-size: 0.88rem;
    color: #166534;
}

.pdf-callout-highlight {
    background: #eff6ff;
    border-left: 4px solid #2563eb;
    padding: 14px 18px;
    border-radius: 6px;
    margin: 16px 0;
    font-size: 0.88rem;
    color: #1e40af;
}

.pdf-list {
    margin: 10px 0 16px 20px;
    padding: 0;
}

.pdf-list li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.pdf-paper-footer {
    margin-top: 40px;
    padding-top: 16px;
    border-top: 1px solid #cbd5e1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.74rem;
    color: #64748b;
    flex-wrap: wrap;
    gap: 8px;
}

/* Fullscreen mode for PDF reader */
.pdf-reader-card.fullscreen-mode {
    position: fixed;
    inset: 0;
    z-index: 9999;
    border-radius: 0;
    width: 100vw;
    height: 100vh;
}

.pdf-reader-card.fullscreen-mode .pdf-reader-scroll-canvas {
    max-height: calc(100vh - 65px);
    height: calc(100vh - 65px);
}

@media (max-width: 768px) {
    .pdf-paper-sheet {
        padding: 28px 18px;
    }
    .pdf-kop-logo {
        width: 50px;
        height: 50px;
    }
    .pdf-kop-text h3 {
        font-size: 0.88rem;
    }
    .pdf-kop-text h2 {
        font-size: 0.95rem;
    }
    .pdf-reader-toolbar {
        padding: 10px 14px;
    }
    .video-player-container {
        min-height: 240px;
    }
    .btn-video-play-pulse {
        width: 60px;
        height: 60px;
        font-size: 1.8rem;
    }
}

/* Local Video Player Wrapper */
.video-local-player-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #000000;
}

.video-local-player-wrapper video {
    width: 100%;
    flex: 1;
    min-height: 0;
    background: #000000;
    outline: none;
    object-fit: contain;
}

.video-file-protocol-notice {
    background: #0f172a;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 8px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    flex-shrink: 0;
}

.vfp-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #10b981;
    font-size: 0.78rem;
    font-weight: 700;
}

.vfp-desc {
    color: #94a3b8;
    font-size: 0.75rem;
    margin: 0;
    line-height: 1.4;
    flex: 1;
    min-width: 240px;
}

.vfp-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.vfp-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #f1f5f9;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
    transition: all 0.2s ease;
}

.vfp-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

.vfp-btn-primary {
    background: #dc2626;
    border-color: #ef4444;
    color: #ffffff;
}

.vfp-btn-primary:hover {
    background: #b91c1c;
    border-color: #dc2626;
    color: #ffffff;
}

/* ==========================================================================
   MODULE BOTTOM NAVIGATION BAR (SEBELUMNYA & SELANJUTNYA)
   ========================================================================== */
.module-bottom-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 10px 14px;
    margin: 16px 0;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
}

[data-theme="dark"] .module-bottom-navigation {
    background: #111827;
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}

.mod-nav-col {
    display: flex;
    align-items: center;
    min-width: 0;
}

.mod-nav-left {
    flex: 0 0 auto;
}

.mod-nav-center {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 8px;
    min-width: 0;
}

.mod-nav-right {
    flex: 0 0 auto;
}

/* Nav Buttons */
.btn-mod-nav {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid var(--border-color);
    background: var(--bg-body);
    color: var(--text-main);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    white-space: nowrap;
}

.btn-mod-nav i {
    font-size: 1.15rem;
    line-height: 1;
    transition: transform 0.2s ease;
}

.btn-mod-nav-text {
    display: flex;
    flex-direction: column;
    text-align: left;
    line-height: 1.2;
}

.nav-direction-label {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.nav-module-hint {
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--text-muted);
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Previous Button */
.btn-mod-nav-prev:hover:not(:disabled) {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    transform: translateX(-3px);
    box-shadow: 0 4px 14px rgba(0, 77, 61, 0.3);
}

.btn-mod-nav-prev:hover:not(:disabled) .nav-module-hint {
    color: rgba(255, 255, 255, 0.85);
}

.btn-mod-nav-prev:hover:not(:disabled) i {
    transform: translateX(-2px);
}

/* Disabled state */
.btn-mod-nav.disabled,
.btn-mod-nav:disabled {
    opacity: 0.45;
    cursor: not-allowed !important;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: none;
}

[data-theme="dark"] .btn-mod-nav.disabled,
[data-theme="dark"] .btn-mod-nav:disabled {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.06);
}

/* Next Button */
.btn-mod-nav-next {
    background: linear-gradient(135deg, #004d3d 0%, #006952 100%);
    color: #ffffff;
    border-color: #004d3d;
    box-shadow: 0 4px 14px rgba(0, 77, 61, 0.35);
}

.btn-mod-nav-next .nav-direction-label {
    color: #a7f3d0;
}

.btn-mod-nav-next .nav-module-hint {
    color: rgba(255, 255, 255, 0.85);
}

.btn-mod-nav-next:hover:not(:disabled) {
    background: linear-gradient(135deg, #00382c 0%, #005643 100%);
    transform: translateX(3px);
    box-shadow: 0 6px 18px rgba(0, 77, 61, 0.45);
}

.btn-mod-nav-next:hover:not(:disabled) i {
    transform: translateX(2px);
}

/* Quiz / Finish Next Variant */
.btn-mod-nav-quiz {
    background: linear-gradient(135deg, #c5a022 0%, #b38e1b 100%);
    color: #0f172a;
    border-color: #c5a022;
    box-shadow: 0 4px 14px rgba(197, 160, 34, 0.4);
}

.btn-mod-nav-quiz .nav-direction-label {
    color: #451a03;
}

.btn-mod-nav-quiz .nav-module-hint {
    color: #1e293b;
}

.btn-mod-nav-quiz:hover:not(:disabled) {
    background: linear-gradient(135deg, #b08d18 0%, #997810 100%);
    transform: translateX(3px);
    box-shadow: 0 6px 20px rgba(197, 160, 34, 0.55);
}

/* Center Meta & Pills */
.mod-nav-meta-pills {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 5px;
}

.mod-nav-pos-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.76rem;
    font-weight: 800;
    color: var(--text-muted);
    background: var(--bg-body);
    padding: 3px 10px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

.mod-nav-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.74rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
}

.mod-nav-status-pill.completed {
    background: rgba(16, 185, 129, 0.14);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.28);
}

[data-theme="dark"] .mod-nav-status-pill.completed {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.mod-nav-status-pill.in-progress {
    background: rgba(245, 158, 11, 0.14);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.28);
}

[data-theme="dark"] .mod-nav-status-pill.in-progress {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.mod-nav-status-pill.locked {
    background: rgba(100, 116, 139, 0.14);
    color: #64748b;
    border: 1px solid rgba(100, 116, 139, 0.24);
}

.mod-nav-status-pill.guest {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.mod-nav-current-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-main);
    max-width: 320px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 768px) {
    .module-bottom-navigation {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 12px 14px;
    }
    .mod-nav-col {
        width: 100%;
        justify-content: center;
    }
    .btn-mod-nav {
        width: 100%;
        justify-content: center;
    }
    .mod-nav-center {
        order: -1;
        padding: 4px 0;
    }
    .mod-nav-current-title {
        max-width: 100%;
    }
}



/* ==========================================================================
   HELPDESK INTERAKTIF STYLES
   ========================================================================== */
.helpdesk-container {
    padding: 24px;
    max-width: 1320px;
    margin: 0 auto;
}

.helpdesk-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 50%, var(--accent) 100%);
    border-radius: var(--border-radius);
    padding: 28px 32px;
    color: #ffffff;
    box-shadow: var(--shadow-md);
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.helpdesk-hero::after {
    content: '';
    position: absolute;
    right: -40px;
    bottom: -50px;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(197, 160, 34, 0.25) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.helpdesk-hero-info h1 {
    font-size: 1.65rem;
    font-weight: 800;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #ffffff;
}

.helpdesk-hero-info p {
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.88);
    max-width: 650px;
    line-height: 1.5;
    margin: 0;
}

.helpdesk-hero-actions {
    display: flex;
    gap: 12px;
    z-index: 2;
    flex-wrap: wrap;
}

.btn-helpdesk-primary {
    background: var(--secondary);
    color: #1a2b48;
    font-weight: 800;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-speed);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.btn-helpdesk-primary:hover {
    transform: translateY(-2px);
    background: #deb836;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
}

.btn-helpdesk-outline {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    font-weight: 700;
    padding: 12px 18px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.88rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-speed);
    backdrop-filter: blur(4px);
}

.btn-helpdesk-outline:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

/* HelpDesk Metrics Grid */
.helpdesk-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.helpdesk-metric-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-speed);
}

.helpdesk-metric-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.metric-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.metric-icon-box.blue { background: rgba(59, 130, 246, 0.12); color: #2563eb; }
.metric-icon-box.amber { background: rgba(245, 158, 11, 0.12); color: #d97706; }
.metric-icon-box.green { background: rgba(16, 185, 129, 0.12); color: #059669; }
.metric-icon-box.purple { background: rgba(139, 92, 246, 0.12); color: #7c3aed; }

.metric-info h3 {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0;
    line-height: 1.2;
}

.metric-info span {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* HelpDesk Filter & Tab Bar */
.helpdesk-nav-tabs {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 12px 18px;
    margin-bottom: 20px;
    gap: 16px;
    flex-wrap: wrap;
}

.ticket-status-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.ticket-pill-btn {
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.84rem;
    font-weight: 700;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ticket-pill-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.ticket-pill-btn.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

.ticket-filter-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.ticket-search-box {
    position: relative;
    min-width: 240px;
}

.ticket-search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.95rem;
}

.ticket-search-box input {
    width: 100%;
    padding: 8px 12px 8px 34px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-body);
    color: var(--text-main);
    font-size: 0.86rem;
    outline: none;
    transition: border-color 0.2s;
}

.ticket-search-box input:focus {
    border-color: var(--primary);
}

.ticket-filter-select {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-body);
    color: var(--text-main);
    font-size: 0.84rem;
    font-weight: 600;
    outline: none;
    cursor: pointer;
}

/* HelpDesk Table & List */
.helpdesk-table-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.helpdesk-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    text-align: left;
}

.helpdesk-table th {
    background: var(--bg-body);
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
}

.helpdesk-table td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
    vertical-align: middle;
}

.helpdesk-table tr:hover {
    background: rgba(0, 77, 61, 0.03);
}

[data-theme="dark"] .helpdesk-table tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

/* Badges */
.badge-tkt-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge-tkt-open {
    background: rgba(59, 130, 246, 0.12);
    color: #2563eb;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-tkt-process {
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-tkt-resolved {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-tkt-cat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.74rem;
    font-weight: 700;
}

.badge-cat-teknis { background: rgba(139, 92, 246, 0.12); color: #7c3aed; }
.badge-cat-administrasi { background: rgba(59, 130, 246, 0.12); color: #2563eb; }
.badge-cat-umum { background: rgba(20, 184, 166, 0.12); color: #0d9488; }

.badge-priority {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 700;
}

.badge-priority-mendesak { background: rgba(239, 68, 68, 0.15); color: #dc2626; }
.badge-priority-normal { background: rgba(100, 116, 139, 0.12); color: #475569; }
.badge-priority-rendah { background: rgba(100, 116, 139, 0.08); color: #64748b; }

.btn-tkt-action {
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-weight: 700;
    font-size: 0.8rem;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-tkt-action:hover {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

.tkt-actions-cell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    position: relative;
}

.tkt-admin-status-dropdown-wrap {
    position: relative;
    display: inline-block;
}

.btn-tkt-admin-status {
    background: rgba(0, 77, 61, 0.08);
    border: 1px solid rgba(0, 77, 61, 0.25);
    color: var(--primary);
    font-weight: 700;
}

.btn-tkt-admin-status:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.tkt-status-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 1000;
    min-width: 160px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    padding: 6px;
    text-align: left;
    animation: fadeInMenu 0.15s ease-out;
}

.tkt-status-dropdown-menu.show {
    display: block;
}

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

.status-menu-header {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 6px 10px 4px 10px;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 4px;
}

.status-menu-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: none;
    background: transparent;
    color: var(--text-main);
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
    text-align: left;
}

.status-menu-item:hover {
    background: rgba(0, 77, 61, 0.08);
    color: var(--primary);
}

.status-menu-item.active {
    background: rgba(0, 77, 61, 0.12);
    font-weight: 800;
    color: var(--primary);
}

/* Stepper Tracker for Real-time Ticket */
.ticket-stepper {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin: 20px 0 28px 0;
    padding: 0 10px;
}

.ticket-stepper::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 40px;
    right: 40px;
    height: 3px;
    background: var(--border-color);
    z-index: 1;
}

.ticket-step-item {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 33%;
}

.step-circle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 3px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--text-muted);
    font-weight: 800;
    margin-bottom: 8px;
    transition: all 0.3s;
}

.step-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.step-date {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.ticket-step-item.active .step-circle {
    border-color: var(--warning);
    background: var(--warning);
    color: #ffffff;
    box-shadow: 0 0 0 4px rgba(252, 163, 17, 0.2);
}

.ticket-step-item.active .step-label {
    color: var(--text-main);
}

.ticket-step-item.completed .step-circle {
    border-color: var(--success);
    background: var(--success);
    color: #ffffff;
    box-shadow: 0 0 0 4px rgba(45, 106, 79, 0.2);
}

.ticket-step-item.completed .step-label {
    color: var(--success);
}

/* Ticket Conversation Thread */
.ticket-thread-box {
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    max-height: 340px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 16px;
}

.thread-entry {
    display: flex;
    gap: 12px;
}

.thread-entry.operator {
    flex-direction: row-reverse;
}

.thread-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 800;
    flex-shrink: 0;
}

.thread-avatar.user { background: #3b82f6; color: #ffffff; }
.thread-avatar.operator { background: var(--primary); color: #ffffff; }

.thread-bubble {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 16px;
    max-width: 80%;
}

.thread-entry.operator .thread-bubble {
    background: rgba(0, 77, 61, 0.08);
    border-color: rgba(0, 77, 61, 0.2);
}

[data-theme="dark"] .thread-entry.operator .thread-bubble {
    background: rgba(0, 107, 84, 0.2);
    border-color: rgba(0, 107, 84, 0.4);
}

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

.thread-author {
    font-weight: 700;
    font-size: 0.82rem;
    color: var(--text-main);
}

.thread-time {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.thread-text {
    font-size: 0.85rem;
    color: var(--text-main);
    line-height: 1.45;
    margin: 0;
    white-space: pre-wrap;
}

/* ==========================================================================
   Enhanced HelpDesk Ticket & Modal Card System
   ========================================================================== */

/* Universal Polished Modal Card */
.modal-card {
    background: var(--bg-card) !important;
    border-radius: 20px !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.05) !important;
    position: relative !important;
    padding: 28px 32px !important;
    animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    color: var(--text-main) !important;
    box-sizing: border-box !important;
}

[data-theme="dark"] .modal-card {
    background: #1e293b !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05) !important;
}

/* Modern Minimalist Close Button */
.modal-close-btn-modern {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-sm);
}

.modal-close-btn-modern:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.25);
    transform: rotate(90deg) scale(1.06);
}

[data-theme="dark"] .modal-close-btn-modern {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    color: #94a3b8;
}

[data-theme="dark"] .modal-close-btn-modern:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.4);
}

/* Specific Styles for Ticket Creation Modal */
.modal-ticket-card {
    max-width: 640px !important;
    width: 95% !important;
    max-height: 92vh !important;
    overflow-y: auto !important;
    padding: 28px 32px !important;
}

.ticket-modal-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.ticket-modal-icon-badge {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, #004d3d 0%, #006b54 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    box-shadow: 0 8px 20px rgba(0, 77, 61, 0.25);
    flex-shrink: 0;
}

[data-theme="dark"] .ticket-modal-icon-badge {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: #042019;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

.ticket-modal-title-group {
    flex: 1;
    padding-right: 36px;
}

.ticket-modal-badge-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.ticket-modal-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 9px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    background: rgba(0, 77, 61, 0.08);
    color: var(--primary);
    border: 1px solid rgba(0, 77, 61, 0.15);
}

.ticket-modal-pill.pill-sub {
    background: rgba(197, 160, 34, 0.12);
    color: #92400e;
    border-color: rgba(197, 160, 34, 0.25);
}

[data-theme="dark"] .ticket-modal-pill {
    background: rgba(52, 211, 153, 0.15);
    color: #34d399;
    border-color: rgba(52, 211, 153, 0.3);
}

[data-theme="dark"] .ticket-modal-pill.pill-sub {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    border-color: rgba(251, 191, 36, 0.3);
}

.ticket-modal-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0 0 3px 0;
    letter-spacing: -0.3px;
    line-height: 1.25;
}

.ticket-modal-subtitle {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
}

/* Info Callout Box */
.ticket-modal-info-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: linear-gradient(135deg, rgba(0, 77, 61, 0.05) 0%, rgba(0, 107, 84, 0.02) 100%);
    border: 1px solid rgba(0, 77, 61, 0.16);
    border-left: 4px solid var(--primary);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 0.8rem;
    color: var(--text-main);
    line-height: 1.45;
}

.ticket-modal-info-box i {
    font-size: 1.15rem;
    color: var(--primary);
    flex-shrink: 0;
    margin-top: 1px;
}

[data-theme="dark"] .ticket-modal-info-box {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.25);
    border-left-color: #34d399;
}

[data-theme="dark"] .ticket-modal-info-box i {
    color: #34d399;
}

/* Form Section Headers */
.ticket-form-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--primary);
    margin: 18px 0 12px 0;
    padding-bottom: 6px;
    border-bottom: 1px dashed var(--border-color);
}

[data-theme="dark"] .ticket-form-section-title {
    color: #4ade80;
}

/* Form Grid & Fields */
.ticket-form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 12px;
}

.ticket-form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.ticket-form-field label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-main);
}

.ticket-form-field label i {
    color: var(--primary);
    font-size: 0.95rem;
}

[data-theme="dark"] .ticket-form-field label i {
    color: #34d399;
}

.ticket-form-field .req-star {
    color: #ef4444;
    font-weight: 800;
}

.ticket-input-wrapper {
    position: relative;
    width: 100%;
}

.ticket-input-wrapper input,
.ticket-input-wrapper select,
.ticket-input-wrapper textarea {
    width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1.5px solid var(--border-color);
    background: var(--bg-body);
    color: var(--text-main);
    font-size: 0.88rem;
    font-family: 'Inter', -apple-system, sans-serif !important;
    outline: none;
    transition: all 0.2s ease-in-out;
    box-sizing: border-box;
}

.ticket-input-wrapper input:hover,
.ticket-input-wrapper select:hover,
.ticket-input-wrapper textarea:hover {
    border-color: #94a3b8;
}

.ticket-input-wrapper input:focus,
.ticket-input-wrapper select:focus,
.ticket-input-wrapper textarea:focus {
    border-color: var(--primary);
    background: var(--bg-card);
    box-shadow: 0 0 0 3.5px rgba(0, 77, 61, 0.12);
}

[data-theme="dark"] .ticket-input-wrapper input:focus,
[data-theme="dark"] .ticket-input-wrapper select:focus,
[data-theme="dark"] .ticket-input-wrapper textarea:focus {
    border-color: #34d399;
    box-shadow: 0 0 0 3.5px rgba(52, 211, 153, 0.2);
}

.ticket-input-wrapper textarea {
    line-height: 1.55;
    resize: vertical;
    min-height: 95px;
}

.ticket-input-wrapper select {
    font-weight: 600;
    cursor: pointer;
}

.ticket-field-hint {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.74rem;
    color: var(--text-muted);
    margin-top: 3px;
    padding: 0 2px;
}

.ticket-field-hint span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Modal Footer Actions */
.ticket-modal-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--border-color);
}

.btn-ticket-cancel {
    padding: 10px 22px;
    border-radius: 10px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    font-size: 0.88rem;
    background: var(--bg-body);
    color: var(--text-main);
    border: 1.5px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    box-shadow: var(--shadow-sm);
}

.btn-ticket-cancel:hover {
    background: #e2e8f0;
    color: #0f172a;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

[data-theme="dark"] .btn-ticket-cancel {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: #f1f5f9;
}

[data-theme="dark"] .btn-ticket-cancel:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-ticket-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 26px;
    border-radius: 10px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 800;
    font-size: 0.92rem;
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: #ffffff;
    border: 1.5px solid #047857;
    box-shadow: 0 4px 14px rgba(5, 150, 105, 0.3);
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.btn-ticket-submit:hover {
    background: linear-gradient(135deg, #047857 0%, #065f46 100%);
    box-shadow: 0 6px 18px rgba(5, 150, 105, 0.42);
    transform: translateY(-1px);
}

.btn-ticket-submit:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(5, 150, 105, 0.25);
}

[data-theme="dark"] .btn-ticket-submit {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #042019;
    border-color: #34d399;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

[data-theme="dark"] .btn-ticket-submit:hover {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
    box-shadow: 0 6px 20px rgba(52, 211, 153, 0.45);
}

@media (max-width: 576px) {
    .modal-ticket-card {
        padding: 20px 16px !important;
    }
    .ticket-form-grid-2 {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .ticket-modal-icon-badge {
        width: 44px;
        height: 44px;
        font-size: 1.3rem;
    }
}

/* ==========================================================================
   FAQ CENTER STYLES
   ========================================================================== */
.faq-container {
    padding: 24px;
    max-width: 1080px;
    margin: 0 auto;
}

.faq-hero-section {
    text-align: center;
    padding: 36px 20px 28px 20px;
    background: linear-gradient(135deg, rgba(0, 77, 61, 0.06) 0%, rgba(26, 43, 72, 0.08) 100%);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    margin-bottom: 28px;
    position: relative;
}

.faq-badge-title {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 77, 61, 0.1);
    color: var(--primary);
    font-weight: 800;
    font-size: 0.82rem;
    padding: 6px 14px;
    border-radius: 20px;
    margin-bottom: 12px;
}

[data-theme="dark"] .faq-badge-title {
    background: rgba(0, 107, 84, 0.3);
    color: #4ade80;
}

.faq-hero-title {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 8px;
}

.faq-hero-subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 24px auto;
}

/* FAQ Live Search & Suggestion Wrap */
.faq-search-wrapper {
    position: relative;
    max-width: 680px;
    margin: 0 auto;
}

.faq-search-input-box {
    position: relative;
    display: flex;
    align-items: center;
}

.faq-search-input-box i.ri-search-line {
    position: absolute;
    left: 18px;
    color: var(--primary);
    font-size: 1.25rem;
    pointer-events: none;
}

.faq-search-input {
    width: 100%;
    padding: 14px 20px 14px 50px;
    border-radius: 30px;
    border: 2px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-main);
    font-size: 0.96rem;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
    outline: none;
    transition: all 0.25s;
}

.faq-search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 77, 61, 0.15);
}

.faq-clear-search {
    position: absolute;
    right: 16px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 4px;
    display: none;
}

/* Instant Suggestions Dropdown */
.faq-suggestion-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    z-index: 100;
    max-height: 380px;
    overflow-y: auto;
    text-align: left;
    display: none;
}

.faq-suggestion-dropdown.show {
    display: block;
}

.faq-sugg-header {
    padding: 10px 16px;
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-body);
    display: flex;
    justify-content: space-between;
}

.faq-sugg-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.15s;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.faq-sugg-item:last-child {
    border-bottom: none;
}

.faq-sugg-item:hover {
    background: rgba(0, 77, 61, 0.05);
}

[data-theme="dark"] .faq-sugg-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.sugg-question {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.sugg-answer-preview {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* FAQ Categories Filter Pills */
.faq-category-pills {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.faq-cat-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.85rem;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.faq-cat-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.faq-cat-btn.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

/* FAQ Accordion List */
.faq-list-wrap {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-card-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
}

.faq-card-item:hover {
    border-color: var(--primary-light);
}

.faq-card-item.expanded {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.faq-header-bar {
    padding: 16px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    user-select: none;
}

.faq-q-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.faq-q-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(0, 77, 61, 0.08);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

[data-theme="dark"] .faq-q-icon {
    background: rgba(0, 107, 84, 0.25);
    color: #4ade80;
}

.faq-question-text {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.4;
}

.faq-chevron {
    font-size: 1.3rem;
    color: var(--text-muted);
    transition: transform 0.25s ease;
}

.faq-card-item.expanded .faq-chevron {
    transform: rotate(180deg);
    color: var(--primary);
}

.faq-answer-body {
    display: none;
    padding: 0 20px 18px 68px;
    color: var(--text-main);
    font-size: 0.9rem;
    line-height: 1.6;
    border-top: 1px solid transparent;
}

.faq-card-item.expanded .faq-answer-body {
    display: block;
    border-top-color: var(--border-color);
    padding-top: 14px;
}

.faq-footer-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px dashed var(--border-color);
    flex-wrap: wrap;
    gap: 12px;
}

.faq-vote-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.faq-vote-btn {
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--text-main);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.15s;
}

.faq-vote-btn:hover {
    background: rgba(0, 77, 61, 0.08);
    border-color: var(--primary);
}

.faq-admin-actions {
    display: flex;
    gap: 8px;
}

/* ==========================================================================
   CHATBOT AI POP-UP FLOATING WIDGET
   ========================================================================== */
.chatbot-floating-wrapper {
    position: fixed;
    bottom: 26px;
    right: 26px;
    z-index: 99999;
    display: none;
    flex-direction: column;
    align-items: flex-end;
}

.chatbot-floating-wrapper.visible {
    display: flex !important;
}

/* Floating Button */
.chatbot-trigger-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 50%, var(--secondary) 100%);
    border: none;
    color: #ffffff;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 77, 61, 0.4);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    outline: none;
}

.chatbot-trigger-btn:hover {
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 77, 61, 0.5);
}

.chatbot-trigger-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--primary-light);
    opacity: 0.6;
    animation: chatbotPulse 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
    pointer-events: none;
}

@keyframes chatbotPulse {
    0% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.35); opacity: 0; }
    100% { transform: scale(1.35); opacity: 0; }
}

.chatbot-trigger-icon-wrap {
    font-size: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    width: 100%;
    height: 100%;
    position: relative;
}

.pns-avatar-container {
    width: 50px;
    height: 50px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    padding: 1px;
    box-sizing: border-box;
    overflow: hidden;
}

.chatbot-floating-wrapper.open .pns-avatar-container {
    display: none !important;
}

.chatbot-floating-wrapper.open .chatbot-icon-default {
    display: none;
}

.chatbot-icon-close {
    display: none;
}

.chatbot-floating-wrapper.open .chatbot-icon-close {
    display: block;
    font-size: 1.6rem;
}

.chatbot-badge-online {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #10b981;
    border: 2px solid #ffffff;
    z-index: 3;
}

/* Tooltip bubble next to trigger */
.chatbot-tooltip-bubble {
    position: absolute;
    right: 74px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-card);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    box-shadow: var(--shadow-md);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0.95;
    transition: opacity 0.2s;
}

.chatbot-floating-wrapper.open .chatbot-tooltip-bubble {
    display: none;
}

/* Chatbot Popup Window */
.chatbot-window {
    width: 390px;
    max-width: calc(100vw - 32px);
    height: 580px;
    max-height: calc(100vh - 120px);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 22px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
    margin-bottom: 16px;
    display: none;
    flex-direction: column;
    overflow: hidden;
    transform-origin: bottom right;
    animation: chatWindowPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.chatbot-floating-wrapper.open .chatbot-window {
    display: flex;
}

/* Minimized State */
.chatbot-window.minimized {
    height: 64px !important;
    overflow: hidden;
}

.chatbot-window.minimized .chatbot-messages-body,
.chatbot-window.minimized .chatbot-notice-bar,
.chatbot-window.minimized .chatbot-input-bar {
    display: none !important;
}

/* Chatbot Header */
.chatbot-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    padding: 14px 18px;
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chatbot-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chatbot-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0;
    box-sizing: border-box;
}

.chatbot-avatar .pns-avatar-svg {
    width: 40px;
    height: 40px;
}

.chatbot-gender-badge {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #ffffff;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
    font-family: inherit;
    margin-right: 2px;
}

.chatbot-gender-badge:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

/* Animated PNS Mascot with Headset & Mic */
.pns-avatar-svg {
    width: 100%;
    height: 100%;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
    animation: pnsAvatarBob 3.5s ease-in-out infinite;
    transform-origin: 50% 90%;
    pointer-events: none;
}

.chatbot-trigger-btn:hover .pns-avatar-svg {
    transform: scale(1.12) rotate(3deg);
}

.pns-eyes {
    transform-box: fill-box;
    transform-origin: center;
    animation: pnsEyesBlink 4s infinite ease-in-out;
}

.pns-mic-light {
    transform-box: fill-box;
    transform-origin: center;
    animation: pnsMicPulse 1.8s infinite ease-in-out;
}

@keyframes pnsAvatarBob {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-3px) rotate(1.5deg); }
}

@keyframes pnsEyesBlink {
    0%, 92%, 100% { transform: scaleY(1); }
    96% { transform: scaleY(0.08); }
}

@keyframes pnsMicPulse {
    0%, 100% {
        opacity: 0.6;
        fill: #34d399;
        filter: drop-shadow(0 0 1px #34d399);
    }
    50% {
        opacity: 1;
        fill: #10b981;
        filter: drop-shadow(0 0 4px #10b981);
    }
}

.chatbot-status-dot {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    background: #10b981;
    border: 2px solid #ffffff;
    border-radius: 50%;
}

.chatbot-title-wrap {
    display: flex;
    flex-direction: column;
}

.chatbot-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: #ffffff;
}

.chatbot-subtitle {
    font-size: 0.74rem;
    color: rgba(255, 255, 255, 0.85);
}

.chatbot-header-actions {
    display: flex;
    gap: 6px;
}

.chatbot-hdr-btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #ffffff;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s;
}

.chatbot-hdr-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Chatbot Notice Bar */
.chatbot-notice-bar {
    background: rgba(197, 160, 34, 0.12);
    border-bottom: 1px solid rgba(197, 160, 34, 0.2);
    padding: 6px 14px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #b45309;
    display: flex;
    align-items: center;
    gap: 6px;
}

[data-theme="dark"] .chatbot-notice-bar {
    background: rgba(197, 160, 34, 0.18);
    color: #facc15;
}

/* Chatbot Messages Body */
.chatbot-messages-body {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: var(--bg-body);
}

.chat-msg {
    display: flex;
    gap: 10px;
    max-width: 90%;
}

.chat-msg.bot-msg {
    align-self: flex-start;
}

.chat-msg.user-msg {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.chat-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.bot-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 77, 61, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0;
    box-sizing: border-box;
    flex-shrink: 0;
    overflow: hidden;
}

.bot-avatar .pns-avatar-svg {
    width: 36px;
    height: 36px;
}

.user-avatar {
    background: #3b82f6;
    color: #ffffff;
}

.chat-bubble-wrap {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.chat-msg.user-msg .chat-bubble-wrap {
    align-items: flex-end;
}

.chat-bubble {
    padding: 11px 15px;
    border-radius: 16px;
    font-size: 0.86rem;
    line-height: 1.48;
    color: var(--text-main);
}

.bot-msg .chat-bubble {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-top-left-radius: 4px;
    box-shadow: var(--shadow-sm);
}

.user-msg .chat-bubble {
    background: var(--primary);
    color: #ffffff;
    border-top-right-radius: 4px;
}

.chat-bubble p {
    margin: 0 0 6px 0;
}

.chat-bubble p:last-child {
    margin-bottom: 0;
}

.chat-bubble ul {
    margin: 6px 0 6px 18px;
    padding: 0;
}

.chat-time {
    font-size: 0.68rem;
    color: var(--text-muted);
    padding: 0 4px;
}

/* Quick Prompts */
.chatbot-quick-prompts {
    margin-top: 4px;
    background: var(--bg-card);
    border: 1px dashed var(--border-color);
    border-radius: 12px;
    padding: 10px 12px;
}

.quick-prompts-label {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.quick-prompts-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.quick-prompt-btn {
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.15s;
    text-align: left;
}

.quick-prompt-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(0, 77, 61, 0.06);
}

/* Fallback Action Card */
.chat-fallback-card {
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 12px;
    padding: 12px;
    margin-top: 8px;
}

.chat-fallback-card p {
    font-size: 0.8rem;
    color: var(--text-main);
    margin-bottom: 10px;
    font-weight: 600;
}

.fallback-actions-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-fallback-action {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-fallback-ticket {
    background: var(--primary);
    color: #ffffff;
}

.btn-fallback-ticket:hover {
    background: var(--primary-light);
}

.btn-fallback-wa {
    background: #25d366;
    color: #ffffff;
}

.btn-fallback-wa:hover {
    background: #1eb857;
}

.btn-fallback-tg {
    background: #0088cc;
    color: #ffffff;
}

.btn-fallback-tg:hover {
    background: #0077b5;
}

/* Chat Input Bar */
.chatbot-input-bar {
    padding: 12px 14px;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.chatbot-input-bar input {
    flex: 1;
    padding: 10px 14px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background: var(--bg-body);
    color: var(--text-main);
    font-size: 0.86rem;
    outline: none;
    transition: border-color 0.2s;
}

.chatbot-input-bar input:focus {
    border-color: var(--primary);
}

.chatbot-send-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--primary);
    border: none;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s;
    flex-shrink: 0;
}

.chatbot-send-btn:hover {
    background: var(--primary-light);
    transform: scale(1.05);
}

/* Typing indicator */
.chat-typing-dots {
    display: inline-flex;
    gap: 4px;
    padding: 8px 12px;
}

.chat-typing-dots span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--text-muted);
    animation: typingBounce 1.4s infinite ease-in-out both;
}

.chat-typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.chat-typing-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes typingBounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

@media (max-width: 600px) {
    .chatbot-window {
        width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        bottom: 0;
        right: 0;
        margin-bottom: 0;
        position: fixed;
    }
    .helpdesk-hero {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    .faq-answer-body {
        padding-left: 20px;
    }
}

/* User Dropdown Language Switcher Pills */
.btn-lang-pill {
    position: relative;
    border: 1px solid var(--border-color);
    background: var(--bg-body);
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    font-size: 0.8rem;
    font-weight: 700;
}

.btn-lang-pill:hover:not(.active) {
    border-color: var(--primary);
    background: var(--bg-hover);
    transform: translateY(-1px);
}

.btn-lang-pill.active {
    background: var(--primary) !important;
    color: #ffffff !important;
    border-color: var(--primary) !important;
    box-shadow: 0 3px 10px rgba(13, 148, 136, 0.35);
}

.btn-lang-pill:active {
    transform: scale(0.97);
}
