/* =========================================================
   Scola LMS — Dashboard Guru
   ========================================================= */
:root {
  --navy: #1b2a63;
  --primary: #2563eb;
  --primary-soft: #e3edff;
  --text: #334155;
  --muted: #64748b;
  --border: #e3e8f1;
  --bg: #f4f7fc;
  --white: #fff;

  --yellow: #f5b529; --yellow-bg: #fff8e3; --yellow-bd: #fbe3a4;
  --green: #22a45d;  --green-bg: #e9f7ef;  --green-bd: #bfe5cf;
  --purple: #8b5cf6; --purple-bg: #f2eeff; --purple-bd: #dacffb;
  --blue: #2f6fed;   --blue-bg: #eaf2ff;   --blue-bd: #c8dafc;
  --red: #ef5a6f;    --red-bg: #fdecef;    --red-bd: #f8c9d1;
  --orange: #f78c2a; --orange-bg: #fff1e3;

  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .05);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }

.ic {
  width: 20px; height: 20px; flex-shrink: 0;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
.ic-sm { width: 16px; height: 16px; }
.ic-xs { width: 14px; height: 14px; }
.ic-lg { width: 26px; height: 26px; }

.container { max-width: 1280px; margin: 0 auto; padding: 24px; }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 24px;
  height: 64px; display: flex; align-items: center; gap: 32px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; color: var(--navy); }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #fff; display: grid; place-items: center; font-size: 18px;
}
.nav { display: flex; gap: 4px; flex: 1; }
.nav a {
  padding: 8px 14px; border-radius: 8px; font-weight: 600; color: var(--muted);
}
.nav a:hover { background: var(--bg); color: var(--navy); }
.nav a.active { background: var(--primary-soft); color: var(--primary); }
.profile { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.profile-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: #fde7cf; color: #9a5b1f; font-weight: 700;
  display: grid; place-items: center;
}
.profile-name { font-weight: 700; color: var(--navy); line-height: 1.2; }
.profile-role { font-size: 12px; color: var(--muted); }

/* ---------- Sapaan ---------- */
.welcome {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: linear-gradient(90deg, #e4eefd 0%, #edf3fe 100%);
  border-radius: 16px; padding: 16px 20px;
}
.welcome-title { font-size: 20px; line-height: 1.3; font-weight: 800; color: var(--navy); }
.welcome-sub { margin-top: 4px; color: var(--muted); font-size: 13.5px; }
.welcome-stats { display: flex; gap: 8px; flex-wrap: wrap; }
.stat-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px 6px 6px; border-radius: 999px;
  background: var(--white); box-shadow: var(--shadow);
  font-size: 13px; color: var(--muted); font-weight: 600;
  transition: box-shadow .15s;
}
.stat-chip:hover { box-shadow: 0 4px 14px rgba(27, 42, 99, .1); }
.stat-chip strong { font-size: 16px; font-weight: 800; color: var(--navy); }
.stat-chip-icon {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--primary-soft); color: var(--primary);
  display: grid; place-items: center;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid transparent; border-radius: 999px;
  padding: 7px 16px; font-weight: 600; font-size: 13px; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
