/* ==============================================================
   LMS ADMIN PANEL - FUN & PLAYFUL THEME MODIFICATION
   Theme: "Creative Studio" (Rounded, Gradient, Bouncy, Compact)
   ============================================================== */

/* --- 0. ANIMATIONS & VARIABLES --- */
/* Animasi Masuk (Pop In) */
@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0.98);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}


/* Animasi Pulse untuk Status Chat */
@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
    }
}

@keyframes wave {

    0%,
    100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(20deg);
    }

    75% {
        transform: rotate(-20deg);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- 1. MAIN WRAPPER (Floating Page) --- */
#lms-main-wrapper {
    font-family: 'Nunito', 'Poppins', 'Segoe UI', sans-serif;
    font-size: 14px;
    /* Disesuaikan agar lebih compact */
    line-height: 1.5;
    color: #4b5563;
    background: #ffffff;
    padding: 40px;

    border-radius: 24px;

    max-width: 100%;
    margin: 40px auto;
    /* Margin atas lebih besar untuk ruang floating */
    box-sizing: border-box;
    border: 2px solid #f0f3ff;

    /* [MODIFIKASI] Efek Floating Page - REMOVED AS REQUESTED */
    /* animation: gentleFloat 5s ease-in-out infinite; */
}

#lms-main-wrapper *,
#lms-main-wrapper *::before,
#lms-main-wrapper *::after {
    box-sizing: border-box;
}

/* --- 2. TYPOGRAPHY & HEADER --- */
#lms-main-wrapper h1 {
    font-size: 26px;
    /* Sedikit lebih kecil agar proporsional */
    font-weight: 800;
    margin: 0 0 25px 0;

    background: linear-gradient(135deg, #7c3aed 0%, #db2777 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;

    letter-spacing: -0.02em;
}

#lms-main-wrapper h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 20px 0 15px 0;
    color: #374151;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#lms-main-wrapper p {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 24px;
}

/* --- 3. NAVIGATION TABS (Unified Design v018) --- */
#lms-main-wrapper .nav-tab-wrapper {
    display: flex !important;
    background: #f3f4f6 !important;
    border-bottom: none !important;
    margin-bottom: 25px !important;
    flex-wrap: nowrap !important;
    gap: 4px !important;
    padding: 12px 12px 0 12px !important;
    align-items: flex-end;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    white-space: nowrap;
}

#lms-main-wrapper .nav-tab-wrapper::-webkit-scrollbar {
    display: none;
}

#lms-main-wrapper a.nav-tab {
    background: #757687 !important;
    /* Inactive Tab Color */
    border: none !important;
    margin: 0 !important;
    padding: 12px 24px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #FFFFFF !important;
    text-decoration: none !important;
    cursor: pointer !important;
    border-radius: 8px 8px 0 0 !important;
    position: relative;
    transition: all 0.2s ease !important;
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

#lms-main-wrapper a.nav-tab:hover:not(.nav-tab-active) {
    background-color: #5a5b6a !important;
    color: #fff !important;
}

#lms-main-wrapper a.nav-tab-active {
    background-color: #FFFFFF !important;
    color: #1E5EFF !important;
    /* Active Tab Color */
    border: none !important;
    z-index: 10 !important;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05) !important;
    padding-bottom: 16px !important;
    margin-bottom: -1px !important;
}

/* --- 4. BUTTONS & ACTION BAR --- */
#lms-main-wrapper .action-bar {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 25px;
    width: 100%;
}

#lms-main-wrapper .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    border-radius: 10px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    border: none !important;
    text-decoration: none !important;
    height: 38px !important;
    line-height: 38px !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05) !important;
    vertical-align: middle !important;
}

#lms-main-wrapper .button:active {
    transform: scale(0.95);
}

#lms-main-wrapper .button-primary {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    color: white;
    box-shadow: 0 6px 15px rgba(139, 92, 246, 0.35);
}

#lms-main-wrapper .button-primary:hover {
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.45);
    transform: translateY(-2px);
}

#lms-main-wrapper .button-delete {
    background: #fee2e2;
    color: #dc2626;
}

#lms-main-wrapper .button-delete:hover {
    background: #dc2626;
    color: white;
}

