/* NIBS Educare v2 — tema indigo/violet, permukaan kaca, tipografi Inter */
:root {
  --brand: #4f46e5;
  --brand-2: #8b5cf6;
  --bg: #f3f0ff;
  --ink: #1f1b3a;
  --ink-soft: #635f82;
  --ink-faint: #8d89a8;
  --line: rgba(255, 255, 255, .65);
  --line-soft: rgba(31, 27, 58, .08);
  --surface: rgba(255, 255, 255, .62);
  --surface-strong: rgba(255, 255, 255, .84);
  --success: #0f9d76;
  --warn: #d97706;
  --danger: #dc2626;
  --info: #2563eb;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 18px 40px -24px rgba(47, 32, 106, .45), 0 2px 6px rgba(47, 32, 106, .06);
  --shadow-soft: 0 10px 24px -18px rgba(47, 32, 106, .5);
  --sidebar-w: 276px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1100px 620px at 8% -8%, rgba(139, 92, 246, .28), transparent 62%),
    radial-gradient(900px 520px at 96% 4%, rgba(79, 70, 229, .22), transparent 60%),
    radial-gradient(760px 520px at 70% 100%, rgba(236, 72, 153, .16), transparent 65%),
    var(--bg);
  background-attachment: fixed;
  min-height: 100vh;
  font-size: 14.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -.015em; color: var(--ink); }
h1 { font-size: 1.32rem; }
h2 { font-size: 1.02rem; }
h3 { font-size: .95rem; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85em; }

.ico { width: 18px; height: 18px; flex: 0 0 auto; }
.muted { color: var(--ink-soft); }
.small { font-size: .82rem; }
.skip-link { position: absolute; left: -9999px; top: 0; }
.skip-link:focus { left: 12px; top: 12px; background: #fff; padding: 8px 14px; border-radius: 10px; z-index: 100; }

/* ---------------- kerangka ---------------- */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex: 0 0 var(--sidebar-w);
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  padding: 18px 14px 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .78), rgba(255, 255, 255, .46));
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border-right: 1px solid var(--line);
  box-shadow: 8px 0 40px -32px rgba(47, 32, 106, .6);
  z-index: 30;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 6px 8px 16px; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 13px; flex: 0 0 auto;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; font-weight: 700; font-size: .9rem; overflow: hidden;
  box-shadow: 0 10px 20px -12px rgba(79, 70, 229, .9);
}
.brand-mark.big { width: 54px; height: 54px; border-radius: 16px; font-size: 1rem; }
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-text strong { font-size: .92rem; line-height: 1.25; }
.brand-text small { color: var(--ink-soft); font-size: .68rem; letter-spacing: .02em; text-transform: uppercase; }
.sidebar-close { display: none; margin-left: auto; }

