/* Rapor Digital - tema "Segar" (tanpa dependensi, responsif) */
:root {
    --ink: #0b2b29;
    --ink-2: #123f3b;
    --c-primary: #0f9b7a;
    --c-primary-dark: #0a7b61;
    --c-primary-soft: #e2f5ee;
    --c-accent: #f5b43a;
    --c-bg: #f3f8f6;
    --c-card: #ffffff;
    --c-text: #14302d;
    --c-muted: #5f7d78;
    --c-line: #e1eae7;
    --c-danger: #c2351f;
    --c-danger-soft: #fdece9;
    --c-ok: #0b7a4a;
    --c-ok-soft: #e0f5e9;
    --c-warn: #8a5a05;
    --c-warn-soft: #fff1cf;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 1px 2px rgba(11, 43, 41, .05), 0 6px 18px -8px rgba(11, 43, 41, .12);
    --side-w: 252px;
    --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.55; color: var(--c-text); background: var(--c-bg); }
a { color: var(--c-primary-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5rem; letter-spacing: -.01em; }
h1 { font-size: 1.55rem; font-weight: 800; }
h2 { font-size: 1.2rem; font-weight: 700; }
h3 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0 0 .75rem; }
code { background: #e8f1ee; padding: 1px 6px; border-radius: 6px; font-size: .9em; }
hr { border: 0; border-top: 1px solid var(--c-line); margin: 1rem 0; }
:focus-visible { outline: 3px solid rgba(15, 155, 122, .4); outline-offset: 2px; }

/* ---------- shell: sidebar + main ---------- */
.navtoggle { position: absolute; opacity: 0; pointer-events: none; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--side-w); background: linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%); color: #cfe6e1; display: flex; flex-direction: column; z-index: 80; overflow-y: auto; transition: transform .22s ease; }
.side-brand { display: flex; align-items: center; gap: 11px; padding: 20px 18px 16px; color: #fff; }
.side-brand:hover { text-decoration: none; }
.side-brand .mark { flex: none; width: 38px; height: 38px; border-radius: 12px; background: linear-gradient(135deg, #1fc79d, #0f9b7a); display: grid; place-items: center; font-weight: 800; font-size: 1.1rem; color: #fff; box-shadow: 0 6px 14px -6px rgba(31, 199, 157, .8); }
.side-brand .t { font-weight: 800; line-height: 1.15; font-size: 1rem; }
.side-brand .t small { display: block; font-weight: 500; font-size: .74rem; color: #8fb5ae; margin-top: 2px; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-nav { padding: 6px 10px 18px; flex: 1; }
.side-group { font-size: .74rem; font-weight: 600; color: #7fa59e; padding: 16px 10px 6px; }
.side-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; margin: 1px 0; border-radius: 10px; color: #cfe6e1; font-size: .92rem; font-weight: 500; }
.side-nav a:hover { background: rgba(255, 255, 255, .07); text-decoration: none; color: #fff; }
.side-nav a.active { background: rgba(31, 199, 157, .16); color: #fff; font-weight: 700; box-shadow: inset 3px 0 0 var(--c-accent); }
.side-nav .ic { width: 20px; text-align: center; font-size: 1rem; opacity: .9; }
.side-foot { padding: 12px 14px 16px; border-top: 1px solid rgba(255, 255, 255, .08); font-size: .8rem; color: #8fb5ae; }

.main { margin-left: var(--side-w); min-height: 100vh; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 40; background: rgba(243, 248, 246, .88); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--c-line); }
.topbar-in { max-width: 1280px; margin: 0 auto; padding: 10px 24px; display: flex; align-items: center; gap: 12px; min-height: 60px; }
.burger { display: inline-flex; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--c-line); background: #fff; cursor: pointer; align-items: center; justify-content: center; font-size: 1.2rem; flex: none; }
.crumb { flex: 1; min-width: 0; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumb small { display: block; font-weight: 500; color: var(--c-muted); font-size: .76rem; }
.topbar-right { display: flex; align-items: center; gap: 8px; }
.topbar select { padding: 7px 10px; border-radius: 10px; border: 1px solid var(--c-line); background: #fff; font: inherit; font-size: .85rem; max-width: 200px; }
.user-chip { display: flex; align-items: center; gap: 9px; padding: 4px 12px 4px 4px; border-radius: 999px; background: #fff; border: 1px solid var(--c-line); color: var(--c-text); font-size: .85rem; font-weight: 600; }
.user-chip:hover { text-decoration: none; border-color: var(--c-primary); }
.user-chip .av { width: 30px; height: 30px; border-radius: 50%; background: var(--c-primary); color: #fff; display: grid; place-items: center; font-size: .82rem; font-weight: 800; }
.user-chip .nm { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .btn-link, .btn-link { background: transparent; border: 0; color: var(--c-muted); cursor: pointer; font: inherit; font-size: .85rem; padding: 6px 8px; border-radius: 8px; }
.topbar .btn-link:hover { background: #e6efec; color: var(--c-text); }
.schoolbar { background: var(--c-warn-soft); border-bottom: 1px solid #f2dca0; font-size: .85rem; padding: 7px 16px; text-align: center; color: #6b4e00; }
.scrim { display: none; }
@media (min-width: 961px) {
    .sidebar, .main { transition: transform .22s ease, margin-left .22s ease; }
    body.side-hidden .sidebar { transform: translateX(-102%); }
    body.side-hidden .main { margin-left: 0; }
}

@media (max-width: 960px) {
    .sidebar { transform: translateX(-102%); }
    .navtoggle:checked ~ .sidebar { transform: none; box-shadow: 8px 0 40px rgba(0, 0, 0, .3); }
    .navtoggle:checked ~ .scrim { display: block; position: fixed; inset: 0; background: rgba(5, 25, 23, .5); z-index: 70; }
    .main { margin-left: 0; }
    .topbar-in { padding: 8px 14px; }
    .user-chip .nm { display: none; }
    .user-chip { padding: 4px; }
}
@media (max-width: 560px) {
    .topbar select { max-width: 130px; }
    .topbar .btn-link { padding: 6px 4px; }
}

/* ---------- layout ---------- */
.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 24px 24px 56px; }
@media (max-width: 640px) { .container { padding: 16px 14px 44px; } }
.narrow { max-width: 780px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { margin: 0; }
.page-head .sub { color: var(--c-muted); font-size: .9rem; margin-top: 2px; }
.page-head.hero { padding: 24px 26px; border-radius: 20px; color: #fff; align-items: center; background:
    radial-gradient(420px 220px at 92% -20%, rgba(245, 180, 58, .35), transparent 70%),
    radial-gradient(520px 260px at 10% 130%, rgba(31, 199, 157, .45), transparent 70%),
    linear-gradient(120deg, var(--ink) 0%, #0f5c52 100%); box-shadow: 0 18px 36px -22px rgba(11, 43, 41, .7); }
.page-head.hero .sub { color: #bfe3dc; }
.page-head.hero .btn { background: var(--c-accent); border-color: var(--c-accent); color: #3a2800; font-weight: 700; }
.page-head.hero .btn:hover { background: #ffc65c; color: #3a2800; }
.card { background: var(--c-card); border: 1px solid var(--c-line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 18px; }
.card-h { padding: 14px 18px; border-bottom: 1px solid var(--c-line); font-weight: 700; display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.card-b { padding: 18px; }
.card-f { padding: 12px 18px; border-top: 1px solid var(--c-line); background: #f8fbfa; border-radius: 0 0 var(--radius) var(--radius); }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .g2 { grid-template-columns: 1fr; } }
@media (max-width: 460px) { .g3 { grid-template-columns: 1fr; } .stat { padding: 14px 16px; } .stat .n { font-size: 1.7rem; } }
.stat { padding: 18px 20px; margin-bottom: 0; background: linear-gradient(160deg, #fff 55%, var(--c-primary-soft)); }
.stat .n { font-size: 2.1rem; font-weight: 800; color: var(--ink); line-height: 1.1; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.stat .l { color: var(--c-muted); font-size: .85rem; margin-top: 2px; }
.grid > .card { margin-bottom: 0; }
.grid.mb { margin-bottom: 18px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-size: .9rem; font-weight: 600; padding: 8px 16px; border-radius: 10px; border: 1px solid var(--c-primary); background: var(--c-primary); color: #fff; cursor: pointer; line-height: 1.3; text-align: center; transition: background .15s, box-shadow .15s, transform .05s; box-shadow: 0 6px 14px -8px rgba(15, 155, 122, .9); }
.btn:hover { background: var(--c-primary-dark); border-color: var(--c-primary-dark); text-decoration: none; color: #fff; }
.btn:active { transform: translateY(1px); }
.btn-outline { background: #fff; color: var(--c-primary-dark); box-shadow: none; }
.btn-outline:hover { background: var(--c-primary-soft); color: var(--c-primary-dark); }
.btn-danger { background: var(--c-danger); border-color: var(--c-danger); box-shadow: none; }
.btn-danger:hover { background: #962412; border-color: #962412; }
.btn-ghost { background: transparent; color: var(--c-muted); border-color: var(--c-line); box-shadow: none; }
.btn-ghost:hover { background: #eaf2ef; color: var(--c-text); }
.btn-sm { padding: 5px 11px; font-size: .82rem; border-radius: 9px; }
.btn-block { display: flex; width: 100%; padding: 11px 16px; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

/* ---------- forms ---------- */
label { display: block; font-weight: 600; font-size: .85rem; margin-bottom: 4px; color: #27504b; }
.input, select, textarea, input[type=text], input[type=password], input[type=number], input[type=date], input[type=email], input[type=file] {
    width: 100%; font: inherit; font-size: .92rem; padding: 9px 12px; border: 1px solid #cddbd7; border-radius: var(--radius-sm); background: #fff; color: var(--c-text); transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 76px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--c-primary); box-shadow: 0 0 0 4px rgba(15, 155, 122, .16); }
.field { margin-bottom: 14px; }
.help { color: var(--c-muted); font-size: .8rem; margin-top: 3px; }
.err { color: var(--c-danger); font-size: .82rem; margin-top: 3px; }
.field.has-err input, .field.has-err select, .field.has-err textarea { border-color: var(--c-danger); }
.check { display: flex; gap: 8px; align-items: center; font-weight: 500; }
.check input { width: 18px; height: 18px; accent-color: var(--c-primary); }
.inline-form { display: inline; }
.form-grid { display: grid; gap: 0 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.form-grid .full { grid-column: 1 / -1; }
fieldset { border: 1px solid var(--c-line); border-radius: var(--radius); padding: 14px 16px 4px; margin: 0 0 16px; background: #fcfefd; }
legend { font-weight: 700; font-size: .88rem; padding: 0 8px; color: var(--c-primary-dark); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.t { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.t th, table.t td { padding: 10px 12px; border-bottom: 1px solid var(--c-line); text-align: left; vertical-align: top; }
table.t thead th { background: #eef6f3; font-weight: 700; font-size: .82rem; color: #3a625c; position: sticky; top: 0; white-space: nowrap; }
table.t thead th:first-child { border-top-left-radius: 10px; }
table.t thead th:last-child { border-top-right-radius: 10px; }
table.t tbody tr:hover { background: #f6fbf9; }
table.t tbody tr:last-child td { border-bottom: 0; }
table.t td.num, table.t th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.t td.c, table.t th.c { text-align: center; }
table.t input[type=number], table.t input[type=text], table.t select, table.t textarea { padding: 6px 9px; }
table.t .w-num { width: 92px; }
table.t .w-sel { width: 76px; }
.group-row td { background: var(--c-primary-soft); font-weight: 700; color: var(--c-primary-dark); }

/* ---------- badges / alerts ---------- */
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; background: #e6eeeb; color: #36534e; }
.b-ok { background: var(--c-ok-soft); color: var(--c-ok); }
.b-warn { background: var(--c-warn-soft); color: var(--c-warn); }
.b-danger { background: var(--c-danger-soft); color: var(--c-danger); }
.b-primary { background: var(--c-primary-soft); color: var(--c-primary-dark); }
.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: .92rem; border: 1px solid transparent; }
.alert-success { background: var(--c-ok-soft); color: var(--c-ok); border-color: #b5e4c8; }
.alert-danger { background: var(--c-danger-soft); color: var(--c-danger); border-color: #f5c3bb; }
.alert-warning { background: var(--c-warn-soft); color: var(--c-warn); border-color: #f2d68e; }
.alert-info { background: var(--c-primary-soft); color: var(--c-primary-dark); border-color: #b4e2d3; }
.alert ul { margin: 4px 0 0; padding-left: 18px; }

/* ---------- misc ---------- */
.muted { color: var(--c-muted); }
.small { font-size: .82rem; }
.right { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.mt { margin-top: 16px; } .mb { margin-bottom: 16px; } .mt0 { margin-top: 0; }
.flex { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.progress { background: #dfece8; border-radius: 999px; height: 8px; overflow: hidden; min-width: 90px; }
.progress > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #1fc79d, var(--c-primary)); }
.empty { text-align: center; padding: 30px 12px; color: var(--c-muted); }
.pagination { display: flex; gap: 4px; list-style: none; padding: 0; margin: 16px 0 0; flex-wrap: wrap; }
.pagination .page-link { display: block; padding: 6px 12px; border: 1px solid var(--c-line); border-radius: 9px; background: #fff; color: var(--c-text); font-size: .85rem; }
.pagination .active .page-link { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
.pagination .disabled .page-link { color: #9bb3ae; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs a { padding: 7px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--c-line); color: var(--c-text); font-size: .88rem; font-weight: 600; }
.tabs a.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.tabs a:hover { text-decoration: none; background: var(--c-primary-soft); }
.tabs a.active:hover { background: var(--ink-2); }

/* ---------- guest pages ---------- */
.guest { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 14px; background:
    radial-gradient(600px 400px at 85% -10%, rgba(245, 180, 58, .28), transparent 70%),
    radial-gradient(700px 500px at -5% 105%, rgba(31, 199, 157, .35), transparent 70%),
    linear-gradient(160deg, #eaf7f2 0%, #f3f8f6 60%); }
.guest-box { width: 100%; max-width: 430px; }
.guest-box.wide { max-width: 740px; }
.guest-box > .card { box-shadow: 0 24px 50px -28px rgba(11, 43, 41, .45); border-radius: 20px; }
.guest-logo { text-align: center; margin-bottom: 18px; }
.guest-logo .mark { display: inline-grid; place-items: center; width: 58px; height: 58px; border-radius: 18px; background: linear-gradient(135deg, #1fc79d, #0f9b7a); color: #fff; font-size: 1.7rem; font-weight: 800; margin-bottom: 10px; box-shadow: 0 14px 24px -12px rgba(15, 155, 122, .9); }
.guest-logo h1 { font-size: 1.35rem; margin: 0 0 2px; }
.checklist { list-style: none; padding: 0; margin: 0 0 14px; font-size: .88rem; }
.checklist li { padding: 3px 0; }
.checklist .ok::before { content: "\2714  "; color: var(--c-ok); font-weight: 700; }
.checklist .no::before { content: "\2718  "; color: var(--c-danger); font-weight: 700; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

@media print {
    .sidebar, .topbar, .schoolbar, .scrim, .no-print { display: none !important; }
    .main { margin: 0; }
    body { background: #fff; }
    .container { max-width: none; padding: 0; }
    .card { box-shadow: none; border: 0; }
}
