/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --admin: #7c3aed;
  --guru: #0ea5e9;
  --peserta: #10b981;
  --danger: #ef4444;
  --warn: #f59e0b;
  --dark: #1e293b;
  --light: #f8fafc;
  --gray: #64748b;
  --border: #e2e8f0;
  --radius: 14px;
  --shadow: 0 4px 24px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.16);
}
body { font-family: 'Segoe UI', sans-serif; background: var(--light); color: var(--dark); min-height: 100vh; }
body.ujian-body { background: #f0f9ff; }

/* ===== NAVBAR ===== */
.navbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; height: 64px;
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  box-shadow: 0 2px 12px rgba(0,0,0,0.2); position: sticky; top: 0; z-index: 100;
}
.nav-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 1.1rem; }
.nav-brand img { height: 36px; border-radius: 6px; }
.nav-links { display: flex; gap: 8px; list-style: none; }
.nav-links a { color: #cbd5e1; text-decoration: none; padding: 8px 14px; border-radius: 8px; font-size: 0.9rem; transition: all .2s; display: flex; align-items: center; gap: 6px; }
.nav-links a:hover { background: rgba(255,255,255,0.1); color: #fff; }
.nav-links li { display: flex; align-items: center; }
.nav-links .dark-toggle { font-size: 0.82rem; padding: 7px 14px; }
.hamburger { display: none; background: none; border: none; color: #fff; font-size: 1.4rem; cursor: pointer; padding: 8px; }

/* ===== HERO ===== */
.hero {
  position: relative; min-height: 340px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1e3a5f 0%, #0ea5e9 50%, #10b981 100%);
  overflow: hidden; text-align: center;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-content { position: relative; z-index: 1; color: #fff; padding: 40px 20px; }
.hero-icon { font-size: 4rem; margin-bottom: 16px; animation: float 3s ease-in-out infinite; }
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-12px)} }
.hero-content h1 { font-size: 1.2rem; font-weight: 400; opacity: .85; }
.hero-content h2 { font-size: 2.4rem; font-weight: 800; text-shadow: 0 2px 8px rgba(0,0,0,0.3); }
.hero-content h3 { font-size: 1.4rem; font-weight: 600; margin-bottom: 12px; }
.hero-content p { font-size: 1rem; opacity: .8; }

/* ===== CARDS ===== */
.main-cards { padding: 48px 24px; max-width: 1100px; margin: 0 auto; }
.section-title { text-align: center; font-size: 1.6rem; font-weight: 700; margin-bottom: 32px; color: var(--dark); display: flex; align-items: center; justify-content: center; gap: 10px; }
.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.card {
  background: #fff; border-radius: var(--radius); padding: 36px 28px; text-align: center;
  box-shadow: var(--shadow); cursor: pointer; transition: all .3s; border: 2px solid transparent;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.card-icon { font-size: 3rem; margin-bottom: 16px; }
.card h3 { font-size: 1.4rem; font-weight: 700; margin-bottom: 10px; }
.card p { color: var(--gray); font-size: 0.9rem; margin-bottom: 24px; line-height: 1.6; }
.card-admin { border-color: var(--admin); } .card-admin .card-icon { color: var(--admin); }
.card-guru { border-color: var(--guru); } .card-guru .card-icon { color: var(--guru); }
.card-peserta { border-color: var(--peserta); } .card-peserta .card-icon { color: var(--peserta); }

/* ===== BUTTONS ===== */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px; border-radius: 10px; border: none; font-size: 0.95rem; font-weight: 600; cursor: pointer; transition: all .2s; text-decoration: none; }
.btn-admin { background: var(--admin); color: #fff; } .btn-admin:hover { background: #6d28d9; }
.btn-guru { background: var(--guru); color: #fff; } .btn-guru:hover { background: #0284c7; }
.btn-peserta { background: var(--peserta); color: #fff; } .btn-peserta:hover { background: #059669; }
.btn-danger { background: var(--danger); color: #fff; } .btn-danger:hover { background: #dc2626; }
.btn-warn { background: var(--warn); color: #fff; } .btn-warn:hover { background: #d97706; }
.btn-gray { background: #e2e8f0; color: var(--dark); } .btn-gray:hover { background: #cbd5e1; }
.btn-success { background: #10b981; color: #fff; } .btn-success:hover { background: #059669; }
.full-btn { width: 100%; justify-content: center; }

/* ===== MODAL ===== */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 999; align-items: center; justify-content: center; backdrop-filter: blur(4px); }
.modal-overlay.active { display: flex; }
.modal { background: #fff; border-radius: var(--radius); width: 90%; max-width: 420px; box-shadow: var(--shadow-lg); overflow: hidden; animation: slideUp .3s ease; }
@keyframes slideUp { from{transform:translateY(30px);opacity:0} to{transform:translateY(0);opacity:1} }
.modal-header { display: flex; align-items: center; gap: 12px; padding: 20px 24px; background: linear-gradient(135deg, var(--admin), #6d28d9); color: #fff; }
.modal-header i { font-size: 1.4rem; }
.modal-header h3 { flex: 1; font-size: 1.1rem; }
.modal-close { background: none; border: none; color: #fff; font-size: 1.2rem; cursor: pointer; padding: 4px; }
.modal-body { padding: 24px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: flex; align-items: center; gap: 6px; font-size: 0.85rem; font-weight: 600; color: var(--gray); margin-bottom: 8px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 11px 14px; border: 2px solid var(--border); border-radius: 10px;
  font-size: 0.95rem; transition: border .2s; outline: none; background: #f8fafc;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--admin); background: #fff; }
.input-pw { position: relative; }
.input-pw input { padding-right: 44px; }
.input-pw button { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--gray); cursor: pointer; font-size: 1rem; }
.error-msg { color: var(--danger); font-size: 0.85rem; margin-bottom: 12px; min-height: 18px; }
.error-msg-box {
  display: flex; align-items: flex-start; gap: 10px;
  background: #fee2e2; border: 1.5px solid #fca5a5; border-radius: 10px;
  padding: 12px 16px; color: #991b1b; font-size: 0.88rem; font-weight: 600;
  margin-bottom: 12px;
}
.error-msg-box i { margin-top: 2px; flex-shrink: 0; }

/* ===== FOOTER ===== */
.footer { text-align: center; padding: 20px; background: var(--dark); color: #94a3b8; font-size: 0.85rem; }

/* ===== ADMIN LAYOUT ===== */
.admin-layout { display: flex; flex-direction: column; min-height: 100vh; }

/* Top navbar admin/guru */
.app-navbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; min-height: 64px; position: sticky; top: 0; z-index: 100;
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  box-shadow: 0 2px 16px rgba(0,0,0,0.2);
}
.app-navbar.admin-nav { background: linear-gradient(135deg, #581c87 0%, #7c3aed 50%, #a855f7 100%); }
.app-navbar.guru-nav { background: linear-gradient(135deg, #0c4a6e 0%, #0369a1 50%, #0ea5e9 100%); }
.app-navbar.peserta-nav { background: linear-gradient(135deg, #065f46 0%, #059669 50%, #10b981 100%); }

.app-navbar .nav-brand { 
  display: flex; align-items: center; gap: 12px; color: #fff; 
  font-weight: 700; font-size: 1.05rem; white-space: nowrap; 
}
.app-navbar .nav-brand i { font-size: 1.5rem; color: rgba(255,255,255,0.95); }
.app-navbar .nav-brand span { 
  display: inline-block; line-height: 1.3;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.app-navbar-right { 
  display: flex; align-items: center; gap: 10px; 
  flex-wrap: wrap; justify-content: flex-end;
}

/* Tombol keluar di sudut kanan atas */
.btn-logout-top {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 16px; border-radius: 8px;
  border: 1.5px solid rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.9);
  font-size: 0.82rem; font-weight: 600; cursor: pointer; transition: all .2s;
  white-space: nowrap; line-height: 1;
}
.btn-logout-top:hover { background: rgba(239,68,68,0.75); border-color: #ef4444; color: #fff; }

/* Tab nav bar */
.app-tabnav {
  display: flex; align-items: stretch; gap: 0;
  background: rgba(0,0,0,0.22); padding: 0 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1); overflow-x: auto;
  scrollbar-width: none;
}
.app-tabnav::-webkit-scrollbar { display: none; }
.app-tabnav a {
  display: flex; align-items: center; gap: 7px;
  padding: 12px 18px; color: rgba(255,255,255,0.65); text-decoration: none;
  font-size: 0.85rem; font-weight: 600; white-space: nowrap;
  border-bottom: 3px solid transparent; transition: all .2s;
  cursor: pointer; background: none; border-top: none; border-left: none; border-right: none;
}
.app-tabnav a:hover { color: #fff; background: rgba(255,255,255,0.1); }
.app-tabnav a.active { color: #fff; border-bottom-color: rgba(255,255,255,0.9); background: rgba(255,255,255,0.12); }
.app-tabnav .nav-logout { margin-left: auto; display: none; }

/* Warna tabnav per role */
.admin-tabnav { background: linear-gradient(90deg, #4c1d95 0%, #6d28d9 100%); }
.admin-tabnav a.active { border-bottom-color: #c4b5fd; }
.guru-tabnav { background: linear-gradient(90deg, #0c4a6e 0%, #0369a1 100%); }
.guru-tabnav a.active { border-bottom-color: #7dd3fc; }


.main-content { flex: 1; padding: 24px; background: #f1f5f9; min-height: calc(100vh - 108px); }
.top-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.top-bar h1 { font-size: 1.4rem; font-weight: 700; }
.page-section { display: none; }
.page-section.active { display: block; }

/* ===== STATS CARDS ===== */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: #fff; border-radius: var(--radius); padding: 20px; display: flex; align-items: center; gap: 16px; box-shadow: var(--shadow); }
.stat-icon { width: 52px; height: 52px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; color: #fff; flex-shrink: 0; }
.stat-info h3 { font-size: 1.6rem; font-weight: 800; }
.stat-info p { font-size: 0.8rem; color: var(--gray); }

/* ===== TABLE ===== */
.table-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.table-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.table-header h3 { font-size: 1rem; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.table-actions { display: flex; gap: 8px; flex-wrap: wrap; }
table { width: 100%; border-collapse: collapse; }
th { background: #f8fafc; padding: 12px 16px; text-align: left; font-size: 0.8rem; font-weight: 700; color: var(--gray); text-transform: uppercase; letter-spacing: .5px; }
td { padding: 12px 16px; border-top: 1px solid var(--border); font-size: 0.9rem; }
tr:hover td { background: #f8fafc; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; }
.badge-green { background: #dcfce7; color: #166534; }
.badge-blue { background: #dbeafe; color: #1e40af; }
.badge-red { background: #fee2e2; color: #991b1b; }
.badge-yellow { background: #fef9c3; color: #854d0e; }
.action-btns { display: flex; gap: 6px; }
.icon-btn { width: 32px; height: 32px; border-radius: 8px; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 0.85rem; transition: all .2s; }

/* ===== GURU LAYOUT ===== */
.guru-main { flex: 1; padding: 24px; background: #f0f9ff; min-height: calc(100vh - 108px); }
.guru-tabnav a.active { color: #38bdf8; border-bottom-color: #38bdf8; }
.guru-tabnav { background: #0c4a6e; }
.guru-tabnav a { color: #7dd3fc; }
.guru-tabnav a:hover { color: #e0f2fe; }
.guru-tabnav a.active { color: #fff; border-bottom-color: #38bdf8; }

/* ===== TOOLBAR SOAL ===== */
.editor-toolbar {
  display: flex; flex-wrap: wrap; gap: 2px; padding: 8px; background: #f1f5f9;
  border: 2px solid var(--border); border-bottom: none; border-radius: 10px 10px 0 0;
}
.toolbar-btn {
  width: 32px; height: 32px; border: none; background: transparent; border-radius: 6px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; color: var(--dark); transition: all .15s; position: relative;
}
.toolbar-btn:hover { background: #e2e8f0; }
.toolbar-btn.active { background: var(--guru); color: #fff; }
.toolbar-sep { width: 1px; background: var(--border); margin: 4px 4px; }
.toolbar-select { height: 32px; border: 1px solid var(--border); border-radius: 6px; padding: 0 6px; font-size: 0.8rem; background: #fff; cursor: pointer; }
.editor-area {
  min-height: 160px; padding: 14px; border: 2px solid var(--border); border-radius: 0 0 10px 10px;
  outline: none; font-size: 0.95rem; line-height: 1.7; background: #fff;
}
.editor-area:focus { border-color: var(--guru); }
.color-picker-wrap { position: relative; display: inline-flex; }
.color-picker-wrap input[type=color] { position: absolute; opacity: 0; width: 32px; height: 32px; cursor: pointer; }

/* ===== TIMER CIRCLE ===== */
.timer-wrap { display: flex; flex-direction: column; align-items: center; margin-bottom: 16px; }
.timer-circle { position: relative; width: 80px; height: 80px; }
.timer-circle svg { transform: rotate(-90deg); }
.timer-circle .bg-circle { fill: none; stroke: #e2e8f0; stroke-width: 6; }
.timer-circle .prog-circle { fill: none; stroke: var(--guru); stroke-width: 6; stroke-linecap: round; transition: stroke-dashoffset .9s linear, stroke .5s; }
.timer-circle .timer-text { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 1rem; font-weight: 800; color: var(--dark); }

/* ===== SOAL NAVIGATOR ===== */
.soal-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.soal-nav-btn {
  width: 38px; height: 38px; border-radius: 8px; border: 2px solid var(--border);
  background: #fff; font-size: 0.85rem; font-weight: 700; cursor: pointer; transition: all .2s;
  display: flex; align-items: center; justify-content: center;
}
.soal-nav-btn.done { background: #10b981; border-color: #10b981; color: #fff; }
.soal-nav-btn.current { background: var(--guru); border-color: var(--guru); color: #fff; }
.soal-nav-btn.undone { background: #fee2e2; border-color: var(--danger); color: var(--danger); }

/* ===== UJIAN CARD ===== */
.ujian-card { background: #fff; border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); max-width: 800px; margin: 0 auto; }
.ujian-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.soal-number { font-size: 0.85rem; color: var(--gray); font-weight: 600; }
.soal-text { font-size: 1rem; line-height: 1.8; margin-bottom: 20px; padding: 16px; background: #f8fafc; border-radius: 10px; border-left: 4px solid var(--guru); }
.options-list { display: flex; flex-direction: column; gap: 10px; }
.option-item {
  display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px;
  border: 2px solid var(--border); border-radius: 10px; cursor: pointer; transition: all .2s;
}
.option-item:hover { border-color: var(--guru); background: #f0f9ff; }
.option-item.selected { border-color: var(--guru); background: #e0f2fe; }
.option-item input[type=radio] { margin-top: 2px; accent-color: var(--guru); }
.option-label { font-weight: 700; color: var(--guru); min-width: 20px; }

/* ===== RESULT ===== */
.result-card { text-align: center; padding: 40px 28px; }
.result-score { font-size: 4rem; font-weight: 900; margin: 16px 0; }
.result-score.pass { color: var(--peserta); }
.result-score.fail { color: var(--danger); }
.result-msg { font-size: 1.2rem; font-weight: 600; margin-bottom: 8px; }
.result-detail { color: var(--gray); font-size: 0.9rem; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .hamburger { display: block; }
  .nav-links { display: none; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: #1e293b; padding: 12px; gap: 4px; }
  .nav-links.open { display: flex; }
  .main-content { padding: 16px; }
  .guru-main { padding: 16px; }
  .hero-content h2 { font-size: 1.8rem; }
  .cards-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .table-header { flex-direction: column; align-items: flex-start; }
  .app-navbar .nav-brand span { display: none; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .ujian-card { padding: 16px; }
  .editor-toolbar { gap: 1px; }
  .toolbar-btn { width: 28px; height: 28px; font-size: 0.75rem; }
  .app-tabnav a { padding: 12px 10px; font-size: 0.78rem; gap: 4px; }
  .app-tabnav a i { display: none; }
}
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 49; }

/* ===== TABS ===== */
.tabs { display: flex; gap: 4px; margin-bottom: 20px; background: #e2e8f0; padding: 4px; border-radius: 10px; }
.tab-btn { flex: 1; padding: 10px; border: none; background: transparent; border-radius: 8px; font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: all .2s; color: var(--gray); }
.tab-btn.active { background: #fff; color: var(--dark); box-shadow: 0 2px 8px rgba(0,0,0,0.08); }

/* ===== SEARCH ===== */
.search-bar { display: flex; gap: 8px; margin-bottom: 16px; }
.search-bar input { flex: 1; padding: 10px 14px; border: 2px solid var(--border); border-radius: 10px; font-size: 0.9rem; outline: none; }
.search-bar input:focus { border-color: var(--guru); }

/* ===== UPLOAD AREA ===== */
.upload-area {
  border: 2px dashed var(--border); border-radius: 12px; padding: 32px; text-align: center;
  cursor: pointer; transition: all .2s; background: #f8fafc;
}
.upload-area:hover { border-color: var(--guru); background: #f0f9ff; }
.upload-area i { font-size: 2.5rem; color: var(--guru); margin-bottom: 12px; }
.upload-area p { color: var(--gray); font-size: 0.9rem; }

/* ===== PROGRESS BAR ===== */
.progress-bar { height: 8px; background: #e2e8f0; border-radius: 4px; overflow: hidden; margin-bottom: 8px; }
.progress-fill { height: 100%; border-radius: 4px; transition: width .5s; }

/* ===== TOOLTIP ===== */
[data-tip] { position: relative; }
[data-tip]:hover::after {
  content: attr(data-tip); position: absolute; bottom: 110%; left: 50%; transform: translateX(-50%);
  background: #1e293b; color: #fff; padding: 4px 8px; border-radius: 6px; font-size: 0.75rem;
  white-space: nowrap; z-index: 999; pointer-events: none;
}

/* ===== MISC ===== */
.flex { display: flex; } .items-center { align-items: center; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; }
.mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; }
.text-sm { font-size: 0.85rem; } .text-gray { color: var(--gray); } .font-bold { font-weight: 700; }
.w-full { width: 100%; } .text-center { text-align: center; }
.hidden { display: none !important; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media(max-width:600px){ .grid-2 { grid-template-columns: 1fr; } }
.card-white { background: #fff; border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 20px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 8px; }
.section-head h2 { font-size: 1.1rem; font-weight: 700; display: flex; align-items: center; gap: 8px; }
input[type=range] { accent-color: var(--guru); }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; background: #e0f2fe; color: #0369a1; }

/* ===== DARK MODE TOGGLE BUTTON ===== */
.dark-toggle {
  background: rgba(255,255,255,0.1); border: 1.5px solid rgba(255,255,255,0.35); color: rgba(255,255,255,0.9);
  border-radius: 8px; padding: 7px 14px; cursor: pointer; font-size: 0.82rem; font-weight: 600;
  display: flex; align-items: center; gap: 6px; transition: all .2s; white-space: nowrap; line-height: 1;
}
.dark-toggle:hover { background: rgba(255,255,255,0.2); border-color: rgba(255,255,255,0.7); color: #fff; }

/* ===== DARK MODE ===== */
body.dark {
  --dark: #e2e8f0;
  --light: #0f172a;
  --gray: #94a3b8;
  --border: #334155;
  background: #0f172a;
  color: #e2e8f0;
}
body.dark .card,
body.dark .stat-card,
body.dark .card-white,
body.dark .ujian-card,
body.dark .table-card { background: #1e293b; border-color: #334155; }
body.dark .main-content { background: #0f172a; }
body.dark .guru-main { background: #0c1a2e; }
body.dark th { background: #1e293b; color: #94a3b8; }
body.dark td { border-color: #334155; }
body.dark tr:hover td { background: #1e293b; }
body.dark .form-group input,
body.dark .form-group select,
body.dark .form-group textarea { background: #1e293b; border-color: #334155; color: #e2e8f0; }
body.dark .form-group input:focus,
body.dark .form-group select:focus { border-color: var(--guru); background: #1e293b; }
body.dark .modal { background: #1e293b; }
body.dark .modal-body { background: #1e293b; }
body.dark .editor-toolbar { background: #1e293b; border-color: #334155; }
body.dark .editor-area { background: #0f172a; border-color: #334155; color: #e2e8f0; }
body.dark .toolbar-select { background: #1e293b; color: #e2e8f0; border-color: #334155; }
body.dark .toolbar-btn { color: #e2e8f0; }
body.dark .toolbar-btn:hover { background: #334155; }
body.dark .soal-text { background: #1e293b; border-left-color: var(--guru); }
body.dark .option-item { border-color: #334155; }
body.dark .option-item:hover { background: #1e3a5f; border-color: var(--guru); }
body.dark .option-item.selected { background: #0c2d4a; border-color: var(--guru); }
body.dark .soal-nav-btn { background: #1e293b; border-color: #334155; color: #e2e8f0; }
body.dark .soal-nav-btn.undone { background: #3b1a1a; border-color: var(--danger); color: var(--danger); }
body.dark .soal-nav-btn.done { background: #10b981; border-color: #10b981; color: #fff; }
body.dark .soal-nav-btn.current { background: var(--guru); border-color: var(--guru); color: #fff; }
body.dark .tabs { background: #1e293b; }
body.dark .tab-btn.active { background: #334155; color: #e2e8f0; }
body.dark .search-bar input { background: #1e293b; border-color: #334155; color: #e2e8f0; }
body.dark .upload-area { background: #1e293b; border-color: #334155; }
body.dark .upload-area:hover { background: #0c2d4a; }
body.dark .section-title { color: #e2e8f0; }
body.dark .top-bar h1 { color: #e2e8f0; }
body.dark .top-bar button { color: #e2e8f0 !important; }
body.dark .btn-gray { background: #334155; color: #e2e8f0; }
body.dark .btn-gray:hover { background: #475569; }
body.dark .chip { background: #1e3a5f; color: #38bdf8; }
body.dark .progress-bar { background: #334155; }
body.dark [data-tip]:hover::after { background: #334155; }
body.dark .home-body { background: #0f172a; }
body.dark .footer { background: #020617; }
body.dark .main-content { background: #0f172a; }
body.dark .guru-main { background: #0c1a2e; }
body.dark .app-tabnav { background: rgba(0,0,0,0.4); border-bottom-color: rgba(255,255,255,0.08); }
body.dark .admin-tabnav { background: linear-gradient(90deg, #2e1065 0%, #4c1d95 100%); }
body.dark .guru-tabnav { background: linear-gradient(90deg, #082f49 0%, #0c4a6e 100%); }
body.dark .btn-logout-top { border-color: rgba(248,113,113,0.5); background: rgba(239,68,68,0.15); color: #fca5a5; }
body.dark .btn-logout-top:hover { background: #ef4444; border-color: #ef4444; color: #fff; }
body.dark .dark-toggle { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.2); color: rgba(255,255,255,0.8); }
