:root {
    --kjp-primary: #0d47a1;
    --kjp-primary-dark: #082f6d;
    --kjp-accent: #f7b500;
    --kjp-surface: #f4f7fb;
    --kjp-text: #172033;
    --kjp-muted: #6b7280;
    --kjp-border: #dfe6f0;
}

* { box-sizing: border-box; }
body {
    font-family: "Inter", sans-serif;
    color: var(--kjp-text);
    background: var(--kjp-surface);
}

a { text-decoration: none; }

.public-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.public-body main { flex: 1; }

.portal-navbar {
    background: linear-gradient(110deg, var(--kjp-primary-dark), var(--kjp-primary));
    box-shadow: 0 10px 30px rgba(8, 47, 109, .2);
}
.portal-navbar .nav-link { color: rgba(255,255,255,.82); font-weight: 500; }
.portal-navbar .nav-link:hover { color: #fff; }
.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.16);
    color: #fff;
}
.brand-mark {
    flex: 0 0 38px;
    overflow: hidden;
}
.brand-mark.has-logo {
    background: #fff;
    padding: 3px;
    box-shadow: 0 4px 14px rgba(0,0,0,.12);
}
.brand-mark img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 9px;
    object-fit: contain;
}

.logo-setting-preview {
    width: 138px;
    height: 138px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 10px;
    background: #fff;
    border: 1px solid #dbe4f0;
    box-shadow: 0 12px 32px rgba(20, 55, 100, .10);
}
.logo-setting-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.logo-setting-placeholder {
    color: #8ba0ba;
    text-align: center;
}
.logo-setting-placeholder i {
    display: block;
    font-size: 3.1rem;
    margin-bottom: .35rem;
}

.hero-section {
    position: relative;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 80% 20%, rgba(247,181,0,.28), transparent 28%),
        linear-gradient(125deg, #082f6d 0%, #0d47a1 58%, #1565c0 100%);
    padding: 86px 0 88px;
}
.hero-section::after {
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    border: 70px solid rgba(255,255,255,.06);
    right: -160px;
    bottom: -220px;
}
.hero-eyebrow {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    padding: 8px 13px;
    border-radius: 999px;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.18);
    font-size: .86rem;
    font-weight: 600;
}
.hero-title { font-size: clamp(2.15rem, 5vw, 4.1rem); font-weight: 800; letter-spacing: -.04em; }
.hero-subtitle { max-width: 680px; color: rgba(255,255,255,.82); font-size: 1.05rem; line-height: 1.8; }
.hero-card {
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 26px;
    padding: 26px;
    backdrop-filter: blur(10px);
    box-shadow: 0 25px 60px rgba(0,0,0,.18);
}
.hero-card .mini-step {
    display: flex;
    gap: 14px;
    padding: 13px 0;
    border-bottom: 1px solid rgba(255,255,255,.14);
}
.hero-card .mini-step:last-child { border-bottom: 0; }

/* V14 - Gambar KJP Plus pada area utama portal */
.hero-visual {
    position: relative;
}
.hero-image-card {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 2;
    border-radius: 26px;
    background: #0792c8;
    border: 1px solid rgba(255,255,255,.26);
    box-shadow: 0 25px 60px rgba(0,0,0,.22);
    isolation: isolate;
}
.hero-image-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(180deg, transparent 55%, rgba(3,35,82,.58) 100%);
}
.hero-kjp-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform .35s ease;
}
.hero-image-card:hover .hero-kjp-image {
    transform: scale(1.025);
}
.hero-image-label {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 16px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    width: fit-content;
    max-width: calc(100% - 36px);
    padding: 9px 13px;
    border-radius: 999px;
    color: #fff;
    background: rgba(5,39,88,.72);
    border: 1px solid rgba(255,255,255,.24);
    box-shadow: 0 8px 22px rgba(0,0,0,.16);
    backdrop-filter: blur(8px);
    font-size: .86rem;
    font-weight: 700;
}
.hero-flow-card {
    margin-top: 16px;
    padding: 21px 24px;
}
.hero-flow-card .mini-step {
    padding: 10px 0;
}

