/* E-Rapor SMK — gaya antarmuka. Warna institusional, tanpa animasi berlebihan. */
:root {
  --brand: #1f3a5f;
  --brand-2: #2c5282;
  --accent: #0f766e;
  --warn: #b7791f;
  --danger-soft: #b4432f;
  --bg: #f3f5f8;
  --line: #dde3ea;
  --bs-body-font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
  --bs-body-font-size: .95rem;
  --bs-primary: #1f3a5f;
  --bs-primary-rgb: 31, 58, 95;
  --bs-link-color: #2c5282;
  --bs-link-color-rgb: 44, 82, 130;
}
body { background: var(--bg); color: #1d2530; }
.btn-primary { --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-hover-bg: var(--brand-2); --bs-btn-hover-border-color: var(--brand-2); --bs-btn-active-bg: #172c48; }
.btn-outline-primary { --bs-btn-color: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-hover-bg: var(--brand); --bs-btn-hover-border-color: var(--brand); }
.text-bg-primary { background-color: var(--brand) !important; }
.app-shell { display: flex; min-height: 100vh; }
.sidebar { width: 256px; background: #14263f; color: #c9d5e3; flex-shrink: 0; display: flex; flex-direction: column; }
@media (min-width: 992px) { .sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; } }
.sidebar.offcanvas-lg { background-color: #14263f !important; color: #c9d5e3; }
.sidebar-brand { display: flex; align-items: center; gap: .6rem; padding: 1rem 1.1rem; border-bottom: 1px solid rgba(255,255,255,.08); color: #fff; }
.sidebar-brand > i { font-size: 1.6rem; color: #7fb3d5; }
.sidebar-brand small { display: block; font-size: .75rem; color: #9fb3c8; line-height: 1.2; max-width: 170px; }
.sidebar-nav { padding: .5rem 0 1rem; flex: 1; }
.nav-group { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: #7d93ab; padding: .9rem 1.2rem .3rem; }
.sidebar .nav-link { display: flex; gap: .65rem; align-items: center; color: #c9d5e3; padding: .45rem 1.2rem; font-size: .9rem; border-left: 3px solid transparent; }
.sidebar .nav-link:hover { background: rgba(255,255,255,.05); color: #fff; }
.sidebar .nav-link.active { background: rgba(127,179,213,.14); color: #fff; border-left-color: #7fb3d5; }
.sidebar-foot { font-size: .72rem; color: #6c829a; padding: .6rem 1.2rem; border-top: 1px solid rgba(255,255,255,.06); }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: .75rem; padding: .55rem 1.25rem; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 1020; }
.period-form { display: flex; align-items: center; gap: .45rem; }
.period-form select { min-width: 210px; }
.content { padding: 1.25rem; max-width: 1500px; width: 100%; }
@media (max-width: 575.98px) { .content { padding: .8rem; } .period-form select { min-width: 150px; } }
.breadcrumb { font-size: .82rem; margin-bottom: .75rem; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-bottom: 1rem; }
.page-head h1 { font-size: 1.35rem; margin: 0; font-weight: 650; color: var(--brand); }
.page-head .actions { margin-left: auto; display: flex; gap: .4rem; flex-wrap: wrap; }
.card { border-color: var(--line); border-radius: .6rem; }
.card-header { background: #fff; font-weight: 600; border-bottom-color: var(--line); }
.stat-card { padding: 1rem 1.1rem; display: flex; align-items: center; gap: .9rem; }
.stat-card .icon { width: 44px; height: 44px; border-radius: .5rem; display: grid; place-items: center; font-size: 1.3rem; background: #e8eef6; color: var(--brand); }
.stat-card .value { font-size: 1.45rem; font-weight: 700; line-height: 1; }
.stat-card .label { font-size: .8rem; color: #5f6b7a; }
.table { --bs-table-hover-bg: #f5f8fc; font-size: .9rem; }
.table thead th { background: #eef2f7; color: #344255; font-weight: 600; font-size: .8rem; text-transform: none; white-space: nowrap; vertical-align: middle; }
.table-sticky thead th { position: sticky; top: 0; z-index: 2; }
.num { font-variant-numeric: tabular-nums; text-align: right; }
.score-grid input { width: 4.6rem; text-align: right; font-variant-numeric: tabular-nums; padding: .2rem .4rem; }
.score-grid input.empty { background: #f1f3f5; }
.score-grid input.invalid { border-color: #dc3545; background: #fff5f5; }
.score-grid input.below { color: var(--danger-soft); font-weight: 600; }
.score-grid td.name { min-width: 200px; }
.score-grid select { width: 4.2rem; padding: .15rem .3rem; }
.cell-missing { color: #8a94a3; font-style: italic; }
.text-fail { color: var(--danger-soft); font-weight: 600; }
.text-pass { color: var(--accent); }
.form-label { font-weight: 550; font-size: .88rem; }
.help { font-size: .8rem; color: #6b7684; }
.filter-bar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: end; margin-bottom: .75rem; }
.filter-bar .form-control, .filter-bar .form-select { width: auto; min-width: 160px; }
.guest { background: linear-gradient(180deg, #14263f 0, #1f3a5f 260px, var(--bg) 260px); }
.guest-wrap { max-width: 440px; margin: 0 auto; padding: 3.5rem 1rem; }
.login-card .brand { display: flex; align-items: center; gap: .7rem; margin-bottom: 1.2rem; }
.login-card .brand i { font-size: 2rem; color: var(--brand); }
.flow { display: flex; flex-wrap: wrap; gap: .25rem; font-size: .78rem; }
.flow span { padding: .2rem .55rem; border-radius: 1rem; background: #e9edf2; color: #5f6b7a; }
.flow span.done { background: #d7efe9; color: #0f5f56; }
.flow span.now { background: var(--brand); color: #fff; }
.kd-chip { display: inline-block; font-size: .72rem; background: #eef2f7; border-radius: .3rem; padding: .05rem .35rem; margin: 0 .15rem .15rem 0; }
.progress { height: .55rem; }
.empty-state { text-align: center; padding: 2.5rem 1rem; color: #6b7684; }
.empty-state i { font-size: 2rem; display: block; margin-bottom: .5rem; color: #a3b1c2; }
pre.trace { font-size: .78rem; background: #f6f8fa; padding: .75rem; border-radius: .4rem; max-height: 420px; overflow: auto; }
@media print { .sidebar, .topbar, .no-print { display: none !important; } .content { padding: 0; } }
.rapor-frame { width: 100%; height: 80vh; border: 1px solid #d0d7de; border-radius: .5rem; background: #fff; }
.audit-json { max-width: 520px; max-height: 220px; overflow: auto; white-space: pre-wrap; word-break: break-all; font-size: .72rem; background: #f6f8fa; padding: .4rem; border-radius: .3rem; margin: 0 0 .3rem; }
