/* =====================================================================
   Ruang Belajar - tampilan LMS SMK Muhammadiyah 1 Salam
   Warna dasar hijau tua + aksen kuning matahari, motif kawung pada sampul.
   ===================================================================== */

:root {
  --forest: #0F2747;   /* biru dongker (sebelumnya hijau tua #0E3B2B) */
  --forest-2: #183A66;
  /* Warna utama: tombol, tautan, ikon (biru) */
  --green: #1E5AA8;
  --green-600: #174A8C;
  --green-50: #E8EFF9;
  /* Warna status berhasil/benar (tetap hijau) */
  --ok: #17784A;
  --ok-600: #11613B;
  --ok-50: #E8F3EC;
  --sun: #F4B400;
  --sun-50: #FFF6DB;
  --ink: #131C2B;
  --muted: #586477;
  --line: #DCE3EC;
  --paper: #F3F5F8;
  --card: #FFFFFF;
  --danger: #B42318;
  --danger-50: #FDECEA;
  --info: #1D5FB8;
  --info-50: #E8F0FB;
  --warn: #8A5A00;
  --warn-50: #FFF4D6;
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 18px;
  --shadow: 0 1px 2px rgba(15, 39, 71, .06), 0 10px 28px -16px rgba(15, 39, 71, .28);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --kawung: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cg fill='none' stroke='white' stroke-width='1.4'%3E%3Cellipse cx='14.3' cy='14.3' rx='4.4' ry='8.4' transform='rotate(-45 14.3 14.3)'/%3E%3Cellipse cx='25.7' cy='25.7' rx='4.4' ry='8.4' transform='rotate(-45 25.7 25.7)'/%3E%3Cellipse cx='25.7' cy='14.3' rx='4.4' ry='8.4' transform='rotate(45 25.7 14.3)'/%3E%3Cellipse cx='14.3' cy='25.7' rx='4.4' ry='8.4' transform='rotate(45 14.3 25.7)'/%3E%3C/g%3E%3Cg fill='white'%3E%3Ccircle cx='20' cy='20' r='1.6'/%3E%3Ccircle cx='0' cy='0' r='2'/%3E%3Ccircle cx='40' cy='0' r='2'/%3E%3Ccircle cx='0' cy='40' r='2'/%3E%3Ccircle cx='40' cy='40' r='2'/%3E%3C/g%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img, svg, video, iframe { max-width: 100%; }
a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--green-600); }
h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: 26px; font-weight: 800; }
h2 { font-size: 18px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 700; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--sun); color: var(--ink); padding: 8px 12px; border-radius: var(--r-sm); z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; border-radius: 4px; }
.ic { width: 18px; height: 18px; flex: none; }
[hidden] { display: none !important; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 13px; }

