:root {
    --bg: #f4f7fb;
    --panel: #ffffff;
    --text: #162033;
    --muted: #697386;
    --line: #dfe5ee;
    --primary: #1f5eff;
    --primary-dark: #1548c7;
    --danger-bg: #fff1f1;
    --danger-text: #a32020;
    --success-bg: #edf9f0;
    --success-text: #1b6c35;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}

.container {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.topbar {
    background: var(--panel);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 10;
}

.topbar-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    font-weight: 800;
    letter-spacing: -0.02em;
}

.school {
    color: var(--muted);
    font-size: 13px;
}

.userbox {
    display: flex;
    align-items: center;
    gap: 14px;
    text-align: right;
}

.userbox span {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.main {
    padding: 32px 0 48px;
    min-height: calc(100vh - 130px);
}

.footer {
    color: var(--muted);
    font-size: 13px;
    border-top: 1px solid var(--line);
    padding: 20px 0;
    background: var(--panel);
}

.hero {
    background: linear-gradient(135deg, #ffffff, #eef4ff);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 28px;
    margin-bottom: 20px;
}

.hero h1 {
    margin: 4px 0 8px;
    font-size: clamp(28px, 5vw, 42px);
    letter-spacing: -0.04em;
}

.hero p {
    margin: 0;
    color: var(--muted);
}

.eyebrow {
    margin: 0;
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .12em;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 22px;
    margin-bottom: 16px;
}

.card h2,
.card h3 {
    margin-top: 0;
}

.metric {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.card p {
    color: var(--muted);
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    appearance: none;
    border: 1px solid transparent;
    border-radius: 11px;
    background: var(--primary);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    min-height: 42px;
    padding: 10px 16px;
    cursor: pointer;
}

.btn:hover { background: var(--primary-dark); }

.btn-outline {
    background: transparent;
    color: var(--text);
    border-color: var(--line);
}

.btn-outline:hover { background: #f1f4f8; }

.btn-secondary { background: #26344d; }

.btn-block {
    width: 100%;
    margin-top: 8px;
}

.auth-wrap {
    min-height: 65vh;
    display: grid;
    place-items: center;
}

.auth-card {
    width: min(460px, 100%);
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 18px 45px rgba(25, 35, 55, .08);
}

.auth-head { margin-bottom: 22px; }

.auth-head h1 { margin: 4px 0 6px; }

.auth-head p {
    margin: 0;
    color: var(--muted);
}

label {
    display: block;
    margin: 14px 0 7px;
    font-weight: 700;
    font-size: 14px;
}

input {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 11px;
    padding: 10px 12px;
    font: inherit;
    color: var(--text);
    background: #fff;
}

input:focus {
    outline: 3px solid rgba(31, 94, 255, .14);
    border-color: var(--primary);
}

.alert {
    border-radius: 11px;
    padding: 12px 14px;
    margin: 12px 0;
    font-size: 14px;
}

.alert-danger {
    background: var(--danger-bg);
    color: var(--danger-text);
}

.alert-success {
    background: var(--success-bg);
    color: var(--success-text);
}

@media (max-width: 760px) {
    .container {
        width: min(100% - 22px, 1120px);
    }

    .topbar-inner { min-height: 64px; }

    .userbox { gap: 8px; }

    .userbox > div { display: none; }

    .main { padding-top: 20px; }

    .grid { grid-template-columns: 1fr; }

    .hero,
    .card,
    .auth-card {
        border-radius: 15px;
    }

    .hero,
    .card {
        padding: 20px;
    }

    .auth-card { padding: 22px; }
}


/* =========================================================
   V2 MASTER DATA
   ========================================================= */

.master-nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.master-nav a {
    text-decoration: none;
    color: var(--text);
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 700;
}

.master-nav a:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.compact-hero {
    padding-top: 22px;
    padding-bottom: 22px;
}

.master-grid .card-link {
    color: inherit;
    text-decoration: none;
    transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.master-grid .card-link:hover {
    transform: translateY(-2px);
    border-color: #b9c9f7;
    box-shadow: 0 12px 30px rgba(25, 35, 55, .07);
}

.page-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    margin-bottom: 14px;
}

.page-head h1 {
    margin: 3px 0 0;
    font-size: 30px;
    letter-spacing: -0.03em;
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(320px, .85fr) minmax(0, 1.7fr);
    gap: 18px;
    align-items: start;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.form-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

select,
input[type="search"] {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 11px;
    padding: 10px 12px;
    font: inherit;
    color: var(--text);
    background: #fff;
}

select:focus,
input[type="search"]:focus {
    outline: 3px solid rgba(31, 94, 255, .14);
    border-color: var(--primary);
}

small {
    color: var(--muted);
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

button:disabled {
    cursor: not-allowed;
    opacity: .55;
}

.table-wrap {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 680px;
}

.data-table th,
.data-table td {
    border-bottom: 1px solid var(--line);
    text-align: left;
    padding: 12px 10px;
    vertical-align: top;
    font-size: 14px;
}

.data-table th {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
    background: #f8fafc;
}

.data-table tr:last-child td {
    border-bottom: 0;
}

.text-right {
    text-align: right !important;
}

.table-actions {
    white-space: nowrap;
}

.table-actions form {
    display: inline-block;
    margin-left: 5px;
}

.btn-small {
    min-height: 34px;
    padding: 6px 10px;
    border-radius: 9px;
    font-size: 12px;
}

.btn-danger {
    background: #b42318;
}

.btn-danger:hover {
    background: #8f1c13;
}

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.badge-success {
    color: #176b34;
    background: #eaf8ee;
}

.badge-muted {
    color: #596579;
    background: #eef1f5;
}

.empty-state {
    color: var(--muted);
    text-align: center !important;
    padding: 28px !important;
}

.account-box {
    margin-top: 18px;
    padding: 16px;
    border-radius: 14px;
    border: 1px dashed #bdc9d9;
    background: #f8fafc;
}

.account-box h3 {
    margin: 0 0 4px;
}

.account-box p {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 13px;
}

.muted {
    color: var(--muted);
    font-weight: 400;
}

.section-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: end;
    margin-bottom: 14px;
}

.section-toolbar h2 {
    margin-bottom: 2px;
}

.section-toolbar p {
    margin: 0;
}

.filter-form {
    display: grid;
    grid-template-columns: minmax(200px, 1.5fr) minmax(140px, .8fr) minmax(140px, .8fr) auto;
    gap: 8px;
    align-items: end;
    flex: 1;
    max-width: 760px;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 16px;
}

.pagination a {
    min-width: 36px;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border: 1px solid var(--line);
    border-radius: 9px;
    color: var(--text);
    background: var(--panel);
}

.pagination a.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.info-box {
    border: 1px solid #c9d5e7;
    background: #f4f8ff;
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 16px;
    color: #384760;
}

@media (max-width: 900px) {
    .split-layout {
        grid-template-columns: 1fr;
    }

    .form-grid-3 {
        grid-template-columns: 1fr 1fr;
    }

    .section-toolbar {
        display: block;
    }

    .filter-form {
        max-width: none;
        margin-top: 12px;
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 620px) {
    .form-grid,
    .form-grid-3 {
        grid-template-columns: 1fr;
    }

    .filter-form {
        grid-template-columns: 1fr;
    }

    .master-nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 5px;
    }

    .master-nav a {
        white-space: nowrap;
    }
}


/* =========================================================
   V3 KEANGGOTAAN
   ========================================================= */

.period-filter {
    display: grid;
    grid-template-columns: minmax(260px, 420px) auto;
    gap: 10px;
    align-items: end;
}

.v3-selector {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.selection-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.selection-summary > div {
    min-width: 180px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 11px 14px;
}

.selection-summary span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 2px;
}

.selection-summary strong {
    display: block;
    font-size: 14px;
}

.v3-action-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.metric-sm {
    font-size: 24px;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 16px 0 8px;
}

.checkbox-row input {
    width: 18px;
    height: 18px;
    min-height: 0;
    flex: 0 0 auto;
}

.badge-primary {
    color: #174ea6;
    background: #e8f0fe;
}

.v3-candidate-filter {
    grid-template-columns: minmax(180px, .8fr) minmax(220px, 1.4fr) auto;
    max-width: 760px;
}

.candidate-toolbar {
    margin: 16px 0 8px;
    color: var(--muted);
    font-size: 13px;
}

.candidate-toolbar p {
    margin: 0;
}

.checkbox-cell {
    width: 44px;
    text-align: center !important;
}

.checkbox-cell input {
    width: 17px;
    height: 17px;
    min-height: 0;
}

.bulk-date-row {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}

.bulk-date-row > div {
    min-width: 220px;
}

.bulk-class-box {
    margin-top: 18px;
    padding: 16px;
    border: 1px dashed #bdc9d9;
    border-radius: 14px;
    background: #f8fafc;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
    gap: 20px;
    align-items: end;
}

.bulk-class-box p {
    color: var(--muted);
    margin: 5px 0 0;
    font-size: 13px;
}

.bulk-class-box form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: end;
}

.bulk-class-box form label {
    grid-column: 1 / -1;
    margin-top: 0;
}

.assignment-card {
    margin: 0;
}

.assignment-card-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: start;
}

.assignment-card-head h3 {
    margin: 3px 0 0;
    font-size: 22px;
}

.mini-details {
    margin: 18px 0 0;
    display: grid;
    gap: 10px;
}

.mini-details div {
    border-top: 1px solid var(--line);
    padding-top: 9px;
}

.mini-details dt {
    color: var(--muted);
    font-size: 12px;
}

.mini-details dd {
    margin: 2px 0 0;
    font-weight: 700;
}

.v3-empty-card {
    grid-column: 1 / -1;
    border: 1px dashed var(--line);
    border-radius: 14px;
    background: #f8fafc;
}

@media (max-width: 900px) {
    .v3-selector {
        grid-template-columns: 1fr 1fr;
    }

    .v3-selector .btn {
        grid-column: 1 / -1;
    }

    .v3-action-grid {
        grid-template-columns: 1fr;
    }

    .bulk-class-box {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .period-filter,
    .v3-selector,
    .v3-candidate-filter {
        grid-template-columns: 1fr;
    }

    .v3-selector .btn {
        grid-column: auto;
    }

    .bulk-date-row {
        display: grid;
        grid-template-columns: 1fr;
    }

    .bulk-date-row > div {
        min-width: 0;
    }

    .bulk-class-box form {
        grid-template-columns: 1fr;
    }

    .assignment-card-head {
        display: block;
    }

    .assignment-card-head .badge {
        margin-top: 10px;
    }
}


/* =========================================================
   V4 JADWAL
   ========================================================= */

.schedule-note {
    margin-top: 18px;
}

.schedule-filter {
    grid-template-columns: minmax(180px, 1fr) auto;
    max-width: 420px;
}

.schedule-exception-table {
    margin-top: 18px;
}

@media (max-width: 620px) {
    .schedule-filter {
        grid-template-columns: 1fr;
        max-width: none;
    }
}


/* =========================================================
   V5 SESI KEGIATAN
   ========================================================= */

.session-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.session-summary-grid > div {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 14px;
    background: #f8fafc;
}

.session-summary-grid span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 4px;
}

.session-summary-grid strong {
    display: block;
    font-size: 26px;
}

.session-filter-grid {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) 160px 160px minmax(180px, 1fr) 160px auto;
    gap: 10px;
    align-items: end;
}

.session-filter-action {
    display: flex;
    align-items: end;
}

.session-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(320px, .7fr);
    gap: 18px;
    margin-bottom: 18px;
}

.session-detail-list {
    display: grid;
    gap: 0;
    margin: 0;
}

.session-detail-list > div {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.session-detail-list dt {
    color: var(--muted);
    font-size: 13px;
}

.session-detail-list dd {
    margin: 0;
    font-weight: 600;
}

.session-control-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

@media (max-width: 1050px) {
    .session-filter-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .session-filter-action {
        grid-column: 1 / -1;
    }
}

@media (max-width: 820px) {
    .session-detail-grid {
        grid-template-columns: 1fr;
    }

    .session-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .session-filter-grid,
    .session-summary-grid {
        grid-template-columns: 1fr;
    }

    .session-detail-list > div {
        grid-template-columns: 1fr;
        gap: 3px;
    }

    .session-control-actions {
        display: grid;
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   V6 QR CODE + RADIUS
   ========================================================= */

.v6-grid-top {
    margin-top: 18px;
}

.v6-small-metric {
    font-size: 16px !important;
    line-height: 1.35;
}

.v6-wrap-actions {
    flex-wrap: wrap;
}

.v6-inline-message {
    margin-top: 10px;
    min-height: 22px;
    font-size: 13px;
    color: var(--muted);
}

.v6-message-success {
    color: #166534;
}

.v6-message-error {
    color: #991b1b;
}

.v6-token-meta {
    display: grid;
    gap: 4px;
    margin: 16px 0;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f8fafc;
}

.v6-token-meta small {
    color: var(--muted);
}

.v6-qr-box {
    display: grid;
    justify-items: center;
    gap: 10px;
    padding: 18px;
    margin-top: 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
}

.v6-qr-box #qrcode {
    background: #fff;
    padding: 12px;
    border-radius: 12px;
}

.v6-qr-box canvas,
.v6-qr-box img {
    max-width: 100%;
    height: auto !important;
}

.v6-qr-title {
    margin: 0;
    font-weight: 800;
}

.v6-url-box {
    width: 100%;
    padding: 10px;
    border-radius: 10px;
    background: #f1f5f9;
    overflow-wrap: anywhere;
    font-size: 12px;
}

.v6-revoke-form {
    margin-top: 14px;
}

.v6-test-form {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 12px;
    align-items: end;
}

.v6-test-button {
    display: flex;
    align-items: end;
}

.v6-validation-success {
    border-width: 2px;
}

.v6-secure-warning {
    margin: 14px 0;
}

.v6-overview-filter {
    grid-template-columns: minmax(220px, 1fr) 180px 180px auto;
}

@media (max-width: 820px) {
    .v6-test-form,
    .v6-overview-filter {
        grid-template-columns: 1fr;
    }

    .v6-test-button {
        display: block;
    }
}


/* =========================================================
   V6.1 — IN-APP QR SCANNER SISWA
   ========================================================= */

.v61-scanner-card {
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
}

.v61-camera-shell {
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 3 / 4;
    max-height: 620px;
    margin: 18px 0;
    border-radius: 20px;
    background: #0f172a;
}

.v61-camera-video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #0f172a;
}

.v61-scan-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    pointer-events: none;
    background:
        linear-gradient(
            rgba(15, 23, 42, .35),
            rgba(15, 23, 42, .35)
        );
}

.v61-scan-frame {
    position: relative;
    width: min(68vw, 330px);
    aspect-ratio: 1 / 1;
    border: 3px solid rgba(255,255,255,.95);
    border-radius: 22px;
    box-shadow:
        0 0 0 9999px rgba(15, 23, 42, .28),
        0 0 28px rgba(255,255,255,.20);
}

.v61-scan-frame::after {
    content: "";
    position: absolute;
    left: 10%;
    right: 10%;
    top: 50%;
    height: 2px;
    background: rgba(255,255,255,.95);
    box-shadow: 0 0 12px rgba(255,255,255,.75);
}

.v61-camera-placeholder {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 30px;
    color: #fff;
    text-align: center;
    background: #0f172a;
    z-index: 3;
}

.v61-hidden-canvas {
    display: none;
}

.v61-scanner-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.v61-flow {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.v61-flow span {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f8fafc;
    font-size: 13px;
    font-weight: 700;
}

@media (max-width: 620px) {
    .v61-camera-shell {
        aspect-ratio: 3 / 4;
        border-radius: 14px;
    }

    .v61-scanner-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .v61-scanner-actions .btn {
        width: 100%;
    }

    .v61-flow {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   V6.2 — MASTER LOKASI + AUTO GEOFENCE
   ========================================================= */

.v62-check-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 14px 0;
    font-weight: 700;
}

.v62-check-label input {
    width: auto;
    margin: 0;
}

.v62-rule-flow {
    display: grid;
    gap: 10px;
}

.v62-rule-flow > div {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f8fafc;
}

.v62-rule-flow span {
    color: var(--muted);
    font-size: 13px;
}

.v62-extra-location-form {
    display: flex;
    gap: 8px;
    min-width: 320px;
    align-items: center;
}

.v62-extra-location-form select {
    min-width: 220px;
}

.v62-geofence-source {
    display: grid;
    gap: 3px;
    margin: 12px 0 16px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f8fafc;
}

.v62-geofence-source span,
.v62-geofence-source small {
    color: var(--muted);
    font-size: 12px;
}

.v62-geofence-source strong {
    font-size: 15px;
}

.v62-master-apply {
    margin: 14px 0;
}

.v62-master-apply-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: end;
}

.v62-manual-details {
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}

.v62-manual-details summary {
    cursor: pointer;
    font-weight: 800;
}

.v62-manual-details[open] summary {
    margin-bottom: 14px;
}

@media (max-width: 720px) {
    .v62-extra-location-form,
    .v62-master-apply-row {
        display: grid;
        grid-template-columns: 1fr;
        min-width: 0;
    }

    .v62-extra-location-form select {
        min-width: 0;
        width: 100%;
    }
}


/* =========================================================
   V7 — PRESENSI
   ========================================================= */

.v7-summary-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px;
    margin: 18px 0;
}

.v7-summary-grid > div {
    display: grid;
    gap: 3px;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f8fafc;
}

.v7-summary-grid span {
    color: var(--muted);
    font-size: 12px;
}

.v7-summary-grid strong {
    font-size: 24px;
}

.v7-student-summary {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.v7-presence-success {
    border-width: 2px;
}

.v7-presence-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 170px;
    margin: 6px 0 18px;
    padding: 13px 18px;
    border-radius: 14px;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: .04em;
    background: #f1f5f9;
}

.v7-status-hadir {
    background: #dcfce7;
    color: #166534;
}

.v7-status-terlambat {
    background: #fef3c7;
    color: #92400e;
}

.v7-manual-form {
    display: grid;
    grid-template-columns: minmax(130px, .65fr) minmax(180px, .9fr) minmax(220px, 1.3fr) auto;
    gap: 7px;
    align-items: center;
    min-width: 760px;
}

.v7-manual-form select,
.v7-manual-form input {
    margin: 0;
}

.v7-presence-table th,
.v7-presence-table td {
    vertical-align: top;
}

.v7-overview-filter {
    grid-template-columns: minmax(220px, 1fr) 170px 170px minmax(200px, 1fr) auto;
}

@media (max-width: 1100px) {
    .v7-summary-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .v7-overview-filter {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .v7-overview-filter .session-filter-action {
        grid-column: 1 / -1;
    }
}

@media (max-width: 680px) {
    .v7-summary-grid,
    .v7-student-summary,
    .v7-overview-filter {
        grid-template-columns: 1fr 1fr;
    }

    .v7-summary-grid strong {
        font-size: 20px;
    }

    .v7-overview-filter .session-filter-action {
        grid-column: 1 / -1;
    }
}


/* =========================================================
   V7.1 — INPUT IZIN / SAKIT PEMBINA
   ========================================================= */

.v71-session-filter {
    display: grid;
    grid-template-columns: 170px 170px minmax(320px, 1fr) auto;
    gap: 10px;
    align-items: end;
}

.v71-selected-session {
    border-width: 2px;
}

.v71-mini-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.v71-mini-summary span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #f8fafc;
    font-size: 13px;
}

.v71-mini-summary strong {
    font-size: 16px;
}

.v71-absence-form {
    display: grid;
    grid-template-columns: 120px minmax(240px, 1fr) auto;
    gap: 8px;
    align-items: center;
    min-width: 520px;
}

.v71-absence-form select,
.v71-absence-form input {
    margin: 0;
}

@media (max-width: 900px) {
    .v71-session-filter {
        grid-template-columns: 1fr 1fr;
    }

    .v71-session-filter > :nth-child(3),
    .v71-session-filter .session-filter-action {
        grid-column: 1 / -1;
    }
}

@media (max-width: 620px) {
    .v71-session-filter {
        grid-template-columns: 1fr;
    }

    .v71-session-filter > :nth-child(3),
    .v71-session-filter .session-filter-action {
        grid-column: auto;
    }
}


/* =========================================================
   V8 — JURNAL KEGIATAN
   ========================================================= */

.v8-journal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
}

.v8-journal-form {
    display: grid;
    gap: 18px;
}

.v8-journal-form textarea {
    min-height: 110px;
    resize: vertical;
}

.v8-journal-form .actions {
    padding-top: 4px;
}

@media (max-width: 700px) {
    .v8-journal-header {
        flex-direction: column;
        align-items: flex-start;
    }
}


/* =========================================================
   V9 — MONITORING
   ========================================================= */

.monitor-list {
    display: grid;
    gap: 10px;
}

.monitor-list > div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(127, 127, 127, 0.18);
}

.monitor-list > div:last-child {
    border-bottom: 0;
}

.monitor-list strong {
    font-size: 1.05rem;
}

@media (max-width: 700px) {
    .monitor-list > div {
        padding: 8px 0;
    }
}


/* =========================================================
   V10 — LAPORAN
   ========================================================= */

.report-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin: 22px 0;
}