#lms-main-wrapper .button-secondary,
#lms-main-wrapper .btn-view-edit {
    background-color: #ffffff;
    border: 2px solid #e5e7eb;
    color: #4b5563;
    border-radius: 10px;
    font-weight: 700;
}

#lms-main-wrapper .button-secondary:hover,
#lms-main-wrapper .btn-view-edit:hover {
    border-color: #8b5cf6;
    color: #8b5cf6;
    background: #fff;
}

/* Unified View Button Style */
#lms-main-wrapper .button-view,
#lms-main-wrapper .btn-view {
    background-color: #76b0ad !important;
    /* View Button Color */
    color: #fff !important;
    border: none !important;
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 6px;
}

#lms-main-wrapper .button-view:hover,
#lms-main-wrapper .btn-view:hover {
    background-color: #5f9e9b !important;
}

/* Unified Edit Button Style */
#lms-main-wrapper .button-edit,
#lms-main-wrapper .btn-edit {
    background-color: #931e00 !important;
    /* Edit Button Color */
    color: #fff !important;
    border: none !important;
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 6px;
}

#lms-main-wrapper .button-edit:hover,
#lms-main-wrapper .btn-edit:hover {
    background-color: #7a1900 !important;
}

/* Unified Add New Button Style */
#lms-main-wrapper .button-add,
#lms-main-wrapper .btn-add {
    background-color: #00627a !important;
    /* Add New Row Color */
    color: #fff !important;
    border: none !important;
}

#lms-main-wrapper .button-add:hover,
#lms-main-wrapper .btn-add:hover {
    background-color: #004e61 !important;
}

/* Unified Refresh Button Style */
#lms-main-wrapper .button-refresh,
#lms-main-wrapper .btn-refresh {
    background-color: #d1a617 !important;
    /* Refresh Color */
    color: #fff !important;
    border: none !important;
}

#lms-main-wrapper .button-refresh:hover,
#lms-main-wrapper .btn-refresh:hover {
    background-color: #b58f14 !important;
}

/* Unified Export Button Style */
#lms-main-wrapper .button-export,
#lms-main-wrapper .btn-export {
    background-color: #006032 !important;
    /* Download Excel Color */
    color: #fff !important;
    border: none !important;
}

#lms-main-wrapper .button-export:hover,
#lms-main-wrapper .btn-export:hover {
    background-color: #004d28 !important;
}

#lms-main-wrapper table td button {
    margin-right: 8px;
}

/* --- 5. DATA TABLES --- */
/* [FIX] NEW: Unified Controls Row (Sticky) */
.lms-controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    background: #ffffff;
    padding: 10px 15px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;

    /* Sticky Position */
    position: sticky;
    top: 10px;
    z-index: 99;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.lms-controls-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lms-controls-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    margin-bottom: 0 !important;
    font-weight: 600;
    color: #6b7280;
    font-size: 13px;
    float: none !important;
}

.dataTables_wrapper .dataTables_length label {
    display: flex !important;
    align-items: center;
    gap: 8px;
    margin: 0 !important;
    padding: 0 !important;
    line-height: normal !important;
}

.dataTables_wrapper .dataTables_length select {
    width: 60px !important;
    padding: 0 10px 0 10px !important;
    font-size: 13px !important;
    border-radius: 8px !important;
    border: 1px solid #e5e7eb !important;
    background-color: #f9fafb !important;
    height: 38px !important;
    line-height: 38px !important;
    /* Force line height to match height */
    margin: 0 !important;
    vertical-align: middle !important;
}

.dataTables_wrapper .dataTables_filter input {
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    padding: 0 12px !important;
    font-size: 13px !important;
    height: 38px !important;
    line-height: 38px !important;
    width: 200px !important;
    background: #f9fafb !important;
    margin: 0 !important;
}

/* Remove floats */
.dataTables_wrapper .dataTables_length {
    float: none !important;
}

.dataTables_wrapper .dataTables_filter {
    float: none !important;
}

#lms-main-wrapper table.dataTable {
    width: 100% !important;
    border-collapse: separate;
    border-spacing: 0 6px;
    margin-top: 10px;
    border: none;
}

#lms-main-wrapper table.dataTable thead th {
    background-color: #0047A0 !important;
    /* Header Table Color */
    color: #ffffff !important;
    font-weight: 700;
    text-align: left;
    padding: 14px 20px;
    border: none;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