.nav { overflow-y: auto; flex: 1; padding: 4px 2px 12px; scrollbar-width: thin; }
.nav-group { margin-bottom: 14px; }
.nav-label {
  font-size: .66rem; text-transform: uppercase; letter-spacing: .12em;
  color: var(--ink-faint); font-weight: 650; padding: 6px 12px;
}
.nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; margin: 2px 0;
  border-radius: 11px; color: #443f66; font-size: .86rem; font-weight: 500;
  border: 1px solid transparent; transition: background .18s, color .18s, transform .18s;
}
.nav-link:hover { background: rgba(255, 255, 255, .7); color: var(--brand); text-decoration: none; }
.nav-link.is-active {
  background: linear-gradient(120deg, rgba(79, 70, 229, .13), rgba(139, 92, 246, .13));
  color: var(--brand); font-weight: 650; border-color: rgba(79, 70, 229, .18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7);
}
.nav-link .ico { opacity: .85; }
.nav-link.is-active .ico { opacity: 1; }
.sidebar-foot { border-top: 1px solid var(--line-soft); padding-top: 12px; display: grid; gap: 8px; }
.user-chip { display: flex; gap: 10px; align-items: center; padding: 6px 8px; }
.user-chip-text { display: flex; flex-direction: column; min-width: 0; }
.user-chip-text strong { font-size: .84rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip-text small { color: var(--ink-soft); font-size: .72rem; }
.logout-form .btn { justify-content: flex-start; }

.avatar {
  width: 38px; height: 38px; border-radius: 12px; display: inline-grid; place-items: center;
  background: hsl(var(--av-h, 245), 72%, 92%); color: hsl(var(--av-h, 245), 52%, 38%);
  font-weight: 700; font-size: .78rem; flex: 0 0 auto; letter-spacing: .02em;
}
.avatar-sm { width: 32px; height: 32px; border-radius: 10px; font-size: .7rem; }
.avatar-lg { width: 56px; height: 56px; border-radius: 17px; font-size: 1rem; }

.content { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 20px clamp(16px, 3vw, 40px) 14px;
  position: sticky; top: 0; z-index: 20;
  background: linear-gradient(180deg, rgba(243, 240, 255, .92), rgba(243, 240, 255, .55) 70%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.topbar-title { flex: 1; min-width: 0; }
.topbar-title h1 { font-size: clamp(1.1rem, 2vw, 1.42rem); }
.topbar-title p { color: var(--ink-soft); font-size: .82rem; margin-top: 2px; }
.eyebrow { font-size: .68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--brand); }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.topbar-user {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; font-weight: 700; font-size: .78rem;
}
.menu-btn { display: none; }
.main { flex: 1; padding: 6px clamp(16px, 3vw, 40px) 32px; min-width: 0; display: grid; gap: 22px; align-content: start; }
.app-footer { padding: 12px clamp(16px, 3vw, 40px) 26px; color: var(--ink-faint); font-size: .74rem; }
.sidebar-scrim { display: none; }

/* ---------------- kartu & grid ---------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  min-width: 0;
}
.card-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
  padding: 18px 20px 0;
}
.card-head-text h2 { display: flex; align-items: center; gap: 9px; font-size: .96rem; }
.card-ico { color: var(--brand); width: 17px; height: 17px; }
.card-sub { color: var(--ink-soft); font-size: .78rem; margin-top: 3px; }
.card-action { flex: 0 0 auto; }
.card-body { padding: 16px 20px 20px; min-width: 0; }
.card-body.flush { padding: 0; }
.card + .card { margin-top: 0; }
.stack { display: grid; gap: 20px; min-width: 0; align-content: start; }
.split { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 22px; align-items: start; min-width: 0; }
.split-main, .split-aside { min-width: 0; display: grid; gap: 20px; align-content: start; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 18px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.card-grid.wide { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }

.stat { display: block; padding: 17px 18px; transition: transform .18s, box-shadow .18s; }
a.stat:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 22px 44px -26px rgba(47, 32, 106, .55); }
.stat-top { display: flex; align-items: center; gap: 9px; }
.stat-ico { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: rgba(79, 70, 229, .1); color: var(--brand); }
.stat-ico .ico { width: 16px; height: 16px; }
.stat-label { font-size: .76rem; font-weight: 600; color: var(--ink-soft); letter-spacing: .01em; }
.stat-value { font-size: 1.72rem; font-weight: 700; letter-spacing: -.03em; margin-top: 10px; }
.stat-hint { font-size: .74rem; color: var(--ink-soft); margin-top: 2px; }
.stat-violet .stat-ico { background: rgba(139, 92, 246, .13); color: var(--brand-2); }
.stat-emerald .stat-ico { background: rgba(15, 157, 118, .12); color: var(--success); }
.stat-amber .stat-ico { background: rgba(217, 119, 6, .12); color: var(--warn); }
.stat-rose .stat-ico { background: rgba(219, 39, 119, .12); color: #db2777; }

.hero-card {
  display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, .8fr); gap: 22px;
  padding: 24px 26px; align-items: center;
  background:
    radial-gradient(520px 240px at 88% -20%, rgba(139, 92, 246, .18), transparent 70%),
    linear-gradient(120deg, rgba(255, 255, 255, .8), rgba(255, 255, 255, .52));
}
.hero-text h2 { font-size: clamp(1.2rem, 2.4vw, 1.6rem); letter-spacing: -.025em; }
.hero-text p { color: var(--ink-soft); margin-top: 6px; max-width: 56ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 16px; }
.hero-figure { display: grid; justify-items: center; gap: 8px; }
.hero-ring {
  width: 132px; height: 132px; border-radius: 50%;
  display: grid; place-items: center; align-content: center; gap: 0;
  background: radial-gradient(circle at 50% 40%, #fff, rgba(255, 255, 255, .6));
  border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: 0 18px 40px -24px rgba(79, 70, 229, .7), inset 0 0 0 8px rgba(79, 70, 229, .08);
}
.hero-ring-value { font-size: 1.85rem; font-weight: 700; letter-spacing: -.03em; color: var(--brand); }
.hero-ring-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-soft); }
.hero-figure-note { font-size: .72rem; color: var(--ink-soft); text-align: center; }

/* ---------------- tombol, form ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 15px; border-radius: 11px; border: 1px solid transparent;
  font-size: .84rem; font-weight: 600; cursor: pointer; text-decoration: none;
  transition: transform .15s, box-shadow .15s, background .15s; line-height: 1.2;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn .ico { width: 16px; height: 16px; }
.btn-primary {
  background: linear-gradient(120deg, var(--brand), var(--brand-2)); color: #fff;
  box-shadow: 0 12px 24px -14px rgba(79, 70, 229, .9);
}
.btn-primary:hover { box-shadow: 0 16px 28px -14px rgba(79, 70, 229, .95); }
.btn-soft { background: rgba(255, 255, 255, .74); border-color: rgba(79, 70, 229, .16); color: var(--brand); }
.btn-soft:hover { background: #fff; }
.btn-ghost { background: transparent; border-color: var(--line-soft); color: var(--ink-soft); }
.btn-ghost:hover { background: rgba(255, 255, 255, .7); color: var(--brand); }
.btn-danger { background: rgba(220, 38, 38, .1); color: var(--danger); border-color: rgba(220, 38, 38, .2); }
.btn-danger:hover { background: rgba(220, 38, 38, .16); }
.btn-sm { padding: 6px 11px; font-size: .78rem; border-radius: 9px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px;
  border-radius: 10px; border: 1px solid var(--line-soft); background: rgba(255, 255, 255, .7);
  color: var(--ink-soft); cursor: pointer;
}
.icon-btn:hover { color: var(--brand); background: #fff; }
.icon-btn-danger { color: var(--danger); border-color: rgba(220, 38, 38, .18); background: rgba(220, 38, 38, .06); }

.field { display: grid; gap: 6px; min-width: 0; }
.field-label { font-size: .78rem; font-weight: 600; color: #494470; }
.field-label em { color: var(--danger); font-style: normal; }
.field-hint { font-size: .72rem; color: var(--ink-faint); }
.input {
  width: 100%; padding: 9px 12px; border-radius: 11px;
  border: 1px solid rgba(31, 27, 58, .13); background: rgba(255, 255, 255, .82);
  color: var(--ink); font: inherit; font-size: .86rem; min-width: 0;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(79, 70, 229, .14); background: #fff; }
.textarea { resize: vertical; min-height: 74px; line-height: 1.5; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-soft) 50%), linear-gradient(135deg, var(--ink-soft) 50%, transparent 50%); background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
.input-group { position: relative; display: flex; }
.input-suffix { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--ink-faint); cursor: pointer; padding: 6px; display: grid; place-items: center; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.inline-form { display: inline; }
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: end;
  padding: 14px 16px; border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .55); border: 1px solid var(--line);
}
.filter-bar .field { flex: 1 1 170px; }
.filter-bar .btn { flex: 0 0 auto; }

/* ---------------- tabel ---------------- */
.table-wrap { overflow-x: auto; border-radius: 14px; border: 1px solid var(--line-soft); background: rgba(255, 255, 255, .5); }
.table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.table th, .table td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table th { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); font-weight: 650; background: rgba(255, 255, 255, .65); position: sticky; top: 0; z-index: 1; white-space: nowrap; }
.table tbody tr:last-child td { border-bottom: 0; }
/* sorotan ungu pada baris yang sedang ditunjuk kursor */
.table tbody tr { transition: background-color .16s ease, box-shadow .16s ease; }
.table tbody tr:hover,
.table tbody tr:focus-within { background: rgba(139, 92, 246, .14); box-shadow: inset 3px 0 0 rgba(139, 92, 246, .55); }
.table tbody tr.is-selected { background: rgba(139, 92, 246, .18); }
.t-right { text-align: right !important; }
.t-center { text-align: center !important; }
.t-empty { text-align: center; color: var(--ink-faint); padding: 26px 12px !important; }
.cell-clip { display: inline-block; max-width: 34ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.table-compact th, .table-compact td { padding: 6px 8px; }

/* ---------------- badge, progress, lain-lain ---------------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 999px; font-size: .7rem; font-weight: 650; letter-spacing: .01em;
  background: rgba(107, 114, 128, .12); color: #4b5563; white-space: nowrap;
}
.badge-success { background: rgba(15, 157, 118, .13); color: #0b7a5c; }
.badge-info { background: rgba(37, 99, 235, .12); color: #1d4ed8; }
.badge-warn { background: rgba(217, 119, 6, .14); color: #b45309; }
.badge-danger { background: rgba(220, 38, 38, .12); color: #b91c1c; }
.badge-neutral { background: rgba(99, 95, 130, .12); color: #4b4766; }
.badge-brand { background: rgba(79, 70, 229, .12); color: var(--brand); }

.progress { height: 7px; border-radius: 999px; background: rgba(79, 70, 229, .1); overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); transition: width .4s; }
.progress.tone-good span { background: linear-gradient(90deg, #10b981, #34d399); }
.progress.tone-ok span { background: linear-gradient(90deg, var(--brand), var(--brand-2)); }
.progress.tone-low span { background: linear-gradient(90deg, #f59e0b, #f97316); }

.bar-list { display: grid; gap: 12px; }
.bar-list li { display: grid; gap: 5px; }
.bar-row { display: flex; justify-content: space-between; gap: 12px; font-size: .79rem; }
.bar-label { color: var(--ink); font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-value { color: var(--ink-soft); font-variant-numeric: tabular-nums; font-weight: 600; }

.legend { display: grid; gap: 8px; font-size: .79rem; }
.legend li { display: flex; align-items: center; gap: 8px; color: var(--ink-soft); }
.legend li strong { margin-left: auto; color: var(--ink); font-variant-numeric: tabular-nums; }
.legend-rows li { padding: 6px 0; border-bottom: 1px dashed var(--line-soft); }
.legend-rows li:last-child { border-bottom: 0; }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; background: var(--ink-faint); }
.dot-H { background: #10b981; }
.dot-S { background: #f59e0b; }
.dot-I { background: #3b82f6; }
.dot-TK { background: #ef4444; }
.dot-brand { background: var(--brand); }
.dot-brand2 { background: var(--brand-2); }

.donut-row { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.donut {
  width: 108px; height: 108px; border-radius: 50%; flex: 0 0 auto; display: grid; place-content: center; text-align: center;
  background: conic-gradient(var(--brand) calc(var(--val, 0) * 1%), rgba(79, 70, 229, .12) 0);
  position: relative;
}
.donut::after { content: ''; position: absolute; inset: 11px; background: rgba(255, 255, 255, .92); border-radius: 50%; }
.donut span, .donut small { position: relative; z-index: 1; display: block; }
.donut span { font-size: 1.18rem; font-weight: 700; color: var(--brand); }
.donut small { font-size: .62rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); }
.donut-row .legend { flex: 1; min-width: 150px; }

.mini-stat { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.mini-stat strong { font-size: 1.4rem; letter-spacing: -.02em; }
.mini-stat span { font-size: .76rem; color: var(--ink-soft); }
.mini-meta { display: flex; justify-content: space-between; gap: 10px; font-size: .73rem; color: var(--ink-faint); margin-top: 8px; }

.timeline { display: grid; gap: 12px; }
.timeline li { display: flex; gap: 11px; font-size: .81rem; }
.timeline-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); margin-top: 6px; flex: 0 0 auto; box-shadow: 0 0 0 3px rgba(79, 70, 229, .14); }
.timeline-meta { color: var(--ink-faint); font-size: .72rem; margin-top: 1px; }
.news-list { display: grid; gap: 11px; }
.news-list li { display: flex; gap: 10px; font-size: .84rem; }
.news-dot { width: 6px; border-radius: 4px; background: linear-gradient(180deg, var(--brand), var(--brand-2)); flex: 0 0 auto; }
.ach-list { display: grid; gap: 12px; }
.ach-list li { display: flex; align-items: center; gap: 11px; font-size: .82rem; }
.ach-list li > div { min-width: 0; flex: 1; }
.ach-list strong { display: block; font-size: .83rem; }

.empty { display: grid; justify-items: center; text-align: center; gap: 6px; padding: 26px 16px; color: var(--ink-soft); }
.empty .ico { width: 26px; height: 26px; color: var(--brand-2); opacity: .7; }
.empty h3 { font-size: .9rem; }
.empty p { font-size: .79rem; max-width: 42ch; }

.flash {
  display: flex; align-items: center; gap: 10px; padding: 12px 15px; border-radius: 12px;
  font-size: .84rem; border: 1px solid transparent;
}
.flash .ico { width: 17px; height: 17px; flex: 0 0 auto; }
.flash-success { background: rgba(15, 157, 118, .1); border-color: rgba(15, 157, 118, .22); color: #0b6b53; }
.flash-error { background: rgba(220, 38, 38, .08); border-color: rgba(220, 38, 38, .2); color: #a51d1d; }
.flash-info { background: rgba(37, 99, 235, .08); border-color: rgba(37, 99, 235, .2); color: #1d4ed8; }

/* ---------------- tab ---------------- */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; padding: 5px; background: rgba(255, 255, 255, .55); border: 1px solid var(--line); border-radius: 14px; }
.tab { padding: 8px 14px; border-radius: 10px; font-size: .81rem; font-weight: 600; color: var(--ink-soft); }
.tab:hover { background: rgba(255, 255, 255, .8); color: var(--brand); text-decoration: none; }
.tab.is-active { background: linear-gradient(120deg, var(--brand), var(--brand-2)); color: #fff; box-shadow: 0 10px 20px -14px rgba(79, 70, 229, .9); }

/* ---------------- halaman modul ---------------- */
.module-card { display: flex; flex-direction: column; gap: 12px; padding: 18px; transition: transform .18s, box-shadow .18s; }
.module-card:hover { transform: translateY(-2px); box-shadow: 0 22px 44px -26px rgba(47, 32, 106, .55); }
.module-card-top { display: flex; align-items: center; gap: 10px; }
.module-ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: rgba(79, 70, 229, .1); color: var(--brand); flex: 0 0 auto; }
.module-ico.violet { background: rgba(139, 92, 246, .13); color: var(--brand-2); }
.module-ico.emerald { background: rgba(15, 157, 118, .12); color: var(--success); }
.module-ico.amber { background: rgba(217, 119, 6, .13); color: var(--warn); }
.module-ico.rose { background: rgba(219, 39, 119, .1); color: #db2777; }
.module-title { font-size: .93rem; font-weight: 650; }
.module-meta { font-size: .73rem; color: var(--ink-faint); }
.module-card p { font-size: .8rem; color: var(--ink-soft); }
.module-card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; }

.chip-row { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .7); border: 1px solid var(--line-soft); font-size: .73rem; color: var(--ink-soft); }
.chip strong { color: var(--ink); }