.report-title {
    text-align: center;
    margin-bottom: 26px;
}

.report-title h1 {
    margin-bottom: 6px;
}

.report-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.report-summary > div {
    border: 1px solid rgba(127, 127, 127, 0.22);
    border-radius: 10px;
    padding: 14px;
    text-align: center;
}

.report-summary strong,
.report-summary span {
    display: block;
}

.report-summary strong {
    font-size: 1.25rem;
    margin-bottom: 4px;
}

.report-footer {
    margin-top: 28px;
    text-align: right;
    font-size: 0.85rem;
}

.print-table {
    width: 100%;
    border-collapse: collapse;
}

.print-table th,
.print-table td {
    border: 1px solid #777;
    padding: 7px 8px;
    text-align: left;
    vertical-align: top;
}

.print-table th {
    font-weight: 700;
}

.report-print-page {
    background: #fff;
}

.report-paper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
    background: #fff;
}

@media (max-width: 800px) {
    .report-heading {
        flex-direction: column;
        align-items: flex-start;
    }

    .report-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media print {
    .no-print,
    nav,
    .sidebar,
    header.site-header,
    footer.site-footer {
        display: none !important;
    }

    body,
    .report-print-page {
        background: #fff !important;
    }

    .report-paper {
        max-width: none;
        padding: 0;
    }

    .print-table {
        font-size: 9pt;
    }

    .print-table th,
    .print-table td {
        padding: 5px 6px;
    }
}

/* =========================================================
   V10.6 — PROFESSIONAL OFFICIAL REPORT
   ========================================================= */

.report-v106 {
    width: 210mm;
    max-width: 210mm;
    box-sizing: border-box;
    margin: 0 auto;
    padding: 10mm 11mm 12mm;
    background: #fff;
    color: #111827;
    font-family: Arial, Helvetica, sans-serif;
}

.official-letterhead {
    width: 100%;
    margin: 0 0 7mm;
    padding: 0 0 3mm;
    border-bottom: 1.5px solid #4b5563;
}

.official-letterhead img {
    display: block;
    width: 100%;
    height: auto;
}

.official-title {
    text-align: center;
    margin: 4mm 0 5mm;
}

.official-title h1 {
    margin: 0;
    font-size: 15pt;
    line-height: 1.25;
    letter-spacing: .3px;
    font-weight: 800;
}

.official-title p {
    margin: 1.5mm 0 0;
    font-size: 8.5pt;
    font-weight: 700;
    letter-spacing: .35px;
}

.report-meta-table {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: 1px solid #9ca3af;
    margin-bottom: 6mm;
}

.report-meta-table .meta-item {
    padding: 2.5mm 3mm;
    border-bottom: 1px solid #d1d5db;
}

.report-meta-table .meta-item:nth-child(odd) {
    border-right: 1px solid #d1d5db;
}

.report-meta-table .meta-item:nth-last-child(-n+2) {
    border-bottom: 0;
}

.report-meta-table span,
.report-meta-table strong {
    display: block;
}

.report-meta-table span {
    color: #4b5563;
    font-size: 7.5pt;
    margin-bottom: 1mm;
}

.report-meta-table strong {
    font-size: 8.5pt;
}

.report-section {
    margin: 0 0 5.5mm;
    break-inside: avoid;
}

.report-section h2 {
    margin: 0 0 2.5mm;
    padding-bottom: 1.5mm;
    border-bottom: 1.2px solid #1f2937;
    font-size: 9.5pt;
    line-height: 1.2;
    letter-spacing: .25px;
}

.report-summary-v106 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2.5mm;
}