#lms-main-wrapper table.dataTable thead th:first-child {
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

#lms-main-wrapper table.dataTable thead th:last-child {
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

#lms-main-wrapper table.dataTable tbody td {
    padding: 18px 20px;
    color: #374151;
    vertical-align: middle;
    background: #fff;
    font-size: 13.5px;
    font-weight: 500;
    border-top: 1px solid #f3f4f6;
    border-bottom: 1px solid #f3f4f6;
}

#lms-main-wrapper table.dataTable tbody tr td:first-child {
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
    border-left: 1px solid #f3f4f6;
}

#lms-main-wrapper table.dataTable tbody tr td:last-child {
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
    border-right: 1px solid #f3f4f6;
}

/* Fix Thumbnail Size in Tables */
#tbl-courses td.lms-col-thumbnail {
    width: 80px !important;
    min-width: 80px !important;
    max-width: 80px !important;
    padding: 10px !important;
}

#tbl-courses td.lms-col-thumbnail img {
    width: 80px !important;
    height: auto !important;
    border-radius: 8px !important;
    display: block;
    margin: 0 auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#lms-main-wrapper table.dataTable tbody tr {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#lms-main-wrapper table.dataTable tbody tr:hover td {
    background-color: #ffffff;
    border-color: transparent;
}

#lms-main-wrapper table.dataTable tbody tr:hover {
    transform: scale(1.01);
    box-shadow: 0 8px 20px -5px rgba(0, 0, 0, 0.05);
    z-index: 5;
    position: relative;
}

/* --- 6. BADGES --- */
.lms-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
}

.lms-badge-active,
.lms-badge-publish {
    background-color: #d1fae5;
    color: #059669;
}

.lms-badge-draft,
.lms-badge-pending {
    background-color: #fef3c7;
    color: #d97706;
}

.lms-badge-inactive {
    background-color: #f3f4f6;
    color: #6b7280;
}

.lms-rating-badge {
    background: #fffbeb;
    color: #fbbf24;
    padding: 4px 8px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
    border: 1px dashed #fcd34d;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* --- 7. PROGRESS BAR --- */
#lms-main-wrapper table td div[style*="background:#eee"] {
    background-color: #f3f4f6 !important;
    height: 8px !important;
    border-radius: 10px !important;
}

#lms-main-wrapper table td div[style*="background:#2271b1"] {
    background: linear-gradient(90deg, #8b5cf6, #ec4899) !important;
    border-radius: 10px !important;
}

/* --- 8. FORM INPUTS & DROPDOWNS --- */
#lms-main-wrapper input[type="text"],
#lms-main-wrapper input[type="email"],
#lms-main-wrapper select,
#lms-main-wrapper textarea {
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13px;
    color: #374151;
    background: #f9fafb;
    transition: all 0.2s ease;
    width: 100%;
    max-width: 100%;
    box-shadow: none;
}

#lms-main-wrapper input:focus,
#lms-main-wrapper select:focus {
    border-color: #8b5cf6;
    background: #fff;
    outline: none;
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15);
}

.lms-table-select {
    padding: 6px 30px 6px 10px;
    font-size: 13px;
    border-radius: 8px;
    cursor: pointer;
    border-color: #d1d5db;
}

/* --- 9. CHAT SYSTEM (FIXED ICONS & TEXT COLOR & HEADER & INPUTS) --- */

/* === CHAT CONTAINER: LEBIH TINGGI === */
/* =====================================================
   1️⃣ CHAT CONTAINER UTAMA (FULL HEIGHT)
   ===================================================== */
.chat-wrapper,
.chat-main,
#chat-box-wrapper,
#lms-chat-container {
    display: flex !important;
    flex-direction: column !important;

    /* FULL tinggi viewport */
    height: calc(100vh - 120px) !important;
    min-height: 85vh !important;
    max-height: none !important;
}


/* =====================================================
   2️⃣ HEADER & TOOLBAR TIDAK IKUT MEMBESAR
   ===================================================== */
#chat-header,
.chat-header,
#chat-toolbar,
.message-input-container {
    flex-shrink: 0 !important;
}


/* =====================================================
   3️⃣ CHAT HISTORY (AREA UTAMA YANG MEMBESAR)
   ===================================================== */
