/* ==========================================
   PAGE LAYOUT
========================================== */

.main-content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px 80px;
}

.pepa-section-header {
    max-width: 760px;
    margin: 0 auto 32px;
    text-align: center;
}

.pepa-section-title-group h2 {
    font-size: 38px;
    font-weight: 800;
    color: #1e3a8a;
    margin-bottom: 12px;
    line-height: 1.2;
}

.pepa-section-title-group p {
    max-width: 650px;
    margin: 0 auto;
    font-size: 16px;
    line-height: 1.8;
    color: #64748b;
}

/* ── Search Card ─────────────────────────────────────── */
.pepa-search-wrapper {
    max-width: 700px;
    margin: 0 auto 30px;
}

.pepa-search-card {
    background: white;
    border-radius: 24px;
    padding: 44px 40px 36px;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.05),
        0 20px 50px -12px rgba(30, 58, 138, 0.12);
    border: 1px solid rgba(226, 232, 240, 0.6);
    position: relative;
    overflow: hidden;
}

.pepa-search-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2d5bff 0%, #7c3aed 50%, #ff6b35 100%);
}

.pepa-search-header {
    text-align: center;
    margin-bottom: 28px;
}

.pepa-search-icon-wrapper {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 22px;
    color: #4f46e5;
}

.pepa-search-title {
    font-size: 22px;
    font-weight: 700;
    color: #1e3a8a;
    margin-bottom: 8px;
}

.pepa-search-description {
    font-size: 14px;
    color: #64748b;
    line-height: 1.6;
}

.pepa-search-form {
    display: flex;
    gap: 14px;
    align-items: stretch;
}

.pepa-input-group {
    flex: 1;
    position: relative;
}

.pepa-input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 15px;
    pointer-events: none;
    transition: color 0.3s;
}

.pepa-form-input {
    width: 100%;
    padding: 14px 20px 14px 44px;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    font-size: 16px;
    font-family: "Poppins", sans-serif;
    color: #1e3a8a;
    background: white;
    transition: all 0.3s;
    box-sizing: border-box;
}

.pepa-form-input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.pepa-form-input:focus + .pepa-input-icon,
.pepa-input-group:focus-within .pepa-input-icon {
    color: #4f46e5;
}

.pepa-form-input::placeholder {
    color: #94a3b8;
}

.pepa-btn-search {
    padding: 14px 32px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: "Poppins", sans-serif;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.35);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.pepa-btn-search:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.45);
}

.pepa-btn-search:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.pepa-dummy-hint {
    margin-top: 16px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #fefce8 0%, #fef9c3 100%);
    border: 1px solid #fde68a;
    border-radius: 10px;
    font-size: 12px;
    color: #92400e;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pepa-dummy-hint i {
    color: #d97706;
    font-size: 14px;
    flex-shrink: 0;
}

/* ── Spinner ─────────────────────────────────────────── */
.pepa-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: pepaSpin 0.8s linear infinite;
}

@keyframes pepaSpin {
    to {
        transform: rotate(360deg);
    }
}

/* ── Initial State ───────────────────────────────────── */
.pepa-initial-state {
    text-align: center;
    padding: 60px 40px;
    background: white;
    border-radius: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid #f1f5f9;
}

.pepa-initial-illustration {
    margin-bottom: 24px;
}

.pepa-illustration-circle {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 42px;
    color: #6366f1;
    animation: pepaPulse 3s ease-in-out infinite;
}

@keyframes pepaPulse {
    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.15);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 15px rgba(99, 102, 241, 0);
    }
}

.pepa-illustration-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
}

.pepa-illustration-dots span {
    width: 8px;
    height: 8px;
    background: #c7d2fe;
    border-radius: 50%;
    animation: pepaDots 1.4s infinite ease-in-out both;
}

.pepa-illustration-dots span:nth-child(2) {
    animation-delay: 0.16s;
}

.pepa-illustration-dots span:nth-child(3) {
    animation-delay: 0.32s;
}