.report-summary-v106 > div {
    border: 1px solid #9ca3af;
    padding: 3mm 2mm;
    text-align: center;
    min-height: 16mm;
    box-sizing: border-box;
}

.report-summary-v106 strong,
.report-summary-v106 span {
    display: block;
}

.report-summary-v106 strong {
    font-size: 14pt;
    line-height: 1.1;
    margin-bottom: 1mm;
}

.report-summary-v106 span {
    font-size: 7.5pt;
    color: #374151;
}

.report-v106 .print-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 7.4pt;
}

.report-v106 .print-table th,
.report-v106 .print-table td {
    border: 1px solid #9ca3af;
    padding: 1.7mm 1.5mm;
    vertical-align: middle;
    line-height: 1.25;
}

.report-v106 .print-table th {
    background: #f3f4f6;
    color: #111827;
    font-weight: 800;
    text-align: center;
}

.report-v106 .print-table tbody tr:nth-child(even) td {
    background: #fafafa;
}

.report-v106 .center {
    text-align: center !important;
}

.report-v106 .right {
    text-align: right !important;
}

.report-v106 .small-text {
    font-size: 6.8pt;
    color: #4b5563;
}

.report-v106 .table-note {
    margin: 1.5mm 0 0;
    font-size: 6.8pt;
    color: #4b5563;
}