.messages-container,
#chat-history,
.chat-history {
    /* MATIKAN height inline / fixed */
    height: auto !important;
    max-height: none !important;

    /* FLEX AGAR MENGISI RUANG */
    flex: 1 1 auto !important;
    min-height: 0 !important;

    /* SCROLL */
    overflow-y: auto !important;
    padding-bottom: 24px !important;
}


/* Sidebar Container (Left) */
#chat-sidebar-header {
    background: linear-gradient(135deg, #667EEA 0%, #764BA2 100%) !important;
    color: white !important;
    padding: 24px 20px !important;
    font-weight: 700 !important;
    font-size: 20px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    border-top-left-radius: 16px;
    border-top-right-radius: 0;
}

/* Chat Header (Right - "Chatting with") */
#chat-header,
.chat-header,
#chat-box-header,
.chat-box-header {
    background: linear-gradient(135deg, #667EEA 0%, #764BA2 100%) !important;
    color: white !important;
    padding: 20px 24px !important;
    font-weight: 700 !important;
    font-size: 18px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    border-top-right-radius: 16px;
}

#chat-header *,
.chat-header *,
#chat-box-header * {
    color: white !important;
}

/* List User Container */
#chat-user-list {
    background: linear-gradient(135deg, #667EEA 0%, #764BA2 100%) !important;
    padding: 12px !important;
    margin: 0 !important;
    height: 100% !important;
    /* Mengisi tinggi sidebar */
}

/* Item User - INACTIVE State */
#chat-user-list li {
    padding: 12px 16px !important;
    border-bottom: none !important;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.08) !important;
    margin-bottom: 8px !important;
    border-radius: 16px !important;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    border-left: none !important;
    color: #ffffff !important;
}

#chat-user-list li * {
    color: #ffffff !important;
}

#chat-user-list li:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    transform: translateX(5px) scale(1.02);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* Item User - ACTIVE State */
#chat-user-list li.active {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.88) 100%) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    border-left: none !important;
    color: #1f2937 !important;
}

#chat-user-list li.active * {
    color: #1f2937 !important;
}

/* Chat Bubbles */
.chat-bubble,
.message-bubble {
    border-radius: 20px !important;
    padding: 8px 16px !important;
    /* [MODIFIKASI] Lebih padat (was 14px 18px) */
    font-size: 14px !important;
    line-height: 1.4 !important;
    /* [MODIFIKASI] (was 1.5) */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 6px !important;
    /* [MODIFIKASI] Jarak antar bubble lebih rapat (was 12px) */
    border: none !important;
    max-width: 70% !important;
}

/* [MODIFIKASI] Override Inline Style for Reply Quote */
.chat-bubble blockquote,
.message-bubble blockquote {
    margin: 0 0 4px 0 !important;
    padding: 4px 8px !important;
    border-left-width: 3px !important;
}

.chat-bubble-admin,
.message.admin .message-bubble {
    background: linear-gradient(135deg, #667EEA 0%, #764BA2 100%) !important;
    color: white !important;
    margin-left: auto !important;
    margin-right: 0 !important;
    border-bottom-right-radius: 4px !important;
}

.chat-bubble-user,
.message.user .message-bubble {
    background: white !important;
    color: #1F2937 !important;
    margin-right: auto !important;
    margin-left: 0 !important;
    border-bottom-left-radius: 4px !important;
    border: 2px solid #F3F4F6 !important;
}

/* Toolbar Input Area */
#chat-toolbar,
.message-input-container {
    background: white !important;
    border-top: 1px solid #E5E7EB !important;
    padding: 15px !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

/* [MODIFIKASI BARU] Tombol Toolbar (Bold, Italic, Emoji, Upload) -> ABU-ABU */
/* Menargetkan tombol selain tombol kirim (send) */
#chat-toolbar button:not([type="submit"]):not(.send-btn) {
    background: #f3f4f6 !important;
    /* Latar Abu-abu */
    color: #6b7280 !important;
    /* Icon Abu-abu */
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    padding: 10px !important;
    width: 44px !important;
    height: 44px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: none !important;
    /* Hapus shadow */
    transition: all 0.2s ease !important;
    animation: none !important;
    /* Hapus animasi pelangi */
}

/* === FIX FINAL: Tombol Font Colour === */
#chat-toolbar input#chat-font-color {
    background: linear-gradient(135deg, #f59e0b, #f97316) !important;
    border-radius: 12px !important;
    border: none !important;
    box-shadow: 0 4px 10px rgba(249, 115, 22, 0.4) !important;
}


/* Hover State untuk tombol abu-abu */
#chat-toolbar button:not([type="submit"]):not(.send-btn):hover {
    background: #e5e7eb !important;
    /* Abu sedikit lebih gelap */
    color: #374151 !important;
    /* Icon jadi gelap */
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05) !important;
}

