:root {
    --emerald: #087f5b;
    --emerald-dark: #075f48;
    --gold: #c59b37;
    --ink: #15211d;
    --muted: #6b756f;
    --line: #e7ece8;
    --soft: #f5f8f6;
    --white: #ffffff;
}

* { box-sizing: border-box; }

body {
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--soft);
    color: var(--ink);
}

a { text-decoration: none; }

.app-shell {
    min-height: 100vh;
    display: flex;
}

.sidebar {
    width: 280px;
    background: #0f241d;
    color: #eef8f2;
    padding: 22px 18px;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1030;
    overflow-y: auto;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 26px;
}

.brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--emerald), var(--gold));
    color: #fff;
    font-size: 20px;
}

.brand strong { display: block; font-weight: 800; }
.brand span { display: block; color: #aebfb7; font-size: 13px; }

.sidebar-nav { gap: 4px; }

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #d6e4dd;
    border-radius: 8px;
    padding: 11px 12px;
    font-weight: 600;
}

.sidebar-nav .nav-link:hover {
    background: rgba(255,255,255,.08);
    color: #fff;
}

.app-main {
    margin-left: 280px;
    width: calc(100% - 280px);
    min-height: 100vh;
}

.topbar {
    height: 78px;
    background: rgba(255,255,255,.92);
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(14px);
}

.topbar-kicker {
    color: var(--gold);
    font-weight: 800;
    font-size: 12px;
    text-transform: uppercase;
}

.topbar-title {
    font-size: 22px;
    font-weight: 800;
}

.content-wrap { padding: 28px; }

.btn-primary {
    --bs-btn-bg: var(--emerald);
    --bs-btn-border-color: var(--emerald);
    --bs-btn-hover-bg: var(--emerald-dark);
    --bs-btn-hover-border-color: var(--emerald-dark);
}

.btn-icon {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--line);
    background: #fff;
}

.profile-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--line);
    background: #fff;
}

.stat-card, .panel, .login-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 18px 55px rgba(23, 38, 32, .07);
}

.stat-card {
    min-height: 126px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    overflow: hidden;
}

.stat-card span {
    color: var(--muted);
    font-weight: 700;
    font-size: 13px;
}

.stat-card strong {
    display: block;
    margin-top: 8px;
    font-size: 34px;
    line-height: 1;
}

.stat-card i {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    font-size: 22px;
}

