/* =========================================================
   DPT PAGE
   Semua selector dibatasi dalam #dpt-ui
========================================================= */

#dpt-ui {
    --dpt-blue: #2563eb;
    --dpt-blue-dark: #1d4ed8;
    --dpt-navy: #0f172a;
    --dpt-text: #1e293b;
    --dpt-muted: #64748b;
    --dpt-border: #e2e8f0;
    --dpt-soft: #f8fafc;
    --dpt-green: #16a34a;
    --dpt-red: #dc2626;

    width: 100%;
    color: var(--dpt-text);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
}

#dpt-ui *,
#dpt-ui *::before,
#dpt-ui *::after {
    box-sizing: border-box;
}

#dpt-ui button,
#dpt-ui input {
    font: inherit;
}

#dpt-ui button {
    cursor: pointer;
}

#dpt-ui .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* =========================================================
   HALAMAN UTAMA
========================================================= */

#dpt-ui .dpt-page {
    width: min(760px, 100%);
    margin: 38px auto;
    padding: 0 18px;
}

#dpt-ui .dpt-card {
    overflow: hidden;
    border: 1px solid var(--dpt-border);
    border-radius: 28px;
    background: #ffffff;
    box-shadow:
        0 24px 70px rgba(15, 23, 42, 0.1),
        0 4px 12px rgba(15, 23, 42, 0.04);
}

/* =========================================================
   HEADER
========================================================= */

#dpt-ui .dpt-header {
    position: relative;
    display: flex;
    align-items: center;
    gap: 18px;
    overflow: hidden;
    padding: 34px 34px;
    color: #ffffff;
    background:
        linear-gradient(
            135deg,
            var(--dpt-blue) 0%,
            var(--dpt-blue-dark) 100%
        );
}

#dpt-ui .dpt-header::before,
#dpt-ui .dpt-header::after {
    position: absolute;
    content: "";
    border-radius: 50%;
    pointer-events: none;
}

#dpt-ui .dpt-header::before {
    top: -90px;
    right: -60px;
    width: 230px;
    height: 230px;
    background: rgba(255, 255, 255, 0.1);
}

#dpt-ui .dpt-header::after {
    bottom: -100px;
    left: -70px;
    width: 210px;
    height: 210px;
    background: rgba(255, 255, 255, 0.06);
}

#dpt-ui .dpt-header-icon {
    position: relative;
    z-index: 1;
    display: grid;
    flex: 0 0 58px;
    width: 58px;
    height: 58px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 18px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    font-size: 28px;
    font-weight: 800;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.1);
}

#dpt-ui .dpt-header-content {
    position: relative;
    z-index: 1;
}

#dpt-ui .dpt-label {
    display: block;
    margin-bottom: 9px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

#dpt-ui .dpt-header h1 {
    margin: 0 0 9px;
    color: #ffffff;
    font-size: clamp(22px, 4vw, 30px);
    font-weight: 800;
    line-height: 1.2;
}

#dpt-ui .dpt-header p {
    max-width: 530px;
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    line-height: 1.65;
}

/* =========================================================
   FORM
========================================================= */

#dpt-ui .dpt-form-wrapper {
    padding: 32px 34px 30px;
}

#dpt-ui .dpt-form-heading {
    margin-bottom: 26px;
}

#dpt-ui .dpt-form-heading h2 {
    margin: 0 0 7px;
    color: var(--dpt-navy);
    font-size: 20px;
    font-weight: 800;
}

#dpt-ui .dpt-form-heading p {
    margin: 0;
    color: var(--dpt-muted);
    font-size: 13px;
    line-height: 1.65;
}

#dpt-ui .dpt-form-group {
    margin-bottom: 20px;
}

#dpt-ui .dpt-form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--dpt-text);
    font-size: 13px;
    font-weight: 700;
}

#dpt-ui .dpt-input-wrapper {
    position: relative;
}

#dpt-ui .dpt-input-icon {
    position: absolute;
    top: 50%;
    left: 16px;
    z-index: 1;
    display: grid;
    width: 25px;
    height: 25px;
    place-items: center;
    border-radius: 8px;
    color: var(--dpt-blue);
    background: #eff6ff;
    font-size: 13px;
    font-weight: 800;
    transform: translateY(-50%);
}

#dpt-ui .dpt-form-group input {
    width: 100%;
    height: 56px;
    padding: 0 16px 0 53px;
    border: 2px solid var(--dpt-border);
    border-radius: 15px;
    outline: none;
    color: var(--dpt-text);
    background: #ffffff;
    font-size: 14px;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

#dpt-ui .dpt-form-group input:focus {
    border-color: var(--dpt-blue);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.11);
}

#dpt-ui .dpt-form-group input::placeholder {
    color: #94a3b8;
}

#dpt-ui .dpt-input-help {
    display: block;
    margin-top: 7px;
    color: #94a3b8;
    font-size: 11px;
    line-height: 1.5;
}