@keyframes pepaDots {
    0%,
    80%,
    100% {
        transform: scale(0.6);
        opacity: 0.4;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.pepa-initial-title {
    font-size: 20px;
    font-weight: 700;
    color: #1e3a8a;
    margin-bottom: 8px;
}

.pepa-initial-text {
    font-size: 15px;
    color: #64748b;
    line-height: 1.6;
    max-width: 480px;
    margin: 0 auto;
}

/* ── Profile Card ────────────────────────────────────── */
.pepa-profile-card {
    background: white;
    border-radius: 20px;
    padding: 24px 32px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
    animation: pepaSlideUp 0.4s ease;
}

.pepa-profile-avatar {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
    color: white;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.pepa-profile-name {
    font-size: 18px;
    font-weight: 700;
    color: #1e3a8a;
    margin-bottom: 4px;
}

.pepa-profile-meta {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
}

.pepa-profile-badge {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    border-radius: 12px;
    color: #4f46e5;
    font-weight: 700;
    font-size: 15px;
    flex-shrink: 0;
}

.pepa-profile-badge i {
    font-size: 18px;
}

/* ── Score Card ──────────────────────────────────────── */
.pepa-score-card {
    background: white;
    border-radius: 20px;
    padding: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid #f1f5f9;
    margin-bottom: 24px;
    animation: pepaSlideUp 0.45s ease;
    overflow: hidden;
}

.pepa-score-card-header {
    padding: 28px 32px 20px;
    border-bottom: 1px solid #f1f5f9;
}

.pepa-score-card-title-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

.pepa-score-card-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.25);
}

.pepa-score-card-title {
    font-size: 18px;
    font-weight: 700;
    color: #1e3a8a;
    margin-bottom: 2px;
}

.pepa-score-card-subtitle {
    font-size: 13px;
    color: #94a3b8;
    font-weight: 500;
}

.pepa-table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.pepa-table-responsive::-webkit-scrollbar {
    height: 6px;
}

.pepa-table-responsive::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.pepa-data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.pepa-data-table thead tr {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.pepa-data-table th {
    padding: 14px 20px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

.pepa-data-table td {
    padding: 16px 20px;
    color: #1e3a8a;
    font-size: 14px;
    border-bottom: 1px solid #f1f5f9;
    font-weight: 500;
}

.pepa-data-table tbody tr:last-child td {
    border-bottom: none;
}

.pepa-data-table tbody tr {
    transition: all 0.2s;
}

.pepa-data-table tbody tr:hover td {
    background: #faf5ff;
}

.pepa-attempt-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    border-radius: 10px;
    font-weight: 700;
    color: #4f46e5;
    font-size: 13px;
}

.pepa-score-highlight {
    font-size: 18px;
    font-weight: 800;
    color: #4f46e5;
}

.pepa-badge {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.pepa-badge-success {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
}

.pepa-badge-pending {
    background: #fef3c7;
    color: #92400e;
}

/* ── Download Button ─────────────────────────────────── */
.pepa-btn-download {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white !important;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 3px 10px rgba(255, 107, 53, 0.25);
    white-space: nowrap;
}

.pepa-btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(255, 107, 53, 0.4);
    color: white !important;
    text-decoration: none;
}

.pepa-btn-download i {
    font-size: 14px;
}

.pepa-empty-row td {
    text-align: center;
    color: #94a3b8;
    padding: 40px 16px !important;
    font-size: 14px;
}

/* ── Info Box ────────────────────────────────────────── */
.pepa-info-box {
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    border: 1.5px solid #c7d2fe;
    border-radius: 16px;
    padding: 22px 28px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    animation: pepaSlideUp 0.5s ease;
    margin-bottom: 24px;
}

.pepa-info-icon {
    width: 44px;
    height: 44px;
    background: #4f46e5;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.25);
}

.pepa-info-title {
    font-size: 15px;
    font-weight: 700;
    color: #312e81;
    margin-bottom: 4px;
}

.pepa-info-desc {
    font-size: 13px;
    color: #4338ca;
    line-height: 1.5;
}

/* ── WhatsApp Box ────────────────────────────────────── */
.pepa-wa-box {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1.5px solid #bbf7d0;
    border-radius: 16px;
    padding: 22px 28px;
    display: flex;
    align-items: center;
    gap: 18px;
    animation: pepaSlideUp 0.55s ease;
}

.pepa-wa-icon {
    width: 48px;
    height: 48px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.3);
}

.pepa-wa-title {
    font-size: 15px;
    font-weight: 700;
    color: #166534;
    margin-bottom: 4px;
}

.pepa-wa-desc {
    font-size: 13px;
    color: #15803d;
    line-height: 1.5;
}

.pepa-btn-wa {
    margin-left: auto;
    padding: 10px 22px;
    background: #25d366;
    color: white !important;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: "Poppins", sans-serif;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.25);
}

