/* ============ REKAPITULASI PAGE STYLES ============ */

/* ---------- Halaman utama rekap ---------- */
.rekap-section {
    padding: 48px 0 72px;
    background: #f8fafc;
}

/* ---------- Hero section ---------- */
.rekap-hero {
    background: linear-gradient(135deg, #0a2540 0%, #1e4a7a 100%);
    border-radius: 20px 20px 0 0;
    padding: 60px 0 40px;
    margin: -48px -48px 40px;
    position: relative;
    overflow: hidden;
}

.rekap-hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' style='fill:none;stroke:#c49a0a;stroke-width:1'/%3E")
        repeat;
    opacity: 0.3;
}

.rekap-hero-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.rekap-hero .hero-kicker {
    font-family: "Poppins", sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #f0b429;
}

.rekap-hero h1 {
    font-family: "Poppins", sans-serif;
    font-size: 36px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
}

.rekap-hero p {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.8);
    margin: 12px 0 0;
}

.rekap-hero .breadcrumb {
    background: transparent;
    padding: 0;
    margin: 16px 0 0;
}

.rekap-hero .breadcrumb a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    transition: color 0.2s;
}

.rekap-hero .breadcrumb a:hover {
    color: #f0b429;
}

.rekap-hero .breadcrumb i {
    color: #f0b429;
    font-size: 10px;
    margin: 0 8px 0 4px;
}

/* ---------- Tab switcher ---------- */
.rekap-tabs {
    display: inline-flex;
    gap: 4px;
    background: #e2e8f0;
    padding: 6px 12px;
    border-radius: 999px;
    margin-bottom: 28px;
    border: 1px solid #cbd5e0;
}

.rekap-tab {
    border: none;
    cursor: pointer;
    font-family: "Poppins", sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #0a2540;
    background: transparent;
    padding: 10px 20px;
    border-radius: 999px;
    position: relative;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.rekap-tab:hover {
    color: #1e4a7a;
}

.rekap-tab.active {
    background: #0a2540;
    color: #ffffff;
}

.rekap-tab.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 2px;
    height: 2px;
    border-radius: 2px;
    background: #f0b429;
}

.rekap-tab.active i {
    color: #f0b429;
}

.rekap-tab i {
    margin-right: 6px;
    font-size: 12px;
    color: #1e4a7a;
    transition: color 0.25s;
}

/* ---------- Filter bar ---------- */
.rekap-filter {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(10, 37, 64, 0.05);
    padding: 20px 24px;
    margin-bottom: 32px;
    position: relative;
}

.rekap-filter::after {
    content: "";
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background: url("data:image/svg+xml,%3Csvg width='32' height='32' viewBox='0 0 24 24' style='fill:#64748b'/%3E")
        no-repeat center;
    pointer-events: none;
}

/* Filter grid - card based layout */
.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.filter-item {
    position: relative;
}

.filter-item label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 6px;
}

.filter-item select,
.filter-item input {
    width: 100%;
    height: 44px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafe;
    padding: 0 16px;
    font-family: "Inter", sans-serif;
    font-size: 14px;
    color: #0a2540;
    outline: none;
    transition: all 0.2s ease;
}

.filter-item select:hover,
.filter-item input:hover {
    border-color: #c49a0a;
}

.filter-item select:focus,
.filter-item input:focus {
    border-color: #f0b429;
    box-shadow: 0 0 0 3px rgba(240, 180, 41, 0.15);
    background: #ffffff;
}

/* Search box styling */
.filter-search {
    position: relative;
}

.search-box {
    position: relative;
}

.search-box i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 14px;
    pointer-events: none;
}

.search-box input {
    padding-left: 38px;
}

/* Filter actions */
.filter-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    flex-wrap: wrap;
    align-items: center;
}

.rekap-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    border-radius: 10px;
    font-family: "Inter", sans-serif;
    font-size: 14px;
    font-weight: 600;
    padding: 11px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-reset {
    background: #f1f4f8;
    color: #0a2540;
}

.btn-reset:hover {
    background: #e2e8f0;
}

.btn-export {
    background: #0a2540;
    color: #ffffff;
}

.btn-export:hover {
    background: #1e4a7a;
}

.btn-export i {
    color: #f0b429;
    font-size: 12px;
    margin-top: 1px;
}

/* ---------- Tabel rekap ---------- */
.rekap-table-wrap {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(10, 37, 64, 0.05);
    overflow: auto;
    margin-bottom: 24px;
}