.report-v106 .students-table th:nth-child(1),
.report-v106 .students-table td:nth-child(1) { width: 6%; }
.report-v106 .students-table th:nth-child(2),
.report-v106 .students-table td:nth-child(2) { width: 12%; }
.report-v106 .students-table th:nth-child(3),
.report-v106 .students-table td:nth-child(3) { width: 27%; }
.report-v106 .students-table th:nth-child(4),
.report-v106 .students-table td:nth-child(4) { width: 7%; }
.report-v106 .students-table th:nth-child(5),
.report-v106 .students-table td:nth-child(5),
.report-v106 .students-table th:nth-child(6),
.report-v106 .students-table td:nth-child(6),
.report-v106 .students-table th:nth-child(7),
.report-v106 .students-table td:nth-child(7),
.report-v106 .students-table th:nth-child(8),
.report-v106 .students-table td:nth-child(8),
.report-v106 .students-table th:nth-child(9),
.report-v106 .students-table td:nth-child(9) { width: 5%; }
.report-v106 .students-table th:nth-child(10),
.report-v106 .students-table td:nth-child(10) { width: 11%; }

.report-v106 .sessions-table th:nth-child(1),
.report-v106 .sessions-table td:nth-child(1) { width: 5%; }
.report-v106 .sessions-table th:nth-child(2),
.report-v106 .sessions-table td:nth-child(2) { width: 19%; }
.report-v106 .sessions-table th:nth-child(3),
.report-v106 .sessions-table td:nth-child(3) { width: 18%; }
.report-v106 .sessions-table th:nth-child(4),
.report-v106 .sessions-table td:nth-child(4) { width: 18%; }
.report-v106 .sessions-table th:nth-child(5),
.report-v106 .sessions-table td:nth-child(5) { width: 12%; }
.report-v106 .sessions-table th:nth-child(6),
.report-v106 .sessions-table td:nth-child(6) { width: 17%; }
.report-v106 .sessions-table th:nth-child(7),
.report-v106 .sessions-table td:nth-child(7) { width: 11%; }