/* Tombol Kirim (Send) - Tetap Ungu */
#chat-toolbar button:last-child,
#chat-toolbar button[type="submit"],
.send-btn {
    background: linear-gradient(135deg, #667EEA 0%, #764BA2 100%) !important;
    color: white !important;
    width: auto !important;
    padding: 10px 24px !important;
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3) !important;
    border-radius: 12px !important;
    border: none !important;
    height: 44px !important;
}

#chat-toolbar button:last-child:hover,
#chat-toolbar button[type="submit"]:hover,
.send-btn:hover {
    box-shadow: 0 6px 15px rgba(102, 126, 234, 0.45) !important;
    transform: translateY(-2px);
}

/* [MODIFIKASI FINAL & PERBAIKAN] Input Chat */
/* Menggunakan selector yang SANGAT spesifik untuk menimpa default */
#chat-toolbar input,
#chat-toolbar textarea,
.message-input,
input.message-input,
div.message-input-container input[type="text"] {
    border-radius: 50px !important;
    /* Pill Shape Bulat Sempurna */
    border: 2px solid #8b5cf6 !important;
    /* Border Default: Ungu Soft */
    padding: 12px 24px !important;
    /* Padding kanan kiri lebih lega */
    flex: 1 !important;
    color: #374151 !important;
    font-size: 14px !important;
    background: #ffffff !important;
    box-shadow: none !important;
    min-height: 44px !important;
    outline: none !important;
}

/* Focus State Input - Efek Glowing Ungu */
#chat-toolbar input:focus,
#chat-toolbar textarea:focus,
.message-input:focus,
input.message-input:focus,
div.message-input-container input[type="text"]:focus {
    border-color: #7c3aed !important;
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.25) !important;
    background: #ffffff !important;
}

/* Placeholder Text Color - Penanganan Lintas Browser */
::-webkit-input-placeholder {
    color: #9ca3af !important;
    opacity: 1 !important;
}

::-moz-placeholder {
    color: #9ca3af !important;
    opacity: 1 !important;
}

:-ms-input-placeholder {
    color: #9ca3af !important;
    opacity: 1 !important;
}

::placeholder {
    color: #9ca3af !important;
    opacity: 1 !important;
}

/* Fallback Classes */
.user-sidebar {
    background: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);
}

.user-item.active {
    color: #5B21B6;
    background: white;
}

/* Scrollbar Styles */
#chat-user-list::-webkit-scrollbar,
.user-list::-webkit-scrollbar,
.messages-container::-webkit-scrollbar {
    width: 6px;
}

#chat-user-list::-webkit-scrollbar-thumb,
.messages-container::-webkit-scrollbar-thumb {
    background: #D1D5DB;
    border-radius: 3px;
}

/* === CHAT INPUT EDITOR (CONTENTEDITABLE) === */
#chat-input-editor {
    border: 2px solid #8b5cf6 !important;
    /* Ungu */
    border-radius: 9999px !important;
    /* Rounded maksimal */
    padding: 14px 22px !important;
    min-height: 56px !important;
    max-height: 120px !important;
    overflow-y: auto !important;
    font-size: 14px;
    color: #374151;
    outline: none !important;
    background: #ffffff;
}

/* Focus state (glow ungu) */
#chat-input-editor:focus {
    border-color: #7c3aed !important;
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.25);
}

/* === PLACEHOLDER UNTUK contenteditable === */
#chat-input-editor:empty:before {
    content: "Type your message...";
    color: #9ca3af;
    /* Abu-abu pudar */
    pointer-events: none;
}

/* Hilangkan placeholder saat ada isi */
#chat-input-editor:focus:before {
    content: "";
}