.kv { display: grid; gap: 9px; font-size: .82rem; }
.kv > div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed var(--line-soft); padding-bottom: 8px; }
.kv > div:last-child { border-bottom: 0; padding-bottom: 0; }
.kv dt, .kv span:first-child { color: var(--ink-soft); }
.kv strong { text-align: right; }

.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.section-title h2 { font-size: 1rem; }
.section-title p { font-size: .78rem; color: var(--ink-soft); }

.note-box { padding: 12px 14px; border-radius: 12px; background: rgba(79, 70, 229, .06); border: 1px dashed rgba(79, 70, 229, .22); font-size: .79rem; color: #41406a; }

/* ---------------- halaman login ---------------- */
.auth-body { display: grid; place-items: center; padding: clamp(16px, 3vw, 44px); }
.auth-wrap {
  width: min(1080px, 100%); display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: 26px; align-items: stretch;
}
.auth-hero {
  padding: clamp(22px, 3vw, 36px); border-radius: 26px; display: flex; flex-direction: column; gap: 18px;
  background:
    radial-gradient(520px 300px at 100% 0%, rgba(139, 92, 246, .28), transparent 65%),
    linear-gradient(150deg, rgba(255, 255, 255, .84), rgba(255, 255, 255, .52));
  border: 1px solid var(--line); box-shadow: var(--shadow);
  backdrop-filter: blur(20px) saturate(180%);
}
.auth-brand { display: flex; align-items: center; gap: 13px; }
.auth-brand strong { display: block; font-size: .95rem; }
.auth-brand small { display: block; color: var(--ink-soft); font-size: .72rem; letter-spacing: .02em; }
.auth-hero h1 { font-size: clamp(1.45rem, 3vw, 2.05rem); line-height: 1.22; letter-spacing: -.03em; margin-top: 4px; }
.auth-sub { color: var(--ink-soft); font-size: .9rem; max-width: 46ch; }
.auth-points { display: grid; gap: 14px; margin-top: 4px; }
.auth-points li { display: flex; gap: 11px; font-size: .81rem; color: var(--ink-soft); }
.auth-points .ico { color: var(--brand); margin-top: 2px; }
.auth-points strong { display: block; color: var(--ink); font-size: .85rem; }
.auth-address { display: flex; gap: 8px; align-items: flex-start; font-size: .76rem; color: var(--ink-faint); margin-top: auto; }
.auth-address .ico { width: 15px; height: 15px; margin-top: 2px; }
.auth-card-wrap { display: grid; gap: 16px; align-content: start; }
.auth-card { padding: 24px; display: grid; gap: 14px; background: var(--surface-strong); }
.auth-card-head h2 { font-size: 1.15rem; margin-top: 3px; }
.auth-card-head p { color: var(--ink-soft); font-size: .81rem; margin-top: 3px; }
.auth-kicker { font-size: .68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--brand); }
.auth-note { display: flex; align-items: center; gap: 6px; font-size: .72rem; color: var(--ink-faint); }
.auth-note .ico { width: 14px; height: 14px; }
.auth-demo { padding: 18px 20px; display: grid; gap: 8px; }
.auth-demo h3 { display: flex; align-items: center; gap: 7px; font-size: .84rem; }
.auth-demo h3 .ico { width: 15px; height: 15px; color: var(--brand-2); }
.auth-demo p { font-size: .74rem; color: var(--ink-soft); }
.demo-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: .78rem; }
.demo-row span { color: var(--ink-soft); }
.demo-row code { background: rgba(79, 70, 229, .08); color: var(--brand); padding: 3px 8px; border-radius: 7px; font-size: .76rem; }

