/* ==============================================================
   CUSTOM CSS TAMBAHAN (Modul E-Learning, Timeline, Summernote)
   ============================================================== */

/* --- 1. UX & Utilitas --- */
.cursor-pointer { cursor: pointer; }
.sort.asc::after { content: " \f0de"; font-family: "bootstrap-icons"; }
.sort.desc::after { content: " \f0dd"; font-family: "bootstrap-icons"; }
#searchPanel { transition: all 0.3s ease-in-out; }
.fs-7 { font-size: 0.85rem; }
.small, small { font-size: .975em; }
.text-small { font-size: 0.85rem; }
.footer { flex-shrink: 0; width: 100%; }

/* --- 2. Avatar & Profil --- */
.avatar-img {
    width: 40px; height: 40px; object-fit: cover;
    border-radius: 50%; border: 2px solid white; box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.avatar-group { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; margin-bottom: 10px; }
.avatar-group .avatar-img { width: 50px; height: 50px; margin-left: -15px; }
.avatar-group .avatar-img:first-child { margin-left: 0; }

.lecturer-avatars { display: flex; align-items: center; }
.lecturer-img {
    width: 40px; height: 40px; border-radius: 50%; border: 2px solid #fff;
    object-fit: cover; margin-right: -10px; transition: margin 0.2s;
}
.lecturer-img:hover { margin-right: 5px; z-index: 10; }
.img-lecturer { width: 60px; height: 60px; object-fit: cover; border-radius: 8px; border: 2px solid white; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.lecturer-names { font-size: 0.85rem; color: #555; margin-left: 15px; font-style: italic; }

.img-student { width: 70px; height: 70px; object-fit: cover; border-radius: 50%; border: 3px solid #dee2e6; }
.student-header { background-color: #223842; color: white; padding: 5px 10px; font-size: 0.9rem; border-radius: 4px 4px 0 0; }

/* --- 3. Layout & Container (Timeline & Filter) --- */
.participant-container { overflow-y: auto; }
.filter-section {
    background-color: #ffffff;
    border-bottom: 3px solid var(--theme-primary); /* Dinamis Tema */
    padding: 15px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); z-index: 1000; position: relative;
}
#timeline-container {
    height: calc(100vh - 140px); overflow-y: auto; padding: 20px; scroll-behavior: smooth;
}

/* --- 4. Cards & Komponen Spesifik --- */
.course-card {
    border: 1px solid rgba(0,0,0,0.1); border-radius: 12px; background: white;
    transition: transform 0.2s; box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.course-card:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-color: var(--theme-primary); /* Dinamis Tema */
}

.exam-card {
    border: none;
    border-left: 5px solid var(--theme-primary) !important; /* Dinamis Tema */
    background-color: var(--theme-light) !important; /* Latar tipis mengikuti tema */
    margin-bottom: 20px; transition: transform 0.2s; box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.exam-card:hover { transform: translateY(-2px); box-shadow: 0 4px 8px rgba(0,0,0,0.1); }

.card-header-custom {
    color: var(--theme-primary); /* Dinamis Tema */
    font-weight: bold; font-size: 1.1rem; border-bottom: 1px solid rgba(0,0,0,0.1);
    padding-bottom: 8px; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center;
}

/* --- 5. Tipografi, Warna & Loading --- */
.course-title { font-weight: 700; color: #212529; text-transform: uppercase; }
.blue-link { color: var(--theme-primary); text-decoration: none; font-weight: 600; font-size: 0.9rem; }
.text-teal { color: var(--theme-primary) !important; }
.bg-custom-dark { background-color: var(--theme-primary-dark) !important; color: white; }
.border-left-accent { border-left: 4px solid var(--theme-primary) !important; }
.badge-exam-type { background-color: var(--theme-primary) !important; color: var(--theme-text-on-primary) !important; }

.meta-label { font-weight: 600; color: #495057; font-size: 0.9rem; }
.meta-value { font-size: 0.9rem; color: #212529; }
.stat-item { text-align: center; font-size: 0.8rem; color: #495057; margin-bottom: 10px; }
.stat-icon { font-size: 1.2rem; margin-bottom: 5px; display: block; }
.stat-item i { color: #343a40; }

.loading-trigger { height: 50px; text-align: center; padding: 10px; opacity: 0; }
.loading-indicator, .loader { text-align: center; padding: 20px; display: none; color: var(--theme-primary); }

/* --- 6. Form Toolbar & File Input --- */
.btn-toolbar-custom { background-color: #f8f9fa; border: 1px solid #ced4da; color: #495057; font-size: 0.85rem; }
.btn-toolbar-custom:hover { background-color: #e2e6ea; }
.btn-file { position: relative; overflow: hidden; }
.btn-file input[type=file] {
    position: absolute; top: 0; right: 0; min-width: 100%; min-height: 100%;
    font-size: 100px; text-align: right; filter: alpha(opacity=0); opacity: 0;
    outline: none; background: white; cursor: inherit; display: block;
}

/* --- 7. Editor Summernote (Z-Index Fix & Media) --- */
.note-editor .dropdown-menu { z-index: 10050 !important; }
.note-modal-backdrop { z-index: 10040 !important; }
.note-modal { z-index: 10050 !important; }
.dropdown-menu { z-index: 1050 !important; }

.editor-container { min-height: 300px; max-height: 600px; overflow-y: auto; outline: none; }
.editor-container:focus { background-color: #fcfcfc; }
.editor-container img { max-width: 100%; height: auto; margin: 10px 0; border: 1px solid transparent; cursor: pointer; transition: all 0.2s; }
.editor-container img:hover { border: 1px dashed var(--theme-primary); opacity: 0.9; }
.editor-image-selected { outline: 3px solid var(--theme-primary); box-shadow: 0 0 10px var(--theme-light); }
.editor-container video { max-width: 100%; margin: 10px 0; background: #000; }
.editor-container audio { width: 100%; margin: 10px 0; }
.editor-container iframe { max-width: 100%; margin: 10px 0; border: 1px solid #ddd; border-radius: 4px; }

/* --- 8. Link Guide & Embed Cards --- */
.link-guide-container, .link-guide-wrapper {
    max-height: 250px; overflow-y: auto; background-color: #f8f9fa;
    border: 1px solid #e9ecef; border-radius: 5px; padding: 10px; margin-top: 10px; font-size: 0.85rem;
}
.link-guide-item { margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px dashed #ddd; }
.link-guide-item:last-child { border-bottom: none; }
.link-guide-label, .link-guide-title { font-weight: bold; display: block; color: #555; margin-bottom: 2px; }
.link-guide-example, .link-guide-code {
    font-family: monospace; color: var(--theme-primary); background: #fff;
    padding: 2px 5px; border-radius: 3px; border: 1px solid #e9ecef; word-break: break-all; display: block; margin-top: 2px;
}

.embed-card {
    border: 1px solid #e0e0e0; border-radius: 8px; padding: 12px; margin: 10px 0;
    background: #fff; display: flex; align-items: center; text-decoration: none; color: #333;
    transition: box-shadow 0.2s; max-width: 600px;
}
.embed-card:hover { box-shadow: 0 4px 8px rgba(0,0,0,0.1); text-decoration: none; color: var(--theme-primary-dark); }
.embed-icon { font-size: 24px; margin-right: 12px; width: 40px; text-align: center; }
.embed-info { display: flex; flex-direction: column; overflow: hidden; }
.embed-title { font-weight: bold; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.embed-link { font-size: 12px; color: #888; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ============================================================== 
   BASE ELEARNING CSS - Modern, ringan, dan terpusat
   File ini menjadi pusat seluruh style khusus modul e-Learning.
   ============================================================== */
:root {
  --el-bg: #f8fafc;
  --el-surface: #ffffff;
  --el-border: #e2e8f0;
  --el-muted: #64748b;
  --el-title: #0f172a;
  --el-radius: 18px;
  --el-shadow: 0 14px 35px rgba(15, 23, 42, .08);
}

.elearning-shell {
  background: radial-gradient(circle at top left, rgba(177,147,38,.16), transparent 34%), var(--el-bg);
  min-height: calc(100vh - 120px);
  padding: 16px;
}
.elearning-card,
.el-card {
  border: 1px solid var(--el-border) !important;
  border-radius: var(--el-radius) !important;
  background: var(--el-surface) !important;
  box-shadow: var(--el-shadow) !important;
  overflow: hidden;
}
.elearning-card .card-header,
.el-card-header {
  background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(248,250,252,.96)) !important;
  border-bottom: 1px solid var(--el-border) !important;
}
.elearning-tab-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--theme-light);
  color: var(--theme-primary);
}
.elearning-tab-title { font-weight: 700; color: var(--el-title); }
.elearning-tab-desc { color: var(--el-muted); font-size: .78rem; margin-top: .15rem; line-height: 1.35; }
.elearning-panel-note,
.el-panel-note {
  display: block;
  color: var(--el-muted);
  background: linear-gradient(135deg, rgba(248,250,252,.94), rgba(255,255,255,.94));
  border: 1px solid var(--el-border);
  border-left: 4px solid var(--theme-primary);
  border-radius: 14px;
  padding: 10px 12px;
  margin: 10px 0 14px;
  font-size: .88rem;
  line-height: 1.55;
}
.el-kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 12px 0; }
.el-kpi-card { padding: 14px; border-radius: 16px; background: #fff; border: 1px solid var(--el-border); box-shadow: 0 10px 24px rgba(15,23,42,.06); }
.el-kpi-label { color: var(--el-muted); font-size: .78rem; margin-bottom: 4px; }
.el-kpi-value { color: var(--el-title); font-size: 1.45rem; font-weight: 800; line-height: 1.1; }
.el-kpi-help { color: #94a3b8; font-size: .75rem; margin-top: 6px; }

/* HTML/CSS chart ringan, pengganti Chart/JFreeChart lama */
.el-html-chart {
  --chart-max: 1;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--el-border);
  border-radius: 18px;
  background: linear-gradient(180deg, #fff, #f8fafc);
  box-shadow: 0 12px 30px rgba(15,23,42,.07);
  padding: 14px 16px;
  margin: 12px 0;
}
.el-html-chart-title { font-weight: 800; color: var(--el-title); margin-bottom: 4px; }
.el-html-chart-desc { color: var(--el-muted); font-size: .82rem; margin-bottom: 12px; line-height:1.45; }
.el-html-chart-row { display: grid; grid-template-columns: minmax(110px, 210px) 1fr minmax(42px, auto); gap: 10px; align-items: center; margin: 8px 0; }
.el-html-chart-label { font-size: .82rem; color: #334155; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.el-html-chart-track { min-height: 18px; border-radius: 999px; background: #e2e8f0; overflow: hidden; position: relative; }
.el-html-chart-bar { height: 100%; min-width: 6px; border-radius: 999px; background: var(--theme-gradient); box-shadow: inset 0 0 0 1px rgba(255,255,255,.24); }
.el-html-chart-value { font-size: .78rem; color: #475569; font-weight: 700; text-align: right; }
.el-pie-css { width: 160px; height: 160px; border-radius: 50%; margin: 10px auto; background: conic-gradient(var(--theme-primary) var(--el-percent), #e2e8f0 0); display:flex; align-items:center; justify-content:center; }
.el-pie-css-inner { width: 104px; height: 104px; border-radius:50%; background:#fff; display:flex; flex-direction:column; align-items:center; justify-content:center; box-shadow: inset 0 0 0 1px var(--el-border); }
.el-pie-css-value { font-size:1.35rem; font-weight:800; color:var(--el-title); }
.el-pie-css-label { font-size:.72rem; color:var(--el-muted); text-align:center; padding:0 8px; }
.el-chart-legend { display:flex; flex-wrap:wrap; gap:8px; justify-content:center; margin-top:8px; color:#475569; font-size:.8rem; }
.el-chart-dot { width:10px; height:10px; border-radius:50%; display:inline-block; background:var(--theme-primary); margin-right:5px; }
.el-chart-dot-muted { background:#cbd5e1; }

@media (max-width: 768px) {
  .elearning-shell { padding: 10px; }
  .elearning-card { border-radius: 14px !important; }
  .elearning-card .nav-tabs { overflow-x: auto; flex-wrap: nowrap; }
  .elearning-tab-desc { display: none; }
  .el-html-chart-row { grid-template-columns: 1fr; gap: 5px; }
  .el-html-chart-value { text-align:left; }
}

/* Grafik HTML/CSS e-Learning: pengganti Chart.js/JFreeChart agar lebih ringan dan mudah dirawat. */
.el-css-chart{width:100%;display:flex;flex-direction:column;gap:10px;padding:8px 4px;box-sizing:border-box;}
.el-css-chart-row{display:grid;grid-template-columns:minmax(72px,150px) 1fr 54px;gap:10px;align-items:center;font-size:12px;color:#334155;}
.el-css-chart-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:600;}
.el-css-chart-track{height:14px;border-radius:999px;background:#e5e7eb;overflow:hidden;box-shadow:inset 0 1px 2px rgba(15,23,42,.08);}
.el-css-chart-fill{height:100%;min-width:3px;border-radius:999px;background:linear-gradient(90deg,var(--theme-primary,#16a34a),var(--theme-secondary,#facc15));}
.el-css-chart-value{text-align:right;font-weight:700;color:#0f172a;}
.el-css-radar{width:min(300px,100%);min-height:250px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;margin:auto;}
.el-css-radar-core{width:170px;height:170px;border-radius:50%;background:conic-gradient(var(--theme-primary,#16a34a) calc(var(--score,0)*1%),#e5e7eb 0);display:flex;align-items:center;justify-content:center;box-shadow:inset 0 0 0 18px rgba(255,255,255,.72),0 12px 30px rgba(15,23,42,.12);position:relative;}
.el-css-radar-core:before,.el-css-radar-core:after{content:"";position:absolute;border:1px dashed rgba(15,23,42,.16);border-radius:50%;}
.el-css-radar-core:before{inset:34px}.el-css-radar-core:after{inset:68px}
.el-css-radar-score{position:relative;z-index:1;font-size:28px;font-weight:800;color:#0f172a;}
.el-css-radar-list{width:100%;display:flex;flex-direction:column;gap:6px;max-height:110px;overflow:auto;padding:0 4px;}
.el-css-radar-item{display:grid;grid-template-columns:minmax(70px,1fr) 54px;gap:8px;font-size:12px;color:#475569;}
.el-css-radar-item strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#334155;}
.el-chart-empty{padding:24px;text-align:center;border:1px dashed #cbd5e1;border-radius:14px;color:#64748b;background:#f8fafc;font-size:12px;}
