/* =========================================
           BASE & VARIABLES
        ========================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --blue: #1a5cdb;
    --blue-dark: #1348b0;
    --blue-light: #e8f0fe;
    --green: #16a34a;
    --green-light: #dcfce7;
    --text: #1a1f36;
    --muted: #64748b;
    --border: #dde3f0;
    --bg-page: #f0f5ff;
    --white: #ffffff;
}

html,
body {
    height: 100%;
    overflow: hidden; /* satu halaman penuh, tanpa scroll */
}

body {
    font-family: "Inter", sans-serif;
    background: var(--bg-page);
    color: var(--text);
    display: flex;
    flex-direction: column;
}

/* =========================================
           LAYOUT WRAPPER
        ========================================= */
.page {
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding: 0;
    overflow: hidden;
    width: 100%;
    position: relative;
}

/* =========================================
           HEADER
        ========================================= */
.header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    height: 56px;
    flex-shrink: 0;
    width: 100%;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1536px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-text {
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--blue);
    letter-spacing: 0.01em;
    line-height: 1.2;
}

.logo-sub {
    font-size: 11px;
    color: var(--muted);
    font-weight: 400;
}

.login-btn {
    background: var(--blue);
    color: white;
    border: none;
    padding: 0 18px;
    height: 34px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    font-family: "Inter", sans-serif;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.15s;
}

.login-btn:hover {
    background: var(--blue-dark);
}

.login-btn svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* =========================================
           MAIN LAYOUT (2 COLUMNS)
        ========================================= */
.main-layout {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 24px;
    gap: 40px;
    flex: 1;
    width: 100%;
    max-width: 1536px;
    margin: 0 auto;
}

/* =========================================
           HERO SECTION (LEFT)
        ========================================= */
.hero {
    flex: 0 0 35%;
    padding: 0;
}

.hero-inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
}

.hero-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--blue);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
}

.hero-big {
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 42px;
    font-weight: 700;
    color: var(--blue);
    line-height: 1.1;
    margin-bottom: 4px;
}

.hero-desc {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.6;
}

.hero-badge {
    background: var(--green-light);
    color: var(--green);
    font-size: 12px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* =========================================
           CARDS SECTION (RIGHT)
        ========================================= */
.cards-section {
    flex: 1;
    padding: 0;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition:
        border-color 0.15s,
        box-shadow 0.15s;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.card:hover {
    border-color: var(--blue);
    box-shadow: 0 2px 8px rgba(26, 92, 219, 0.12);
}

.card-img {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    background: #f8faff;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.card-label {
    width: 100%;
    background: var(--blue);
    color: white;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 6px;
    line-height: 1.4;
}

/* =========================================
           HERO STEPS (ALUR LAYANAN)
        ========================================= */
.hero-steps {
    margin-top: 32px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    width: 100%;
}

.hero-steps-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--blue);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
    border-bottom: 1px dashed var(--border);
    padding-bottom: 8px;
}

.hero-steps-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.hero-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.hero-step-icon {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: var(--blue-light);
    color: var(--blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}

.hero-step-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hero-step-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.2;
}

.hero-step-desc {
    font-size: 11px;
    color: var(--muted);
    line-height: 1.4;
}

/* =========================================
           CEK STATUS TTE
        ========================================= */
.cek-status-box {
    margin-top: 24px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    width: 100%;
}

.cek-status-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--blue);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
    border-bottom: 1px dashed var(--border);
    padding-bottom: 8px;
}

.cek-status-form {
    display: flex;
    gap: 8px;
}

.cek-status-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    font-family: "Inter", sans-serif;
    outline: none;
    transition: border-color 0.15s;
}

.cek-status-input:focus {
    border-color: var(--blue);
}