.status-page { min-height: 80vh; display: grid; place-items: center; padding: 24px; }
.status-card { max-width: 440px; padding: 30px; text-align: center; display: grid; gap: 12px; justify-items: center; }
.status-code { font-size: 2.4rem; font-weight: 800; letter-spacing: -.04em; background: linear-gradient(120deg, var(--brand), var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.status-card p { color: var(--ink-soft); font-size: .86rem; }

/* ---------------- input nilai & kehadiran ---------------- */
.score-input { width: 68px; padding: 6px 8px; text-align: center; font-variant-numeric: tabular-nums; }
.score-input::-webkit-outer-spin-button, .score-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.att-select { width: auto; min-width: 66px; padding: 5px 24px 5px 8px; text-align: center; font-weight: 650; font-size: .78rem; }
.att-H { border-color: rgba(15, 157, 118, .4); background: rgba(15, 157, 118, .1); color: #0b7a5c; }
.att-S { border-color: rgba(217, 119, 6, .4); background: rgba(217, 119, 6, .1); color: #b45309; }
.att-I { border-color: rgba(37, 99, 235, .35); background: rgba(37, 99, 235, .08); color: #1d4ed8; }
.att-TK { border-color: rgba(220, 38, 38, .35); background: rgba(220, 38, 38, .08); color: #b91c1c; }
.matrix-wrap { overflow-x: auto; }
.matrix { border-collapse: separate; border-spacing: 0; font-size: .78rem; width: max-content; min-width: 100%; }
.matrix th, .matrix td { padding: 6px 7px; border-bottom: 1px solid var(--line-soft); text-align: center; }
.matrix thead th { position: sticky; top: 0; background: rgba(255, 255, 255, .92); z-index: 2; font-size: .68rem; color: var(--ink-soft); font-weight: 650; }
.matrix .name-col { position: sticky; left: 0; background: rgba(255, 255, 255, .95); text-align: left; min-width: 168px; z-index: 1; box-shadow: 1px 0 0 var(--line-soft); }
.matrix thead .name-col { z-index: 3; }
.matrix tfoot td { font-weight: 650; background: rgba(255, 255, 255, .7); }
.rekap-H { color: #0b7a5c; font-weight: 650; }
.rekap-S { color: #b45309; font-weight: 650; }
.rekap-I { color: #1d4ed8; font-weight: 650; }
.rekap-TK { color: #b91c1c; font-weight: 650; }
.legend-inline { display: flex; flex-wrap: wrap; gap: 12px; font-size: .74rem; color: var(--ink-soft); }
.legend-inline span { display: inline-flex; align-items: center; gap: 5px; }

/* ---------------- cetak A4 ---------------- */
.report-sheet {
  background: #fff; border-radius: 16px; padding: 34px 38px; color: #17142e;
  width: 100%; max-width: 820px; margin: 0 auto;
  box-shadow: 0 28px 60px -40px rgba(47, 32, 106, .6); border: 1px solid rgba(31, 27, 58, .1);
}
.report-head { display: flex; align-items: center; gap: 16px; border-bottom: 2px solid var(--brand); padding-bottom: 14px; }
.report-head h2 { font-size: 1.05rem; }
.report-head p { font-size: .76rem; color: #55516e; }
.report-title { text-align: center; margin: 16px 0 6px; font-weight: 700; letter-spacing: .02em; }
.report-table { width: 100%; border-collapse: collapse; font-size: .78rem; margin-top: 10px; }
.report-table th, .report-table td { border: 1px solid #d8d5e6; padding: 6px 8px; }
.report-table th { background: #f2f0fb; font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; }
.report-sign { display: flex; justify-content: space-between; gap: 20px; margin-top: 28px; font-size: .76rem; }
.report-sign div { text-align: center; flex: 1; }
.report-sign .space { height: 52px; }
.dim { color: #77738f; }

@media print {
  @page { size: A4; margin: 14mm; }
  body { background: #fff !important; }
  .sidebar, .topbar, .app-footer, .no-print, .flash { display: none !important; }
  .app-shell { display: block; }
  .main { padding: 0; display: block; }
  .report-sheet { box-shadow: none; border: 0; padding: 0; border-radius: 0; }
  .card { box-shadow: none; border-color: #ddd; background: #fff; }
}

/* ---------------- responsif ---------------- */
@media (max-width: 1180px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .hero-card { grid-template-columns: minmax(0, 1fr); }
  .hero-figure { justify-items: start; }
}
@media (max-width: 960px) {
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; transform: translateX(-102%);
    transition: transform .28s ease; width: min(300px, 84vw); flex-basis: auto;
  }
  .sidebar.is-open { transform: translateX(0); }
  .sidebar-close { display: inline-grid; }
  .menu-btn { display: inline-grid; }
  .sidebar-scrim:not([hidden]) {
    display: block; position: fixed; inset: 0; background: rgba(24, 20, 48, .38);
    backdrop-filter: blur(2px); z-index: 25;
  }
  .topbar { padding-top: 16px; }
  .auth-wrap { grid-template-columns: minmax(0, 1fr); }
  .auth-hero { order: 2; }
  .auth-card-wrap { order: 1; }
}
@media (max-width: 640px) {
  body { font-size: 14px; }
  .main { gap: 18px; }
  .stat-grid, .card-grid, .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .card-head, .card-body { padding-left: 15px; padding-right: 15px; }
  .hero-card { padding: 20px 18px; }
  .hero-ring { width: 108px; height: 108px; }
  .hero-ring-value { font-size: 1.5rem; }
  .split { gap: 18px; }
  .topbar-actions .btn span { display: none; }
  .report-sheet { padding: 20px 16px; }
  .filter-bar .field { flex: 1 1 100%; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .tabs { overflow-x: auto; flex-wrap: nowrap; }
  .tab { white-space: nowrap; }
}

/* ---------------- komponen tambahan modul ---------------- */
.stack.tight, .card-body.tight { padding: 12px 16px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.row-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.icon-btn-sm { width: 30px; height: 30px; border-radius: 8px; }
.icon-btn-sm .ico { width: 15px; height: 15px; }
.name-inline { display: flex; align-items: center; gap: 9px; min-width: 0; }
.name-inline > span { display: flex; flex-direction: column; min-width: 0; }
.name-inline small { color: var(--ink-faint); font-size: .72rem; }
.name-col .name-inline { align-items: center; }
.checkline { display: flex; align-items: center; gap: 8px; font-size: .82rem; color: var(--ink-soft); }
.checkline input { width: 16px; height: 16px; accent-color: var(--brand); }
.section-head { font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-faint); margin-top: 4px; }

.ref-list { display: grid; gap: 10px; }
.ref-list.compact { gap: 6px; }
.ref-item { padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .6); border: 1px solid var(--line-soft); min-width: 0; }
.ref-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ref-code { font-size: .72rem; font-weight: 700; color: var(--brand); letter-spacing: .02em; }
.ref-grade { font-size: .72rem; color: var(--ink-faint); }
.ref-actions { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.ref-desc { font-size: .82rem; color: #3f3b5c; margin-top: 5px; }
.ref-desc.small { font-size: .76rem; }
.ind-name { font-size: .82rem; font-weight: 550; }
.ref-phase { display: grid; gap: 12px; }
.ref-head + .ref-desc { margin-top: 4px; }

.add-panel { border: 1px dashed rgba(79, 70, 229, .28); border-radius: 12px; background: rgba(79, 70, 229, .04); overflow: hidden; }
.add-panel > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 7px; padding: 9px 12px; font-size: .8rem; font-weight: 600; color: var(--brand); }
.add-panel > summary::-webkit-details-marker { display: none; }
.add-panel > summary .ico { width: 15px; height: 15px; }
.add-panel[open] > summary { border-bottom: 1px dashed rgba(79, 70, 229, .2); }
.add-panel-body { padding: 12px; background: rgba(255, 255, 255, .6); }
.add-panel-body .form-grid { gap: 10px; }

.meeting-list { display: grid; gap: 6px; }
.meeting-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 11px; background: rgba(255, 255, 255, .55); border: 1px solid var(--line-soft); }
.meeting-no { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: rgba(79, 70, 229, .1); color: var(--brand); font-size: .74rem; font-weight: 700; flex: 0 0 auto; }
.meeting-body { min-width: 0; flex: 1; }
.meeting-title { font-size: .84rem; font-weight: 600; color: var(--ink); }
.meeting-title:hover { color: var(--brand); }
.meeting-meta { font-size: .7rem; color: var(--ink-faint); }

.chip-active { background: linear-gradient(120deg, var(--brand), var(--brand-2)); color: #fff; border-color: transparent; }
.chip-active strong { color: #fff; }
.chip a { color: inherit; }
.narrative-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-top: 10px; }
.char-block { padding: 11px 13px; border-radius: 12px; background: rgba(255, 255, 255, .55); border: 1px solid var(--line-soft); margin-top: 10px; }
.char-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: .86rem; }
.char-block p { font-size: .8rem; color: #47436a; margin-top: 5px; }

.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.news-card { overflow: hidden; display: flex; flex-direction: column; }
.news-cover { height: 132px; background-size: cover; background-position: center; }
.news-cover-fallback { display: grid; place-items: center; background: linear-gradient(135deg, rgba(79, 70, 229, .85), rgba(139, 92, 246, .85)); color: #fff; font-weight: 650; letter-spacing: .04em; font-size: .82rem; }
.news-card-body { padding: 15px 16px 16px; display: grid; gap: 9px; flex: 1; }
.news-card-body h3 { font-size: .95rem; }
.news-card-body h3 a { color: var(--ink); }
.news-card-body h3 a:hover { color: var(--brand); text-decoration: none; }
.news-card-body p { font-size: .8rem; color: var(--ink-soft); }
.news-article { overflow: hidden; }
.news-hero { height: 220px; background-size: cover; background-position: center; }
.article-title { font-size: clamp(1.2rem, 2.4vw, 1.6rem); margin: 10px 0; letter-spacing: -.02em; }
.article-excerpt { color: var(--ink-soft); font-style: italic; border-left: 3px solid rgba(79, 70, 229, .35); padding-left: 12px; margin-bottom: 14px; }
.article-body { font-size: .88rem; line-height: 1.75; color: #33304f; }

.color-field { display: flex; align-items: center; gap: 10px; }
.color-field input[type=color] { width: 56px; height: 38px; padding: 3px; border-radius: 10px; cursor: pointer; }
.color-field span { font-size: .78rem; color: var(--ink-soft); font-family: ui-monospace, monospace; }
.appearance-preview { border-radius: 16px; padding: 20px; background:
  radial-gradient(320px 180px at 100% 0%, color-mix(in srgb, var(--brand-2) 24%, transparent), transparent 70%),
  linear-gradient(160deg, rgba(255,255,255,.9), rgba(255,255,255,.6));
  border: 1px solid var(--line); display: grid; gap: 10px; }
.preview-login { display: flex; align-items: center; gap: 10px; }
.preview-mark { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: .76rem; background: linear-gradient(135deg, var(--brand), var(--brand-2)); }
.preview-login strong { display: block; font-size: .84rem; }
.preview-login small { display: block; color: var(--ink-soft); font-size: .68rem; }
.appearance-preview h3 { font-size: 1rem; line-height: 1.3; margin-top: 4px; }
.appearance-preview p { font-size: .76rem; color: var(--ink-soft); }
.preview-field { padding: 9px 11px; border-radius: 10px; border: 1px solid rgba(31,27,58,.12); background: #fff; font-size: .76rem; color: var(--ink-faint); }
.preview-btn { padding: 10px; border-radius: 10px; text-align: center; font-size: .8rem; font-weight: 650; color: #fff; background: linear-gradient(120deg, var(--brand), var(--brand-2)); }
.preview-address { font-size: .68rem; color: var(--ink-faint); }
.print-page .main { max-width: 100%; }

@media print {
  .print-page .main { padding: 0; }
}

/* ---------------- ekstrakurikuler, student cases, future plan ---------------- */
.chip-btn { cursor: pointer; border: 1px solid var(--line-soft); background: rgba(255, 255, 255, .8); font: inherit; font-size: .73rem; color: var(--ink-soft); }
.chip-btn:hover { border-color: rgba(139, 92, 246, .5); color: var(--brand); }
.chip-x { background: none; border: 0; color: var(--ink-faint); cursor: pointer; font-size: .9rem; line-height: 1; padding: 0 0 0 2px; }
.chip-x:hover { color: var(--danger); }

/* alur / stepper */
.stepper { display: flex; gap: 6px; list-style: none; overflow-x: auto; padding: 4px 0; margin: 0; }
.stepper-item { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1 1 0; min-width: 96px; text-align: center; position: relative; }
.stepper-item::after { content: ''; position: absolute; top: 15px; left: calc(50% + 18px); right: calc(-50% + 18px); height: 2px; background: var(--line-soft); }
.stepper-item:last-child::after { display: none; }
.stepper-dot { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: .76rem; font-weight: 700;
  background: rgba(99, 95, 130, .1); color: var(--ink-soft); border: 1px solid var(--line-soft); }
.stepper-dot .ico { width: 15px; height: 15px; }
.stepper-label { font-size: .71rem; color: var(--ink-soft); font-weight: 550; }
.stepper-item.is-done .stepper-dot { background: rgba(15, 157, 118, .15); color: #0b7a5c; border-color: rgba(15, 157, 118, .3); }
.stepper-item.is-current .stepper-dot { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; border-color: transparent;
  box-shadow: 0 8px 18px -10px rgba(79, 70, 229, .9); }
.stepper-item.is-current .stepper-label { color: var(--brand); font-weight: 650; }

.flow-list { display: grid; gap: 12px; list-style: none; counter-reset: flow; }
.flow-list li { display: flex; gap: 10px; font-size: .8rem; }
.flow-list li p { color: var(--ink-soft); font-size: .77rem; margin-top: 2px; }
.flow-list li strong { font-size: .81rem; }
.flow-no { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; flex: 0 0 auto;
  background: rgba(79, 70, 229, .1); color: var(--brand); font-size: .72rem; font-weight: 700; }

/* kasus */
.case-timeline .timeline-dot.is-secret { background: var(--danger); box-shadow: 0 0 0 3px rgba(220, 38, 38, .14); }
.case-step-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .83rem; }
.case-step-detail { font-size: .8rem; color: #45415f; margin-top: 4px; line-height: 1.6; }
.case-narrative { font-size: .84rem; line-height: 1.7; color: #353152; }
.intervention-card { padding: 12px 14px; border-radius: 12px; background: rgba(255, 255, 255, .6); border: 1px solid var(--line-soft); }
.intervention-card .progress { margin: 8px 0; }
.badge .ico { width: 12px; height: 12px; }

/* future plan */
.plan-items { display: grid; gap: 10px; }
.plan-item { padding: 11px 13px; border-radius: 12px; background: rgba(255, 255, 255, .62); border: 1px solid var(--line-soft); }
.plan-item-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: .85rem; }
.plan-item .progress { margin: 8px 0 4px; }
.plan-progress-form { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.plan-progress-form .score-input { width: 58px; }
.plan-progress-form .select { width: auto; min-width: 118px; padding: 6px 26px 6px 9px; font-size: .76rem; }
.roster { display: grid; gap: 6px; }
.roster a { display: flex; align-items: center; gap: 9px; padding: 7px 9px; border-radius: 11px;
  border: 1px solid transparent; color: inherit; }
.roster a:hover { background: rgba(255, 255, 255, .75); text-decoration: none; border-color: var(--line-soft); }
.roster a.is-active { background: rgba(139, 92, 246, .12); border-color: rgba(139, 92, 246, .3); }
.roster-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.roster-text strong { font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.roster-text small { font-size: .7rem; color: var(--ink-faint); }
.roster-bar { width: 54px; flex: 0 0 auto; }
.roster-bar .progress { height: 5px; }

@media (max-width: 640px) {
  .stepper-item { min-width: 80px; }
  .stepper-label { font-size: .66rem; }
  .plan-progress-form .select { min-width: 100px; }
}

/* ---------------- Master → Menu Access ---------------- */
.role-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.role-chip { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px;
  border: 1px solid var(--line-soft); background: rgba(255, 255, 255, .62); color: inherit; }
.role-chip:hover { text-decoration: none; border-color: rgba(139, 92, 246, .4); background: #fff; }
.role-chip.is-active { border-color: rgba(79, 70, 229, .45); background: linear-gradient(120deg, rgba(79, 70, 229, .1), rgba(139, 92, 246, .1));
  box-shadow: inset 0 0 0 1px rgba(79, 70, 229, .12); }
.role-chip-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.role-chip-text strong { font-size: .82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.role-chip-text small { font-size: .7rem; color: var(--ink-faint); }

.menu-form { display: grid; gap: 16px; }
.menu-sections { display: grid; gap: 14px; }
.menu-section { border: 1px solid var(--line-soft); border-radius: 14px; overflow: hidden; background: rgba(255, 255, 255, .5); }
.menu-section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 13px; background: rgba(255, 255, 255, .72); border-bottom: 1px solid var(--line-soft); }
.menu-section-head h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); }
.menu-list { display: grid; }
.menu-row { display: flex; align-items: center; gap: 10px; padding: 8px 13px; border-bottom: 1px dashed var(--line-soft); }
.menu-row:last-child { border-bottom: 0; }
.menu-row.is-locked { opacity: .6; }
.menu-check { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; cursor: pointer; }
.menu-check input { width: 16px; height: 16px; accent-color: var(--brand); flex: 0 0 auto; }
.menu-check input:disabled { cursor: not-allowed; }
.menu-row-text { display: flex; flex-direction: column; min-width: 0; }
.menu-row-text strong { font-size: .82rem; font-weight: 550; }
.menu-row-text small { font-size: .7rem; color: var(--ink-faint); font-family: ui-monospace, monospace; }

.menu-preview { display: grid; gap: 12px; padding: 12px; border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .8), rgba(255, 255, 255, .5)); border: 1px solid var(--line-soft); }
.menu-preview-group .nav-label { padding: 2px 6px 4px; }
.menu-preview-item { display: flex; align-items: center; gap: 8px; padding: 6px 9px; border-radius: 9px; font-size: .79rem; color: #443f66; }
.menu-preview-item .ico { width: 15px; height: 15px; opacity: .8; }
.menu-preview-group { display: grid; gap: 2px; }

@media (max-width: 640px) {
  .role-chips { grid-template-columns: minmax(0, 1fr); }
  .menu-row-text small { display: none; }
}

/* ---------------- Menu Access: tiga tingkat akses ---------------- */
.level-legend { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px;
  border-radius: 12px; background: rgba(255, 255, 255, .55); border: 1px solid var(--line-soft); }
.level-legend > small { margin-left: auto; }
.level-group { display: flex; gap: 4px; flex: 0 0 auto; }
.level-opt { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 999px;
  border: 1px solid var(--line-soft); background: rgba(255, 255, 255, .7);
  font-size: .73rem; font-weight: 600; color: var(--ink-soft); cursor: pointer; white-space: nowrap; }
.level-opt input { width: 13px; height: 13px; margin: 0; accent-color: var(--brand); }
.level-opt:hover { border-color: rgba(139, 92, 246, .45); }
.level-opt.is-disabled { opacity: .45; cursor: not-allowed; }
.level-opt.is-disabled:hover { border-color: var(--line-soft); }
/* warna status saat opsi terpilih */
.level-opt.lvl-hidden:has(input:checked) { background: rgba(99, 95, 130, .14); border-color: rgba(99, 95, 130, .3); color: #4b4766; }
.level-opt.lvl-view:has(input:checked) { background: rgba(37, 99, 235, .12); border-color: rgba(37, 99, 235, .32); color: #1d4ed8; }
.level-opt.lvl-edit:has(input:checked) { background: rgba(15, 157, 118, .13); border-color: rgba(15, 157, 118, .34); color: #0b7a5c; }
.menu-row { align-items: center; justify-content: space-between; gap: 12px; }
.menu-row-text { flex: 1; }
.nav-lock { width: 13px; height: 13px; opacity: .6; margin-left: 2px; }
.menu-preview-item .nav-lock { margin-left: auto; }

@media (max-width: 860px) {
  .level-group { flex-wrap: wrap; }
  .menu-row { flex-wrap: wrap; }
  .level-legend > small { margin-left: 0; }
}

/* ---------------- portal thalibah / orangtua ---------------- */
.portal-links { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------------- Academic Excellence: kartu besar & grafik ---------------- */
.xl-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.xl-card.tone-indigo { --xl-a: #4f46e5; --xl-b: #8b5cf6; }
.xl-card.tone-violet { --xl-a: #7c3aed; --xl-b: #a78bfa; }
.xl-card.tone-emerald { --xl-a: #0f9d76; --xl-b: #34d399; }
.xl-card.tone-amber { --xl-a: #d97706; --xl-b: #fbbf24; }
.xl-card.tone-rose { --xl-a: #db2777; --xl-b: #f472b6; }
.xl-card { --xl-a: var(--brand); --xl-b: var(--brand-2); }

.xl-head { display: flex; gap: 13px; padding: 18px 20px 14px;
  background: linear-gradient(120deg, color-mix(in srgb, var(--xl-a) 12%, transparent), color-mix(in srgb, var(--xl-b) 8%, transparent));
  border-bottom: 1px solid var(--line-soft); }
.xl-ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex: 0 0 auto;
  background: linear-gradient(135deg, var(--xl-a), var(--xl-b)); color: #fff;
  box-shadow: 0 12px 24px -14px color-mix(in srgb, var(--xl-a) 80%, black); }
.xl-ico .ico { width: 22px; height: 22px; }
.xl-head-text { min-width: 0; flex: 1; display: grid; gap: 5px; }
.xl-head-text h3 { font-size: 1.06rem; letter-spacing: -.02em; }
.xl-tagline { font-size: .81rem; color: var(--ink-soft); }
.xl-meta { display: flex; flex-wrap: wrap; gap: 12px; font-size: .74rem; color: var(--ink-faint); }
.xl-meta span { display: inline-flex; align-items: center; gap: 5px; }
.xl-meta .ico { width: 13px; height: 13px; }

.xl-body { padding: 18px 20px; display: grid; gap: 18px; }
.xl-progress { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.xl-progress .donut { width: 108px; height: 108px; }
.xl-progress-text { flex: 1; min-width: 190px; display: grid; gap: 6px; }
.xl-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.xl-chart-block { min-width: 0; }
.xl-top { display: grid; gap: 6px; }
.xl-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 12px 20px 16px; border-top: 1px solid var(--line-soft); background: rgba(255, 255, 255, .4); }
.xl-foot .row-actions { margin-left: auto; }

/* grafik batang CSS murni */
.chart { display: flex; align-items: flex-end; gap: 8px; height: calc(var(--chart-h, 96px) + 34px); padding-top: 16px; }
.chart-col { flex: 1 1 0; min-width: 26px; display: flex; flex-direction: column; justify-content: flex-end;
  align-items: center; gap: 4px; height: 100%; position: relative; }
.chart-bar { width: 100%; max-width: 44px; border-radius: 7px 7px 3px 3px;
  background: linear-gradient(180deg, var(--brand-2), var(--brand)); transition: height .4s ease; }
.chart-bar.is-qual { background: linear-gradient(180deg, #60a5fa, #2563eb); }
.chart-bar.is-quant { background: linear-gradient(180deg, var(--brand-2), var(--brand)); }
.chart-bar.is-level { background: linear-gradient(180deg, #fbbf24, #d97706); }
.chart-value { font-size: .68rem; font-weight: 650; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.chart-label { font-size: .63rem; color: var(--ink-faint); text-align: center; line-height: 1.2;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* laporan A4 */
.report-subtitle { text-align: center; font-size: .86rem; color: #45415f; margin-bottom: 4px; }
.report-section { margin-top: 16px; margin-bottom: 6px; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: #3b3560; }
.report-text { font-size: .8rem; line-height: 1.65; color: #33304f; }
.report-chart { display: grid; gap: 7px; margin-top: 6px; }
.report-chart-row { display: grid; grid-template-columns: 150px 1fr 46px; align-items: center; gap: 10px; font-size: .74rem; }
.report-chart-label { color: #45415f; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-chart-track { height: 9px; border-radius: 999px; background: #ece9f7; overflow: hidden; }
.report-chart-fill { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #4f46e5, #8b5cf6); }
.report-chart-value { text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; }

@media (max-width: 720px) {
  .xl-head { flex-wrap: wrap; }
  .xl-progress .donut { width: 92px; height: 92px; }
  .chart { gap: 4px; }
  .report-chart-row { grid-template-columns: 96px 1fr 40px; }
}

@media print {
  .report-chart-row { break-inside: avoid; }
  .report-table { break-inside: auto; }
  .report-table tr { break-inside: avoid; }
  .report-table thead { display: table-header-group; }
  .xl-card, .chart { break-inside: avoid; }
}

/* ---------------- Appearance: kartu logo ---------------- */
.input-static { display: flex; align-items: center; color: var(--ink-soft); background: rgba(255, 255, 255, .55); font-size: .82rem; }
.logo-current { display: flex; align-items: center; gap: 14px; }
.logo-thumb { width: 84px; height: 84px; border-radius: 18px; flex: 0 0 auto; display: grid; place-items: center;
  background: rgba(255, 255, 255, .8); border: 1px dashed rgba(79, 70, 229, .35); overflow: hidden; }
.logo-thumb.has-logo { border-style: solid; border-color: var(--line-soft); background: #fff; }
.logo-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.logo-initials { font-weight: 700; color: var(--brand); font-size: 1.1rem; }
.logo-current-text { min-width: 0; display: grid; gap: 3px; }
.logo-current-text strong { font-size: .88rem; }
.logo-current-text small { font-size: .76rem; color: var(--ink-soft); }
.logo-url { font-size: .68rem; color: var(--ink-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; max-width: 100%; }
.logo-status { font-size: .78rem; color: var(--ink-soft); min-height: 1.2em; }
.logo-status.is-ok { color: #0b7a5c; }
.logo-status.is-error { color: #b91c1c; }
.spec-box { padding: 12px 14px; border-radius: 12px; background: rgba(79, 70, 229, .05); border: 1px dashed rgba(79, 70, 229, .22); }
.spec-box .legend li .small { margin-left: auto; text-align: right; max-width: 62%; }

/* logo tidak boleh terpotong (contain), dan beri latar netral */
.brand-mark img { object-fit: contain; padding: 3px; background: rgba(255, 255, 255, .9); }
.preview-mark-logo { background: #fff; border: 1px solid var(--line-soft); overflow: hidden; }
.preview-mark-logo img { width: 100%; height: 100%; object-fit: contain; padding: 3px; }

/* ---------------- Bahan Belajar Mandiri: viewer PDF ---------------- */
.pdf-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .62); border: 1px solid var(--line-soft); }
.pdf-toolbar-info { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pdf-toolbar-text { display: flex; flex-direction: column; min-width: 0; }
.pdf-toolbar-text strong { font-size: .84rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdf-toolbar-text small { font-size: .71rem; color: var(--ink-faint); }
.pdf-toolbar-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.pdf-frame { margin-top: 12px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line-soft);
  background: #f6f5fb; display: grid; gap: 0; }
.pdf-viewer { width: 100%; height: 620px; border: 0; display: block; background: #fff; }
.pdf-frame-hint { display: flex; align-items: flex-start; gap: 7px; padding: 9px 12px; font-size: .73rem;
  color: var(--ink-soft); background: rgba(79, 70, 229, .05); border-top: 1px solid var(--line-soft); }
.pdf-frame-hint .ico { width: 14px; height: 14px; flex: 0 0 auto; margin-top: 2px; }
/* saat layar penuh: iframe mengisi seluruh layar */
.pdf-frame:fullscreen, .pdf-frame:-webkit-full-screen { border-radius: 0; border: 0; background: #0f0d20;
  display: flex; flex-direction: column; width: 100vw; height: 100vh; }
.pdf-frame:fullscreen .pdf-viewer, .pdf-frame:-webkit-full-screen .pdf-viewer { flex: 1; height: auto; }
.pdf-frame:fullscreen .pdf-frame-hint, .pdf-frame:-webkit-full-screen .pdf-frame-hint { display: none; }

.pdf-placeholder { display: grid; justify-items: center; text-align: center; gap: 6px; padding: 26px 18px;
  border: 1px dashed rgba(79, 70, 229, .28); border-radius: 14px; background: rgba(79, 70, 229, .04); }
.pdf-placeholder .ico { width: 26px; height: 26px; color: var(--brand-2); opacity: .8; }
.pdf-placeholder h3 { font-size: .9rem; }
.pdf-placeholder p { font-size: .79rem; color: var(--ink-soft); max-width: 46ch; }
.pdf-broken-link { font-size: .68rem; color: var(--danger); word-break: break-all; }

@media (max-width: 720px) {
  .pdf-viewer { height: 420px; }
  .pdf-toolbar-actions .btn span { display: inline; }
  .pdf-toolbar-actions { width: 100%; }
}

@media print {
  .pdf-frame, .pdf-toolbar { display: none !important; }
}

/* ---------------- Learning Objectives: kartu per mapel + urutan TP ---------------- */
.tp-list { display: grid; gap: 8px; }
.tp-row { display: flex; align-items: flex-start; gap: 9px; padding: 10px 11px; border-radius: 12px;
  background: rgba(255, 255, 255, .68); border: 1px solid var(--line-soft);
  transition: background-color .15s, box-shadow .15s, transform .15s; }
.tp-row:hover { background: #fff; box-shadow: 0 8px 18px -14px rgba(47, 32, 106, .5); }
.tp-row.is-dragging { opacity: .55; background: rgba(139, 92, 246, .12); box-shadow: 0 14px 28px -18px rgba(79, 70, 229, .8); }
.tp-row.is-over { border-color: rgba(139, 92, 246, .55); box-shadow: inset 0 0 0 1px rgba(139, 92, 246, .35); }
.tp-handle { display: grid; place-items: center; width: 22px; height: 26px; flex: 0 0 auto;
  color: var(--ink-faint); cursor: grab; border-radius: 6px; touch-action: none; }
.tp-handle:hover { color: var(--brand); background: rgba(79, 70, 229, .08); }
.tp-handle:active { cursor: grabbing; }
.tp-handle .ico { width: 15px; height: 15px; }
.tp-no { flex: 0 0 auto; min-width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center;
  background: rgba(79, 70, 229, .1); color: var(--brand); font-size: .72rem; font-weight: 700; margin-top: 2px; }
.tp-body { flex: 1; min-width: 0; }
.tp-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tp-body .ref-desc { margin-top: 4px; }
.tp-actions { display: flex; align-items: center; gap: 3px; flex: 0 0 auto; flex-wrap: wrap; }
.tp-actions .icon-btn:disabled { opacity: .35; cursor: not-allowed; }
.chip-hint { background: rgba(79, 70, 229, .08); color: var(--brand); }
.chip-hint .ico { width: 13px; height: 13px; }
.tp-add-form .field-hint { margin-top: 2px; }

@media (max-width: 640px) {
  .tp-row { flex-wrap: wrap; }
  .tp-actions { width: 100%; justify-content: flex-end; }
}

/* ---------------- lingkup guru (Teaching Assignment) ---------------- */
.scope-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.scope-grid .chip-row { margin-top: 4px; }
.scope-grid .chip { background: rgba(79, 70, 229, .07); border-color: rgba(79, 70, 229, .18); }

/* ---------------- Teaching Journal: field Learning Journey melebar ---------------- */
.form-grid .field-span-2 { grid-column: span 2; }
@media (max-width: 640px) {
  .form-grid .field-span-2 { grid-column: span 1; }
}

/* ---------------- Teaching Journal: field angka ringkas ---------------- */
.field-compact .input { max-width: 150px; }
.field-compact .field-hint { white-space: nowrap; }
@media (max-width: 640px) {
  .field-compact .input { max-width: none; }
  .field-compact .field-hint { white-space: normal; }
}

/* ---------------- Attendance: kartu rekap grafis ---------------- */
.chart-trend .chart-bar { max-width: 22px; }
.chart-trend .chart-value { display: none; }
.xl-progress .donut { flex: 0 0 auto; }

/* kartu rekap attendance: grafik harus menyusut agar tidak mendorong lebar halaman */
.chart-compact { overflow-x: auto; overflow-y: hidden; }
.chart-compact .chart-col { min-width: 0; }
.chart-compact .chart-label { font-size: .58rem; }
@media (max-width: 640px) {
  .chart-compact .chart-col { min-width: 0; }
  .chart-compact .chart-value { font-size: .58rem; }
}

/* ---------------- Learning Journey: kartu mapel tanpa pertemuan ---------------- */
.empty-inline { display: flex; align-items: flex-start; gap: 11px; padding: 14px; border-radius: 12px;
  background: rgba(79, 70, 229, .04); border: 1px dashed rgba(79, 70, 229, .28); }
.empty-inline .ico { width: 22px; height: 22px; color: var(--brand-2); opacity: .85; flex: 0 0 auto; margin-top: 1px; }
.empty-inline strong { font-size: .84rem; display: block; }
.empty-inline p { font-size: .78rem; color: var(--ink-soft); margin-top: 2px; }
.empty-inline p strong { display: inline; font-size: inherit; }

/* ---------------- semester TP & Learning Journey ---------------- */
.term-quick { display: inline-flex; }
.term-select { width: auto; min-width: 104px; padding: 5px 24px 5px 8px; font-size: .72rem; height: 30px; }
.tp-actions .term-select { font-weight: 600; }
@media (max-width: 640px) {
  .term-select { min-width: 92px; }
}

/* ---------------- Learning Assessment: median & klaster ---------------- */
.median-scale { position: relative; height: 46px; margin: 10px 0 18px; }
.median-track { position: absolute; left: 0; right: 0; top: 22px; height: 6px; border-radius: 999px;
  background: linear-gradient(90deg, rgba(220,38,38,.22), rgba(217,119,6,.22), rgba(37,99,235,.22), rgba(15,157,118,.22)); }
.median-iqr { position: absolute; top: 19px; height: 12px; border-radius: 6px; background: rgba(79,70,229,.22); border: 1px solid rgba(79,70,229,.35); }
.median-pin { position: absolute; top: 10px; transform: translateX(-50%); display: grid; justify-items: center; }
.median-pin::before { content: ''; width: 3px; height: 26px; border-radius: 2px; background: var(--brand); box-shadow: 0 0 0 2px rgba(79,70,229,.16); }
.median-pin > span { position: absolute; top: -12px; font-size: .68rem; font-weight: 700; color: var(--brand); white-space: nowrap; }
.median-lo, .median-hi { position: absolute; top: 32px; font-size: .64rem; color: var(--ink-faint); }
.median-lo { left: 0; } .median-hi { right: 0; }

/* ---------------- Leger & analisis nilai A4 landscape ---------------- */
@page landscape-a4 { size: A4 landscape; margin: 10mm; }
.leger-sheet {
  background: #fff; color: #17142e; border-radius: 14px; padding: 22px 24px;
  box-shadow: 0 24px 50px -34px rgba(47, 32, 106, .5); border: 1px solid rgba(31, 27, 58, .1);
  width: 100%; max-width: 1120px; margin: 0 auto;
}
.leger-head { display: flex; align-items: center; gap: 14px; border-bottom: 2px solid var(--brand); padding-bottom: 10px; }
.leger-head h2 { font-size: 1rem; }
.leger-head p { font-size: .72rem; color: #55516e; }
.leger-title { text-align: center; font-weight: 700; letter-spacing: .03em; margin: 12px 0 2px; font-size: .95rem; }
.leger-sub { text-align: center; font-size: .76rem; color: #55516e; margin-bottom: 10px; }
.leger-meta { width: 100%; border-collapse: collapse; font-size: .74rem; margin-bottom: 10px; }
.leger-meta th, .leger-meta td { border: 1px solid #d8d5e6; padding: 4px 7px; text-align: left; }
.leger-meta th { background: #f5f3fc; width: 120px; font-weight: 600; }
.leger-table { width: 100%; border-collapse: collapse; font-size: .64rem; }
.leger-table th, .leger-table td { border: 1px solid #cfcbdf; padding: 3px 4px; text-align: center; }
.leger-table th { background: #efecfa; font-size: .6rem; text-transform: uppercase; letter-spacing: .02em; }
.leger-table th.name-col, .leger-table td.name-col { text-align: left; min-width: 132px; }
.leger-table tbody tr:nth-child(even) { background: #faf9fe; }
.leger-table tfoot td { background: #f3f1fb; font-weight: 700; }
.leger-empty { color: #8b87a3; }
.analysis-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin: 10px 0; }
.analysis-cell { border: 1px solid #d8d5e6; border-radius: 8px; padding: 7px 9px; }
.analysis-cell span { display: block; font-size: .62rem; text-transform: uppercase; letter-spacing: .05em; color: #6b6786; }
.analysis-cell strong { font-size: 1.05rem; }
.analysis-block { margin-top: 12px; }
.analysis-block h4 { font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: #3b3560; margin-bottom: 4px; }
.analysis-block p, .analysis-block li { font-size: .72rem; line-height: 1.55; color: #33304f; }
.analysis-block ul { padding-left: 16px; list-style: disc; }
.analysis-cluster { display: grid; gap: 4px; }
.analysis-cluster-row { display: grid; grid-template-columns: 66px 1fr 74px; align-items: center; gap: 8px; font-size: .68rem; }
.analysis-cluster-track { height: 8px; border-radius: 999px; background: #ece9f7; overflow: hidden; }
.analysis-cluster-fill { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #4f46e5, #8b5cf6); }
.leger-sign { display: flex; justify-content: space-between; gap: 20px; margin-top: 16px; font-size: .72rem; }
.leger-sign div { text-align: center; flex: 1; }
.leger-sign .space { height: 42px; }
.leger-foot { margin-top: 10px; font-size: .62rem; color: #8b87a3; }

@media print {
  .leger-sheet { box-shadow: none; border: 0; padding: 0; border-radius: 0; max-width: none; }
  .leger-table { font-size: .6rem; }
  .leger-table tr { break-inside: avoid; }
}

/* cetak landscape: lembar lebar mengisi halaman */
@media print {
  @page { size: A4 landscape; margin: 8mm; }
  body.print-landscape .leger-sheet { width: 100%; }
  body.print-landscape .topbar, body.print-landscape .sidebar { display: none !important; }
  .leger-table { font-size: .58rem; }
  .analysis-grid { grid-template-columns: repeat(4, 1fr); }
}