.report-v106 .report-attendance-table th,
.report-v106 .report-attendance-table td {
    text-align: center;
}

.report-v106 .report-attendance-table td {
    font-size: 11pt;
    font-weight: 800;
    padding: 2.5mm;
}

.report-monitoring .print-table td {
    width: 25%;
}

.signature-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-top: 8mm;
    break-inside: avoid;
}

.signature-column {
    text-align: center;
    font-size: 8.5pt;
}

.signature-column p {
    margin: 0 0 1.5mm;
}

.signature-space {
    height: 18mm;
}

.signature-line {
    margin-bottom: 1mm !important;
}

.official-footer {
    display: flex;
    justify-content: space-between;
    gap: 8mm;
    margin-top: 7mm;
    padding-top: 2mm;
    border-top: 1px solid #d1d5db;
    font-size: 6.8pt;
    color: #6b7280;
}

@media screen {
    .report-print-page {
        margin: 0;
        background: #eef1f5;
    }

    .report-v106 {
        margin: 20px auto;
        box-shadow: 0 5px 24px rgba(0,0,0,.08);
    }
}

@media print {
    @page {
        size: A4 portrait;
        margin: 8mm;
    }

    html,
    body {
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
    }

    .report-v106 {
        width: auto;
        max-width: none;
        margin: 0;
        padding: 0;
        box-shadow: none;
    }

    .official-letterhead,
    .official-title,
    .report-meta-table,
    .report-section,
    .signature-block {
        break-inside: avoid;
    }

    .print-table {
        page-break-inside: auto;
    }

    .print-table tr {
        page-break-inside: avoid;
        break-inside: avoid;
    }

    .print-table thead {
        display: table-header-group;
    }

    .print-table tfoot {
        display: table-footer-group;
    }

    .official-footer {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        background: #fff;
    }
}