.tone-emerald i { background: #e6f5ef; color: var(--emerald); }
.tone-sky i { background: #eaf4ff; color: #2878bd; }
.tone-gold i { background: #fff7df; color: var(--gold); }
.tone-rose i { background: #fff0f0; color: #c05252; }
.tone-slate i { background: #edf1f4; color: #52616b; }

.panel { padding: 22px; }

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

.panel-header h2 {
    font-size: 18px;
    font-weight: 800;
    margin: 0;
}

.list-item {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.list-item p {
    color: var(--muted);
    margin: 4px 0 0;
    font-size: 14px;
}

.timeline { display: grid; gap: 15px; }
.timeline-item { display: grid; grid-template-columns: 16px 1fr; gap: 10px; }
.timeline-item > span {
    width: 10px;
    height: 10px;
    margin-top: 7px;
    border-radius: 50%;
    background: var(--emerald);
}
.timeline-item p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }

.empty-state {
    min-height: 160px;
    display: grid;
    place-items: center;
    text-align: center;
    color: var(--muted);
    border: 1px dashed var(--line);
    border-radius: 8px;
}

.empty-state i {
    display: block;
    font-size: 34px;
    color: var(--emerald);
    margin-bottom: 8px;
}

.table thead th {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--muted);
    background: #f8faf9;
}

.form-control, .form-select {
    border-color: #dfe7e2;
    min-height: 44px;
}

.login-body {
    min-height: 100vh;
    background:
        linear-gradient(120deg, rgba(8,127,91,.94), rgba(15,36,29,.96)),
        url('../images/login-bg.jpg');
    background-size: cover;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-panel {
    width: min(1080px, 100%);
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 28px;
    align-items: center;
}

.login-copy { color: #fff; }
.brand-login { margin-bottom: 36px; }
.brand-login span { color: rgba(255,255,255,.75); }
.login-copy h1 { font-size: clamp(34px, 5vw, 58px); font-weight: 800; line-height: 1.03; }
.login-copy p { max-width: 620px; color: rgba(255,255,255,.82); font-size: 18px; margin-top: 18px; }
.login-card { padding: 30px; }
.login-card h2 { font-weight: 800; }

.sidebar-backdrop { display: none; }

@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform .2s ease;
    }
    .sidebar.is-open { transform: translateX(0); }
    .sidebar-backdrop.is-open {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,.38);
        z-index: 1020;
    }
    .app-main {
        margin-left: 0;
        width: 100%;
    }
    .topbar { padding: 0 16px; }
    .content-wrap { padding: 18px; }
    .login-panel { grid-template-columns: 1fr; }
}


.rapor-book {
    display: grid;
    gap: 24px;
    margin-top: 24px;
    font-family: "Times New Roman", Times, serif;
    color: #000;
}

.rapor-page {
    width: min(794px, 100%);
    min-height: 1123px;
    margin: 0 auto;
    background: #fff;
    box-shadow: 0 18px 55px rgba(23, 38, 32, .12);
    border: 1px solid #d9ded8;
    padding: 52px 58px;
}

.rapor-frame {
    min-height: 1019px;
    position: relative;
}

.rapor-cover-frame {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.rapor-cover h1,
.rapor-cover h2,
.rapor-page-title {
    letter-spacing: 0;
    font-weight: 700;
    text-align: center;
}

.rapor-cover h1 {
    font-size: 24px;
    margin: 52px 0 16px;
}

.rapor-cover h2 {
    max-width: 560px;
    font-size: 20px;
    text-transform: uppercase;
    margin: 0 0 8px;
}

.rapor-address {
    min-height: 42px;
    max-width: 560px;
    margin: 0 0 34px;
    font-size: 15px;
}

.rapor-logo-box {
    width: 116px;
    height: 104px;
    border: 1.5px solid #000;
    display: grid;
    place-items: center;
    margin-bottom: 42px;
    font-weight: 700;
    line-height: 1.25;
}

.rapor-cover-table,
.rapor-identity-table {
    width: 100%;
    display: grid;
    gap: 9px;
    font-size: 16px;
}

.rapor-cover-table {
    max-width: 560px;
    margin-top: 4px;
}

.rapor-cover-table div,
.rapor-identity-table div {
    display: grid;
    grid-template-columns: 190px 18px 1fr;
    align-items: end;
    text-align: left;
}

.rapor-cover-table strong,
.rapor-identity-table strong {
    min-height: 24px;
    border-bottom: 1px dotted #000;
    font-weight: 400;
}

.rapor-system-title {
    margin-top: auto;
    margin-bottom: 34px;
    font-size: 15px;
}

.rapor-page-title {
    font-size: 20px;
    margin: 20px 0 32px;
}

.rapor-identity-table {
    gap: 12px;
    margin-top: 10px;
}

.rapor-identity-table div {
    grid-template-columns: 210px 18px 1fr;
}

.rapor-identity-footer {
    display: grid;
    grid-template-columns: 1fr 126px;
    gap: 34px;
    align-items: start;
    margin-top: 58px;
}

.rapor-head-sign {
    text-align: center;
    justify-self: end;
    min-width: 260px;
}

.rapor-head-sign p,
.rapor-signatures p {
    margin: 0 0 78px;
}

.rapor-head-sign strong,
.rapor-signatures strong {
    display: block;
    min-height: 22px;
    font-weight: 700;
    text-decoration: underline;
}

.rapor-head-sign span {
    display: block;
    margin-top: 2px;
}

.rapor-photo-box {
    width: 106px;
    height: 136px;
    border: 1px solid #000;
    display: grid;
    place-items: center;
    text-align: center;
    font-size: 14px;
    line-height: 1.25;
}

.rapor-meta-table,
.rapor-score-table,
.rapor-development-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 14px;
}

.rapor-meta-table {
    margin-bottom: 18px;
}

.rapor-meta-table td,
.rapor-score-table th,
.rapor-score-table td,
.rapor-development-table th,
.rapor-development-table td {
    border: 1px solid #000;
    padding: 6px 8px;
    vertical-align: middle;
}

.rapor-meta-table td:nth-child(1),
.rapor-meta-table td:nth-child(3) {
    width: 90px;
    font-weight: 700;
}

.rapor-score-table th,
.rapor-development-table th {
    text-align: center;
    font-weight: 700;
}

.rapor-score-table th:nth-child(1),
.rapor-score-table td:nth-child(1),
.rapor-development-table th:nth-child(1),
.rapor-development-table td:nth-child(1) {
    width: 44px;
    text-align: center;
}

.rapor-score-table th:nth-child(3),
.rapor-score-table th:nth-child(4),
.rapor-score-table td:nth-child(3),
.rapor-score-table td:nth-child(4),
.rapor-development-table td:nth-child(n+3) {
    text-align: center;
}

.rapor-score-table td {
    height: 30px;
}

.rapor-summary-row td {
    font-weight: 700;
}

.rapor-signatures {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    text-align: center;
    margin-top: 34px;
    font-size: 14px;
}

.rapor-text-box {
    border: 1px solid #000;
    min-height: 92px;
    margin-top: 14px;
    padding: 10px 12px;
    font-size: 14px;
}

.rapor-text-box strong {
    display: block;
    margin-bottom: 8px;
}

.rapor-text-box p {
    margin: 0;
    line-height: 1.5;
}

@media print {
    @page { size: A4; margin: 0; }

    html,
    body {
        width: 210mm;
        min-height: 297mm;
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
        color: #000 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    body * {
        visibility: hidden;
    }

    .rapor-book,
    .rapor-book * {
        visibility: visible;
    }

    .no-print,
    .sidebar,
    .topbar,
    .toast-shell,
    .sidebar-backdrop,
    .btn,
    .panel,
    .table-responsive {
        display: none !important;
    }

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

    .content-wrap {
        padding: 0 !important;
    }

    .rapor-book {
        position: absolute;
        inset: 0 auto auto 0;
        display: block;
        width: 210mm;
        margin: 0 !important;
        padding: 0 !important;
        gap: 0 !important;
        background: #fff !important;
    }

    .rapor-page {
        width: 210mm !important;
        height: 297mm !important;
        min-height: 297mm !important;
        max-height: 297mm !important;
        margin: 0 !important;
        padding: 16mm 18mm !important;
        overflow: hidden !important;
        border: 0 !important;
        box-shadow: none !important;
        break-after: page;
        page-break-after: always;
    }

    .rapor-page:last-child {
        break-after: auto;
        page-break-after: auto;
    }

    .rapor-frame {
        min-height: 265mm !important;
        height: 265mm !important;
    }

    .rapor-cover h1 {
        margin-top: 18mm !important;
        font-size: 18pt !important;
    }

    .rapor-cover h2,
    .rapor-page-title {
        font-size: 15pt !important;
    }

    .rapor-cover-table,
    .rapor-identity-table {
        font-size: 12pt !important;
    }

    .rapor-meta-table,
    .rapor-score-table,
    .rapor-development-table,
    .rapor-text-box,
    .rapor-signatures {
        font-size: 10.5pt !important;
    }

    .rapor-score-table td {
        height: 7.5mm !important;
        padding: 1.5mm 2mm !important;
    }

    .rapor-text-box {
        min-height: 25mm !important;
    }
}

.santri-group {
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.santri-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    background: #f8faf9;
    border-bottom: 1px solid var(--line);
}

.santri-group-header span {
    color: var(--gold);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.santri-group-header h3 {
    margin: 2px 0 0;
    font-size: 18px;
    font-weight: 800;
}

.santri-group-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: 14px;
    white-space: nowrap;
}

.santri-group-meta strong {
    color: var(--emerald);
    font-size: 24px;
    line-height: 1;
}

.santri-group-meta span {
    color: var(--muted);
    text-transform: none;
    font-weight: 700;
}

.santri-table { margin-bottom: 0; }

@media (max-width: 575.98px) {
    .santri-group-header {
        align-items: flex-start;
        flex-direction: column;
    }
}


.print-only {
    display: none;
}

.absensi-print-document {
    width: min(100%, 210mm);
    margin: 0 auto;
    padding: 14mm;
    background: #fff;
    color: #000;
    font-family: "Times New Roman", Times, serif;
}

.absensi-print-header {
    text-align: center;
    border-bottom: 3px double #000;
    padding-bottom: 10px;
    margin-bottom: 14px;
}

.absensi-print-header h2 {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0;
}

.absensi-print-header p {
    margin: 0;
    font-size: 13px;
}

.absensi-print-info,
.absensi-print-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.absensi-print-info {
    margin-bottom: 12px;
}

.absensi-print-info td,
.absensi-print-table th,
.absensi-print-table td {
    border: 1px solid #000;
    padding: 5px 6px;
    vertical-align: top;
}

.absensi-print-info td:nth-child(odd),
.absensi-print-table th {
    font-weight: 700;
    background: #f1f1f1;
}

.absensi-print-table th:first-child,
.absensi-print-table td:first-child {
    width: 34px;
    text-align: center;
}

.absensi-print-table th:nth-child(3),
.absensi-print-table td:nth-child(3) {
    width: 90px;
    text-align: center;
}

.absensi-print-recap {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.absensi-print-recap div {
    border: 1px solid #000;
    padding: 7px 8px;
}

.absensi-print-recap span {
    display: block;
    font-size: 11px;
}

.absensi-print-recap strong {
    display: block;
    margin-top: 3px;
    font-size: 16px;
}

.absensi-print-sign {
    display: grid;
    grid-template-columns: 1fr 240px;
    gap: 24px;
    margin-top: 32px;
    text-align: center;
    font-size: 13px;
}

.absensi-print-sign p {
    margin: 0 0 68px;
}

.absensi-print-sign strong {
    display: block;
    text-decoration: underline;
}
/* Laporan document styles */
.breadcrumb-wrap .breadcrumb {
    --bs-breadcrumb-divider-color: var(--muted);
    font-size: 13px;
}

.laporan-document {
    width: min(100%, 210mm);
    margin: 0 auto 24px;
    padding: 18mm;
    background: #fff;
    color: #000;
    border: 1px solid var(--line);
    box-shadow: 0 18px 55px rgba(23, 38, 32, .08);
    font-family: "Times New Roman", Times, serif;
}

.laporan-doc-header {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 16px;
    align-items: center;
    border-bottom: 3px double #000;
    padding-bottom: 12px;
    margin-bottom: 16px;
}

.laporan-logo {
    width: 64px;
    height: 64px;
    border: 1.5px solid #000;
    display: grid;
    place-items: center;
    text-align: center;
    font-weight: 700;
    line-height: 1.15;
}

.laporan-doc-header h1 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0;
}

.laporan-doc-header p {
    margin: 2px 0 0;
    font-size: 13px;
}

.laporan-doc-title {
    text-align: center;
    margin: 18px 0 14px;
}

.laporan-doc-title h2 {
    font-size: 17px;
    font-weight: 700;
    text-decoration: underline;
    margin: 0 0 6px;
}

.laporan-doc-title p {
    margin: 0;
    font-size: 13px;
}

.laporan-info-table,
.laporan-print-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.laporan-info-table {
    margin-bottom: 14px;
}

.laporan-info-table td,
.laporan-print-table th,
.laporan-print-table td {
    border: 1px solid #000;
    padding: 5px 6px;
    vertical-align: top;
}

.laporan-info-table td:nth-child(1),
.laporan-info-table td:nth-child(3) {
    width: 110px;
    font-weight: 700;
    background: #f5f5f5;
}

.laporan-print-table th {
    text-align: center;
    font-weight: 700;
    background: #f1f1f1;
}

.laporan-print-table td:first-child,
.laporan-print-table th:first-child {
    width: 34px;
    text-align: center;
}

.laporan-recap {
    margin-top: 16px;
}

.laporan-recap h3 {
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 8px;
}

.laporan-recap-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.laporan-recap-grid div {
    border: 1px solid #000;
    padding: 8px;
}

.laporan-recap-grid span {
    display: block;
    font-size: 11px;
}

.laporan-recap-grid strong {
    display: block;
    font-size: 16px;
    margin-top: 4px;
}

.laporan-sign {
    display: grid;
    grid-template-columns: 1fr 240px;
    gap: 24px;
    margin-top: 34px;
    text-align: center;
    font-size: 13px;
}

.laporan-sign p {
    margin: 0 0 70px;
}

.laporan-sign strong {
    display: block;
    text-decoration: underline;
}

@media screen {
    .laporan-document {
        overflow-x: auto;
    }
}

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

    html,
    body {
        width: 210mm;
        min-height: 297mm;
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
        color: #000 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    body * {
        visibility: hidden;
    }

    #print-area,
    #print-area * {
        visibility: visible;
    }

    .sidebar,
    .topbar,
    .sidebar-backdrop,
    .toast-shell,
    .laporan-dashboard,
    .no-print {
        display: none !important;
    }

    .app-shell,
    .app-main,
    .content-wrap {
        display: block !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
    }

    #print-area {
        display: block !important;
        position: absolute;
        inset: 0 auto auto 0;
        width: 186mm !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        box-shadow: none !important;
        background: #fff !important;
        overflow: visible !important;
        font-size: 10pt !important;
    }

    .laporan-doc-header {
        grid-template-columns: 18mm 1fr !important;
        gap: 4mm !important;
        padding-bottom: 3mm !important;
        margin-bottom: 4mm !important;
    }

    .laporan-logo {
        width: 16mm !important;
        height: 16mm !important;
        font-size: 8pt !important;
    }

    .laporan-doc-header h1 {
        font-size: 14pt !important;
    }

    .laporan-doc-header p,
    .laporan-doc-title p,
    .laporan-sign,
    .laporan-info-table,
    .laporan-print-table {
        font-size: 9pt !important;
    }

    .laporan-doc-title h2 {
        font-size: 12pt !important;
    }

    .laporan-info-table td,
    .laporan-print-table th,
    .laporan-print-table td {
        padding: 1.4mm 1.7mm !important;
        border-color: #000 !important;
    }

    .laporan-recap-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 2mm !important;
    }

    .laporan-recap-grid div {
        padding: 2mm !important;
    }
}