.rekap-table-wrap::-webkit-scrollbar {
    height: 6px;
}

.rekap-table-wrap::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.rekap-table-wrap::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

.rekap-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 960px;
    font-size: 13px;
    background: #ffffff;
}

.rekap-table thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #0a2540;
    color: #ffffff;
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 12px 14px;
    text-align: left;
    border-bottom: 2px solid #f0b429;
    white-space: nowrap;
    transition: background 0.2s;
}

.rekap-table thead th:hover {
    background: #123a63;
}

.rekap-table thead th.col-tk {
    text-align: center;
    background: #123a63;
    color: #ffffff;
}

.rekap-table thead th.col-l {
    color: #9fd4ff;
    background: #0a2540;
}

.rekap-table thead th.col-p {
    color: #ffb7d2;
    background: #0a2540;
}

.rekap-table thead th.sortable {
    cursor: pointer;
    user-select: none;
}

.rekap-table thead th.sortable:hover {
    background: #123a63;
}

.rekap-table thead th.sortable .sort-ind {
    margin-left: 5px;
    font-size: 10px;
    color: #f0b429;
}

.rekap-table thead th .sort-ind {
    float: right;
    color: #64748b;
    font-size: 12px;
}

.rekap-table tbody td {
    padding: 11px 14px;
    border-bottom: 1px solid #edf1f6;
    color: #33435a;
    vertical-align: middle;
    font-size: 13px;
}

.rekap-table tbody tr:nth-child(even) {
    background: #f8fafc;
}

.rekap-table tbody tr:hover {
    background: #f0f5fb;
}

.rekap-table td.num {
    text-align: center;
    font-weight: 600;
    color: #0a2540;
}

.rekap-table td.school-name {
    font-weight: 600;
    color: #0a2540;
}

.rekap-table td .npsn-mono {
    font-family: "Inter", monospace;
    letter-spacing: 0.4px;
    color: #64748b;
    font-size: 12px;
}

/* ---------- Badge & chip ---------- */
.badge-tk {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    padding: 3px 9px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    margin: 1px;
    transition: all 0.2s;
}

.badge-tk.L {
    background: #dbeafe;
    color: #1d4ed8;
}

.badge-tk.P {
    background: #fce7f3;
    color: #be185d;
}

.badge-tk.zero {
    background: #f1f5f9;
    color: #94a3b8;
}

.badge-status {
    display: inline-flex;
    align-items: center;
    font-size: 11.5px;
    font-weight: 700;
    border-radius: 999px;
    padding: 3px 12px;
    margin: 1px 2px 1px 0;
    white-space: nowrap;
    font-size: 12px;
}

.badge-status small {
    font-size: 10px;
    font-weight: 400;
    color: #94a3b8;
    margin-left: 4px;
}

.st-pns {
    background: #1e3a8a;
    color: #ffffff;
}
.st-pppk {
    background: #2563eb;
    color: #ffffff;
}
.st-paruh {
    background: #c49a0a;
    color: #ffffff;
}
.st-honorer {
    background: #475569;
    color: #ffffff;
}
.st-gty {
    background: #0f766e;
    color: #ffffff;
}

.chip-jabatan {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11.5px;
    font-weight: 600;
    color: #33435a;
    background: #f1f4f8;
    border: 1px solid #dbe2ea;
    border-radius: 999px;
    padding: 3px 10px;
}

.chip-jabatan b {
    color: #c49a0a;
    font-weight: 700;
}

.badge-jenjang {
    display: inline-flex;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #0a2540;
    background: #fef3c7;
    border: 1px solid #f5d66b;
    border-radius: 6px;
    padding: 3px 8px;
    margin-right: 4px;
}

/* ---------- Kartu mobile ---------- */
.rekap-cards {
    display: none;
}

.rekap-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(10, 37, 64, 0.05);
    padding: 20px;
    margin-bottom: 16px;
    transition:
        transform 0.2s,
        box-shadow 0.2s;
}

.rekap-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(10, 37, 64, 0.08);
}

.rekap-card .card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px dashed #dbe2ea;
    margin-bottom: 12px;
}

.rekap-card .card-head h4 {
    margin: 0 0 3px;
    font-family: "Poppins", sans-serif;
    font-size: 15px;
    color: #0a2540;
    line-height: 1.35;
}