.mini-number {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 10px;
    background: var(--kjp-accent);
    color: #2c2100;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.section-title { font-weight: 800; letter-spacing: -.02em; }
.section-subtitle { color: var(--kjp-muted); }

.feature-card,
.content-card,
.form-card,
.status-card {
    background: #fff;
    border: 1px solid var(--kjp-border);
    border-radius: 20px;
    box-shadow: 0 14px 34px rgba(18, 48, 87, .07);
}
.feature-card { padding: 24px; height: 100%; transition: .2s ease; }
.feature-card:hover { transform: translateY(-4px); box-shadow: 0 20px 42px rgba(18, 48, 87, .12); }
.feature-icon {
    width: 50px;
    height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    background: #e9f1ff;
    color: var(--kjp-primary);
    font-size: 1.35rem;
}

.btn-kjp {
    border: 0;
    color: #fff;
    background: linear-gradient(120deg, var(--kjp-primary), #1976d2);
    box-shadow: 0 9px 22px rgba(13,71,161,.22);
}
.btn-kjp:hover { color: #fff; background: linear-gradient(120deg, #0b3d8f, #1565c0); }

.form-page-header {
    background: linear-gradient(115deg, #082f6d, #0d47a1);
    color: #fff;
    padding: 45px 0 74px;
}
.form-wrap { margin-top: -44px; }
.form-card { padding: 28px; }
.form-section { display: none; }
.form-section.active { display: block; animation: fadeSlide .24s ease; }
@keyframes fadeSlide { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }

.stepper {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 30px;
}
.step-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 14px;
    border: 1px solid var(--kjp-border);
    border-radius: 14px;
    color: var(--kjp-muted);
    background: #f8fafc;
}
.step-item.active,
.step-item.completed {
    color: var(--kjp-primary-dark);
    border-color: #b8cff2;
    background: #edf4ff;
}
.step-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    background: #dce3ed;
    font-weight: 700;
}
.step-item.active .step-circle,
.step-item.completed .step-circle { background: var(--kjp-primary); color: #fff; }
.step-label strong { display: block; font-size: .88rem; }
.step-label small { font-size: .72rem; }

.form-label { font-weight: 600; color: #283349; }
.form-control,
.form-select {
    border-color: #d9e2ee;
    min-height: 46px;
    border-radius: 11px;
}
.form-control:focus,
.form-select:focus {
    border-color: #5d8dd0;
    box-shadow: 0 0 0 .2rem rgba(13,71,161,.11);
}
.form-check-input:checked { background-color: var(--kjp-primary); border-color: var(--kjp-primary); }
.choice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 9px;
    padding: 14px;
    border: 1px solid #e1e7f0;
    border-radius: 13px;
    background: #fafcff;
}
.section-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 23px;
}
.section-heading .icon {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    background: #e9f1ff;
    color: var(--kjp-primary);
    font-size: 1.2rem;
}
.error-summary { border-left: 4px solid #dc3545; }

.portal-footer { background: #071f48; color: rgba(255,255,255,.75); }

/* V10 - Unduhan berkas pelengkap */
.min-w-0 { min-width: 0; }
.download-page-header {
    color: #fff;
    background:
        radial-gradient(circle at 82% 20%, rgba(247,181,0,.22), transparent 28%),
        linear-gradient(120deg, #071f48, #0d47a1 64%, #1565c0);
}
.download-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.2);
    background: rgba(255,255,255,.12);
    font-size: .86rem;
    font-weight: 600;
}
.download-count {
    min-width: 150px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 18px 24px;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 20px;
    background: rgba(255,255,255,.12);
    backdrop-filter: blur(8px);
}
.download-count strong { font-size: 2rem; line-height: 1; }
.download-count small { margin-top: 7px; color: rgba(255,255,255,.72); }
.download-card {
    display: flex;
    flex-direction: column;
    padding: 22px;
    border: 1px solid var(--kjp-border);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(18,48,87,.07);
    transition: transform .2s ease, box-shadow .2s ease;
}
.download-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 40px rgba(18,48,87,.12);
}
.download-file-icon {
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    background: #e9f1ff;
    color: var(--kjp-primary);
    font-size: 1.55rem;
}
.download-file-icon-sm {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
    border-radius: 12px;
    font-size: 1.15rem;
}
.download-description { line-height: 1.6; }
.download-card-meta {
    padding-top: 16px;
    border-top: 1px solid #edf1f6;
}

@media (min-width: 992px) and (max-width: 1399.98px) {
    .portal-navbar .navbar-nav { gap: .2rem !important; }
    .portal-navbar .nav-link { padding-left: .45rem; padding-right: .45rem; font-size: .92rem; }
    .portal-navbar .btn { padding-left: .7rem !important; padding-right: .7rem !important; }
}

/* Admin */
.admin-body { min-height: 100vh; background: #f3f6fb; }
.admin-sidebar {
    width: 270px;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1030;
    color: #fff;
    background: linear-gradient(180deg, #071f48, #0d47a1);
    padding: 22px 16px;
    overflow-y: auto;
}
.admin-brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 23px; color: #fff; }
.admin-menu-title { color: rgba(255,255,255,.48); font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; padding: 14px 13px 8px; }
.admin-nav .nav-link {
    color: rgba(255,255,255,.72);
    border-radius: 12px;
    padding: 11px 13px;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 11px;
}
.admin-nav .nav-link:hover,
.admin-nav .nav-link.active { color: #fff; background: rgba(255,255,255,.13); }
.admin-main { margin-left: 270px; min-height: 100vh; }
.admin-topbar {
    height: 74px;
    background: #fff;
    border-bottom: 1px solid var(--kjp-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 1020;
}
.admin-content { padding: 26px 28px; }
.stat-card {
    border: 1px solid var(--kjp-border);
    border-radius: 18px;
    padding: 21px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(18,48,87,.06);
    height: 100%;
}
.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #edf4ff;
    color: var(--kjp-primary);
    font-size: 1.2rem;
}
.stat-value { font-size: 1.85rem; font-weight: 800; letter-spacing: -.04em; }
.table-card {
    background: #fff;
    border: 1px solid var(--kjp-border);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(18,48,87,.06);
}
.table-card-header { padding: 20px 22px; border-bottom: 1px solid var(--kjp-border); }
.table-card .table { margin-bottom: 0; }
.table-card .table th { background: #f7f9fc; color: #536078; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.table-card .table td { vertical-align: middle; }
.detail-section {
    border: 1px solid var(--kjp-border);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 20px;
}
.detail-section-title { padding: 14px 18px; background: #f4f7fb; font-weight: 700; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.detail-item { padding: 12px 18px; border-top: 1px solid #eef1f5; }
.detail-label { color: var(--kjp-muted); font-size: .78rem; margin-bottom: 3px; }
.detail-value { font-weight: 600; word-break: break-word; }

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at 10% 15%, rgba(247,181,0,.2), transparent 24%),
        linear-gradient(130deg, #061a3a, #0d47a1);
}
.login-card {
    width: min(100%, 430px);
    border-radius: 24px;
    background: #fff;
    padding: 32px;
    box-shadow: 0 28px 80px rgba(0,0,0,.28);
}

@media (max-width: 991.98px) {
    .admin-sidebar { transform: translateX(-100%); transition: .22s ease; }
    .admin-sidebar.show { transform: translateX(0); }
    .admin-main { margin-left: 0; }
    .admin-content { padding: 20px 16px; }
    .admin-topbar { padding: 0 16px; }
}

@media (max-width: 767.98px) {
    .hero-section { padding: 62px 0 68px; }
    .hero-image-card { border-radius: 21px; }
    .hero-image-label {
        left: 13px;
        right: 13px;
        bottom: 12px;
        max-width: calc(100% - 26px);
        font-size: .78rem;
    }
    .hero-flow-card { padding: 20px; }
    .stepper { grid-template-columns: 1fr; }
    .step-label small { display: none; }
    .form-card { padding: 20px 16px; }
    .detail-grid { grid-template-columns: 1fr; }
}

@media print {
    .no-print, .admin-sidebar, .admin-topbar { display: none !important; }
    .admin-main { margin: 0 !important; }
    .admin-content { padding: 0 !important; }
    body { background: #fff; }
    .table-card, .detail-section { box-shadow: none; }
}

/* Cetak formulir publik */
.print-toolbar {
    max-width: 210mm;
}
.print-document {
    width: min(100% - 28px, 210mm);
    margin: 0 auto 42px;
}
.print-sheet {
    min-height: 330mm;
    padding: 16mm 15mm;
    margin: 0 auto 22px;
    background: #fff;
    border: 1px solid var(--kjp-border);
    box-shadow: 0 16px 38px rgba(18, 48, 87, .09);
    color: #111;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
}
.print-document-header {
    text-align: center;
    font-weight: 700;
    line-height: 1.45;
    margin-bottom: 16px;
}
.print-document-header .print-title {
    font-size: 17px;
}
.print-page-header,
.print-meta {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    font-size: 10px;
    color: #444;
    border-bottom: 1px solid #bbb;
    padding-bottom: 7px;
    margin-bottom: 14px;
}
.print-meta {
    border: 1px solid #bbb;
    padding: 8px 10px;
    margin-bottom: 16px;
}
.print-section-title {
    display: inline-block;
    font-size: 14px;
    font-weight: 800;
    border-bottom: 1.5px solid #111;
    margin: 0 0 10px;
}
.print-row {
    display: grid;
    grid-template-columns: 26px 180px 12px minmax(0, 1fr);
    gap: 4px;
    align-items: start;
    min-height: 24px;
    padding: 3px 0;
    border-bottom: 1px dotted #d2d2d2;
    break-inside: avoid;
}
.print-number,
.print-label,
.print-colon {
    color: #222;
}
.print-value {
    min-height: 17px;
    font-weight: 600;
    overflow-wrap: anywhere;
}
.print-declaration {
    margin-top: 34px;
    padding: 11px 12px;
    border: 1px solid #aaa;
    line-height: 1.55;
}
.print-signatures {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 70px;
    margin-top: 36px;
    text-align: center;
    line-height: 1.5;
}
.signature-space {
    height: 70px;
}
.print-footer-note {
    margin-top: 45px;
    padding-top: 8px;
    border-top: 1px solid #bbb;
    text-align: center;
    font-size: 9px;
    color: #555;
}

@media (max-width: 767.98px) {
    .print-document { width: calc(100% - 16px); overflow-x: auto; }
    .print-sheet { min-width: 720px; padding: 30px 34px; }
}

@page {
    size: 210mm 330mm;
    margin: 0;
}

@media print {
    html, body {
        width: 210mm;
        background: #fff !important;
    }
    .portal-navbar,
    .portal-footer,
    .no-print {
        display: none !important;
    }
    .public-body,
    .public-body main {
        display: block !important;
        min-height: 0 !important;
    }
    .print-document {
        width: 210mm;
        margin: 0;
    }
    .print-sheet {
        width: 210mm;
        min-height: 330mm;
        margin: 0;
        padding: 15mm 15mm;
        border: 0;
        box-shadow: none;
        page-break-after: always;
        break-after: page;
    }
    .print-sheet-last {
        page-break-after: auto;
        break-after: auto;
    }
}

/* V6 - Cetak formulir mengikuti format lampiran resmi KJP Plus 2026 */
.kjp-official-document {
    width: min(calc(100% - 24px), 210mm);
    margin: 0 auto 44px;
    color: #111;
    font-family: Arial, Helvetica, sans-serif;
}
.kjp-official-sheet {
    box-sizing: border-box;
    width: 210mm;
    min-height: 330mm;
    margin: 0 auto 20px;
    padding: 18mm 16mm 14mm 16mm;
    background: #fff;
    border: 1px solid #d6d6d6;
    box-shadow: 0 16px 38px rgba(18, 48, 87, .09);
    font-size: 11pt;
    line-height: 1.14;
    overflow: hidden;
}
.kjp-official-sheet * { box-sizing: border-box; }
.kjp-official-page-one { padding-top: 21mm; }
.kjp-official-page-two,
.kjp-official-page-three { padding-top: 24mm; }
.kjp-official-header {
    margin-bottom: 6.5mm;
    text-align: center;
    font-size: 12.6pt;
    font-weight: 500;
    line-height: 1.45;
}
.kjp-official-section-title {
    display: flex;
    align-items: baseline;
    gap: 2.7mm;
    margin: 0 0 3.2mm;
    font-size: 11.7pt;
    font-weight: 700;
    line-height: 1;
}
.kjp-official-section-title u {
    text-underline-offset: 1.1mm;
    text-decoration-thickness: .35mm;
}
.kjp-official-row {
    display: grid;
    grid-template-columns: 8mm 47mm 3.5mm minmax(0, 1fr);
    align-items: center;
    min-height: 5.25mm;
    break-inside: avoid;
}
.kjp-official-number { text-align: right; padding-right: 2.5mm; }
.kjp-official-label { white-space: nowrap; }
.kjp-official-label strong { font-weight: 700; }
.kjp-official-colon { text-align: center; }
.kjp-official-fill-line {
    display: flex;
    align-items: flex-end;
    min-width: 0;
    min-height: 4.15mm;
    padding: 0 1.5mm .75mm;
    border-bottom: .5mm dotted #111;
    font-size: 10.4pt;
    font-weight: 600;
    line-height: 1;
    overflow: hidden;
}
.kjp-official-fill-line > span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.kjp-official-choice-row { align-items: start; }
.kjp-official-choice-content { min-width: 0; }
.kjp-official-options {
    display: grid;
    align-items: start;
    column-gap: 5mm;
    row-gap: .25mm;
    padding-top: .55mm;
}
.kjp-official-options.columns-1 { grid-template-columns: minmax(0, 1fr); }
.kjp-official-options.columns-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kjp-official-options.columns-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kjp-official-options.columns-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kjp-official-options.compact-width { max-width: 85mm; }
.kjp-official-choice {
    display: inline-flex;
    align-items: center;
    gap: 2mm;
    min-height: 5.4mm;
    white-space: nowrap;
}
.kjp-official-box {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4.8mm;
    height: 4.8mm;
    border: 0;
    font-family: 'DejaVu Sans', Arial, sans-serif;
    font-size: 14pt;
    font-weight: 400;
    line-height: 1;
}
.kjp-official-box.is-selected {
    background: #fff;
    padding: 0;
}
.kjp-official-date-row { min-height: 5.8mm; }
.kjp-official-date-layout {
    position: relative;
    display: block;
    width: 104mm;
    height: 4.8mm;
    white-space: nowrap;
}
.kjp-official-date-layout .kjp-official-digit-box {
    position: absolute;
    top: 0;
    display: block;
    width: 4.6mm;
    height: 4.6mm;
    border: .3mm solid #111;
    font-size: 9.8pt;
    font-weight: 600;
    line-height: 4.2mm;
    text-align: center;
}
.kjp-official-date-layout .kjp-official-date-separator {
    position: absolute;
    top: .1mm;
    width: 2mm;
    text-align: center;
}
.kjp-official-date-layout .separator-one { left: 10.2mm; }
.kjp-official-date-layout .separator-two { left: 23mm; }
.kjp-official-date-layout .kjp-official-date-note {
    position: absolute;
    left: 46mm;
    top: .35mm;
    white-space: nowrap;
    font-size: 9.6pt;
}
.kjp-official-rt-wrapper {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    width: max-content;
}
.kjp-official-rt-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 11mm;
    height: 5.5mm;
    padding: 0 1mm;
    border: .3mm solid #111;
    font-size: 10pt;
    font-weight: 600;
}
.kjp-official-slash { display: inline-block; margin: 0 2mm; font-size: 14.5pt; }
.kjp-official-tall-row { min-height: 17mm; }
.kjp-official-class-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10mm;
    padding-top: .4mm;
}
.kjp-official-class-grid > div { display: grid; }
.kjp-official-expiry-content {
    display: flex;
    align-items: center;
    gap: 6mm;
    min-width: 0;
}
.kjp-official-expiry-content .expiry-line {
    width: 31mm;
    flex: 0 0 31mm;
}
.kjp-official-multiline-row { min-height: 13mm; }
.kjp-official-multiline-row.small-multiline { min-height: 11.5mm; }
.kjp-official-multiline-row .kjp-official-choice-content { padding-bottom: .4mm; }
.address-options { max-width: 93mm; }
.residence-options { grid-template-columns: 1.45fr 1fr !important; max-width: 101mm; }
.address-row { min-height: 22.5mm; }
.education-row { min-height: 17mm; }
.education-options { column-gap: 4mm; }
.disability-row { min-height: 39mm; }
.disability-options { row-gap: 0; }
.disability-options .kjp-official-choice { min-height: 5.4mm; }
.job-row { min-height: 22.5mm; }
.job-options { max-width: 99mm; column-gap: 2mm; }
.education-guardian-row { min-height: 17mm; }
.relation-row { min-height: 22.5mm; }
.relation-options { max-width: 116mm; column-gap: 4mm; }
.emergency-name-row { min-height: 9mm; align-items: start; }
.emergency-name-row .kjp-official-label { line-height: 1.45; }
.emergency-name-row .kjp-official-fill-line { margin-top: 0; }
.allow-small-value .kjp-official-fill-line { font-size: 9.6pt; }
.nowrap-label { font-size: 10.5pt; }

@media (max-width: 850px) {
    .kjp-official-document { width: calc(100% - 12px); overflow-x: auto; }
    .kjp-official-sheet { min-width: 210mm; }
}

@media print {
    html, body { width: 210mm; }
    .kjp-official-document { width: 210mm; margin: 0; }
    .kjp-official-sheet {
        width: 210mm;
        min-height: 330mm;
        margin: 0;
        border: 0;
        box-shadow: none;
        page-break-after: always;
        break-after: page;
    }
    .kjp-official-sheet:last-child {
        page-break-after: auto;
        break-after: auto;
    }
    .kjp-official-box,
    .kjp-official-digit-box,
    .kjp-official-rt-box {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
}


/* V8 - Hasil cetak F4 portrait dengan font diperbesar */
@page {
    size: 210mm 330mm;
    margin: 0;
}

@media print {
    html, body {
        width: 210mm !important;
        min-height: 330mm;
    }
    .kjp-official-document {
        width: 210mm !important;
        margin: 0 !important;
    }
    .kjp-official-sheet {
        width: 210mm !important;
        min-height: 330mm !important;
        margin: 0 !important;
        border: 0 !important;
        box-shadow: none !important;
    }
}

/* V12 - Footer identitas madrasah pada portal dan formulir cetak */
.portal-footer {
    border-top: 1px solid rgba(255,255,255,.09);
}
.portal-footer-school {
    display: inline-flex;
    align-items: center;
    color: #fff;
    font-size: 1rem;
    letter-spacing: .01em;
}
.portal-footer-copy {
    color: rgba(255,255,255,.68);
}

.kjp-official-sheet {
    position: relative;
}
.kjp-official-madrasah-footer {
    position: absolute;
    right: 16mm;
    bottom: 6.5mm;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    color: #111;
    font-family: Arial, Helvetica, sans-serif;
    font-style: italic;
    text-align: right;
    line-height: 1.25;
    letter-spacing: .01em;
    white-space: nowrap;
}
.kjp-official-footer-school {
    font-size: 9.5pt;
    font-weight: 700;
}
.kjp-official-footer-time {
    margin-top: .7mm;
    font-size: 8.5pt;
    font-weight: 400;
}

@media print {
    .kjp-official-madrasah-footer {
        right: 16mm;
        bottom: 6.5mm;
    }
    .kjp-official-footer-school { font-size: 9.5pt; }
    .kjp-official-footer-time { font-size: 8.5pt; }
}

/* V15 - Upload berkas persyaratan oleh pendaftar */
.applicant-upload-page {
    max-width: 1180px;
}
.upload-summary-card {
    padding: 24px 26px;
    background: #fff;
    border: 1px solid var(--kjp-border);
    border-radius: 20px;
    box-shadow: 0 14px 34px rgba(18, 48, 87, .07);
}
.upload-progress {
    height: 12px;
    border-radius: 999px;
    background: #e8eef7;
}
.upload-progress .progress-bar {
    border-radius: 999px;
    background: linear-gradient(90deg, #0d47a1, #1e88e5);
    font-size: .65rem;
    font-weight: 700;
}
.document-upload-card {
    padding: 22px;
    background: #fff;
    border: 1px solid var(--kjp-border);
    border-radius: 18px;
    box-shadow: 0 12px 28px rgba(18, 48, 87, .06);
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
    scroll-margin-top: 92px;
}
.document-upload-card:hover {
    transform: translateY(-2px);
    border-color: #bfd2ed;
    box-shadow: 0 16px 34px rgba(18, 48, 87, .10);
}
.document-upload-card.is-uploaded {
    border-color: #b9dfc7;
    background: linear-gradient(180deg, #fff, #fbfffc);
}
.document-upload-icon {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: var(--kjp-primary);
    background: #eaf2ff;
    font-size: 1.3rem;
}
.document-upload-card.is-uploaded .document-upload-icon {
    color: #137333;
    background: #e9f7ee;
}
.uploaded-file-info {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
    padding: 12px 13px;
    border-radius: 12px;
    border: 1px solid #dfe8e2;
    background: #f7fbf8;
}
.uploaded-file-info > i {
    flex: 0 0 auto;
    font-size: 1.35rem;
}
.upload-document-form .input-group > .form-control {
    min-width: 0;
}

.admin-document-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 18px;
}
.admin-document-item {
    min-width: 0;
    padding: 16px;
    border: 1px solid #e1e7f0;
    border-radius: 14px;
    background: #fafcff;
}
.admin-document-item.is-uploaded {
    border-color: #bedfc9;
    background: #fbfffc;
}
.admin-document-icon {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    color: var(--kjp-primary);
    background: #e9f1ff;
    font-size: 1.1rem;
}
.admin-document-item.is-uploaded .admin-document-icon {
    color: #137333;
    background: #e7f6ec;
}
.admin-document-progress {
    height: 7px;
    border-radius: 99px;
    background: #e8edf5;
}
.admin-document-progress .progress-bar {
    border-radius: 99px;
}

@media (max-width: 991.98px) {
    .portal-navbar .navbar-nav {
        align-items: stretch !important;
        padding-top: 12px;
        padding-bottom: 10px;
    }
    .portal-navbar .navbar-nav .btn {
        width: 100%;
        margin: 4px 0 0 !important;
    }
    .admin-document-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .upload-summary-card,
    .document-upload-card {
        padding: 18px;
    }
    .document-upload-card > .d-flex {
        align-items: flex-start;
    }
    .document-upload-icon {
        width: 42px;
        height: 42px;
        flex-basis: 42px;
    }
    .upload-document-form .input-group {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .upload-document-form .input-group > .form-control,
    .upload-document-form .input-group > .btn {
        width: 100%;
        border-radius: 10px !important;
    }
}
