/* QuizCBT - tema terinspirasi Horizon UI: ungu-biru elektrik, kartu rounded besar, shadow lembut */
:root {
  --paper: #F4F7FE;        /* lightPrimary Horizon */
  --sheet: #ffffff;
  --ink: #1B2559;          /* navy-900 Horizon: teks utama */
  --ink-soft: #56617A;     /* teks sekunder - kontras cukup di light mode (WCAG AA, rasio 6.2:1) */
  --line: #E9EDF7;         /* garis pembatas halus */
  --mark: #05CD99;         /* hijau "benar" Horizon */
  --wrong: #EE5D50;        /* merah Horizon */
  --accent: #4318FF;       /* brand ungu-biru elektrik Horizon */
  --accent-soft: #F4F0FF;  /* latar lembut aksen */
  --topbar-bg: #111c44;    /* navy-800 Horizon: sidebar/topbar selalu gelap */
  --btn-hover: #F4F7FE;
  --radius: 16px;
  --radius-sm: 10px;
  font-size: 16px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  line-height: 1.55;
}
h1, h2, h3, .brand, th, .btn, nav, .tag, .timer, .qnav, label, .topbar, .muted, .flash, .inline-form, input, select, textarea, button, .foot {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}
h1 { font-size: 1.5rem; font-weight: 700; border-bottom: none; padding-bottom: 0; }
h2 { font-size: 1.1rem; font-weight: 700; }
a { color: var(--accent); }
.container { max-width: 1200px; margin: 1.2rem auto 3rem; padding: 0 1rem; }
.container:has(.auth-split), .container.container-auth { max-width: none; margin: 0; padding: 0; }
.topbar { background: var(--topbar-bg); color: #fff; position: sticky; top: 0; z-index: 65; }
.topbar-inner { max-width: 1200px; margin: auto; display: flex; align-items: center; justify-content: space-between; padding: .7rem 1rem; flex-wrap: wrap; gap: .5rem; }
.brand { color: #fff; text-decoration: none; font-weight: 700; letter-spacing: .5px; }
.brand-mark { color: var(--accent); background: #fff; border-radius: 8px; padding: .1rem .35rem; }
.topbar nav { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; }
.topbar nav a { color: #dfe4ff; text-decoration: none; }
.topbar nav a:hover { color: #fff; }
.who { color: #aab4e8; font-size: .85rem; }
.card { background: var(--sheet); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem 1.4rem; margin: 1rem 0; box-shadow: 0 18px 40px rgba(112,120,190,.08); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 760px) { .grid-2 { grid-template-columns: 1fr; } }
label { display: block; margin: .55rem 0; font-size: .92rem; }
input, select, textarea { width: 100%; padding: .5rem .65rem; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: .95rem; background: var(--sheet); color: var(--ink); }
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
textarea { min-height: 100px; }
.inline-form { display: inline-flex; gap: .35rem; align-items: center; margin: .15rem 0; }
.inline-form input, .inline-form select { width: auto; }
.btn { display: inline-block; padding: .5rem 1rem; border: 1px solid var(--line); background: var(--paper); color: var(--ink); border-radius: var(--radius-sm); cursor: pointer; font-size: .9rem; text-decoration: none; font-weight: 600; box-shadow: 0 1px 2px rgba(29,43,80,.06); transition: background .12s, box-shadow .12s, transform .06s; }
.btn:hover { background: var(--btn-hover); box-shadow: 0 4px 10px rgba(67,24,255,.12); }
.btn:active { transform: translateY(1px); box-shadow: 0 1px 1px rgba(29,43,80,.08); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 6px 16px rgba(67,24,255,.28); }
.btn-primary:hover { background: #3311e0; }
.btn-danger { border-color: var(--wrong); background: #fdecea; color: var(--wrong); }
.btn-danger:hover { background: var(--wrong); color: #fff; }
.btn-sm { padding: .25rem .6rem; font-size: .8rem; }
table { width: 100%; border-collapse: collapse; margin-top: .6rem; font-size: .92rem; }
th { text-align: left; border-bottom: 2px solid var(--line); padding: .5rem .5rem; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); }
td { border-bottom: 1px solid var(--line); padding: .55rem .5rem; vertical-align: top; }
.muted { color: var(--ink-soft); font-size: .9rem; }
.flash { padding: .6rem .9rem; border-radius: var(--radius-sm); margin: .8rem 0; font-size: .92rem; }
.flash-ok { background: #e8f4ee; border: 1px solid var(--mark); color: var(--mark); }
.flash-err { background: #fdecea; border: 1px solid var(--wrong); color: var(--wrong); }
.tag { display: inline-block; font-size: .72rem; padding: .1rem .5rem; border-radius: 99px; border: 1px solid currentColor; }
.tag-user { color: var(--ink-soft); }
.tag-manager { color: var(--accent); }
.tag-superadmin { color: var(--wrong); }
.auth-split { min-height: 100vh; display: flex; }
.auth-panel { flex: 1 1 480px; display: flex; align-items: center; justify-content: center; padding: 2rem 1.2rem; }
.auth-card { width: 100%; max-width: 400px; background: var(--sheet); border-radius: var(--radius); padding: 2rem 1.8rem; box-shadow: 0 24px 60px rgba(112,120,190,.14); }
.auth-hero { flex: 1 1 45%; background: linear-gradient(135deg, var(--accent) 0%, #7B5CFF 60%, #A992FF 100%);
  display: flex; align-items: center; justify-content: center; padding: 3rem 2rem; position: relative; overflow: hidden; }
.auth-hero::before, .auth-hero::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,.12); }
.auth-hero::before { width: 340px; height: 340px; top: -100px; right: -100px; }
.auth-hero::after { width: 220px; height: 220px; bottom: -80px; left: -60px; }
.auth-hero-inner { position: relative; z-index: 2; color: #fff; text-align: center; max-width: 380px; }
.auth-hero-badge { font-size: 3.2rem; margin-bottom: 1rem; }
.auth-hero h2 { color: #fff; font-size: 1.6rem; margin-bottom: .6rem; }
.auth-hero p { color: #EDE9FF; font-size: .98rem; line-height: 1.6; }
@media (max-width: 860px) {
  .auth-split { flex-direction: column-reverse; }
  .auth-hero { padding: 2rem 1.2rem 1.4rem; }
  .auth-hero-inner { max-width: none; }
  .auth-panel { padding: 2rem 1.2rem; }
}
.foot { text-align: center; color: var(--ink-soft); font-size: .8rem; padding: 1rem; }
code { background: #eef1ff; padding: 0 .3rem; border-radius: 3px; font-size: .85em; }

/* ==== halaman ujian ==== */
.exam-head { position: sticky; top: 0; z-index: 5; background: var(--topbar-bg); color: #fff; padding: .5rem .9rem; display: flex; justify-content: space-between; align-items: center; border-radius: 0 0 var(--radius) var(--radius); }
.timer { font-variant-numeric: tabular-nums; font-size: 1.25rem; font-weight: 700; color: #ffd166; }
.timer.danger { color: #ff8f87; animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .timer.danger { animation: none; } }
.q-card { background: var(--sheet); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius); padding: 1rem 1.2rem; margin: 1rem 0; }
.q-num { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.q-media { display: block; max-width: 100%; margin: .6rem 0; border: 1px solid var(--line); border-radius: 4px; }
.opt { display: flex; gap: .55rem; align-items: flex-start; padding: .45rem .6rem; border: 1px solid var(--line); border-radius: 4px; margin: .35rem 0; cursor: pointer; background: var(--sheet); }
.opt:hover { border-color: var(--accent); }
.opt input { width: auto; margin-top: .25rem; }
.qnav { display: flex; flex-wrap: wrap; gap: .3rem; margin: .8rem 0; }
.qnav a { display: inline-flex; width: 2.1rem; height: 2.1rem; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 4px; text-decoration: none; color: var(--ink); font-size: .85rem; }
.qnav a.done { background: var(--mark); border-color: var(--mark); color: #fff; }
.score-big { font-size: 2.6rem; font-weight: 800; color: var(--accent); }
.correct { color: var(--mark); font-weight: 600; }
.incorrect { color: var(--wrong); font-weight: 600; }
.match-row { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; align-items: center; margin: .35rem 0; }
.bar { background: #eef1ff; border-radius: 3px; height: 10px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--accent); }

/* ==== v3: tombol & navigasi yang lebih "proper" ==== */
.btn { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
  box-shadow: 0 1px 2px rgba(29,43,80,.12); transition: background .15s, transform .06s; }
.btn:active { transform: translateY(1px); }
.btn-sm { min-height: 32px; }
.btn-back { background: var(--topbar-bg); color: #fff; border-color: var(--topbar-bg); font-weight: 600; }
.btn-back::before { content: "←"; font-weight: 700; }
.btn-back:hover { background: #33406b; color: #fff; }
.btn-topbar { border-color: #fff; color: #fff; background: transparent; box-shadow: none; }
.btn-topbar:hover { background: rgba(255,255,255,.15); }
.backbar { margin: .2rem 0 .8rem; }

/* ==== v3: banner peringatan pindah tab (tanpa rekam) ==== */
.tab-notice { position: fixed; left: 50%; bottom: 1rem; transform: translate(-50%, 130%);
  background: var(--wrong); color: #fff; padding: .7rem 1.1rem; border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0,0,0,.25); z-index: 99; max-width: 92vw; font-family: 'Segoe UI', sans-serif;
  transition: transform .25s ease; }
.tab-notice.show { transform: translate(-50%, 0); }

/* ==== v3: responsive smartphone ==== */
img, video, iframe { max-width: 100%; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 760px) {
  :root { font-size: 15px; }
  .container { padding: 0 .7rem; margin-top: .8rem; }
  h1 { font-size: 1.25rem; }
  .card, .q-card { padding: .8rem .8rem; }
  /* tabel bisa digeser horizontal */
  table { display: block; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
  table td, table th { white-space: normal; min-width: 90px; }
  /* form & tombol nyaman disentuh */
  .inline-form { flex-wrap: wrap; }
  .inline-form { flex-wrap: wrap; }
  .inline-form input[type="text"], .inline-form input[type="number"], .inline-form input[type="email"],
  .inline-form input[type="password"], .inline-form input:not([type]), .inline-form select {
    min-width: 0 !important; flex: 1 1 140px;
  }
  .inline-form input[type="file"] { min-width: 0 !important; max-width: 100%; }
  .btn { padding: .5rem .8rem; }
  input, select, textarea, .btn { font-size: 16px; } /* cegah zoom otomatis iOS */
  .topbar-inner { padding: .5rem .7rem; }
  .topbar nav { gap: .55rem; font-size: .9rem; }
  .who { width: 100%; order: 9; }
  .match-row { grid-template-columns: 1fr; gap: .2rem; }
  .exam-head { flex-wrap: wrap; gap: .3rem; }
  .score-big { font-size: 2rem; }
  .auth-card { margin: 4vh auto; padding: 1.1rem; }
  .qnav a { width: 2.4rem; height: 2.4rem; }
  .opt { padding: .6rem .6rem; }
}
@media (max-width: 420px) {
  .grid-2 { grid-template-columns: 1fr; }
  .topbar nav a { padding: .15rem .1rem; }
}

/* ==== v4: logo & navigasi tombol responsif ==== */
.brand { display: inline-flex; align-items: center; gap: .5rem; }
.brand { min-width: 0; max-width: 62%; overflow: hidden; }
.brand-logo { display: block; height: auto; width: auto;
  max-height: 34px; max-width: min(130px, 30vw);
  object-fit: contain; border-radius: 4px; background: #fff; padding: 2px; flex: 0 1 auto; }
.nav-btns { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; justify-content: flex-end; }
.nav-btn { display: inline-flex; align-items: center; gap: .3rem; padding: .38rem .75rem;
  border: 1px solid rgba(255,255,255,.35); border-radius: 999px; color: #eef1ff !important;
  text-decoration: none; font-size: .86rem; background: rgba(255,255,255,.07); transition: background .15s; }
.nav-btn:hover { background: rgba(255,255,255,.2); color: #fff !important; }
.nav-btn-out { border-color: #ffb4ac; color: #ffd7d3 !important; }
.nav-btn-out:hover { background: rgba(255,120,110,.25); }
.impersonate-bar { background: #ffd166; color: var(--ink); display: flex; gap: .8rem; align-items: center;
  justify-content: center; flex-wrap: wrap; padding: .45rem .8rem; font-family: 'Segoe UI', sans-serif;
  font-size: .9rem; border-bottom: 1px solid #e3b64e; }
@media (max-width: 760px) {
  .nav-btn { padding: .32rem .6rem; font-size: .8rem; }
  .brand-logo { max-height: 26px; max-width: min(96px, 26vw); }
  .brand { max-width: 58%; font-size: .95rem; }
}

/* ==== v5: modal konfirmasi di dalam halaman ==== */
.modal-backdrop { position: fixed; inset: 0; background: rgba(20,28,55,.55); display: none;
  align-items: center; justify-content: center; z-index: 100; padding: 1rem; }
.modal-backdrop.open { display: flex; }
.modal-box { background: var(--sheet); border-radius: 12px; padding: 1.3rem 1.5rem; max-width: 420px;
  width: 100%; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.35);
  font-family: 'Segoe UI', system-ui, sans-serif; animation: pop .16s ease; }
@keyframes pop { from { transform: scale(.94); opacity: .4; } to { transform: scale(1); opacity: 1; } }

/* ==== v6: logo pada halaman masuk ==== */
.auth-logo { display: inline-block; height: auto; width: auto; max-height: 76px; max-width: min(220px, 62vw);
  object-fit: contain; }

/* ==== v6: modal kumpulkan jawaban ==== */
.modal-box .modal-ico { font-size: 2rem; line-height: 1; margin-bottom: .4rem; }
.modal-box h3 { margin: 0 0 .5rem; font-size: 1.15rem; }
.modal-box p { margin: .2rem 0; font-size: .92rem; }
.modal-box .modal-stat { margin-top: .5rem; }
.modal-actions { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; margin-top: 1.1rem; }
.modal-actions .btn { flex: 1 1 auto; min-width: 150px; justify-content: center; }
@media (max-width: 420px) { .modal-actions .btn { flex: 1 1 100%; } }

/* ==== Dark Mode ==== */
html[data-theme="dark"] {
  --paper: #0b1437;        /* navy-900 Horizon */
  --sheet: #111c44;        /* navy-800 Horizon */
  --ink: #ffffff;
  --ink-soft: #A3AED0;     /* gray-600 Horizon, tetap konsisten kedua tema */
  --line: #1B254B;         /* navy-700 Horizon */
  --mark: #05CD99;
  --wrong: #ff8a80;
  --accent: #868CFF;       /* brandLinear Horizon: ungu lebih terang utk kontras di gelap */
  --accent-soft: rgba(134,140,255,.12);
}
html[data-theme="dark"] input, html[data-theme="dark"] select, html[data-theme="dark"] textarea { background: #232a48; color: var(--ink); }
html[data-theme="dark"] .btn { box-shadow: 0 1px 3px rgba(0,0,0,.4); }
html[data-theme="dark"] .btn-primary { background: var(--accent); border-color: var(--accent); color: #0b0f1e; }
html[data-theme="dark"] .btn-back { background: var(--accent); color: #0b0f1e; border-color: var(--accent); }
html[data-theme="dark"] .btn-danger { background: rgba(255,138,128,.12); }
html[data-theme="dark"] .btn-danger:hover { background: var(--wrong); color: #0b0f1e; }
html[data-theme="dark"] .tag { filter: brightness(1.15); }
html[data-theme="dark"] img.brand-logo, html[data-theme="dark"] .auth-logo { background: #fff; }

/* Toggle switch dark mode */
.theme-toggle { display: inline-flex; align-items: center; gap: .3rem; padding: .38rem .6rem;
  border: 1px solid rgba(255,255,255,.35); border-radius: 999px; background: rgba(255,255,255,.07);
  color: #eef1ff; cursor: pointer; font-size: .95rem; line-height: 1; }
.theme-toggle:hover { background: rgba(255,255,255,.2); }

/* ==== Badge notifikasi lonceng ==== */
.notif-badge { position: absolute; top: -4px; right: -4px; background: var(--wrong, #b3372f);
  color: #fff; font-size: .65rem; font-weight: 700; min-width: 16px; height: 16px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center; padding: 0 3px; line-height: 1; }

/* ==== Keaktifan: grid checklist massal ==== */
.participation-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .5rem; }
.participation-item { display: flex; align-items: center; gap: .5rem; padding: .55rem .7rem;
  border: 1px solid var(--line); border-radius: 8px; cursor: pointer; font-weight: normal; }
.participation-item:has(input:checked) { background: var(--accent); color: #fff; border-color: var(--accent); }
.participation-item input { width: auto; flex-shrink: 0; }
@media (max-width: 480px) {
  .participation-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 360px) {
  .participation-grid { grid-template-columns: 1fr; }
}

/* ==== Sidebar navigasi: parent (kategori) > child (menu) ==== */
.sidebar-burger { display: none; background: transparent; border: 1px solid rgba(255,255,255,.4);
  color: #fff; border-radius: 6px; width: 34px; height: 34px; font-size: 1.1rem; cursor: pointer; flex-shrink: 0; }
.sidebar { position: fixed; top: var(--topbar-h, 56px); left: 0; bottom: 0; width: 250px; background: var(--sheet);
  border-right: 1px solid var(--line); overflow-y: auto; padding: 1rem .8rem 2rem; z-index: 60; }
.sidebar-group { margin-bottom: 1.1rem; }
.sidebar-parent { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--ink-soft); padding: 0 .5rem .4rem; }
.sidebar-children { display: flex; flex-direction: column; gap: .15rem; }
.sidebar-child { display: flex; align-items: center; gap: .55rem; padding: .55rem .6rem; border-radius: 8px;
  color: var(--ink); text-decoration: none; font-size: .92rem; font-family: 'Segoe UI', sans-serif; }
.sidebar-child:hover { background: var(--paper); }
.sidebar-child.active { background: var(--accent); color: #fff; font-weight: 600; }
.sidebar-child-ico { width: 1.3rem; text-align: center; flex-shrink: 0; }

main.with-sidebar { margin-left: 250px; max-width: none; }
@media (min-width: 901px) {
  main.with-sidebar { padding-left: 1rem; }
}
body.has-sidebar .topbar-inner { padding-left: 1rem; }

.sidebar-overlay { display: none; position: fixed; top: var(--topbar-h, 56px); left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.4); z-index: 55; }
.sidebar-overlay.show { display: block; }

@media (max-width: 900px) {
  .sidebar-burger { display: inline-flex; align-items: center; justify-content: center; }
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; box-shadow: 4px 0 20px rgba(0,0,0,.15); }
  .sidebar.open { transform: translateX(0); }
  main.with-sidebar { margin-left: 0; }
}

/* ==== Menu kelas: kartu tombol besar (Keaktifan/Project/Pengaturan Nilai/dst) ==== */
.class-menu-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .7rem; margin-bottom: 1.3rem; }
.class-menu-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem;
  background: var(--sheet); border: 1px solid var(--line); border-radius: 10px; padding: 1rem .6rem;
  text-decoration: none; color: var(--ink); font-weight: 600; font-size: .88rem; font-family: 'Segoe UI', sans-serif;
  box-shadow: 0 1px 3px rgba(29,43,80,.07); transition: transform .12s, box-shadow .12s, border-color .12s; text-align: center; }
.class-menu-btn:hover { transform: translateY(-3px); box-shadow: 0 8px 18px rgba(29,43,80,.13); border-color: var(--accent); }
.class-menu-btn .cmb-ico { font-size: 1.6rem; line-height: 1; }
@media (max-width: 480px) {
  .class-menu-grid { grid-template-columns: repeat(2, 1fr); }
  .class-menu-btn { padding: .8rem .5rem; font-size: .82rem; }
}

/* ==== Dashboard: kartu statistik ala Horizon UI ==== */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; margin: 1rem 0 1.4rem; }
.stat-card { background: var(--sheet); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem;
  display: flex; align-items: center; gap: .8rem; box-shadow: 0 18px 40px rgba(112,120,190,.08); }
.stat-card.stat-alert { border-color: var(--wrong); }
.stat-ico { width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; flex-shrink: 0; }
.stat-num { font-size: 1.5rem; font-weight: 800; line-height: 1.1; color: var(--ink); }
.stat-label { font-size: .8rem; color: var(--ink-soft); margin-top: .1rem; }
@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .stat-card { padding: .8rem .9rem; }
  .stat-num { font-size: 1.2rem; }
}

/* ==== Badge Nilai Huruf ==== */
.letter-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 2rem; height: 2rem;
  border-radius: 8px; font-weight: 800; font-size: .95rem; background: var(--accent-soft); color: var(--accent); }
.letter-A, .letter-AB { background: #E6FAF5; color: var(--mark); }
.letter-B, .letter-BC { background: var(--accent-soft); color: var(--accent); }
.letter-C { background: #FFF6E5; color: #B8860B; }
.letter-D, .letter-E { background: #FDECEC; color: var(--wrong); }

/* ==== Keaktifan berbasis pertemuan: item yang sudah tercatat ==== */
.participation-marked { opacity: .55; background: var(--paper); cursor: not-allowed; }

/* ==== Grid kartu kelas (menggantikan tabel polos lama) ==== */
.class-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; margin-top: 1rem; }
.class-card { background: var(--sheet); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem 1.2rem; box-shadow: 0 18px 40px rgba(112,120,190,.08); display: flex; flex-direction: column; }
.class-card-top { display: flex; align-items: center; gap: .7rem; margin-bottom: .8rem; }
.class-card-avatar { width: 44px; height: 44px; border-radius: 12px; background: linear-gradient(135deg, var(--accent), #7B5CFF);
  color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .95rem; flex-shrink: 0; }
.class-card-title { font-weight: 700; font-size: 1.02rem; text-decoration: none; color: var(--ink); display: block; }
.class-card-title:hover { color: var(--accent); }
.class-card-code { font-size: .8rem; color: var(--ink-soft); margin-top: .1rem; }
.class-card-stats { display: flex; gap: 1.4rem; margin: .3rem 0; }
.class-card-stats div { display: flex; flex-direction: column; }
.class-card-stats strong { font-size: 1.2rem; color: var(--ink); }
.class-card-stats span { font-size: .75rem; color: var(--ink-soft); }
.class-card-actions { display: flex; gap: .5rem; margin-top: .6rem; flex-wrap: wrap; }

/* ==== Bulk delete soal: checkbox pemilih di tiap kartu soal ==== */
.q-select-check { display: flex; align-items: center; gap: .4rem; margin-bottom: .5rem; font-weight: normal; cursor: pointer; }
.q-select-check input { width: auto; }

/* ==== Daftar Komponen Penilaian: tombol rounded, bukan tabel polos ==== */
.component-btn-grid { display: flex; flex-direction: column; gap: .5rem; }
.component-btn-wrap { display: flex; align-items: stretch; gap: .4rem; }
.component-btn { flex: 1; display: flex; flex-direction: column; gap: .25rem; background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .7rem .9rem; text-decoration: none; color: var(--ink); }
.component-btn:hover { border-color: var(--accent); }
.component-btn.active { background: var(--accent-soft); border-color: var(--accent); }
.component-btn-title { font-weight: 700; font-size: .95rem; }
.component-btn-meta { display: flex; align-items: center; gap: .5rem; font-size: .82rem; }
.component-btn-del { align-self: center; }

/* ==== Ringkasan kelas: kartu klik-able (Peserta/Kuis/Komponen/Banding) ==== */
.class-summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .8rem; margin: 1rem 0; }
.class-summary-card { display: flex; align-items: center; gap: .6rem; background: var(--sheet); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: .8rem 1rem; text-decoration: none; color: var(--ink); box-shadow: 0 1px 3px rgba(29,43,80,.06); }
.class-summary-ico { font-size: 1.4rem; }
.class-summary-num { font-size: 1.3rem; font-weight: 800; line-height: 1.1; }
.class-summary-label { font-size: .78rem; color: var(--ink-soft); }
.class-summary-clickable { cursor: pointer; transition: transform .12s, box-shadow .12s, border-color .12s; }
.class-summary-clickable:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(29,43,80,.12); border-color: var(--accent); }
.class-summary-alert { border-color: var(--wrong); }
.class-summary-alert .class-summary-num { color: var(--wrong); }

/* ==== Chip kode kelas: klik untuk salin ==== */
.class-code-chip { font-family: monospace; font-weight: 800; font-size: 1.05rem; background: var(--paper);
  border: 1px solid var(--line); border-radius: 6px; padding: .3rem .7rem; cursor: pointer; user-select: all;
  transition: background .12s; }
.class-code-chip:hover { background: var(--accent-soft); border-color: var(--accent); }

/* ==== Materi Kelas: grid video/dokumen ==== */
.material-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; margin-top: .8rem; }
.material-card { background: var(--sheet); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.material-video-wrap { position: relative; width: 100%; padding-top: 56.25%; background: #000; }
.material-video-iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }

/* ==== Dropdown pindah manajer kelas: batasi lebar agar tidak overflow di kartu sempit (desktop) ==== */
.inline-form .manager-move-select {
  flex: 1 1 100%;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: .3rem .4rem;
  font-size: .82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-sizing: border-box;
}

/* ==== Tombol keluarkan kecil di dalam tag anggota kelompok ==== */
.btn-inline-remove { border: none; background: none; color: var(--wrong); cursor: pointer; font-size: .85em; padding: 0 0 0 .3em; font-weight: 700; }
.btn-inline-remove:hover { text-decoration: underline; }