/* ---------- Kerangka ---------- */
body.has-nav { display: grid; grid-template-columns: 256px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 8px;
  background: var(--forest); color: #fff;
  padding: 20px 14px;
}
.brand { display: flex; gap: 12px; align-items: center; padding: 4px 8px 18px; }
.brand strong { display: block; font-size: 17px; font-weight: 800; }
.brand span { display: block; font-size: 12px; color: rgba(255, 255, 255, .68); line-height: 1.3; }
.side-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.side-nav a {
  display: flex; gap: 12px; align-items: center;
  padding: 10px 12px; border-radius: 10px;
  color: rgba(255, 255, 255, .78); text-decoration: none; font-weight: 600;
}
.side-nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.side-nav a[aria-current="page"] { background: rgba(255, 255, 255, .12); color: #fff; box-shadow: inset 3px 0 0 var(--sun); }
.side-user { display: flex; gap: 10px; align-items: center; padding: 12px 8px 0; border-top: 1px solid rgba(255, 255, 255, .12); }
.side-user-text { flex: 1; min-width: 0; }
.side-user-text strong { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user-text span { display: block; font-size: 12px; color: rgba(255, 255, 255, .65); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user .icon-btn { color: rgba(255, 255, 255, .8); }
.side-user .icon-btn:hover { background: rgba(255, 255, 255, .1); color: #fff; }
img.logo { object-fit: contain; }
.topbar, .bottom-nav { display: none; }
.main { padding: 28px clamp(16px, 4vw, 40px) 56px; max-width: 1160px; width: 100%; }

@media (max-width: 900px) {
  body.has-nav { display: block; padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .sidebar { display: none; }
  .topbar {
    display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; z-index: 20;
    background: var(--forest); color: #fff; padding: 10px 16px;
  }
  .topbar-brand { display: flex; gap: 10px; align-items: center; color: #fff; text-decoration: none; font-weight: 800; }
  .topbar .icon-btn { color: #fff; }
  .bottom-nav {
    display: flex; position: fixed; inset: auto 0 0 0; z-index: 20;
    background: var(--card); border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .bottom-nav a {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 6px 2px; font-size: 11px; font-weight: 600; color: var(--muted); text-decoration: none; border-radius: 10px;
  }
  .bottom-nav a .ic { width: 22px; height: 22px; }
  .bottom-nav a[aria-current="page"] { color: var(--green); background: var(--green-50); }
  .main { padding-top: 18px; }
  h1 { font-size: 22px; }
}

/* ---------- Tombol ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 9px 16px;
  font: inherit; font-weight: 700; font-size: 14px;
  color: #fff; background: var(--green);
  border: 1px solid var(--green); border-radius: 10px;
  text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--green-600); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn-ghost { background: var(--card); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--green-50); color: var(--ink); border-color: #C2CEDD; }
.btn-light { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .4); color: #fff; }
.btn-light:hover { background: rgba(255, 255, 255, .26); }
.btn-danger-ghost { background: var(--card); color: var(--danger); border-color: #f1c8c3; }
.btn-danger-ghost:hover { background: var(--danger-50); color: var(--danger); }
.btn-sm { min-height: 34px; padding: 6px 12px; font-size: 13px; }
.btn-lg { min-height: 50px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px;
  border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer;
}
.icon-btn:hover { background: var(--green-50); color: var(--ink); }
.icon-btn:disabled { opacity: .35; cursor: default; background: transparent; }
.icon-btn-danger:hover { background: var(--danger-50); color: var(--danger); }
.link-btn { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: inherit; text-decoration: underline; cursor: pointer; }
form.inline { display: inline-flex; gap: 2px; margin: 0; }

/* ---------- Pesan ---------- */
.flash {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; margin: 0 0 16px; border-radius: var(--r);
  background: var(--ok-50); color: var(--ok-600); font-weight: 600; font-size: 14px;
}
.flash .ic { margin-top: 2px; }
.flash span { flex: 1; }
.flash a { color: inherit; }
.flash-error { background: var(--danger-50); color: var(--danger); }
.flash-warn { background: var(--warn-50); color: var(--warn); }
.flash-info { background: var(--info-50); color: var(--info); }
.flash-x { background: none; border: 0; color: inherit; cursor: pointer; padding: 0; opacity: .7; }
.flash.small { margin: 8px 0 0; padding: 10px 12px; font-size: 13px; }

/* ---------- Judul halaman ---------- */
.page-head { margin-bottom: 22px; }
.back { display: inline-flex; align-items: center; gap: 4px; margin: 0 0 10px -4px; font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none; }
.back:hover { color: var(--ink); }
.page-head-row { display: flex; gap: 16px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; }
.page-sub { margin-top: 6px; color: var(--muted); }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 32px 0 14px; flex-wrap: wrap; }
.section-head a { font-weight: 600; font-size: 14px; }

/* ---------- Kartu & formulir ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; }
.card-title { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; font-size: 16px; }
.card-title .ic { color: var(--green); }
.form-card { max-width: 820px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.row-2, .row-3 { display: grid; gap: 14px; }
.row-2 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.row-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 760px) {
  .grid-2, .row-2, .row-3 { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 18px; }
}
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; border: 0; padding: 0; margin: 0; }
.field > span, .field > legend { font-size: 13px; font-weight: 700; color: var(--ink); padding: 0; }
.field small { color: var(--muted); font-size: 12px; }
.field.narrow { max-width: 260px; }
input[type=text], input[type=password], input[type=email], input[type=url], input[type=search],
input[type=number], input[type=datetime-local], select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px;
  font: inherit; font-size: 15px; color: var(--ink);
  background: #fff; border: 1px solid #C9D2DE; border-radius: 10px;
}
textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(30, 90, 168, .2); }
select { appearance: none; padding-right: 36px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235A6B62' stroke-width='2' fill='none'/%3E%3C/svg%3E") no-repeat right 14px center; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--green); flex: none; }
.check-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.check-pill input, .swatch input, .seg-input input, .kind input, .opt-key input { position: absolute; opacity: 0; pointer-events: none; }
.check-pill span {
  display: inline-flex; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 14px; font-weight: 600; cursor: pointer; background: #fff;
}
.check-pill input:checked + span { background: var(--green); border-color: var(--green); color: #fff; }
.check-pill input:focus-visible + span, .swatch input:focus-visible + span, .seg-input input:focus-visible + span, .kind input:focus-visible + span { outline: 3px solid var(--sun); outline-offset: 2px; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch span { display: block; width: 36px; height: 36px; border-radius: 10px; background: var(--sw); cursor: pointer; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .5); }
.swatch input:checked + span { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--sw); }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; padding-top: 4px; }
.inline-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-top: 14px; }
.inline-form .grow, .grow { flex: 1; min-width: 160px; }
.pw-wrap { display: flex; gap: 8px; align-items: stretch; position: relative; }
.pw-toggle { position: absolute; right: 4px; top: 4px; bottom: 4px; width: 40px; display: grid; place-items: center; background: none; border: 0; color: var(--muted); cursor: pointer; border-radius: 8px; }
.pw-toggle:hover { background: var(--green-50); }
.pw-gen { display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.pw-gen:hover { background: var(--green-50); }
.current-file { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 12px; background: var(--paper); border-radius: 10px; font-size: 14px; }
.file-drop {
  display: flex; align-items: center; gap: 10px; padding: 14px 16px;
  border: 1.5px dashed #B6C4D6; border-radius: 12px; background: #FBFCFE;
  color: var(--muted); font-weight: 600; cursor: pointer; position: relative;
}
.file-drop:hover, .file-drop.is-filled { border-color: var(--green); color: var(--green-600); background: var(--green-50); }
.file-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.file-drop-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seg { display: inline-flex; padding: 3px; background: #E6EBF2; border-radius: 12px; gap: 2px; flex-wrap: wrap; }
.seg a, .seg-input span {
  display: block; padding: 7px 14px; border-radius: 9px; font-size: 14px; font-weight: 600;
  color: var(--muted); text-decoration: none; cursor: pointer;
}
.seg a[aria-current="page"], .seg-input input:checked + span { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.seg-input input:disabled + span { opacity: .4; cursor: not-allowed; }
.seg-input label { position: relative; }
.kind-picker { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 640px) { .kind-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kind { position: relative; }
.kind span {
  display: flex; flex-direction: column; gap: 4px; height: 100%;
  padding: 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; background: #fff;
}
.kind .ic { width: 22px; height: 22px; color: var(--green); }
.kind small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.kind input:checked + span { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); background: var(--green-50); }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }
.toolbar select { width: auto; min-width: 160px; }
.search { position: relative; flex: 1; min-width: 200px; }
.search .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { padding-left: 38px; }
.danger-zone {
  display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  max-width: 820px; margin-top: 24px; padding: 18px 22px;
  border: 1px solid #f1c8c3; border-radius: var(--r-lg); background: #fff;
}
.danger-zone h2 { font-size: 15px; color: var(--danger); }
.danger-zone p { color: var(--muted); font-size: 13px; max-width: 520px; margin-top: 4px; }

/* ---------- Avatar, tag ---------- */
.avatar {
  display: inline-grid; place-items: center; flex: none;
  width: 36px; height: 36px; border-radius: 50%;
  background: hsl(var(--h) 45% 88%); color: hsl(var(--h) 55% 26%);
  font-size: 13px; font-weight: 800; letter-spacing: .02em;
}
.avatar-sm { width: 30px; height: 30px; font-size: 11px; }
.avatar-lg { width: 64px; height: 64px; font-size: 22px; }
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap;
  background: #EEF1F5; color: var(--muted);
}
.tag .ic { width: 13px; height: 13px; }
.tag-ok { background: var(--ok-50); color: var(--ok-600); }
.tag-info { background: var(--info-50); color: var(--info); }
.tag-warn { background: var(--warn-50); color: var(--warn); }
.tag-danger { background: var(--danger-50); color: var(--danger); }
.tag-light { background: rgba(255, 255, 255, .2); color: #fff; }
.role { font-size: 13px; font-weight: 700; }
.role-admin { color: #7a3fa0; }
.role-guru { color: var(--info); }
.role-siswa { color: var(--ok-600); }

/* ---------- Halaman masuk ---------- */
body.is-bare { background: #fff; }
.login { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); min-height: 100vh; }
.login-art { position: relative; background: var(--forest); color: #fff; overflow: hidden; display: flex; align-items: flex-end; }
.login-art::before { content: ""; position: absolute; inset: 0; background: var(--kawung); background-size: 56px; opacity: .09; }
.login-art-inner { position: relative; z-index: 1; padding: clamp(28px, 6vw, 72px); max-width: 560px; }
.login-school { margin-top: 28px; font-size: 15px; font-weight: 600; color: rgba(255, 255, 255, .75); }
.login-app { font-size: clamp(40px, 6vw, 64px); font-weight: 800; line-height: 1; letter-spacing: -0.03em; margin-top: 6px; }
.login-tag { margin-top: 18px; font-size: 17px; color: rgba(255, 255, 255, .82); max-width: 380px; }
.login-panel { display: flex; align-items: center; justify-content: center; padding: 32px 20px; }
.login-form { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 16px; }
.login-form h1 { font-size: 28px; }
.login-help { font-size: 13px; color: var(--muted); text-align: center; }
@media (max-width: 860px) {
  .login { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .login-art-inner { padding: 28px 22px 30px; }
  .login-art-inner img { width: 44px; height: 44px; }
  .login-school { margin-top: 14px; font-size: 13px; }
  .login-app { font-size: 34px; }
  .login-tag { margin-top: 8px; font-size: 14px; }
  .login-panel { align-items: flex-start; padding-top: 28px; }
}

/* ---------- Beranda ---------- */
.hello { margin-bottom: 22px; }
.hello-date { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 8px; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center;
  padding: 16px 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  text-decoration: none; color: var(--ink);
}
.stat:hover { border-color: #B6C4D6; color: var(--ink); }
.stat .ic { grid-row: span 2; width: 38px; height: 38px; padding: 9px; border-radius: 10px; background: var(--green-50); color: var(--green); }
.stat strong { font-size: 24px; font-weight: 800; line-height: 1.1; }
.stat span { font-size: 13px; color: var(--muted); font-weight: 600; }
.quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
@media (max-width: 760px) { .quick { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.quick-item {
  display: flex; gap: 10px; align-items: center; padding: 14px 16px;
  border-radius: var(--r); background: var(--forest); color: #fff; font-weight: 700; font-size: 14px; text-decoration: none;
}
.quick-item:hover { background: var(--forest-2); color: #fff; }
.quick-item .ic { color: var(--sun); }
.dash-cols { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 960px) { .dash-cols { grid-template-columns: minmax(0, 1fr); } }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.panel-head { padding: 16px 20px 12px; }
.panel-head h2 { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.panel-head .ic { color: var(--green); }
.panel-empty { padding: 4px 20px 22px; color: var(--muted); font-size: 14px; }
.panel-sub { padding: 14px 20px 18px; border-top: 1px solid var(--line); }
.panel-sub h3 { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.todo { list-style: none; margin: 0; padding: 0 8px 10px; }
.todo a {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "kind title due" "kind meta due";
  column-gap: 12px; align-items: center;
  padding: 10px 12px; border-radius: 12px; text-decoration: none; color: var(--ink);
}
.todo a:hover { background: var(--paper); color: var(--ink); }
.todo-kind { grid-area: kind; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: color-mix(in srgb, var(--cc) 14%, white); color: var(--cc); }
.todo a:not(:has(.todo-kind)) { grid-template-columns: 4px minmax(0, 1fr) auto; grid-template-areas: "bar title due" "bar meta due"; }
.todo a:not(:has(.todo-kind))::before { content: ""; grid-area: bar; align-self: stretch; border-radius: 4px; background: var(--cc); }
.todo-title { grid-area: title; font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.todo-meta { grid-area: meta; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.todo-count, .todo-due { grid-area: due; font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 999px; background: var(--sun-50); color: var(--warn); }
.todo-due.is-late { background: var(--danger-50); color: var(--danger); }
.ann-list { list-style: none; margin: 0; padding: 0 8px 10px; }
.ann-list a { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border-radius: 12px; text-decoration: none; color: var(--ink); }
.ann-list a:hover { background: var(--paper); color: var(--ink); }
.ann-course { font-size: 12px; font-weight: 800; color: var(--cc); }
.ann-body { font-size: 14px; }
.ann-meta { font-size: 12px; color: var(--muted); }
.mini-score { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; padding: 8px 0; border-bottom: 1px dashed var(--line); text-decoration: none; color: var(--ink); font-size: 14px; }
.mini-score:last-child { border-bottom: 0; }
.mini-score strong { font-size: 16px; color: var(--green-600); }
.mini-score small { font-size: 12px; color: var(--muted); font-weight: 600; }

/* ---------- Kartu kursus (sampul bermotif kawung) ---------- */
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.course-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  text-decoration: none; color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
.course-card:hover { color: var(--ink); border-color: color-mix(in srgb, var(--cc) 40%, var(--line)); box-shadow: var(--shadow); }
.cc-band {
  position: relative; height: 92px; padding: 14px 16px; display: flex; gap: 6px; align-items: flex-start;
  background: linear-gradient(135deg, rgba(255, 255, 255, .10), rgba(0, 0, 0, .18)), var(--cc);
}
.cc-band::after { content: ""; position: absolute; inset: 0; background: var(--kawung); background-size: 40px; opacity: .16; }
.cc-code { position: relative; z-index: 1; padding: 3px 9px; border-radius: 999px; background: rgba(0, 0, 0, .22); color: #fff; font-size: 12px; font-weight: 800; letter-spacing: .02em; }
.cc-band .tag { position: relative; z-index: 1; }
.cc-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.cc-body h3 { font-size: 16px; line-height: 1.3; margin-bottom: 2px; }
.cc-teacher, .cc-classes { display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); }
.cc-teacher .ic, .cc-classes .ic { width: 15px; height: 15px; }
.cc-classes { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-foot { padding: 10px 16px; border-top: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--muted); }

/* ---------- Kosong ---------- */
.empty { text-align: center; padding: 48px 20px; background: var(--card); border: 1px dashed #C8D2DF; border-radius: var(--r-lg); }
.empty-ic { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--green-50); color: var(--green); margin-bottom: 14px; }
.empty-ic .ic { width: 26px; height: 26px; }
.empty p { color: var(--muted); max-width: 420px; margin: 8px auto 18px; }

/* ---------- Halaman kursus ---------- */
.course-hero {
  position: relative; overflow: hidden; display: flex; gap: 16px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap;
  padding: 28px clamp(20px, 3vw, 32px); border-radius: var(--r-lg); color: #fff;
  background: var(--cc);
}
.course-hero::before { content: ""; position: absolute; inset: 0; background: var(--kawung); background-size: 48px; opacity: .14; }
.course-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0, 0, 0, .22), rgba(0, 0, 0, 0) 70%); }
.course-hero-text, .course-hero-actions { position: relative; z-index: 1; }
.course-hero h1 { font-size: clamp(24px, 3.4vw, 34px); margin: 4px 0 10px; }
.course-hero-code { font-size: 13px; font-weight: 800; opacity: .9; }
.course-hero-meta { display: flex; gap: 8px; align-items: center; font-size: 14px; opacity: .92; margin-top: 4px; }
.course-hero-meta .ic { width: 16px; height: 16px; }
.tabs { display: flex; gap: 4px; margin: 16px 0 22px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs a {
  display: inline-flex; gap: 8px; align-items: center; padding: 12px 14px; margin-bottom: -1px;
  font-weight: 700; font-size: 14px; color: var(--muted); text-decoration: none; white-space: nowrap;
  border-bottom: 3px solid transparent;
}
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--sun); }
.course-desc { margin-bottom: 20px; padding: 16px 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); }
.topic { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); margin-bottom: 16px; }
.topic-head { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; padding: 18px 20px 10px; }
.topic-head h2 { font-size: 17px; }
.topic-sum { color: var(--muted); font-size: 14px; margin-top: 4px; }
.topic-tools { display: flex; gap: 2px; flex: none; }
.topic-edit { display: grid; gap: 12px; padding: 0 20px 14px; }
.topic-empty { padding: 0 20px 6px; color: var(--muted); font-size: 14px; }
.items { list-style: none; margin: 0; padding: 0 10px 10px; }
.item a {
  display: flex; gap: 14px; align-items: center; padding: 12px 10px; border-radius: 12px;
  text-decoration: none; color: var(--ink);
}
.item a:hover { background: var(--paper); color: var(--ink); }
.item + .item a { border-top: 1px solid #EDF1F6; }
.item:hover + .item a, .item a:hover { border-top-color: transparent; }
.item-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; flex: none; }
.item-materi .item-ic { background: var(--ok-50); color: var(--ok); }
.item-tugas .item-ic { background: var(--sun-50); color: #9a6a00; }
.item-kuis .item-ic { background: var(--info-50); color: var(--info); }
.item-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.item-title { font-weight: 700; font-size: 15px; }
.item-meta { font-size: 13px; color: var(--muted); }
.item-badges { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 640px) {
  .item a { flex-wrap: wrap; }
  .item-badges { width: 100%; justify-content: flex-start; padding-left: 54px; }
}
.topic-add { display: flex; gap: 8px; flex-wrap: wrap; padding: 4px 20px 18px; }
.topic-add a {
  display: inline-flex; gap: 6px; align-items: center; padding: 7px 12px;
  border: 1px dashed #B6C4D6; border-radius: 999px; font-size: 13px; font-weight: 700; text-decoration: none; color: var(--green-600);
}
.topic-add a:hover { background: var(--green-50); border-style: solid; }
.topic-add .ic { width: 15px; height: 15px; }
.add-topic { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; padding: 20px; border: 2px dashed #C8D2DF; border-radius: var(--r-lg); }
.add-topic .row-2 { width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 760px) { .add-topic .row-2 { grid-template-columns: 1fr; } }
.add-topic h2 { display: flex; gap: 8px; align-items: center; font-size: 16px; }
.ann-feed { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-direction: column; gap: 12px; }
.ann-head { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.ann-head > div { flex: 1; display: flex; flex-direction: column; }

/* ---------- Teks bacaan ---------- */
.prose { font-size: 15px; line-height: 1.7; overflow-wrap: anywhere; }
.prose > * + * { margin-top: 12px; }
.prose h3 { font-size: 17px; margin-top: 20px; }
.prose ul { padding-left: 22px; margin: 10px 0 0; }
.prose li + li { margin-top: 4px; }
.reader { display: flex; flex-direction: column; gap: 18px; max-width: 860px; }
.video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r); overflow: hidden; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.link-card {
  display: flex; gap: 14px; align-items: center; padding: 16px 18px;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); text-decoration: none; color: var(--ink);
}
.link-card:hover { border-color: var(--green); color: var(--ink); }
.link-card > .ic:first-child { width: 28px; height: 28px; color: var(--green); }
.link-card span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.link-card small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-chip {
  display: flex; gap: 12px; align-items: center; padding: 12px 14px; max-width: 520px;
  border: 1px solid var(--line); border-radius: var(--r); background: #fff; text-decoration: none; color: var(--ink);
}
.file-chip:hover { border-color: var(--green); color: var(--ink); background: var(--green-50); }
.file-chip > .ic:first-child { width: 34px; height: 34px; padding: 7px; border-radius: 9px; background: var(--green-50); color: var(--green); }
.file-chip-name { flex: 1; min-width: 0; font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-chip-size { font-size: 12px; color: var(--muted); }
.file-chip-dl { color: var(--muted); }
.preview-img { border-radius: var(--r); border: 1px solid var(--line); }
.preview-pdf { width: 100%; height: 75vh; border: 1px solid var(--line); border-radius: var(--r); }
.preview-video { width: 100%; border-radius: var(--r); background: #000; }
.prevnext { display: flex; justify-content: space-between; gap: 12px; max-width: 860px; margin-top: 18px; }
.prevnext a { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: var(--r); text-decoration: none; color: var(--ink); max-width: 48%; }
.prevnext a:hover { background: var(--card); color: var(--ink); }
.prevnext span { display: flex; flex-direction: column; font-weight: 700; font-size: 14px; min-width: 0; }
.prevnext small { font-size: 12px; color: var(--muted); font-weight: 600; }
.prevnext .next { text-align: right; margin-left: auto; }

/* ---------- Tugas ---------- */
.assign-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
@media (max-width: 960px) { .assign-layout { grid-template-columns: minmax(0, 1fr); } }
.meta-strip { display: flex; gap: 8px; flex-wrap: wrap; }
.meta-pill { display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; border-radius: 999px; background: var(--paper); font-size: 13px; font-weight: 600; }
.meta-pill .ic { width: 15px; height: 15px; color: var(--green); }
.meta-pill.is-late { background: var(--danger-50); color: var(--danger); }
.meta-pill.is-late .ic { color: var(--danger); }
.submit-box { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 20px; }
.submit-box .card-title { margin-bottom: 0; }
.submit-box > .tag { align-self: flex-start; }
.grade-result { display: flex; align-items: baseline; gap: 8px; padding: 14px 16px; border-radius: var(--r); background: var(--green-50); }
.grade-result strong { font-size: 40px; line-height: 1; font-weight: 800; color: var(--green-600); }
.grade-result span { color: var(--green-600); font-weight: 600; }
.feedback { padding: 12px 14px; border-left: 3px solid var(--sun); background: var(--sun-50); border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.feedback h3 { font-size: 13px; margin-bottom: 4px; }
.answer { padding: 12px 14px; background: var(--paper); border-radius: var(--r-sm); font-size: 14px; }
.mini-stats { display: flex; gap: 24px; flex-wrap: wrap; margin-bottom: 14px; }
.mini-stats div { display: flex; flex-direction: column; }
.mini-stats strong { font-size: 28px; font-weight: 800; line-height: 1.1; }
.mini-stats span { font-size: 13px; color: var(--muted); }
.progress { height: 8px; border-radius: 999px; background: #E6EBF2; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--green); border-radius: inherit; }
.grade-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.grade-row { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.grade-who { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.grade-who > div { flex: 1; min-width: 160px; display: flex; flex-direction: column; }
.grade-answer summary { cursor: pointer; font-weight: 700; font-size: 14px; color: var(--green-600); }
.grade-answer[open] summary { margin-bottom: 10px; }
.grade-answer > * + * { margin-top: 10px; }
.grade-inputs { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.score-field { width: 140px; }
.score-wrap { display: flex; align-items: center; gap: 6px; }
.score-wrap input { font-weight: 800; text-align: center; }
.score-wrap em { font-style: normal; color: var(--muted); font-weight: 600; }
.sticky-save { position: sticky; bottom: 12px; display: flex; justify-content: flex-end; margin-top: 16px; }
.sticky-save .btn { box-shadow: 0 8px 24px -8px rgba(15, 39, 71, .5); }
@media (max-width: 900px) { .sticky-save { bottom: calc(80px + env(safe-area-inset-bottom)); } .sticky-save .btn { width: 100%; } }

/* ---------- Tabel ---------- */
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; font-weight: 700; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line); background: #FAFBFD; white-space: nowrap; }
.table td { padding: 10px 14px; border-bottom: 1px solid #EDF1F6; vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table tr.is-off td { opacity: .55; }
.person { display: inline-flex; gap: 10px; align-items: center; color: var(--ink); text-decoration: none; }
.person > span:not(.avatar) { display: flex; flex-direction: column; }
a.person:hover strong { color: var(--green); }
.row-tools { display: flex; gap: 2px; justify-content: flex-end; }
td.row-tools { display: table-cell; text-align: right; white-space: nowrap; }
.check-col { width: 36px; }
.check-col input { width: 18px; height: 18px; accent-color: var(--green); }
.bulk-bar {
  position: sticky; top: 8px; z-index: 5; display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  padding: 10px 12px; margin-bottom: 10px; border-radius: var(--r); background: var(--forest); color: #fff;
}
.bulk-bar select { width: auto; min-height: 34px; padding: 4px 34px 4px 10px; font-size: 13px; }
.bulk-bar .btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .35); }
.bulk-bar .btn-ghost:hover { background: rgba(255, 255, 255, .1); }
.pager { display: flex; gap: 4px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.pager a, .pager-gap { min-width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; font-weight: 700; font-size: 14px; text-decoration: none; color: var(--ink); }
.pager a:hover { background: var(--card); }
.pager a.is-current { background: var(--green); color: #fff; }
.grades-wrap { max-height: 75vh; }
.grades th { position: sticky; top: 0; z-index: 2; }
.grades th a { color: inherit; }
.grades .sticky-col { position: sticky; left: 0; background: #fff; z-index: 1; min-width: 190px; box-shadow: 1px 0 0 var(--line); }
.grades th.sticky-col { z-index: 3; background: #FAFBFD; }
.grades td.sticky-col { display: table-cell; }
.grades td.sticky-col span { display: block; }
.grades td.is-empty { color: #B4BFCC; }
.grades td.is-low { color: var(--danger); font-weight: 700; }
.grades td.avg { background: var(--green-50); }
.legend { margin-top: 14px; font-size: 14px; }
.legend summary { cursor: pointer; font-weight: 700; }
.legend ul { list-style: none; padding: 0; margin: 10px 0; columns: 2 260px; }
.legend li { margin-bottom: 4px; break-inside: avoid; }

/* ---------- Kuis ---------- */
.q-list { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-direction: column; gap: 12px; }
.q-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; }
.q-card.is-editing { border-color: var(--sun); box-shadow: 0 0 0 2px var(--sun-50); }
.q-card.is-right { border-left: 4px solid var(--ok); }
.q-card.is-wrong { border-left: 4px solid var(--danger); }
.q-head { display: flex; gap: 12px; align-items: flex-start; }
.q-num { display: inline-grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 9px; background: var(--forest); color: #fff; font-weight: 800; font-size: 13px; }
.q-text { flex: 1; min-width: 0; padding-top: 3px; }
.q-tools { display: flex; gap: 2px; }
.q-opts { list-style: none; padding: 0; margin: 12px 0 0 42px; display: flex; flex-direction: column; gap: 6px; }
.q-opts li { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border-radius: 10px; background: var(--paper); font-size: 14px; }
.q-opts li span { flex: 1; }
.q-opts b { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: #fff; font-size: 12px; flex: none; }
.q-opts li.is-correct { background: var(--ok-50); color: var(--ok-600); font-weight: 700; }
.q-opts li.is-correct b { background: var(--ok); color: #fff; }
.q-opts li.is-chosen-wrong { background: var(--danger-50); color: var(--danger); }
.q-opts .chosen { font-style: normal; font-size: 12px; font-weight: 700; }
@media (max-width: 640px) { .q-opts { margin-left: 0; } }
.q-editors { margin-top: 24px; }
.opt-inputs { display: flex; flex-direction: column; gap: 8px; }
.opt-input { display: flex; gap: 8px; align-items: center; }
.opt-key { position: relative; }
.opt-key span {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px;
  border: 1px solid #C9D2DE; font-weight: 800; cursor: pointer; background: #fff;
}
.opt-key input:checked + span { background: var(--ok); border-color: var(--ok); color: #fff; }
.opt-key input:focus-visible + span { outline: 3px solid var(--sun); outline-offset: 2px; }
.quiz-take { max-width: 820px; }
.quiz-bar {
  position: sticky; top: 0; z-index: 10; display: flex; gap: 12px; align-items: center; justify-content: space-between;
  padding: 12px 16px; margin: 0 0 10px; border-radius: var(--r); background: var(--forest); color: #fff;
}
@media (max-width: 900px) { .quiz-bar { top: 52px; } }
.quiz-bar-title { display: flex; flex-direction: column; min-width: 0; }
.quiz-bar-title strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quiz-bar-title span { font-size: 13px; color: rgba(255, 255, 255, .75); }
.quiz-timer { display: inline-flex; gap: 8px; align-items: center; padding: 8px 14px; border-radius: 999px; background: rgba(255, 255, 255, .14); font-weight: 800; font-size: 18px; font-variant-numeric: tabular-nums; }
.quiz-timer.is-warn { background: var(--sun); color: var(--ink); }
.quiz-timer.is-up { background: var(--danger); color: #fff; }
.quiz-nav { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.quiz-nav a { display: grid; place-items: center; min-width: 34px; height: 34px; padding: 0 6px; border-radius: 9px; border: 1px solid var(--line); background: #fff; font-size: 13px; font-weight: 700; text-decoration: none; color: var(--muted); }
.quiz-nav a.is-done { background: var(--ok); border-color: var(--ok); color: #fff; }
.quiz-intro { margin-bottom: 14px; }
.q-take { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--card); padding: 18px; margin: 0 0 14px; scroll-margin-top: 140px; }
.q-take legend { float: left; margin-right: 12px; }
.q-take .q-text { padding-top: 3px; overflow: hidden; }
.q-choices { clear: both; display: flex; flex-direction: column; gap: 8px; padding-top: 14px; }
.choice {
  display: flex; gap: 12px; align-items: center; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 12px; cursor: pointer; font-size: 15px; position: relative;
}
.choice:hover { border-color: #B6C4D6; background: #FBFCFE; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice b { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--paper); flex: none; font-size: 13px; }
.choice:has(input:checked) { border-color: var(--green); background: var(--green-50); box-shadow: inset 0 0 0 1px var(--green); }
.choice:has(input:checked) b { background: var(--green); color: #fff; }
.choice:has(input:focus-visible) { outline: 3px solid var(--sun); outline-offset: 2px; }
.quiz-submit { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.result-hero { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; padding: 24px; margin-bottom: 20px; border-radius: var(--r-lg); background: var(--forest); color: #fff; position: relative; overflow: hidden; }
.result-hero::before { content: ""; position: absolute; inset: 0; background: var(--kawung); background-size: 48px; opacity: .08; }
.result-score, .result-facts { position: relative; }
.result-score { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 120px; height: 120px; border-radius: 50%; background: var(--sun); color: var(--ink); }
.result-score strong { font-size: 40px; line-height: 1; font-weight: 800; }
.result-score span { font-size: 12px; font-weight: 700; }
.result-facts { display: flex; flex-direction: column; gap: 8px; }
.result-facts p { display: flex; gap: 8px; align-items: center; }
.result-facts .is-late { color: #ffd0c9; }
.analysis { list-style: none; padding: 0; margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); }
.analysis li { display: grid; grid-template-columns: 28px minmax(0, 1fr) 140px 44px; gap: 12px; align-items: center; padding: 10px 16px; border-bottom: 1px solid #EDF1F6; font-size: 14px; }
.analysis li:last-child { border-bottom: 0; }
.an-num { font-weight: 800; color: var(--muted); }
.an-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.an-bar { height: 8px; border-radius: 999px; background: #E6EBF2; overflow: hidden; }
.an-bar span { display: block; height: 100%; border-radius: inherit; }
.an-bar.is-easy span { background: var(--ok); }
.an-bar.is-mid span { background: var(--sun); }
.an-bar.is-hard span { background: var(--danger); }
.analysis strong { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .analysis li { grid-template-columns: 24px minmax(0, 1fr) 44px; } .an-bar { grid-column: 2 / 4; grid-row: 2; } }

/* ---------- Nilai siswa ---------- */
.grade-course { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); margin-bottom: 16px; overflow: hidden; }
.grade-course header { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; border-top: 5px solid var(--cc); }
.grade-course header a { color: var(--ink); text-decoration: none; }
.grade-avg { display: flex; flex-direction: column; align-items: flex-end; }
.grade-avg strong { font-size: 24px; font-weight: 800; line-height: 1; color: var(--cc); }
.grade-avg span { font-size: 11px; color: var(--muted); }
.grade-items { list-style: none; margin: 0; padding: 0 10px 10px; }
.grade-items a { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 10px; text-decoration: none; color: var(--ink); }
.grade-items a:hover { background: var(--paper); }
.grade-items .ic { color: var(--muted); }
.gi-title { flex: 1; min-width: 0; display: flex; flex-direction: column; font-weight: 600; font-size: 14px; }
.gi-title small { font-weight: 500; color: var(--muted); font-size: 12px; }
.gi-score strong { font-size: 18px; font-weight: 800; }
.gi-score small { color: var(--muted); font-weight: 600; }

/* ---------- Profil, kelas, impor ---------- */
.profile-top { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 8px 12px; margin: 0; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.classes-layout { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
@media (max-width: 760px) { .classes-layout { grid-template-columns: 1fr; } }
.class-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.class-item { padding: 14px 16px; }
.class-main { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.class-main > div:first-child { flex: 1; min-width: 140px; }
.class-counts { display: flex; gap: 16px; font-size: 13px; color: var(--muted); }
.class-counts a { color: var(--muted); }
.class-counts strong { color: var(--ink); font-size: 15px; }
.import-result { margin-bottom: 20px; }
.import-result h3 { margin: 12px 0 8px; }
.import-result details { margin: 12px 0; }
.import-result summary { cursor: pointer; font-weight: 700; }
.prose-card { font-size: 14px; }
.prose-card p { margin-bottom: 10px; }
.plain { padding-left: 18px; margin: 0 0 12px; }
.plain li { margin-bottom: 6px; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media print {
  .sidebar, .topbar, .bottom-nav, .page-actions, .tabs, .btn { display: none !important; }
  body.has-nav { display: block; }
}