.pepa-btn-wa:hover {
    background: #128c4a;
    transform: translateY(-2px);
    color: white !important;
    text-decoration: none;
}

/* ── Empty State ─────────────────────────────────────── */
.pepa-empty-state {
    text-align: center;
    padding: 60px 40px;
    background: white;
    border-radius: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid #f1f5f9;
    animation: pepaSlideUp 0.5s ease;
}

.pepa-empty-illustration {
    margin-bottom: 20px;
}

.pepa-empty-circle {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 38px;
    color: #ef4444;
}

.pepa-empty-title {
    font-size: 22px;
    font-weight: 700;
    color: #1e3a8a;
    margin-bottom: 8px;
}

.pepa-empty-text {
    font-size: 15px;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 24px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.pepa-btn-retry {
    padding: 12px 32px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: "Poppins", sans-serif;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.35);
}

.pepa-btn-retry:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.45);
}

/* ── Animations ──────────────────────────────────────── */
@keyframes pepaSlideUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Utilities ───────────────────────────────────────── */
.scroll-target {
    scroll-margin-top: 100px;
}

.hidden {
    display: none !important;
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 768px) {
    .main-content {
        padding: 30px 20px 60px;
    }

    .pepa-section-header {
        margin-bottom: 24px;
    }

    .pepa-section-title-group h2 {
        font-size: 28px;
    }

    .pepa-section-title-group p {
        font-size: 15px;
    }

    .pepa-search-card {
        padding: 28px 18px 24px;
    }

    .pepa-search-form {
        flex-direction: column;
    }

    .pepa-profile-card {
        flex-wrap: wrap;
        padding: 20px;
    }

    .pepa-profile-badge {
        margin-left: 0;
        width: 100%;
        justify-content: center;
    }

    .pepa-score-card-header {
        padding: 20px;
    }

    .pepa-data-table th,
    .pepa-data-table td {
        padding: 10px 12px;
        font-size: 12px;
    }

    .pepa-info-box,
    .pepa-wa-box {
        flex-wrap: wrap;
    }

    .pepa-btn-wa {
        margin-left: 0;
        width: 100%;
        justify-content: center;
    }

    .pepa-initial-state,
    .pepa-empty-state {
        padding: 40px 20px;
    }

    /* ── Tambahan untuk Memperbaiki Header yang Terpotong di Mobile ── */
    .page-header {
        position: relative;
        padding: 30px 20px;
        text-align: center;
        margin-top: 60px; /* Sesuaikan dengan tinggi navbar jika navbar-nya fixed */
    }

    .page-title {
        font-size: 26px;
        font-weight: 800;
        color: #1e3a8a;
        margin-top: 8px;
    }

    @media (max-width: 768px) {
        .page-header {
            padding-top: 20px;
            margin-top: 50px; /* Mencegah tertutup navbar atau terpotong atas layar */
        }

        .page-title {
            font-size: 22px;
        }
    }

    /* ── Sembunyikan judul utama di bagian atas khusus untuk Mobile ── */
@media (max-width: 768px) {
    .page-header .page-title {
        display: none !important;
    }
    
    /* Beri sedikit jarak aman untuk header di mobile setelah judulnya disembunyikan */
    .page-header {
        margin-top: 60px; 
        padding: 10px 16px;
    }
}
}