/* V10.7 — per-extracurricular reporting */
.report-actions-v107 { display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
.report-extra-overview-v107 { margin-bottom: 18px; }
.extra-report-name-v107 { margin: 8px 0 0; font-size: 18px; letter-spacing: .4px; }
.report-page-break-v107 { page-break-before: always; break-before: page; }
.report-v107-extra { page-break-after: always; break-after: page; }
.report-v107-extra:last-of-type { page-break-after: auto; break-after: auto; }
@media print {
    .report-actions-v107, .no-print { display:none !important; }
    .report-page-break-v107 { page-break-before: always !important; break-before: page !important; }
    .report-v107-extra { page-break-after: always; break-after: page; }
    .report-v107-extra:last-of-type { page-break-after: auto; break-after: auto; }
}

/* =========================================================
   V1.9 PROFESSIONAL APP SHELL — SIDEBAR + RESPONSIVE DRAWER
   ========================================================= */

.has-app-shell {
    --sidebar-width: 276px;
    --shell-bg: #f5f7fb;
    --sidebar-bg: #0f172a;
    --sidebar-bg-soft: #17213a;
    --sidebar-text: #dbe5f3;
    --sidebar-muted: #8290a8;
    --sidebar-active: #2563eb;
    --workspace-topbar-height: 74px;
    background: var(--shell-bg);
    min-height: 100vh;
    min-height: 100dvh;
}

.has-app-shell,
.has-app-shell button,
.has-app-shell input,
.has-app-shell select,
.has-app-shell textarea {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.app-shell {
    min-height: 100vh;
    width: 100%;
}

.app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 60;
    width: var(--sidebar-width);
    height: var(--app-mobile-viewport-height, 100vh);
    height: var(--app-mobile-viewport-height, 100dvh);
    max-height: var(--app-mobile-viewport-height, 100dvh);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: var(--sidebar-text);
    background:
        radial-gradient(circle at 20% 0%, rgba(37, 99, 235, .22), transparent 34%),
        linear-gradient(180deg, #111a2f 0%, var(--sidebar-bg) 54%, #0b1221 100%);
    border-right: 1px solid rgba(255,255,255,.06);
    box-shadow: 12px 0 35px rgba(15, 23, 42, .08);
}

.sidebar-brand {
    flex: 0 0 auto;
    min-height: 88px;
    padding: 18px 17px 15px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.sidebar-brand-link {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    text-decoration: none;
}

.sidebar-logo {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: inline-grid;
    place-items: center;
    border-radius: 13px;
    color: #fff;
    font-size: 19px;
    font-weight: 900;
    background: linear-gradient(145deg, #3b82f6, #1d4ed8);
    box-shadow: 0 8px 22px rgba(37, 99, 235, .32);
}

.sidebar-brand-copy {
    min-width: 0;
    display: block;
}

.sidebar-brand-copy strong,
.sidebar-brand-copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-brand-copy strong {
    font-size: 15px;
    line-height: 1.25;
    letter-spacing: -.01em;
}

.sidebar-brand-copy small {
    margin-top: 3px;
    color: #93a4bf;
    font-size: 11px;
    font-weight: 500;
}

.sidebar-close {
    display: none;
    appearance: none;
    border: 0;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(255,255,255,.07);
    color: #fff;
    font-size: 27px;
    line-height: 1;
    cursor: pointer;
}

.sidebar-nav {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 15px 12px 18px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.18) transparent;
}

.sidebar-nav::-webkit-scrollbar { width: 6px; }
.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,.16);
    border-radius: 999px;
}

.sidebar-section + .sidebar-section {
    margin-top: 18px;
}

.sidebar-section-account {
    padding-top: 4px;
}

.sidebar-section-label {
    padding: 0 12px 7px;
    color: var(--sidebar-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.sidebar-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 43px;
    margin: 3px 0;
    padding: 9px 11px;
    border-radius: 11px;
    color: #b9c6d9;
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 650;
    transition: background .16s ease, color .16s ease, transform .16s ease;
}

.sidebar-link:hover {
    color: #fff;
    background: rgba(255,255,255,.07);
    transform: translateX(2px);
}

.sidebar-link:focus-visible,
.sidebar-logout:focus-visible,
.sidebar-toggle:focus-visible,
.sidebar-close:focus-visible {
    outline: 3px solid rgba(96, 165, 250, .45);
    outline-offset: 2px;
}

.sidebar-link.is-active {
    color: #fff;
    background: linear-gradient(90deg, rgba(37,99,235,.95), rgba(37,99,235,.72));
    box-shadow: 0 8px 22px rgba(37, 99, 235, .2);
}

.sidebar-link.is-active::before {
    content: "";
    position: absolute;
    left: -12px;
    top: 10px;
    bottom: 10px;
    width: 3px;
    border-radius: 0 4px 4px 0;
    background: #93c5fd;
}

.sidebar-icon {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    display: inline-grid;
    place-items: center;
    color: currentColor;
}

.sidebar-icon svg,
.sidebar-logout svg {
    width: 20px;
    height: 20px;
    display: block;
    fill: currentColor;
}

.sidebar-user {
    flex: 0 0 auto;
    margin: 0 12px 14px;
    padding: 12px;
    min-height: 66px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 14px;
    background: rgba(255,255,255,.055);
}

.sidebar-avatar,
.workspace-avatar {
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    font-weight: 850;
    text-transform: uppercase;
}

.sidebar-avatar {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    color: #dbeafe;
    background: rgba(59,130,246,.24);
    border: 1px solid rgba(147,197,253,.18);
}

.sidebar-user-copy {
    min-width: 0;
    flex: 1;
}

.sidebar-user-copy strong,
.sidebar-user-copy span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-user-copy strong {
    color: #fff;
    font-size: 12.5px;
}

.sidebar-user-copy span {
    margin-top: 2px;
    color: #8fa0b9;
    font-size: 10.5px;
}

.sidebar-logout-form {
    margin: 0;
}

.sidebar-logout {
    appearance: none;
    border: 0;
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    border-radius: 10px;
    color: #aab7ca;
    background: transparent;
    cursor: pointer;
    transition: color .15s ease, background .15s ease;
}

.sidebar-logout:hover {
    color: #fecaca;
    background: rgba(239,68,68,.12);
}

.sidebar-backdrop {
    display: none;
}

.app-workspace {
    width: calc(100% - var(--sidebar-width));
    min-height: 100vh;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.workspace-topbar {
    position: sticky;
    top: 0;
    z-index: 35;
    height: var(--workspace-topbar-height);
    flex: 0 0 var(--workspace-topbar-height);
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 28px;
    border-bottom: 1px solid #e4e9f1;
    background: rgba(255,255,255,.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.sidebar-toggle {
    display: none;
    appearance: none;
    border: 1px solid #e2e8f0;
    width: 43px;
    height: 43px;
    padding: 10px;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .04);
}

.sidebar-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    margin: 4px 0;
    border-radius: 999px;
    background: #273449;
}

.workspace-heading {
    min-width: 0;
    flex: 1;
}

.workspace-heading > span,
.workspace-heading > strong {
    display: block;
}

.workspace-kicker {
    color: #8894a7;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.workspace-heading > strong {
    margin-top: 2px;
    color: #142033;
    font-size: 16px;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workspace-user-compact {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.workspace-avatar {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    color: #1d4ed8;
    background: #eaf1ff;
    border: 1px solid #d7e4ff;
}

.workspace-user-compact > div {
    min-width: 0;
}

.workspace-user-compact strong,
.workspace-user-compact small {
    display: block;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workspace-user-compact strong {
    color: #26344a;
    font-size: 12.5px;
}

.workspace-user-compact small {
    margin-top: 1px;
    color: #8995a7;
    font-size: 10.5px;
}

.has-app-shell .app-main {
    width: 100%;
    max-width: 1580px;
    min-height: calc(100vh - var(--workspace-topbar-height) - 48px);
    margin: 0 auto;
    padding: 26px 28px 38px;
    flex: 1 0 auto;
}

.app-footer {
    flex: 0 0 auto;
    min-height: 46px;
    padding: 13px 28px 16px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    color: #8a96a8;
    font-size: 11.5px;
}

.app-footer-dot {
    color: #c8d0dc;
}

/* Professional surface refinements inside authenticated workspace */
.has-app-shell .hero {
    position: relative;
    overflow: hidden;
    margin-bottom: 18px;
    padding: 25px 27px;
    border: 1px solid #e0e7f1;
    border-radius: 17px;
    background:
        radial-gradient(circle at 94% 12%, rgba(37,99,235,.10), transparent 27%),
        linear-gradient(135deg, #ffffff 0%, #f6f9ff 100%);
    box-shadow: 0 8px 24px rgba(15, 23, 42, .035);
}

.has-app-shell .hero h1 {
    margin: 4px 0 7px;
    color: #172238;
    font-size: clamp(24px, 3vw, 34px);
    letter-spacing: -.035em;
}

.has-app-shell .hero p:not(.eyebrow) {
    max-width: 850px;
    color: #6e7a8d;
}

.has-app-shell .eyebrow {
    color: #2563eb;
    font-size: 10.5px;
    letter-spacing: .11em;
}

.has-app-shell .grid {
    grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.has-app-shell .card {
    border: 1px solid #e2e8f0;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 18px rgba(15, 23, 42, .028);
}

.has-app-shell .card h2,
.has-app-shell .card h3 {
    color: #243147;
}

.has-app-shell .metric {
    color: #15223a;
    font-size: 28px;
}

.has-app-shell .btn {
    min-height: 40px;
    border-radius: 10px;
    padding: 9px 14px;
    font-size: 13px;
    box-shadow: none;
}

.has-app-shell .btn:not(.btn-outline):hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 13px rgba(31, 94, 255, .14);
}

.has-app-shell input,
.has-app-shell select,
.has-app-shell textarea {
    border-color: #dbe2ec;
    border-radius: 10px;
    background: #fff;
}

.has-app-shell .data-table {
    border-collapse: separate;
    border-spacing: 0;
}

.has-app-shell .data-table th {
    color: #667287;
    background: #f7f9fc;
}

.has-app-shell .data-table tbody tr:hover td {
    background: #fbfcfe;
}

.has-app-shell .page-head {
    align-items: center;
}

.has-app-shell .page-head h1 {
    color: #172238;
    font-size: 27px;
}

.has-app-shell .master-nav {
    padding: 5px;
    border: 1px solid #e3e8ef;
    border-radius: 13px;
    background: #fff;
}

.has-app-shell .master-nav a {
    border: 0;
    background: transparent;
}

.has-app-shell .master-nav a:hover {
    background: #eef4ff;
}

@media (max-width: 1200px) {
    .has-app-shell {
        --sidebar-width: 254px;
    }

    .workspace-topbar,
    .has-app-shell .app-main {
        padding-left: 22px;
        padding-right: 22px;
    }
}

@media (max-width: 991px) {
    .has-app-shell {
        --sidebar-width: min(86vw, 304px);
    }

    .has-app-shell.sidebar-open {
        overflow: hidden;
    }

    .app-sidebar {
        width: var(--sidebar-width);
        height: var(--app-mobile-viewport-height, 100dvh);
        max-height: var(--app-mobile-viewport-height, 100dvh);
        min-height: 0;
        padding-bottom: env(safe-area-inset-bottom, 0px);
        transform: translateX(-102%);
        transition: transform .22s ease;
        box-shadow: 16px 0 45px rgba(15, 23, 42, .26);
    }

    .sidebar-open .app-sidebar {
        transform: translateX(0);
    }

    .sidebar-brand {
        padding-top: max(18px, env(safe-area-inset-top, 0px));
    }

    .sidebar-nav {
        min-height: 0;
        padding-bottom: 12px;
    }

    .sidebar-user {
        position: relative;
        z-index: 2;
        margin-bottom: max(10px, env(safe-area-inset-bottom, 0px));
    }

    .sidebar-close {
        display: inline-grid;
        place-items: center;
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 55;
        display: block;
        visibility: hidden;
        opacity: 0;
        background: rgba(15, 23, 42, .52);
        backdrop-filter: blur(2px);
        -webkit-backdrop-filter: blur(2px);
        transition: opacity .2s ease, visibility .2s ease;
    }

    .sidebar-open .sidebar-backdrop {
        visibility: visible;
        opacity: 1;
    }

    .app-workspace {
        width: 100%;
        margin-left: 0;
    }

    .sidebar-toggle {
        display: inline-block;
        flex: 0 0 43px;
    }

    .workspace-topbar {
        height: 66px;
        min-height: 66px;
        padding: 0 17px;
    }

    .has-app-shell .app-main {
        min-height: calc(100vh - 66px);
        padding: 18px 17px 30px;
    }

    .app-footer {
        justify-content: center;
        padding: 11px 17px 18px;
    }
}

@media (max-width: 620px) {
    .workspace-user-compact > div {
        display: none;
    }

    .workspace-avatar {
        width: 35px;
        height: 35px;
        flex-basis: 35px;
        font-size: 12px;
    }

    .workspace-kicker {
        display: none !important;
    }

    .workspace-heading > strong {
        font-size: 14px;
    }

    .has-app-shell .app-main {
        padding: 14px 12px 26px;
    }

    .has-app-shell .hero,
    .has-app-shell .card {
        border-radius: 13px;
        padding: 17px;
    }

    .has-app-shell .hero h1 {
        font-size: 23px;
    }

    .has-app-shell .grid {
        grid-template-columns: 1fr;
        gap: 11px;
    }

    .has-app-shell .card {
        margin-bottom: 12px;
    }

    .has-app-shell .actions .btn {
        flex: 1 1 150px;
    }

    .app-footer {
        flex-wrap: wrap;
        font-size: 10.5px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .app-sidebar,
    .sidebar-backdrop,
    .sidebar-link,
    .has-app-shell .btn {
        transition: none !important;
    }
}

@media print {
    .app-sidebar,
    .sidebar-backdrop,
    .workspace-topbar,
    .app-footer {
        display: none !important;
    }

    .app-workspace {
        width: 100% !important;
        margin-left: 0 !important;
    }

    .has-app-shell .app-main {
        max-width: none !important;
        padding: 0 !important;
    }
}

/* =========================================================
   V1.10.3 — IMPORT SISWA DARI EXCEL
   ========================================================= */
.page-head-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.import-excel-card {
    scroll-margin-top: calc(var(--workspace-topbar-height, 74px) + 16px);
    border-color: #d9e4ff;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.import-toolbar {
    align-items: center;
}

.import-file-field {
    max-width: 760px;
}

.import-file-field input[type="file"] {
    width: 100%;
    min-height: 48px;
    margin-top: 6px;
    padding: 8px 10px;
    border: 1px dashed #b9c8e4;
    border-radius: 11px;
    background: #fff;
    color: var(--text);
}

.import-file-field input[type="file"]::file-selector-button {
    min-height: 34px;
    margin-right: 10px;
    padding: 6px 12px;
    border: 0;
    border-radius: 8px;
    background: #eaf0ff;
    color: #1d4ed8;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.import-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
    font-size: 13px;
}

.import-errors {
    margin: 12px 0;
    padding: 12px 14px;
    border: 1px solid #fecaca;
    border-radius: 10px;
    background: #fff7f7;
}

.import-errors summary {
    cursor: pointer;
    font-weight: 700;
    color: #991b1b;
}

.import-errors ol {
    margin: 10px 0 0;
    padding-left: 22px;
    max-height: 260px;
    overflow: auto;
}

.import-errors li + li {
    margin-top: 5px;
}

.import-note {
    display: grid;
    gap: 4px;
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #f1f5f9;
    color: #475569;
    font-size: 13px;
}

@media (max-width: 760px) {
    .page-head-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .page-head-actions .btn {
        flex: 1 1 auto;
        justify-content: center;
    }

    .import-toolbar {
        align-items: stretch;
    }

    .import-toolbar > .btn {
        width: 100%;
        justify-content: center;
    }
}