/* --- 10. MODAL & UTILS (Restored) --- */
#lmsEditorModal {
    z-index: 999999 !important;
}

.tox-tinymce-aux {
    z-index: 9999999 !important;
}

/* PAGINATION (Unified Bootcamp Design) */
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #0047A0 !important;
    /* Bootcamp Blue */
    color: white !important;
    border: 1px solid #0047A0 !important;
    border-radius: 6px !important;
    min-width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: none !important;
    font-weight: 700;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 6px !important;
    min-width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 2px;
    font-weight: 600;
    font-size: 13px;
    background: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
    color: #1f2937 !important;
    transition: all 0.2s ease;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #0047A0 !important;
    border-color: #0047A0 !important;
    color: white !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
    background: #e5e7eb !important;
    border-color: #d1d5db !important;
    color: #9ca3af !important;
    cursor: not-allowed !important;
}

/* --- 11. TOGGLE SWITCH (Restored & Completed) --- */
.lms-toggle-wrapper {
    display: flex;
    align-items: center;
    font-size: 12px;
    font-weight: 600;
    color: #4b5563;
    background: transparent;
    padding: 0;
    border: none;
}

.lms-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    margin-right: 8px;
}

.lms-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.lms-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e5e7eb;
    -webkit-transition: .3s;
    transition: .3s;
    border-radius: 34px;
}

.lms-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    -webkit-transition: .3s;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

input:checked+.lms-slider {
    background-color: #10b981;
    /* Fresh Green */
}

input:checked+.lms-slider:before {
    transform: translateX(18px);
}

/* --- 12. TABLE FILTERS (Advanced - Creative) --- */
.lms-filter-group {
    display: flex;
    gap: 10px;
    margin-left: 10px;
    align-items: center;
}

.lms-filter-group select.lms-table-filter {
    background-color: #f9fafb !important;
    border: 2px solid #e5e7eb !important;
    border-radius: 10px !important;
    padding: 0 12px !important;
    font-size: 13px !important;
    color: #4b5563 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    height: 38px !important;
    line-height: 38px !important;
    min-width: 130px !important;
    box-shadow: none !important;
    width: auto !important;
    vertical-align: middle !important;
    margin: 0 !important;
}

.lms-filter-group select.lms-table-filter:hover {
    border-color: #8b5cf6 !important;
}

.lms-filter-group select.lms-table-filter:focus {
    border-color: #8b5cf6 !important;
    background: #fff !important;
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15) !important;
    outline: none !important;
}

/* --- 13. NESTED HIERARCHY CONTAINERS (Creative) --- */
.lms-level-container {
    margin-top: 35px;
    padding: 25px;
    background: #ffffff;
    border: 3px solid #f0f3ff;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    display: none;
    /* KEY: Hidden by default */
    animation: slideIn 0.4s ease-out;
}

.lms-level-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 3px solid #8b5cf6;
}

.lms-level-header h3 {
    margin: 0 !important;
    font-size: 20px !important;
    font-weight: 800 !important;
    color: #4b5563 !important;
}

.lms-level-back {
    font-size: 13px;
    color: #ef4444;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.2s ease;
    padding: 6px 12px;
    background: #fee2e2;
    border-radius: 10px;
}

.lms-level-back:hover {
    background: #ef4444;
    color: #fff;
    transform: scale(1.05);
}

.lms-tab-inline {
    margin-top: 15px;
}

/* --- 14. FLOATING SPINNER LOADING OVERLAY --- */
.lms-spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.35);
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lms-spinner-overlay.lms-spinner-visible {
    opacity: 1;
}

.lms-spinner-box {
    background: #ffffff;
    border-radius: 20px;
    padding: 32px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 4px 16px rgba(0, 0, 0, 0.1);
    animation: lms-spinner-pop 0.3s ease;
}

.lms-spinner-circle {
    width: 48px;
    height: 48px;
    border: 4px solid #e5e7eb;
    border-top: 4px solid #8b5cf6;
    border-radius: 50%;
    animation: lms-spin 0.8s linear infinite;
}

.lms-spinner-text {
    font-size: 14px;
    font-weight: 700;
    color: #4b5563;
    letter-spacing: 0.02em;
}

@keyframes lms-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes lms-spinner-pop {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}