/* =========================================================
   BUTTON
========================================================= */

#dpt-ui .dpt-primary-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    min-height: 54px;
    border: 0;
    border-radius: 15px;
    color: #ffffff;
    background: linear-gradient(
        135deg,
        var(--dpt-blue),
        var(--dpt-blue-dark)
    );
    font-size: 14px;
    font-weight: 800;
    box-shadow: 0 12px 25px rgba(37, 99, 235, 0.22);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        opacity 0.2s ease;
}

#dpt-ui .dpt-primary-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(37, 99, 235, 0.3);
}

#dpt-ui .dpt-primary-button:active {
    transform: translateY(0);
}

#dpt-ui .dpt-primary-button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
}

#dpt-ui .button-arrow {
    font-size: 20px;
    line-height: 1;
}

#dpt-ui .dpt-secondary-button {
    width: 100%;
    min-height: 50px;
    margin-top: 10px;
    border: 0;
    border-radius: 14px;
    color: #475569;
    background: #e2e8f0;
    font-size: 14px;
    font-weight: 700;
}

#dpt-ui .dpt-secondary-button:hover {
    background: #cbd5e1;
}

#dpt-ui .dpt-security-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 18px;
    color: #94a3b8;
    font-size: 11px;
    line-height: 1.5;
    text-align: center;
}

/* =========================================================
   PESAN
========================================================= */

#dpt-ui #dpt-message {
    display: none;
    width: 100%;
    margin-top: 16px;
    padding: 13px 15px;
    border-radius: 13px;
    font-size: 13px;
    line-height: 1.6;
    animation: dptAlert 0.25s ease;
}

#dpt-ui .dpt-success {
    border: 1px solid #a7f3d0;
    color: #065f46;
    background: #ecfdf5;
}

#dpt-ui .dpt-error {
    border: 1px solid #fecaca;
    color: #991b1b;
    background: #fef2f2;
}

/* =========================================================
   MODAL
========================================================= */

#dpt-ui .dpt-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    inset: 0;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(8px);
}

#dpt-ui .dpt-modal.active {
    display: flex;
}

#dpt-ui .dpt-modal-box {
    width: 100%;
    max-width: 500px;
    overflow: hidden;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.25);
    animation: dptModalShow 0.28s ease;
}

#dpt-ui .otp-box {
    max-width: 480px;
}

#dpt-ui .otp-header {
    padding: 30px 26px 15px;
    text-align: center;
}

#dpt-ui .otp-icon {
    display: grid;
    width: 60px;
    height: 60px;
    margin: 0 auto 14px;
    place-items: center;
    border-radius: 18px;
    background: #dcfce7;
    font-size: 27px;
}

#dpt-ui .modal-step {
    display: block;
    margin-bottom: 8px;
    color: var(--dpt-blue);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.2px;
}

#dpt-ui .otp-header h2 {
    margin: 0 0 9px;
    color: var(--dpt-navy);
    font-size: 22px;
}

#dpt-ui .otp-header p {
    margin: 0;
    color: var(--dpt-muted);
    font-size: 13px;
    line-height: 1.7;
}

#dpt-ui .otp-body {
    padding: 0 26px;
}

#dpt-ui #otp {
    width: 100%;
    height: 58px;
    border: 2px solid var(--dpt-border);
    border-radius: 15px;
    outline: none;
    color: var(--dpt-navy);
    font-size: 23px;
    font-weight: 800;
    letter-spacing: 6px;
    text-align: center;
}

#dpt-ui #otp:focus {
    border-color: var(--dpt-blue);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.11);
}

#dpt-ui .otp-note {
    margin-top: 10px;
    color: var(--dpt-muted);
    font-size: 12px;
    line-height: 1.6;
    text-align: center;
}

#dpt-ui .otp-footer {
    padding: 20px 26px 26px;
}

/* =========================================================
   HASIL
========================================================= */

#dpt-ui .hasil-modern {
    max-width: 820px;
}

#dpt-ui .hasil-top {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    overflow: hidden;
    padding: 30px;
    color: #ffffff;
    background: linear-gradient(
        135deg,
        var(--dpt-blue),
        var(--dpt-blue-dark)
    );
}

#dpt-ui .hasil-logo {
    position: relative;
    z-index: 1;
    display: grid;
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.16);
    font-size: 30px;
    font-weight: 800;
}

#dpt-ui .hasil-sambutan {
    position: relative;
    z-index: 1;
}

#dpt-ui .hasil-keterangan {
    display: block;
    margin-bottom: 5px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 13px;
}

#dpt-ui .hasil-top h2 {
    margin: 0;
    font-size: 24px;
    line-height: 1.3;
}

#dpt-ui .hasil-top p {
    margin: 8px 0 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 13px;
    line-height: 1.6;
}

#dpt-ui .hasil-content {
    padding: 22px;
    background: #f8fafc;
}

#dpt-ui .hasil-detail-card,
#dpt-ui .status-card,
#dpt-ui .dpt-info-box {
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