.btn-soft { background: var(--primary-soft); color: var(--primary); }
.btn-soft:hover { background: #d3e2ff; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: #1d4ed8; }
.btn-outline { background: var(--white); border-color: var(--border); color: var(--text); }
.btn-outline:hover { border-color: #c5cfdf; background: #f8fafd; }
.btn-danger-soft { background: #fbd5dc; color: #d63b52; }
.btn-danger-soft:hover { background: #f8c3cd; }
.btn-rect { border-radius: 10px; padding: 9px 16px; }

/* ---------- Sections ---------- */
.section-title { font-size: 20px; font-weight: 800; color: var(--navy); margin: 28px 0 14px; }

.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.quick-card {
  display: flex; align-items: center; gap: 16px;
  padding: 18px; border-radius: var(--radius); border: 1px solid;
  transition: transform .15s, box-shadow .15s;
}
.quick-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(27, 42, 99, .08); }
.quick-icon {
  width: 52px; height: 52px; border-radius: 12px; color: #fff;
  display: grid; place-items: center; flex-shrink: 0;
}
.quick-body { flex: 1; min-width: 0; }
.quick-title { font-size: 16px; font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.quick-desc { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.quick-card > .ic { color: var(--navy); }

.q-yellow { background: var(--yellow-bg); border-color: var(--yellow-bd); }
.q-yellow .quick-icon { background: var(--yellow); }
.q-green { background: var(--green-bg); border-color: var(--green-bd); }
.q-green .quick-icon { background: var(--green); }
.q-purple { background: var(--purple-bg); border-color: var(--purple-bd); }
.q-purple .quick-icon { background: var(--purple); }
.q-blue { background: var(--blue-bg); border-color: var(--blue-bd); }
.q-blue .quick-icon { background: var(--blue); }

.dash-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; margin-top: 24px; }
.panel {
  background: var(--white); border: 1px solid var(--border);
  border-radius: 16px; padding: 20px; box-shadow: var(--shadow);
}
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.panel-head + .activity-list { margin-bottom: 24px; }
.panel-title { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 700; color: var(--navy); }
.link-more { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; color: var(--navy); }
.link-more:hover { color: var(--primary); }

/* ---------- Activity ---------- */
.activity-list { display: flex; flex-direction: column; gap: 10px; }
.activity-list:last-child { margin-bottom: 0; }
.activity {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px;
}
.activity.is-live { background: var(--red-bg); border-color: var(--red-bd); }
.activity-icon {
  width: 42px; height: 42px; border-radius: 10px; color: #fff;
  display: grid; place-items: center; flex-shrink: 0;
}
.activity-body { flex: 1; min-width: 0; }
.activity-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.activity-name { font-weight: 600; color: var(--navy); }
.activity-meta { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.activity-meta span { display: inline-flex; align-items: center; gap: 6px; }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600;
}
.b-red { background: #fbd5dc; color: #d63b52; }
.b-blue { background: #dde8ff; color: #2f5fd0; }
.b-green { background: #d8f2e3; color: #1c8a4e; }
.b-orange { background: #ffe3cc; color: #d46a12; }
.b-yellow { background: #fdf0c6; color: #a87403; }
.b-purple { background: #ebe3ff; color: #6d3fe0; }
.b-gray { background: #eef1f6; color: #55627a; }
.b-navy { background: #e6ebf7; color: var(--navy); }

.bg-red { background: var(--red); }
.bg-blue { background: var(--blue); }
.bg-green { background: var(--green); }
.bg-orange { background: var(--orange); }
.bg-purple { background: var(--purple); }
.bg-yellow { background: var(--yellow); }

/* ---------- Timeline / pengumuman cards ---------- */
.quick-count {
  margin-left: 6px; padding: 1px 8px; border-radius: 999px; vertical-align: 2px;
  background: var(--white); font-size: 11px; font-weight: 700; color: var(--muted); white-space: nowrap;
}
.q-purple .quick-count { color: var(--purple); }
.q-blue .quick-count { color: var(--blue); }
.quick-latest {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  color: var(--text);
}
.quick-time { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.feed { list-style: none; margin: 0; padding: 0; }
.feed-item { padding: 12px 0; border-bottom: 1px solid var(--border); }
.feed-item:first-child { padding-top: 0; }
.feed-item:last-child { border-bottom: 0; padding-bottom: 0; }
.feed-title { color: var(--navy); font-weight: 600; line-height: 1.5; }
.feed-time { margin-top: 2px; font-size: 12px; color: var(--muted); }

.panel-stack { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.panel-note { font-size: 12.5px; color: var(--muted); }
.panel-note strong { color: var(--navy); }

/* ---------- Progress bar ---------- */
.progress {
  display: block; height: 8px; border-radius: 999px; background: #eef1f6; overflow: hidden;
}
.progress > span { display: block; height: 100%; border-radius: inherit; background: var(--primary); }
.progress-sm { height: 6px; }
.progress-green > span { background: var(--green); }

/* ---------- Jadwal hari ini ---------- */
.schedule { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.schedule-item {
  display: flex; gap: 14px; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 12px;
}
.schedule-time {
  width: 44px; flex-shrink: 0; font-size: 12px; font-weight: 700; line-height: 1.5; color: var(--navy);
  border-right: 1px solid var(--border);
}
.schedule-body { flex: 1; min-width: 0; }
.schedule-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 700; color: var(--navy); }
.schedule-topic { margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.schedule-meta { display: flex; align-items: center; gap: 5px; margin-top: 4px; font-size: 12px; color: var(--muted); }
.schedule-item.is-live { background: var(--red-bg); border-color: var(--red-bd); }
.schedule-item.is-live .schedule-time { border-color: var(--red-bd); }
.schedule-item.is-done { opacity: .6; }
.live-dot {
  width: 7px; height: 7px; border-radius: 50%; background: currentColor;
  animation: live-pulse 1.4s ease-in-out infinite;
}
@keyframes live-pulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }

/* ---------- Aktivitas selesai (dashboard) ---------- */
.done-list { display: flex; flex-direction: column; gap: 8px; }
.done-item {
  display: flex; gap: 12px; padding: 12px;
  border: 1px solid var(--border); border-radius: 12px;
  transition: border-color .15s, background .15s;
}
.done-item:hover { border-color: #c5d3ee; background: #fbfcff; }
.done-icon {
  width: 34px; height: 34px; border-radius: 9px; color: #fff; flex-shrink: 0;
  display: grid; place-items: center;
}
.done-icon .ic { width: 18px; height: 18px; }
.done-body { flex: 1; min-width: 0; }
.done-name { font-weight: 600; color: var(--navy); line-height: 1.4; }
.done-meta { margin-top: 2px; font-size: 12px; color: var(--muted); }
.done-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; font-size: 12px; }
.done-foot .progress { flex: 1 1 60px; max-width: 110px; }
.done-count { color: var(--muted); }
.done-score { color: var(--muted); margin-left: auto; }
.done-score strong { color: var(--navy); font-size: 13px; }

/* ---------- Progress per kelas ---------- */
.progress-panel { margin-top: 20px; }
.progress-panel .panel-head { flex-wrap: wrap; }
.pp-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.pp-filters .select { width: 100%; min-width: 0; }
.pp-filters .select:disabled { color: var(--muted); background-color: #f6f8fc; cursor: default; }
.pp-list {
  list-style: none; margin: 0; padding: 0;
  border: 1px solid var(--border); border-radius: 12px;
  max-height: 452px; overflow-y: auto;
}
.pp-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  transition: background .12s;
}
.pp-item:last-child { border-bottom: 0; }
.pp-item:hover { background: #f5f8fd; }
.pp-num { width: 20px; flex-shrink: 0; align-self: flex-start; font-size: 15px; color: var(--muted); text-align: center; }
.pp-body { flex: 1; min-width: 0; }
.pp-title { display: flex; align-items: center; gap: 6px; font-weight: 700; color: var(--navy); }
.pp-warn { display: inline-flex; color: #d46a12; }
.pp-badges { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 10px; }
.pp-bar { display: block; height: 10px; border-radius: 999px; background: #eef1f6; overflow: hidden; }
.pp-bar > span {
  display: block; height: 100%; border-radius: inherit;
  background: repeating-linear-gradient(-45deg, #f7a531 0 8px, #f78c2a 8px 16px);
}
.pp-bar.is-done > span { background: var(--green); }
.pp-side { width: 150px; flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.pp-pct { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
/* "Lihat Detail" muncul saat baris disorot (selalu tampil di layar sentuh). */
.pp-detail { opacity: 0; transition: opacity .12s; }
.pp-item:hover .pp-detail, .pp-detail:focus-visible { opacity: 1; }
@media (hover: none) { .pp-detail { opacity: 1; } }
.pp-empty { padding: 36px 16px; text-align: center; color: var(--muted); }

.info-close {
  position: absolute; top: 12px; right: 12px;
  border: 0; background: transparent; color: var(--muted);
  padding: 4px; border-radius: 6px; display: grid;
}
.info-close:hover { background: #d7e4fb; color: var(--navy); }

/* =========================================================
   Detail pages (Materi & Bank Soal)
   ========================================================= */
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.breadcrumb a { display: inline-flex; align-items: center; gap: 6px; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .current { color: var(--navy); font-weight: 600; }

.page-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.page-icon {
  width: 46px; height: 46px; border-radius: 13px; color: #fff;
  display: grid; place-items: center; flex-shrink: 0;
}
.page-head-body { flex: 1; min-width: 220px; }
.page-title { font-size: 22px; font-weight: 800; color: var(--navy); }
.page-sub { color: var(--muted); margin-top: 3px; font-size: 13.5px; }

.tabs {
  display: flex; gap: 4px; margin-top: 18px;
  border-bottom: 1px solid var(--border);
}
.tab {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 18px; margin-bottom: -1px;
  background: transparent; border: 0; border-bottom: 2.5px solid transparent;
  font-weight: 600; font-size: 14.5px; color: var(--muted);
}
.tab:hover { color: var(--navy); }
.tab[aria-selected="true"] { color: var(--primary); border-bottom-color: var(--primary); }
.tab-count {
  min-width: 24px; padding: 1px 8px; border-radius: 999px;
  background: #e9edf4; color: var(--muted); font-size: 12px; font-weight: 700;
}
.tab[aria-selected="true"] .tab-count { background: var(--primary-soft); color: var(--primary); }

.tab-note {
  display: flex; align-items: center; gap: 8px;
  margin-top: 14px; font-size: 12.5px; color: var(--muted);
}
.tab-note .ic { width: 15px; height: 15px; color: var(--primary); }
.tab-note strong { color: var(--navy); }

.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.search {
  flex: 1; min-width: 200px; position: relative;
}
.search .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.input, .select {
  width: 100%; height: 38px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--white); font: inherit; color: var(--text); padding: 0 12px;
}
.search .input { padding-left: 38px; }
.select { width: auto; min-width: 160px; padding-right: 32px; appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
.input:focus, .select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .15); }

/* ---------- Folder layout ---------- */
/* minmax(0,…) so the columns never stretch to their content's intrinsic width. */
.catalog { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 20px; align-items: start; margin-top: 18px; }

.folders {
  background: var(--white); border: 1px solid var(--border);
  border-radius: 14px; padding: 8px; position: sticky; top: 88px;
}
.folders-head {
  padding: 8px 10px 8px; font-size: 11px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
}
.folder-list { display: flex; flex-direction: column; gap: 2px; }
.folder {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 7px 10px; border: 0; border-radius: 10px;
  background: transparent; text-align: left;
  transition: background .12s;
}
.folder:hover { background: #f4f7fd; }
.folder[aria-current="true"] { background: var(--primary-soft); }
.folder-ic {
  width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0;
  display: grid; place-items: center;
}
.folder-name {
  flex: 1; min-width: 0; font-size: 13px; font-weight: 600; color: var(--navy);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.folder-count { font-size: 11.5px; font-weight: 700; color: var(--muted); }
.folder[aria-current="true"] .folder-name,
.folder[aria-current="true"] .folder-count { color: var(--primary); }
/* Keep the mapel colour readable on the selected row's tinted background. */
.folder[aria-current="true"] .folder-ic { background: var(--white); }

.catalog-main { min-width: 0; }
.catalog-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.catalog-title { font-size: 17px; font-weight: 700; color: var(--navy); }
.result-info { font-size: 13px; color: var(--muted); }

/* ---------- Item rows ---------- */
.list { display: flex; flex-direction: column; gap: 8px; }
.row {
  display: flex; align-items: center; gap: 14px;
  background: var(--white); border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 14px;
  transition: border-color .15s, background .15s;
}
.row:hover { border-color: #c5d3ee; background: #fbfcff; }
.row-ic {
  width: 38px; height: 38px; border-radius: 10px; color: #fff; flex-shrink: 0;
  display: grid; place-items: center;
}
.row-body { flex: 1; min-width: 0; }
.row-title { font-size: 14px; font-weight: 700; color: var(--navy); line-height: 1.4; }
.row-desc {
  margin-top: 2px; font-size: 12.5px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.row-meta { display: flex; flex-wrap: wrap; gap: 3px 14px; margin-top: 6px; font-size: 12px; color: var(--muted); }
.row-meta span { display: inline-flex; align-items: center; gap: 5px; }
.row-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.icon-btn {
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  border: 1px solid var(--border); background: var(--white); color: var(--muted);
}
.icon-btn:hover { color: var(--primary); border-color: #b9ccf5; background: #f5f8ff; }

/* Icon chip in the detail modal head */
.item-type { width: 44px; height: 44px; border-radius: 11px; color: #fff; display: grid; place-items: center; }

.level { display: inline-flex; align-items: center; gap: 6px; }
.level::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.level-mudah { color: #1c8a4e; }
.level-sedang { color: #d48806; }
.level-sulit { color: #d63b52; }

.empty {
  text-align: center; padding: 56px 20px; color: var(--muted);
  background: var(--white); border: 1px dashed #cfd8e6; border-radius: 14px;
}
.empty .ic { width: 42px; height: 42px; color: #a3b1c6; stroke-width: 1.5; }
.empty h3 { margin-top: 10px; color: var(--navy); font-size: 16px; }
.empty p { margin-top: 4px; }

/* ---------- Halaman Aktivitas ---------- */
.toolbar-top { margin: 16px 0 12px; }
.tab-live { color: var(--red); margin: 0 2px; }
.tab-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.ts-item {
  display: flex; flex-direction: column; gap: 2px;
  padding: 12px 14px; background: var(--white);
  border: 1px solid var(--border); border-radius: 12px;
}
.ts-item span { font-size: 12px; color: var(--muted); }
.ts-item strong { font-size: 20px; font-weight: 800; color: var(--navy); }
.ts-item.is-warn strong { color: #d46a12; }

.row-activity { cursor: pointer; }
.row.is-live { border-left: 3px solid var(--red); }
.row-monitor { width: 210px; flex-shrink: 0; display: flex; flex-direction: column; gap: 6px; }
.rm-top { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--navy); }
.rm-sub { font-size: 12px; color: var(--muted); }
.rm-sub strong { color: var(--navy); }
.row-monitor .badge { align-self: flex-start; }

.modal-monitor { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.stat-trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.stat-trio > div { padding: 10px; border-radius: 10px; background: #f6f8fc; text-align: center; }
.stat-trio strong { display: block; font-size: 17px; font-weight: 800; color: var(--navy); }
.stat-trio span { font-size: 12px; color: var(--muted); }
.stat-trio .is-warn { background: var(--orange-bg); }
.stat-trio .is-warn strong { color: #d46a12; }
.modal-sub { margin: 16px 0 8px; font-size: 13px; color: var(--navy); }
.name-list { display: flex; flex-wrap: wrap; gap: 6px; }
.name-chip { padding: 4px 10px; border-radius: 999px; background: #eef1f6; font-size: 12.5px; color: var(--text); }
.modal-note { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.modal-note.ok, .modal-note.warn { padding: 12px; border-radius: 10px; }
.modal-note.ok { background: var(--green-bg); color: #1c8a4e; }
.modal-note.warn { background: var(--orange-bg); color: #b35a0f; }

/* ---------- Modal & toast ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(15, 23, 42, .45);
  display: grid; place-items: center; padding: 16px;
}
.modal {
  width: 100%; max-width: 560px; max-height: 88vh; overflow: auto;
  background: var(--white); border-radius: 16px; box-shadow: 0 24px 60px rgba(15, 23, 42, .25);
}
.modal-head { display: flex; align-items: flex-start; gap: 14px; padding: 20px 20px 0; }
.modal-head h3 { font-size: 18px; color: var(--navy); line-height: 1.35; }
.modal-head p { color: var(--muted); font-size: 13px; margin-top: 4px; }
.modal-body { padding: 16px 20px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--border); }
.detail-list { display: grid; grid-template-columns: 140px 1fr; gap: 10px 12px; font-size: 13.5px; }
.detail-list dt { color: var(--muted); }
.detail-list dd { margin: 0; color: var(--navy); font-weight: 600; }
.q-preview { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.q-item { padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; }
.q-item-num { font-size: 12px; font-weight: 700; color: var(--primary); }
.q-item-text { margin-top: 4px; color: var(--navy); line-height: 1.5; }
.q-options { margin: 8px 0 0; padding-left: 0; list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; font-size: 13px; color: var(--muted); }

/* ---------- Pilih soal (Bank Soal) ---------- */
.q-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.q-preview-head strong { color: var(--navy); }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--primary); cursor: pointer; }
.check input { width: 16px; height: 16px; margin: 0; accent-color: var(--primary); cursor: pointer; }
.q-pick { display: flex; gap: 12px; cursor: pointer; transition: border-color .15s, background .15s; }
.q-pick:hover { border-color: #c5d3ee; }
.q-pick > input { width: 17px; height: 17px; margin: 2px 0 0; flex-shrink: 0; accent-color: var(--primary); cursor: pointer; }
.q-pick > div { flex: 1; min-width: 0; }
.q-pick:has(> input:checked) { border-color: #9dbbf6; background: #f5f8ff; }
.picked-badge { background: var(--primary-soft); color: var(--primary); }

.picked { margin-top: 18px; }
.picked-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 16px; margin-bottom: 12px;
  background: var(--white); border: 1px solid var(--border); border-radius: 14px;
}
.picked-bar-body { flex: 1; min-width: 200px; }
.picked-bar-title { font-size: 16px; font-weight: 700; color: var(--navy); }
.picked-bar-sub { margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.picked-list { display: flex; flex-direction: column; gap: 8px; }
.picked-item {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--white); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px;
}
.picked-num {
  width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0;
  background: var(--primary-soft); color: var(--primary);
  display: grid; place-items: center; font-weight: 800; font-size: 13px;
}
.picked-item .q-options { margin-top: 6px; max-width: 560px; }
.icon-btn-danger:hover { color: #d63b52; border-color: var(--red-bd); background: var(--red-bg); }

.form { display: flex; flex-direction: column; gap: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--navy); }
.field label .req { color: #d63b52; }
.field .select { width: 100%; }
.textarea { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.field-error { font-size: 12px; color: #d63b52; }
.input[aria-invalid="true"], .select[aria-invalid="true"] { border-color: #e87a8b; }
.form-summary {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px;
  background: var(--primary-soft); color: var(--navy); font-size: 13px;
}
.form-summary .ic { color: var(--primary); }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 60;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px; border-radius: 12px; background: var(--navy); color: #fff;
  font-weight: 600; box-shadow: 0 12px 30px rgba(15, 23, 42, .25);
  transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast .ic { color: #6ee7a8; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .quick-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-grid { grid-template-columns: 1fr; }
  .nav { display: none; }
}
/* Folder rail collapses into a scrollable chip row above the list. */
@media (max-width: 900px) {
  .catalog { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .folders { position: static; padding: 6px; min-width: 0; }
  .folders-head { display: none; }
  .folder-list { flex-direction: row; overflow-x: auto; gap: 4px; scrollbar-width: thin; }
  .folder { width: auto; flex-shrink: 0; padding: 6px 10px 6px 6px; }
}
@media (max-width: 640px) {
  .container { padding: 16px; }
  .topbar-inner { padding: 0 16px; }
  .profile-text { display: none; }
  .welcome { padding: 14px 16px; }
  .welcome-title { font-size: 18px; }
  .quick-grid { grid-template-columns: 1fr; }
  .activity { flex-wrap: wrap; align-items: flex-start; }
  .activity-body { flex: 1 1 calc(100% - 58px); }
  .activity .btn { margin-left: 58px; }
  .link-more { white-space: nowrap; }
  .search { flex-basis: 100%; }
  .select { flex: 1 1 140px; }
  .activity-meta { gap: 6px 16px; }
  .tab { padding: 12px; font-size: 13.5px; }
  .row { flex-wrap: wrap; gap: 10px 12px; }
  .row-body { flex: 1 1 calc(100% - 50px); }
  .row-actions { margin-left: auto; }
  .row-monitor { width: auto; flex: 1 1 calc(100% - 50px); margin-left: 50px; }
  .row-activity > .btn { margin-left: 50px; }
  .tab-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tabs { overflow-x: auto; }
  .tab { flex-shrink: 0; }
  .detail-list { grid-template-columns: 1fr; gap: 2px; }
  .detail-list dd { margin-bottom: 8px; }
  .q-options { grid-template-columns: 1fr; }
  .pp-filters { grid-template-columns: 1fr; }
  .pp-item { flex-wrap: wrap; }
  .pp-body { flex: 1 1 calc(100% - 34px); }
  .pp-side { width: auto; flex: 1 1 100%; flex-direction: row; align-items: center; justify-content: space-between; padding-left: 34px; }
  .form-row { grid-template-columns: 1fr; }
  .picked-bar .btn { flex: 1 1 auto; }
}