.cek-status-btn {
    background: var(--blue);
    color: white;
    border: none;
    padding: 0 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: "Inter", sans-serif;
    transition: background 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cek-status-btn:hover {
    background: var(--blue-dark);
}

/* =========================================
           MODAL
        ========================================= */
[x-cloak] {
    display: none !important;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 20, 50, 0.55);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal {
    background: white;
    border-radius: 14px;
    width: 100%;
    max-width: 560px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.modal-head {
    padding: 18px 20px 14px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.modal-title {
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}

.modal-close {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 18px;
    line-height: 1;
    font-family: "Inter", sans-serif;
}

.modal-close:hover {
    background: #f5f5f5;
}

.modal-body {
    padding: 16px 20px;
    overflow-y: auto;
    flex: 1;
}

.modal-body h3 {
    font-size: 11px;
    font-weight: 600;
    color: var(--blue);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 6px;
    margin-top: 14px;
}

.modal-body h3:first-child {
    margin-top: 0;
}

.modal-body p {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 4px;
}

.modal-body ol {
    list-style-type: decimal;
    padding-left: 20px;
}

.modal-body ul {
    list-style-type: disc;
    padding-left: 20px;
}

.modal-body ol,
.modal-body ul {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.7;
    margin-bottom: 8px;
}

.modal-body li {
    padding-left: 4px;
}

.modal-body strong {
    color: var(--text);
    font-weight: 500;
}

.modal-foot {
    padding: 14px 20px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

.modal-cta {
    display: block;
    width: 100%;
    background: var(--blue);
    color: white;
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    font-family: "Inter", sans-serif;
    transition: background 0.15s;
}

.modal-cta:hover {
    background: var(--blue-dark);
}

/* =========================================
           RESPONSIVE — TABLET
        ========================================= */
@media (max-width: 960px) {
    .main-layout {
        flex-direction: column;
        gap: 24px;
    }
    .hero {
        flex: none;
        width: 100%;
        text-align: center;
    }
    .hero-inner {
        align-items: center;
    }
    .hero-desc {
        max-width: 100%;
    }
    .hero-steps {
        text-align: left;
    }
    .cards-section {
        flex: none;
        width: 100%;
    }
    .cards-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* =========================================
           RESPONSIVE — MOBILE
        ========================================= */
@media (max-width: 640px) {
    html,
    body {
        height: auto;
        overflow: auto; /* mobile boleh scroll karena layarnya kecil */
    }

    .page {
        height: auto;
        overflow: visible;
    }

    .main-layout {
        padding: 16px;
    }

    .hero {
        padding: 0;
    }

    .hero-big {
        font-size: 26px;
    }

    .hero-inner {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        gap: 8px;
    }

    .cards-section {
        padding: 0;
    }

    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .card-label {
        font-size: 13px;
        padding: 8px 4px;
    }

    .hero-steps {
        margin-top: 24px;
        padding: 14px;
    }
}

@media (max-width: 420px) {
    .main-layout {
        padding: 14px;
    }

    .header {
        padding: 0 14px;
    }

    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Styling Error Alert */
.alert-error {
    color: #dc2626;
    background-color: #fef2f2;
    border: 1px solid #fee2e2;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 14px;
}

/* Overlay / Latar Belakang Gelap */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px); /* Efek blur modern */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.25s ease-out;
}

/* Kartu Modal */
.modal-card {
    background-color: #ffffff;
    border-radius: 16px;
    padding: 24px;
    max-width: 400px;
    width: 100%;
    margin: 0 16px;
    box-shadow:
        0 10px 25px -5px rgba(0, 0, 0, 0.1),
        0 8px 10px -6px rgba(0, 0, 0, 0.1);
    border: 1px solid #f3f4f6;
}

/* Header */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #111827;
}

.modal-close-x {
    text-decoration: none;
    color: #9ca3af;
    font-size: 24px;
    font-weight: 600;
    line-height: 1;
}

.modal-close-x:hover {
    color: #4b5563;
}

/* Body & Info */
.modal-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-group {
    display: flex;
    font-size: 14px;
}

.info-label {
    width: 90px;
    font-weight: 600;
    color: #4b5563;
}

.info-value {
    color: #111827;
}

/* Badge Status */
.status-badge {
    background-color: #dcfce7;
    color: #15803d;
    padding: 2px 8px;
    border-radius: 99px;
    font-size: 12px;
    font-weight: 600;
}

/* Footer & Tombol Tutup */
.modal-footer {
    margin-top: 24px;
    display: flex;
    justify-content: flex-end;
}

.modal-btn-close {
    text-decoration: none;
    background-color: #f3f4f6;
    color: #374151;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.modal-btn-close:hover {
    background-color: #e5e7eb;
}

/* Animasi Fade In */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Container Utama Box Status */
.status-result-box {
    margin-top: 12px;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: all 0.3s ease;
}

/* Container untuk Badge Status */
.status-badge-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Badge Text (Status Utama) */
.status-badge {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 8px;
    border-radius: 4px;
    width: fit-content;
}

/* Teks Deskripsi / Pesan dari BSSN */
.status-message {
    margin: 4px 0 0 0;
    font-size: 12px;
    color: #4b5563;
    line-height: 1.5;
}

/* Efek Spinner Bulat */
.pure-spinner {
    display: none; /* Sembunyikan default */
    width: 18px;
    height: 18px;
    border: 2px solid #ffffff;
    border-bottom-color: transparent;
    border-radius: 50%;
    animation: rotation 0.8s linear infinite;
}

/* Animasi Berputar */
@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Tambahan UX: Beri efek transparan sedikit saat tombol disabled */
.cek-status-btn:disabled {
    opacity: 0.8;
    cursor: not-allowed;
}