#dpt-ui .hasil-detail-card {
    overflow: hidden;
    margin-bottom: 16px;
}

#dpt-ui .detail-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 18px;
    border-bottom: 1px solid #eef2f7;
}

#dpt-ui .detail-row:last-child {
    border-bottom: 0;
}

#dpt-ui .detail-row span {
    color: var(--dpt-muted);
    font-size: 12px;
    font-weight: 600;
}

#dpt-ui .detail-row strong {
    color: var(--dpt-navy);
    font-size: 14px;
    text-align: right;
}

#dpt-ui .status-card {
    margin-bottom: 16px;
    padding: 18px;
    text-align: center;
}

#dpt-ui .status-title {
    display: block;
    margin-bottom: 12px;
    color: #94a3b8;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
}

#dpt-ui .status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 160px;
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

#dpt-ui .status-hijau {
    border: 1px solid #86efac;
    color: #15803d;
    background: #dcfce7;
}

#dpt-ui .status-biru {
    border: 1px solid #93c5fd;
    color: #1d4ed8;
    background: #dbeafe;
}

#dpt-ui .status-merah {
    border: 1px solid #fca5a5;
    color: #dc2626;
    background: #fee2e2;
}

#dpt-ui .dpt-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

#dpt-ui .dpt-info-box {
    padding: 16px;
}

#dpt-ui .dpt-info-title {
    display: block;
    margin-bottom: 6px;
    color: #94a3b8;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
}

#dpt-ui .dpt-info-value {
    color: var(--dpt-navy);
    font-size: 14px;
    line-height: 1.6;
}

#dpt-ui .hasil-informasi {
    margin-bottom: 16px;
    padding: 16px;
    border: 1px solid #dbeafe;
    border-radius: 16px;
    color: #475569;
    background: #eff6ff;
    font-size: 13px;
    line-height: 1.7;
    text-align: center;
}

#dpt-ui .hasil-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#dpt-ui .btn-lapor,
#dpt-ui #btn-tutup-hasil {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 52px;
    border: 0;
    border-radius: 14px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}

#dpt-ui .btn-lapor {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
}

#dpt-ui #btn-tutup-hasil {
    background: var(--dpt-navy);
}

/* =========================================================
   ANIMASI
========================================================= */

@keyframes dptAlert {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes dptModalShow {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* =========================================================
   RESPONSIVE MOBILE
========================================================= */

@media screen and (max-width: 768px) {
    #dpt-ui .dpt-page {
        margin: 16px auto;
        padding: 0 10px;
    }

    #dpt-ui .dpt-card {
        border-radius: 20px;
    }

    #dpt-ui .dpt-header {
        display: block;
        padding: 26px 20px;
        text-align: center;
    }

    #dpt-ui .dpt-header-icon {
        margin: 0 auto 16px;
    }

    #dpt-ui .dpt-header h1 {
        font-size: 23px;
    }

    #dpt-ui .dpt-header p {
        font-size: 13px;
    }

    #dpt-ui .dpt-form-wrapper {
        padding: 24px 20px;
    }

    #dpt-ui .dpt-form-heading h2 {
        font-size: 18px;
    }

    #dpt-ui .dpt-form-group input {
        height: 52px;
    }

    #dpt-ui .dpt-modal {
        align-items: center;
        padding: 12px;
    }

    #dpt-ui .dpt-modal-box {
        max-height: 92vh;
        overflow-y: auto;
        border-radius: 20px;
    }

    #dpt-ui .otp-header,
    #dpt-ui .otp-body {
        padding-right: 20px;
        padding-left: 20px;
    }

    #dpt-ui .otp-footer {
        padding: 18px 20px 20px;
    }

    #dpt-ui .hasil-top {
        display: block;
        padding: 26px 20px;
        text-align: center;
    }

    #dpt-ui .hasil-logo {
        margin: 0 auto 12px;
    }

    #dpt-ui .hasil-content {
        padding: 15px;
    }

    #dpt-ui .detail-row {
        display: block;
        padding: 14px;
    }

    #dpt-ui .detail-row span,
    #dpt-ui .detail-row strong {
        display: block;
        width: 100%;
        text-align: left;
    }

    #dpt-ui .detail-row strong {
        margin-top: 4px;
    }

    #dpt-ui .dpt-info-grid {
        grid-template-columns: 1fr;
    }

    #dpt-ui .dpt-info-box {
        padding: 14px;
    }

    #dpt-ui .status-badge {
        width: 100%;
    }
}

@media screen and (max-width: 420px) {
    #dpt-ui .dpt-header h1 {
        font-size: 21px;
    }

    #dpt-ui .dpt-header p,
    #dpt-ui .dpt-form-heading p {
        font-size: 12px;
    }

    #dpt-ui .dpt-primary-button {
        min-height: 51px;
    }

    #dpt-ui .hasil-top h2 {
        font-size: 21px;
    }
}