/* ==========================================================================
   Alur SPMB: formulir pendaftaran, cek status, dan konfirmasi.
   Melengkapi site.css dengan kerangka halaman dan kontrol unggah berkas.
   ========================================================================== */

.ppdb-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--paper);
}

.ppdb-page main {
    flex: 1;
}

/* Header ----------------------------------------------------------------- */
.ppdb-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(247, 245, 239, 0.96);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
}

.ppdb-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 76px;
}

.ppdb-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1 1 auto;
    color: var(--ink);
    text-decoration: none;
}

.ppdb-brand > span:last-child {
    min-width: 0;
}

.ppdb-brand .brand-mark {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    color: var(--forest-800);
}

.ppdb-brand .brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.ppdb-brand .brand-mark svg {
    width: 26px;
    height: 26px;
}

.ppdb-brand-name {
    display: block;
    font-family: var(--display);
    font-size: 1.02rem;
    font-weight: 600;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.ppdb-brand-sub {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ppdb-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: none;
}

.ppdb-nav a {
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 600;
    text-decoration: none;
}

.ppdb-nav a:hover {
    color: var(--forest-900);
}

.ppdb-nav a.btn {
    color: var(--forest-900);
}

.ppdb-nav a[aria-current="page"]:not(.btn) {
    color: var(--forest-950);
    background: var(--accent-soft);
    border: 1px solid var(--accent);
}

/* Page body -------------------------------------------------------------- */
.ppdb-hero h1 {
    font-size: clamp(2rem, 4.6vw, 3.20rem);
    max-width: 22ch;
}

.ppdb-card {
    width: 100%;
    max-width: 940px;
    margin-inline: auto;
    padding: clamp(22px, 4vw, 40px);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.ppdb-card-narrow {
    max-width: 620px;
}

.ppdb-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 24px;
    padding-block: 0 56px;
}

.ppdb-links a {
    color: var(--forest-800);
    font-size: 0.84rem;
    font-weight: 600;
    text-decoration: none;
}

.ppdb-links a:hover {
    text-decoration: underline;
}

/* Form steps ------------------------------------------------------------- */
.ppdb-fields {
    display: grid;
    gap: 16px;
}

/* Validation ------------------------------------------------------------- */
/* Gaya ringkasan galat dan status field dipakai bersama; lihat site.css. */

.file-field {
    display: grid;
    gap: 6px;
}

.ppdb-step {
    padding: 0;
    margin: 0 0 28px;
    border: 0;
}

.ppdb-step + .ppdb-step {
    padding-top: 26px;
    border-top: 1px solid var(--line);
}

.ppdb-step legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding: 0;
    color: var(--forest-950);
    font-family: var(--display);
    font-size: 1.2rem;
    font-weight: 600;
}

.ppdb-step-num {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--forest-900);
    color: var(--paper);
    font-family: var(--sans);
    font-size: 0.8rem;
    font-weight: 700;
}

.ppdb-step-note {
    margin-left: auto;
    color: var(--muted);
    font-family: var(--sans);
    font-size: 0.75rem;
    font-weight: 500;
}

/* File inputs ------------------------------------------------------------ */
.file-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.file-box {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 14px;
    background: var(--paper);
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color 0.16s ease, background 0.16s ease;
}

.file-box:hover {
    background: var(--forest-50);
    border-color: var(--forest-700);
}

.file-box:focus-within {
    border-style: solid;
    border-color: var(--forest-800);
}

.file-box.has-file {
    background: var(--forest-50);
    border-color: var(--forest-700);
    border-style: solid;
}

.file-box.has-file [data-file-status] {
    color: var(--forest-800);
    font-weight: 600;
}

.file-action {
    padding: 7px 12px;
    background: var(--white);
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    color: var(--forest-900);
    font-size: 0.76rem;
    font-weight: 700;
    white-space: nowrap;
}

.file-box:hover .file-action,
.file-box:focus-within .file-action {
    border-color: var(--forest-700);
}

.file-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 9px;
    color: var(--forest-700);
}

.file-icon svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.file-copy b {
    display: block;
    color: var(--ink);
    font-size: 0.9rem;
}

.file-copy span {
    display: block;
    color: var(--muted);
    font-size: 0.75rem;
}

/* Small labels and actions ---------------------------------------------- */
.req {
    color: var(--danger);
    font-weight: 700;
}

.opt {
    color: var(--muted);
    font-weight: 500;
}

.ppdb-hint {
    margin-top: 16px;
    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.65;
}

.ppdb-hint-tight {
    margin-top: 0;
}

.ppdb-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 26px;
}

.ppdb-actions .btn {
    min-width: 160px;
}

/* Status result ---------------------------------------------------------- */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.status-pending {
    background: #FEF0C7;
    color: #B54708;
}

.status-verified {
    background: #E0F2FE;
    color: #026AA2;
}

.status-accepted {
    background: #DDF7EA;
    color: #0C8A55;
}

.status-rejected {
    background: #FEE4E2;
    color: #B42318;
}

.detail-list {
    display: grid;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
}

.detail-list li {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 11px 0;
    border-top: 1px solid var(--line);
    font-size: 0.88rem;
}

.detail-list li:first-child {
    border-top: 0;
}

.detail-list dt,
.detail-list .label {
    color: var(--muted);
}

.detail-list strong {
    text-align: right;
    color: var(--ink);
}

.result-block {
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

.result-block h2 {
    font-size: 1.15rem;
    margin-bottom: 4px;
}

.notice-warning {
    margin-top: 20px;
    padding: 14px 16px;
    background: #FEF3F2;
    border-left: 3px solid var(--danger);
    border-radius: var(--radius-sm);
    color: #B42318;
    font-size: 0.86rem;
    font-weight: 600;
    line-height: 1.6;
}

/* Confirmation ----------------------------------------------------------- */
.registration-number {
    margin: 20px 0;
    padding: 18px 22px;
    background: var(--forest-50);
    border: 1px dashed var(--forest-700);
    border-radius: var(--radius);
    color: var(--forest-950);
    font-family: var(--display);
    font-size: clamp(1.4rem, 4vw, 2rem);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-align: center;
    word-break: break-all;
}

/* Footer ----------------------------------------------------------------- */
.ppdb-footer {
    background: var(--paper-2);
    border-top: 1px solid var(--line);
}

.ppdb-footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-block: 20px;
    color: var(--muted);
    font-size: 0.78rem;
}

.ppdb-footer-links {
    display: flex;
    gap: 18px;
}

.ppdb-footer a {
    color: var(--forest-800);
    text-decoration: none;
}

.ppdb-footer a:hover {
    text-decoration: underline;
}

/* Responsive ------------------------------------------------------------- */
@media (max-width: 860px) {
    .ppdb-nav a:not(.btn) {
        display: none;
    }
}

@media (max-width: 760px) {
    .ppdb-header-inner {
        min-height: 68px;
        gap: 12px;
    }

    .ppdb-brand-name {
        font-size: 0.95rem;
    }

    .ppdb-brand-sub {
        display: none;
    }

    .ppdb-step-note {
        margin-left: 0;
        flex-basis: 100%;
    }

    .file-grid {
        grid-template-columns: 1fr;
    }

    .ppdb-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .ppdb-actions .btn {
        width: 100%;
    }

    .ppdb-footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}
