/* Rapor Digital - tema "Langit" : biru segar, kartu kaca transparan (tanpa dependensi, responsif) */
:root {
    --ink: #12304a;
    --c-primary: #1f93d8;
    --c-primary-2: #3fb0f0;
    --c-primary-dark: #1673ad;
    --c-primary-soft: #e6f3fd;
    --c-accent: #ff8a3d;
    --c-bg: #f1f6fb;
    --c-card: rgba(255, 255, 255, .84);
    --c-text: #1d3a52;
    --c-muted: #62819a;
    --c-line: rgba(31, 90, 140, .12);
    --c-danger: #d63a2a;
    --c-danger-soft: #fdecea;
    --c-ok: #0e9f5f;
    --c-ok-soft: #e0f7ec;
    --c-warn: #a35f00;
    --c-warn-soft: #fff1d6;
    --radius: 16px;
    --radius-sm: 11px;
    --glass-blur: blur(16px) saturate(1.5);
    --shadow: 0 1px 2px rgba(18, 48, 74, .04), 0 10px 28px -12px rgba(31, 100, 160, .22);
    --side-w: 268px;
    --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-color: var(--c-bg);
}
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; transform: translateZ(0);
    background-image:
        radial-gradient(700px 480px at 8% -8%, rgba(63, 176, 240, .30), transparent 70%),
        radial-gradient(620px 460px at 100% 12%, rgba(124, 92, 255, .16), transparent 70%),
        radial-gradient(700px 520px at 85% 105%, rgba(18, 183, 106, .16), transparent 70%),
        radial-gradient(520px 380px at 0% 90%, rgba(255, 138, 61, .12), transparent 70%); }
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; color: var(--ink); }
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: rgba(31, 147, 216, .1); 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(31, 147, 216, .4); outline-offset: 2px; }
.svg { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- shell: sidebar + main ---------- */
.navtoggle { position: absolute; opacity: 0; pointer-events: none; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--side-w); background: rgba(255, 255, 255, .62); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); border-right: 1px solid rgba(255, 255, 255, .8); color: var(--c-text); display: flex; flex-direction: column; z-index: 80; overflow-y: auto; transition: transform .22s ease; box-shadow: 10px 0 40px -28px rgba(31, 100, 160, .45); }
.side-brand { display: flex; align-items: center; gap: 11px; padding: 18px 18px 8px; color: var(--ink); }
.side-brand:hover { text-decoration: none; }
.side-brand .mark { flex: none; width: 40px; height: 40px; border-radius: 13px; background: linear-gradient(135deg, var(--c-primary-2), var(--c-primary)); display: grid; place-items: center; font-weight: 800; font-size: 1.15rem; color: #fff; box-shadow: 0 8px 16px -8px rgba(31, 147, 216, .9); }
.side-brand .mark-logo { background: #fff; padding: 3px; box-shadow: 0 6px 16px -8px rgba(18, 48, 74, .5); }
.side-brand .mark-logo img { width: 100%; height: 100%; object-fit: contain; display: block; border-radius: 9px; }
.side-brand .t { font-weight: 800; line-height: 1.15; font-size: 1.02rem; }
.side-brand .t small { display: block; font-weight: 500; font-size: .74rem; color: var(--c-muted); margin-top: 2px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-profile { margin: 10px 14px 6px; padding: 16px 14px; border-radius: 18px; text-align: center; background: linear-gradient(160deg, rgba(255, 255, 255, .9), rgba(230, 243, 253, .75)); border: 1px solid rgba(255, 255, 255, .9); box-shadow: var(--shadow); }
.side-profile .av { width: 52px; height: 52px; margin: 0 auto 8px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 1.3rem; color: #fff; background: linear-gradient(135deg, var(--c-primary-2), #7c5cff); box-shadow: 0 8px 18px -8px rgba(124, 92, 255, .8); }
.side-profile .nm { font-weight: 800; color: var(--ink); line-height: 1.25; }
.side-profile .rl { display: inline-block; margin-top: 6px; padding: 2px 11px; border-radius: 999px; font-size: .74rem; font-weight: 700; background: var(--c-primary-soft); color: var(--c-primary-dark); }
.side-profile .sc { margin-top: 6px; font-size: .78rem; color: var(--c-muted); }
.side-nav { padding: 6px 12px 18px; flex: 1; }
.side-group { font-size: .74rem; font-weight: 700; color: #8aa4ba; padding: 16px 10px 6px; }
.side-nav a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; margin: 2px 0; border-radius: 12px; color: #35536c; font-size: .92rem; font-weight: 600; transition: background .15s, color .15s; }
.side-nav a:hover { background: rgba(31, 147, 216, .1); text-decoration: none; color: var(--c-primary-dark); }
.side-nav a.active { background: linear-gradient(135deg, var(--c-primary-2), var(--c-primary)); color: #fff; box-shadow: 0 10px 20px -10px rgba(31, 147, 216, .9); }
.side-nav .svg { font-size: 1.1rem; }
.side-foot { padding: 12px 18px 16px; border-top: 1px solid var(--c-line); font-size: .78rem; color: var(--c-muted); }

.main { margin-left: var(--side-w); min-width: 0; min-height: 100vh; display: flex; flex-direction: column; transition: margin-left .22s ease; }
.topbar { position: sticky; top: 0; z-index: 40; background: rgba(255, 255, 255, .66); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); border-bottom: 1px solid rgba(255, 255, 255, .85); box-shadow: 0 8px 24px -22px rgba(31, 100, 160, .6); }
.topbar-in { max-width: 1280px; margin: 0 auto; padding: 10px 24px; display: flex; align-items: center; gap: 12px; min-height: 62px; }
.burger { display: inline-flex; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--c-line); background: rgba(255, 255, 255, .85); cursor: pointer; align-items: center; justify-content: center; font-size: 1.2rem; flex: none; color: var(--ink); }
.burger:hover { border-color: var(--c-primary); color: var(--c-primary-dark); }
.crumb { flex: 1; min-width: 0; font-weight: 800; color: var(--ink); 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: 12px; border: 1px solid var(--c-line); background: rgba(255, 255, 255, .85); font: inherit; font-size: .85rem; max-width: 210px; }
.user-chip { display: flex; align-items: center; gap: 9px; padding: 4px 12px 4px 4px; border-radius: 999px; background: rgba(255, 255, 255, .85); border: 1px solid var(--c-line); color: var(--c-text); font-size: .85rem; font-weight: 700; }
.user-chip:hover { text-decoration: none; border-color: var(--c-primary); }
.user-chip .av { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--c-primary-2), var(--c-primary)); color: #fff; display: grid; place-items: center; font-size: .85rem; 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; font-weight: 600; padding: 6px 10px; border-radius: 10px; }
.topbar .btn-link:hover { background: rgba(31, 147, 216, .1); color: var(--c-primary-dark); }
.schoolbar { background: rgba(255, 241, 214, .85); border-bottom: 1px solid #f2dca0; font-size: .85rem; padding: 7px 16px; text-align: center; color: #6b4e00; }
.scrim { display: none; }

@media (min-width: 961px) {
    body.side-hidden .sidebar { transform: translateX(-102%); }
    body.side-hidden .main { margin-left: 0; }
}
@media (max-width: 960px) {
    .sidebar { transform: translateX(-102%); background: rgba(255, 255, 255, .9); }
    .navtoggle:checked ~ .sidebar { transform: none; box-shadow: 10px 0 44px rgba(10, 30, 50, .3); }
    .navtoggle:checked ~ .scrim { display: block; position: fixed; inset: 0; background: rgba(10, 30, 50, .42);  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; }
}

/* ---------- dashboard progres ---------- */
.prog-row { display: flex; gap: 14px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.prog-row > div:first-child { flex: 1; min-width: 0; }
.prog-bar { width: 150px; flex: none; text-align: right; }
.side-logout { display: none; padding: 0 16px 8px; }

/* ---------- layout ---------- */
.container { width: 100%; min-width: 0; 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 28px; border-radius: 22px; color: #fff; align-items: center; gap: 18px; flex-wrap: nowrap; position: relative; overflow: hidden; background:
    radial-gradient(360px 220px at 95% -30%, rgba(255, 255, 255, .38), transparent 70%),
    radial-gradient(320px 220px at 5% 140%, rgba(124, 92, 255, .45), transparent 70%),
    linear-gradient(120deg, #1f93d8 0%, #35b6f1 55%, #29c4c0 100%); box-shadow: 0 22px 40px -24px rgba(31, 147, 216, .9); border: 1px solid rgba(255, 255, 255, .5); }
.page-head.hero::after { content: ""; position: absolute; right: -40px; top: -40px; width: 180px; height: 180px; border-radius: 50%; background: rgba(255, 255, 255, .14); }
.page-head.hero h1 { color: #fff; }
.page-head.hero .sub { color: rgba(255, 255, 255, .88); }
.page-head.hero .btn { background: #fff; border-color: #fff; color: var(--c-primary-dark); box-shadow: 0 8px 18px -10px rgba(0, 0, 0, .4); position: relative; z-index: 1; }
.page-head.hero .btn:hover { background: #f0f8ff; color: var(--c-primary-dark); }
.hero-logo { flex: none; width: 76px; height: 76px; object-fit: contain; background: rgba(255, 255, 255, .95); border-radius: 20px; padding: 7px; box-shadow: 0 12px 24px -12px rgba(0, 0, 0, .5); position: relative; z-index: 1; }
@media (max-width: 560px) { .page-head.hero { flex-wrap: wrap; padding: 20px; } .hero-logo { width: 60px; height: 60px; } }

.card { background: var(--c-card);  border: 1px solid rgba(255, 255, 255, .85); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 18px; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .card, .sidebar, .topbar { background: rgba(255, 255, 255, .94); } }
.card-h { padding: 14px 18px; border-bottom: 1px solid var(--c-line); font-weight: 800; color: var(--ink); 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: rgba(230, 243, 253, .45); 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; } }
.grid > .card { margin-bottom: 0; }
.grid.mb { margin-bottom: 18px; }

/* kartu statistik berwarna */
.stat { padding: 16px 18px; margin-bottom: 0; display: flex; align-items: center; gap: 14px; }
.stat .ico { flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-size: 1.35rem; background: var(--tint); color: var(--tone); }
.stat .n { font-size: 1.9rem; font-weight: 800; color: var(--tone, 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; }
.s-blue { --tone: #1f93d8; --tint: rgba(31, 147, 216, .14); }
.s-green { --tone: #0e9f5f; --tint: rgba(18, 183, 106, .16); }
.s-purple { --tone: #7c5cff; --tint: rgba(124, 92, 255, .15); }
.s-orange { --tone: #f2711c; --tint: rgba(255, 138, 61, .17); }

/* ubin aksi cepat */
.tiles { display: grid; gap: 14px; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 18px; }
@media (max-width: 960px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 22px 12px; border-radius: 16px; font-weight: 700; color: var(--tone); background: var(--tint); border: 1px solid rgba(255, 255, 255, .8); transition: transform .15s, box-shadow .15s; text-align: center; }
.tile .svg { width: 1.9rem; height: 1.9rem; }
.tile:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 16px 28px -16px var(--tone); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-size: .9rem; font-weight: 700; padding: 8px 16px; border-radius: 12px; border: 1px solid var(--c-primary); background: linear-gradient(135deg, var(--c-primary-2), var(--c-primary)); color: #fff; cursor: pointer; line-height: 1.3; text-align: center; transition: filter .15s, box-shadow .15s, transform .05s; box-shadow: 0 10px 20px -12px rgba(31, 147, 216, .95); }
.btn:hover { filter: brightness(.95); text-decoration: none; color: #fff; }
.btn:active { transform: translateY(1px); }
.btn-outline { background: rgba(255, 255, 255, .85); color: var(--c-primary-dark); box-shadow: none; }
.btn-outline:hover { background: var(--c-primary-soft); color: var(--c-primary-dark); filter: none; }
.btn-danger { background: var(--c-danger); border-color: var(--c-danger); box-shadow: none; }
.btn-ghost { background: rgba(255, 255, 255, .6); color: var(--c-muted); border-color: var(--c-line); box-shadow: none; }
.btn-ghost:hover { background: #fff; color: var(--c-text); filter: none; }
.btn-sm { padding: 5px 11px; font-size: .82rem; border-radius: 10px; }
.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: 700; font-size: .85rem; margin-bottom: 4px; color: #2c4d68; }
.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 rgba(31, 90, 140, .22); border-radius: var(--radius-sm); background: rgba(255, 255, 255, .9); 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(31, 147, 216, .17); }
.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: rgba(255, 255, 255, .45); }
legend { font-weight: 800; font-size: .88rem; padding: 0 8px; color: var(--c-primary-dark); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; max-width: 100%; -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: rgba(230, 243, 253, .85); font-weight: 800; font-size: .82rem; color: #2d5878; position: sticky; top: 0; white-space: nowrap; }
table.t thead th:first-child { border-top-left-radius: 12px; }
table.t thead th:last-child { border-top-right-radius: 12px; }
table.t tbody tr:hover { background: rgba(31, 147, 216, .06); }
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; }
table.t td.act { width: 1%; white-space: nowrap; }
.group-row td { background: var(--c-primary-soft); font-weight: 800; color: var(--c-primary-dark); }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; align-items: center; flex-wrap: nowrap; }
.row-actions .btn, .row-actions .btn-select { height: 34px; padding-top: 0; padding-bottom: 0; white-space: nowrap; }
.row-actions .btn-select { min-width: 130px; }
.btn-select { width: auto; padding: 5px 10px; font-size: .82rem; font-weight: 700; border-radius: 10px; background: linear-gradient(135deg, var(--c-primary-2), var(--c-primary)); color: #fff; border: 1px solid var(--c-primary); cursor: pointer; }
.btn-select option { color: var(--c-text); background: #fff; }

/* ---------- dropdown cetak ---------- */
.dd { position: relative; display: inline-block; }
.dd > summary { list-style: none; cursor: pointer; }
.dd > summary::-webkit-details-marker { display: none; }
.dd .dd-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 250px; background: rgba(255, 255, 255, .92);  border: 1px solid rgba(255, 255, 255, .9); border-radius: 14px; box-shadow: 0 20px 40px -16px rgba(18, 48, 74, .4); padding: 6px; text-align: left; }
.dd .dd-menu a { display: block; padding: 9px 12px; border-radius: 9px; color: var(--c-text); font-size: .88rem; font-weight: 600; }
.dd .dd-menu a:hover { background: var(--c-primary-soft); text-decoration: none; }
.dd .dd-menu .sep { height: 1px; background: var(--c-line); margin: 4px 6px; }

/* ---------- badges / alerts ---------- */
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; background: rgba(31, 90, 140, .1); color: #3a607e; }
.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: rgba(224, 247, 236, .9); color: var(--c-ok); border-color: #b5e4c8; }
.alert-danger { background: rgba(253, 236, 234, .92); color: var(--c-danger); border-color: #f5c3bb; }
.alert-warning { background: rgba(255, 241, 214, .92); color: var(--c-warn); border-color: #f2d68e; }
.alert-info { background: rgba(230, 243, 253, .92); color: var(--c-primary-dark); border-color: #b6dbf3; }
.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: rgba(31, 147, 216, .14); border-radius: 999px; height: 8px; overflow: hidden; min-width: 90px; }
.progress > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--c-primary-2), #29c4c0); }
.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: 10px; background: rgba(255, 255, 255, .85); 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: #9bb3c6; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs a { padding: 7px 14px; border-radius: 999px; background: rgba(255, 255, 255, .75); border: 1px solid rgba(255, 255, 255, .9); color: var(--c-text); font-size: .88rem; font-weight: 700;  }
.tabs a.active { background: linear-gradient(135deg, var(--c-primary-2), var(--c-primary)); color: #fff; border-color: var(--c-primary); box-shadow: 0 10px 18px -12px rgba(31, 147, 216, .95); }
.tabs a:hover { text-decoration: none; background: var(--c-primary-soft); }
.tabs a.active:hover { filter: brightness(.95); }

/* ---------- guest pages ---------- */
.guest { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 14px; }
.guest-box { width: 100%; max-width: 430px; }
.guest-box.wide { max-width: 740px; }
.guest-box > .card { box-shadow: 0 30px 60px -30px rgba(31, 100, 160, .55); border-radius: 24px; background: rgba(255, 255, 255, .68); }
.guest-logo { text-align: center; margin-bottom: 18px; }
.guest-logo .mark { display: inline-grid; place-items: center; width: 60px; height: 60px; border-radius: 20px; background: linear-gradient(135deg, var(--c-primary-2), var(--c-primary)); color: #fff; font-size: 1.7rem; font-weight: 800; margin-bottom: 10px; box-shadow: 0 16px 26px -14px rgba(31, 147, 216, .95); }
.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; } }

/* ---------- layar sempit (HP) ---------- */
@media (max-width: 640px) {
    body { font-size: 14.5px; }
    h1 { font-size: 1.3rem; }
    .side-logout { display: block; }
    .topbar-in { flex-wrap: wrap; gap: 8px 10px; padding: 8px 12px; }
    .crumb small { display: none; }
    .topbar-right { display: contents; }
    .topbar-right form.inline-form:last-child { display: none; }
    .topbar-right form.inline-form:first-child { display: block; order: 5; flex: 1 1 100%; }
    .topbar-right select { max-width: none; width: 100%; }
    .user-chip { order: 3; }
    .page-head.hero { padding: 18px; border-radius: 18px; }
    .page-head .actions, .page-head > .btn { width: 100%; }
    .page-head .actions .btn, .page-head .actions .dd, .page-head .actions .dd > summary { flex: 1 1 auto; }
    .page-head .actions .dd { display: block; width: 100%; }
    .page-head .actions .dd > summary { display: flex; }
    .dd .dd-menu { left: 0; right: 0; min-width: 0; }
    .card-b { padding: 14px; }
    .card-h { padding: 12px 14px; }
    .tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; margin-left: -2px; -webkit-overflow-scrolling: touch; }
    .tabs a { white-space: nowrap; flex: none; padding: 7px 13px; }
    .stat { padding: 12px 14px; gap: 10px; }
    .stat .ico { width: 40px; height: 40px; font-size: 1.1rem; }
    .stat .n { font-size: 1.55rem; }
    .tiles { padding: 12px; gap: 10px; }
    .tile { padding: 16px 8px; font-size: .85rem; }
    .prog-row { flex-wrap: wrap; gap: 6px; }
    .prog-bar { width: 100%; text-align: left; display: flex; align-items: center; gap: 10px; }
    .prog-bar .progress { flex: 1; }
    .prog-bar .small { white-space: nowrap; }
    .card-f.flex, .card-b.flex { align-items: stretch; }
    .card-f .btn, .card-f .actions { width: 100%; }
    input[type=file] { max-width: 100% !important; }

    /* tabel tetap berbentuk tabel; geser ke samping bila lebih lebar dari layar */
    table.t th, table.t td { padding: 8px 8px; }
    table.t { font-size: .86rem; }
    .table-wrap { overflow-x: auto; }
    #gradeTable { font-size: .85rem; }
    #gradeTable th, #gradeTable td { padding: 8px 6px; }
    #gradeTable .w-num { width: 70px; }
    #gradeTable td:last-child input { min-width: 170px; }
    #gradeTable td:nth-child(2) { min-width: 120px; }
}

@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; background: #fff; }
}

/* ---------- performa ---------- */
html { -webkit-tap-highlight-color: transparent; }
a, button, input, select, textarea, label, summary { touch-action: manipulation; }
@media (max-width: 960px) {
    .sidebar, .topbar { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(255, 255, 255, .97); }
    .card, .tile, .stat { box-shadow: 0 6px 16px -14px rgba(31, 100, 160, .5); }
    html { scroll-behavior: auto; }
}
@media print { body::before { display: none; } }