.rekap-card .card-head small {
    font-size: 12px;
    color: #64748b;
}

.rekap-card .card-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 16px;
}

.rekap-card .kv {
    font-size: 14px;
}

.rekap-card .kv.full {
    grid-column: 1 / -1;
}

.rekap-card .kv .k {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 3px;
}

.rekap-card .kv .v {
    color: #0a2540;
    font-weight: 600;
}

/* ---------- Skeleton loading ---------- */
.skeleton td {
    padding: 13px 14px !important;
}

.skeleton .sk {
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(90deg, #eef2f7 25%, #dde5ee 40%, #eef2f7 60%);
    background-size: 300% 100%;
    animation: sk-shimmer 1.3s ease infinite;
}

@keyframes sk-shimmer {
    0% {
        background-position: 120% 0;
    }
    100% {
        background-position: -120% 0;
    }
}

/* ---------- Empty & error state ---------- */
.rekap-state {
    text-align: center;
    padding: 48px 24px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    margin: 24px 0;
}

.rekap-state i {
    font-size: 40px;
    color: #94a3b8;
    margin-bottom: 12px;
}

.rekap-state h3 {
    font-family: "Poppins", sans-serif;
    font-size: 17px;
    color: #0a2540;
    margin: 0 0 6px;
}

.rekap-state p {
    font-size: 14px;
    color: #64748b;
    margin: 0 auto;
    max-width: 480px;
    line-height: 1.6;
}

.rekap-state .retry-btn {
    margin-top: 16px;
    background: #0a2540;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: "Inter", sans-serif;
}

.rekap-state .retry-btn:hover {
    background: #1a4d80;
}

.rekap-state.err i {
    color: #dc2626;
}

.rekap-state.err h3 {
    color: #b91c1c;
}

/* ---------- Pagination ---------- */
.rekap-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 20px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.page-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #dbe2ea;
    background: #ffffff;
    color: #0a2540;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: "Inter", sans-serif;
    transition: all 0.2s ease;
}

.page-btn:hover:not(:disabled) {
    border-color: #f0b429;
    color: #f0b429;
}

.page-btn.active {
    background: #0a2540;
    border-color: #0a2540;
    color: #ffffff;
}

.page-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.page-ellipsis {
    color: #64748b;
    padding: 0 4px;
    font-size: 13px;
}

.page-info {
    text-align: center;
    font-size: 13px;
    color: #64748b;
    margin-top: 8px;
    white-space: nowrap;
}

.page-info span {
    color: #0a2540;
    font-weight: 600;
    margin: 0 4px;
}

/* ---------- Catatan kecil ---------- */
.rekap-note {
    margin-top: 8px;
    font-size: 12px;
    color: #64748b;
}

.rekap-note i {
    color: #f0b429;
    margin-right: 4px;
}

/* ---------- Responsive rekap ---------- */
@media (max-width: 1024px) {
    .filter-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .rekap-table {
        min-width: 720px;
    }

    .rekap-hero h1 {
        font-size: 30px;
    }
}

@media (max-width: 768px) {
    .rekap-hero {
        min-height: 200px;
        padding: 40px 0;
    }

    .rekap-hero h1 {
        font-size: 24px;
    }

    .rekap-hero p {
        font-size: 13px;
    }

    .rekap-tabs {
        display: flex;
        width: 100%;
        overflow-x: auto;
        padding: 8px;
        background: transparent;
    }

    .rekap-tab {
        flex: 0 0 auto;
        padding: 10px 14px;
        font-size: 12px;
    }

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

    .rekap-filter {
        padding: 16px;
    }

    .filter-actions .rekap-btn {
        flex: 1;
        justify-content: center;
        width: 100%;
    }

    /* Sembunyikan tabel, tampilkan kartu pada mobile */
    .rekap-table-wrap {
        display: none;
    }

    .rekap-cards {
        display: block;
    }

    .rekap-card .card-body {
        grid-template-columns: 1fr;
    }

    .rekap-table {
        min-width: initial;
    }

    .rekap-pagination {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-btn {
        width: 100%;
        margin-bottom: 4px;
    }

    .page-info {
        margin-top: 4px;
        width: 100%;
    }

    .rekap-hero .hero-kicker {
        display: none;
    }

    .rekap-hero h1 {
        font-size: 22px;
    }

    .rekap-hero p {
        font-size: 13px;
    }
}
