/* ================================================================
   1. GLOBAL & COMMON COMPONENT (Digunakan di semua halaman)
   ================================================================ */
:root {
    /* Warna Brand Lo */
    --primary: #3182ce;
    --success: #28a745;
    --info: #17a2b8;
    --warning: #ffc107;
    --danger: #dc3545;
    --dark: #343a40;

    /* Variabel Pendukung (WAJIB ADA buat Pagination) */
    --card-border: #e2e8f0;
    --text-muted: #64748b;
    --bg-main: #f8fafc;
}

/* =========================================
   WPA FORM PENDAFTARAN & ALERTS
   ========================================= */

/* Alerts */
.wpa-alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.wpa-alert-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

.wpa-alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
}

.wpa-success-title {
    color: #16a34a;
    margin-top: 0;
}

.wpa-success-content {
    color: #15803d;
    font-size: 15px;
    margin-bottom: 20px;
}

/* Sponsor Info Box */
.wpa-sponsor-info-box {
    background: #f8fafc;
    padding: 16px 20px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 14px;
    text-align: left !important;
}

.wpa-sponsor-icon {
    color: #3b82f6;
    font-size: 28px;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.wpa-sponsor-label {
    margin: 0 0 2px 0;
    font-size: 13px;
    color: #64748b;
    font-weight: 600;
    text-align: left !important;
}

.wpa-sponsor-name {
    font-weight: 800;
    color: #1e293b;
    font-size: 16px;
    text-align: left !important;
}

.wpa-dot {
    height: 8px;
    width: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
}

.wpa-dot.aktif {
    background: var(--success);
}

.wpa-dot.belum_aktif,
.wpa-dot.pending {
    background: var(--warning);
}

.wpa-dot.blokir {
    background: var(--danger);
}

/* --- Perbaikan Ukuran Field Form --- */
.wpa-form-group input,
.wpa-form-group select,
.wpa-form-group textarea {
    width: 100% !important;
    /* Paksa agar memenuhi kolom */
    box-sizing: border-box;
    padding: 10px 15px !important;
    font-size: 15px !important;
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;
}

/* ================================================================
   2. MODERN ADMIN DASHBOARD 
   ================================================================ */

.wpa-dashboard-pro {
    margin-top: 20px;
    max-width: 1200px;
}

.wpa-admin-wrap {
    margin-bottom: 100px !important;
    padding-bottom: 40px !important;
    display: block;
}

/* Stats Card Grid */
.wpa-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 25px 0;
}

.wpa-stat-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    color: #fff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
}

.wpa-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.wpa-stat-card .card-body {
    padding: 25px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wpa-stat-card.card-all {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
}

.wpa-stat-card.card-pending {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
}

.wpa-stat-card.card-active {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.wpa-stat-card.card-blocked {
    background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
}

.card-label {
    font-size: 13px;
    color: #fff !important;
    opacity: 0.95;
    font-weight: 600;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-value {
    font-size: 38px;
    color: #fff !important;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    margin: 5px 0 0;
    line-height: 1;
}

.card-icon span {
    font-size: 52px;
    width: 52px;
    height: 52px;
    color: #fff !important;
    opacity: 0.3;
}

.card-link {
    background: rgba(0, 0, 0, 0.1);
    padding: 10px 15px;
    text-align: center;
    text-decoration: none;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    transition: background 0.2s;
}

.card-link:hover {
    background: rgba(0, 0, 0, 0.2);
    color: #fff;
}

/* Content Grid (Chart & Recent) */
.wpa-content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    align-items: start;
    width: 100%;
}

.wpa-grid-even {
    grid-template-columns: 1fr 1fr;
}

.wpa-box-pro {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    min-width: 0;
    /* Mencegah overflow grid item */
    overflow: hidden;
}

.wpa-box-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--wpa-bg-color);
}

.wpa-box-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #334155;
}

.wpa-box-body {
    padding: 20px;
}

.wpa-box-body.no-padding {
    padding: 0;
}

/* Minimal Table Recent Members */
.wpa-table-minimal {
    width: 100%;
    border-collapse: collapse;
}

.wpa-table-minimal th {
    text-align: left;
    padding: 12px 20px;
    background: #f8fafc;
    color: #64748b;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wpa-table-minimal td {
    padding: 5px 20px;
    border-bottom: 1px solid var(--wpa-bg-color);
}

.user-meta {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 700;
    color: #1e293b;
    font-size: 14px;
}

.user-date {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 2px;
}

/* Status Dot Indicator */
.wpa-status-dot {
    height: 10px;
    width: 10px;
    border-radius: 50%;
    display: inline-block;
}

.wpa-status-dot.aktif {
    background-color: #10b981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

.wpa-status-dot.belum_aktif {
    background-color: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.1);
}

.wpa-status-dot.blokir {
    background-color: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.wpa-box-footer {
    padding: 12px 20px;
    text-align: center;
}

/* ================================================================
   4. ADMIN RESPONSIVE FIXES (Mobile & Tablet)
   ================================================================ */

/* Global Wrapper Adjustments */
@media (max-width: 782px) {
    .wpa-admin-wrap {
        padding: 10px !important;
        margin-bottom: 50px !important;
    }

    /* Table Responsiveness */
    .wp-list-table,
    .wpa-table-minimal,
    .wpa-table-pro {
        display: block !important;
        width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        table-layout: auto !important;
        border: 1px solid #e2e8f0 !important;
    }

    .wp-list-table thead,
    .wp-list-table tbody,
    .wp-list-table tr {
        display: table !important;
        width: 100% !important;
        min-width: 480px !important;
    }

    /* Form Table (Tambah Produk) & Inner Flex Adjustments */
    table.form-table,
    table.form-table tr,
    table.form-table th,
    table.form-table td {
        display: block !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 5px 0 !important;
        text-align: left !important;
    }

    /* PENTING: Baris yang disembunyikan JS (display:none) harus tetap tersembunyi */
    table.form-table tr[style*="display:none"],
    table.form-table tr[style*="display: none"] {
        display: none !important;
    }



    table.form-table th {
        padding-top: 15px !important;
        font-weight: 700 !important;
    }

    /* Target inner flex boxes in 'Tambah Produk' */
    div[style*="display:flex"][style*="align-items:center"][style*="gap:8px"] {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 5px !important;
    }

    /* Labels inside those flex boxes */
    div[style*="display:flex"] label[style*="width:110px"],
    div[style*="display:flex"] label[style*="width:140px"],
    .wpa-ptier-row th {
        width: 100% !important;
        max-width: none !important;
        padding-bottom: 5px !important;
    }

    /* Regular inputs inside those flex boxes */
    .regular-text,
    .large-text,
    input[name*="bank_"],
    select[name*="ptier_"] {
        width: 100% !important;
    }

    /* WP Editor specific fix */
    .wp-editor-wrap {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Table Fixes for Kelola Order & others */
    .wp-list-table th,
    .wp-list-table td {
        padding: 12px 10px !important;
        font-size: 13px !important;
        vertical-align: middle !important;
    }

    /* Action column buttons in table */
    .wpa-admin-wrap td .button-small {
        height: 32px !important;
        line-height: 30px !important;
        padding: 0 10px !important;
    }

    .wpa-admin-wrap td input[readonly] {
        width: 100% !important;
        max-width: none !important;
        margin-bottom: 5px !important;
    }

    /* ── Settings Page: radio cards & inputs mobile fix ── */
    .wpa-radio-group {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        width: 100% !important;
    }

    .wpa-radio-item {
        width: 100% !important;
        box-sizing: border-box !important;
        min-width: 0 !important;
    }

    .wpa-admin-wrap table.form-table td input[type="text"],
    .wpa-admin-wrap table.form-table td input[type="email"],
    .wpa-admin-wrap table.form-table td input[type="password"],
    .wpa-admin-wrap table.form-table td input[type="number"],
    .wpa-admin-wrap table.form-table td textarea,
    .wpa-admin-wrap table.form-table td select {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Fix checkbox label alignment when text wraps on mobile */
    .wpa-admin-wrap table.form-table td label[style*="display:flex"],
    .wpa-admin-wrap table.form-table td label[style*="display: flex"] {
        align-items: flex-start !important;
        flex-wrap: nowrap !important;
    }

    /* Fix checkmark not centered inside checkbox box on mobile */
    .wpa-admin-wrap table.form-table td label input[type="checkbox"],
    .wpa-admin-wrap table.form-table td label input[type="radio"] {
        flex-shrink: 0 !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        padding: 0 !important;
        line-height: 1 !important;
        vertical-align: middle !important;
        -webkit-appearance: checkbox !important;
        appearance: checkbox !important;
        position: static !important;
        display: inline-block !important;
    }

    .wpa-form-footer-pro {
        flex-direction: column !important;
        padding: 15px !important;
    }

    .wpa-form-footer-pro input[type="submit"] {
        width: 100% !important;
    }

    /* Pagination Fix */
    div[style*="display:flex"][style*="justify-content:center"],
    div[style*="display: flex"][style*="justify-content: center"] {
        flex-wrap: wrap !important;
        gap: 8px !important;
        justify-content: center !important;
    }

    /* Global Stacking Rule for BOTH Admin & Dashboard wrap */
    .wpa-admin-wrap div[style*="display:flex"]:not(.pagination-links),
    .wpa-admin-wrap div[style*="display: flex"]:not(.pagination-links),
    .wpa-admin-wrap div[style*="display:grid"],
    .wpa-admin-wrap div[style*="display: grid"],
    /* Khusus filter form di Produk Digital & Komisi */
    .wpa-admin-wrap .wpa-filter-bar,
    .wpa-admin-wrap div[style*="background:#fff"][style*="display:flex"] {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        gap: 12px !important;
        height: auto !important;
    }

    /* Filter Form Grid 2 Col */
    .wpa-admin-wrap .wpa-filter-form,
    .wpa-admin-wrap form[style*="display:flex"],
    .wpa-admin-wrap form[style*="display: flex"],
    .wpa-admin-wrap form div[style*="display:flex"] {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        width: 100% !important;
        align-items: center !important;
    }

    .wpa-admin-wrap .wpa-filter-form input[type="text"],
    .wpa-admin-wrap .wpa-filter-form select,
    .wpa-admin-wrap form[style*="display:flex"] input[type="text"],
    .wpa-admin-wrap form[style*="display:flex"] select,
    .wpa-admin-wrap form[style*="display: flex"] input[type="text"],
    .wpa-admin-wrap form[style*="display: flex"] select {
        width: 100% !important;
        min-width: 0 !important;
    }

    .wpa-admin-wrap .wpa-filter-form>button,
    .wpa-admin-wrap form[style*="display:flex"]>button,
    .wpa-admin-wrap form[style*="display: flex"]>button,
    .wpa-admin-wrap form[style*="display:flex"]>.button,
    .wpa-admin-wrap form[style*="display: flex"]>.button,
    .wpa-admin-wrap form[style*="display:flex"]>a.button,
    .wpa-admin-wrap form[style*="display: flex"]>a.button {
        grid-column: 1 / -1 !important;
        text-align: center !important;
        justify-content: center !important;
    }

    .wpa-dashboard-pro div[style*="display:flex"],
    .wpa-dashboard-pro div[style*="display: flex"],
    .wpa-dashboard-pro div[style*="display:grid"],
    .wpa-dashboard-pro div[style*="display: grid"] {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: 1fr !important;
        width: 100% !important;
        height: auto !important;
        padding: 5px !important;
        gap: 15px !important;
        box-sizing: border-box !important;
    }

    /* Dashboard & Stats Card Grid - 2 Columns on Mobile */
    .wpa-admin-wrap .wpa-stats-grid,
    .wpa-dashboard-pro .wpa-stats-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        padding: 0 !important;
        margin: 15px 0 !important;
    }

    .wpa-stat-card .card-body {
        padding: 15px 12px !important;
        flex-direction: row !important;
        /* Keep icon side by side if possible or stack */
    }

    .wpa-stat-card .card-value {
        font-size: 22px !important;
        text-shadow: none !important;
    }

    .wpa-stat-card .card-label {
        font-size: 10px !important;
    }

    /* Content Grid (Charts/Tables) stack vertically */
    .wpa-admin-wrap .wpa-content-grid,
    .wpa-dashboard-pro .wpa-content-grid,
    .wpa-admin-wrap .wpa-grid-container,
    .wpa-admin-wrap div[style*="display:grid"][style*="grid-template-columns:350px 1fr"],
    .wpa-admin-wrap div[style*="display: grid"][style*="grid-template-columns: 350px 1fr"] {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        gap: 20px !important;
    }

    /* Exceptions for button groups in table rows */
    .wpa-admin-wrap tr td div[style*="display:flex"],
    .wpa-admin-wrap tr td div[style*="display: flex"],
    .wpa-dashboard-pro tr td div[style*="display:flex"],
    .wpa-dashboard-pro tr td div[style*="display: flex"] {
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        padding: 5px 0 !important;
        gap: 8px !important;
        width: 100% !important;
    }

    .wpa-admin-wrap input[type="text"],
    .wpa-admin-wrap select,
    .wpa-admin-wrap .select2-container,
    .wpa-admin-wrap .select2-container--default .select2-selection--single,
    .wpa-dashboard-pro input[type="text"],
    .wpa-dashboard-pro select {
        width: 100% !important;
        height: 40px !important;
        font-size: 14px !important;
    }

    /* Card/Box refinements */
    .wpa-box-pro {
        margin-bottom: 20px !important;
        width: 100% !important;
    }

    /* Modal Adjustments */
    div[id*="modal"]>div {
        width: 95% !important;
        max-width: none !important;
        padding: 15px !important;
        margin: 10px auto !important;
    }

    /* Shortcode Grid */
    .wpa-grid-container {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 480px) {

    /* Hide non-essential columns if necessary or provide full scroll */
    .wpa-lte-brand {
        font-size: 1rem !important;
    }

    .card-value {
        font-size: 24px !important;
    }
}

/* ================================================================
   3. FRONTEND - Form Pendaftaran
   ================================================================ */
.wpa-form-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px 15px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

/* Form Fields */
.wpa-field-group {
    margin-bottom: 15px;
}

.wpa-field-label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
}

.wpa-req-star {
    color: red;
}

.wpa-input-control {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 10px;
    box-sizing: border-box;
    /* Biar gak melebar keluar form */
}

.wpa-input-file {
    width: 100%;
}

.wpa-input-readonly {
    background-color: #edf2f7;
    cursor: not-allowed;
    font-weight: bold;
}

/* Buttons */
.wpa-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 25px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #fff !important;
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    border: none;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(99, 102, 241, 0.15);
}

.wpa-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
    color: #fff !important;
}

/* ================================================================
   3b. FRONTEND - Authentication (Login/Forgot/Reset)
   ================================================================ */
.wpa-auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
    background: #f8fafc;
    min-height: 400px;
}

.wpa-auth-box {
    background: #fff;
    width: 100%;
    max-width: 450px;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.wpa-auth-box h2 {
    margin: 0 0 10px;
    font-size: 28px;
    font-weight: 800;
    color: #1e293b;
    text-align: center;
}

.wpa-auth-box p {
    margin: 0 0 30px;
    font-size: 15px;
    color: #64748b;
    text-align: center;
}

.wpa-auth-form .wpa-field-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.wpa-auth-form .wpa-field-group label {
    font-weight: 600;
    font-size: 14px;
    color: #475569;
    margin-bottom: 8px;
    display: block;
}

.wpa-auth-form .wpa-field-group input[type="text"],
.wpa-auth-form .wpa-field-group input[type="password"],
.wpa-auth-form .wpa-field-group input[type="email"] {
    width: 100% !important;
    padding: 12px 16px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 10px !important;
    font-size: 15px !important;
    color: #1e293b !important;
    box-sizing: border-box !important;
    transition: all 0.2s;
    background: #fff !important;
}

.wpa-auth-form .wpa-field-group input:focus {
    border-color: #3b82f6 !important;
    outline: none !important;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1) !important;
}

.wpa-auth-extra {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.wpa-checkbox-auth {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #64748b;
}

.wpa-checkbox-auth input {
    margin: 0;
    cursor: pointer;
}

.wpa-forgot-link {
    font-size: 14px;
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
}

.wpa-btn-block {
    width: 100%;
}

.wpa-auth-footer {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid var(--wpa-bg-color);
    text-align: center;
    font-size: 14px;
    color: #64748b;
}

.wpa-auth-footer a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
}

/* ================================================================
   4. MEMBER AREA - AdminLTE Style Layout
   ================================================================ */
/* Modern Dashboard Theme - Starasukses */
.wpa-lte-wrapper {
    display: flex;
    min-height: auto;
    background: #f4f7f6;
    font-family: 'Inter', -apple-system, sans-serif;
    border: none;
    margin: 0;
    width: 100%;
    max-width: 100%;
    /* Flexible: always follows parent container */
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
}

/* Standalone Template: Full Width Dashboard feel */
.wpa-template-body .wpa-lte-wrapper {
    max-width: 100%;
    margin: 0;
    width: 100%;
    border-radius: 0;
}

/* Sidebar Style */
.wpa-lte-sidebar {
    width: 250px;
    background: #04172a;
    color: #fff;
    flex-shrink: 0;
    transition: all 0.3s;
}

.wpa-lte-brand {
    padding: 22px 20px;
    text-align: center;
    font-size: 1.3rem;
    font-weight: 800;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #fff;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.wpa-lte-user-panel {
    padding: 20px 10px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.wpa-user-img img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.05);
}

.wpa-user-info p {
    margin: 0;
    font-weight: 600;
    color: #fff;
}

.wpa-user-info small {
    color: #c2c7d0;
}

/* Navigation */
.wpa-lte-nav ul {
    list-style: none;
    padding: 10px 0;
    margin: 0;
}

.wpa-lte-nav ul li {
    margin-bottom: 5px;
}

.wpa-lte-nav ul li a {
    display: block;
    padding: 8px 20px;
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    font-size: 14px;
}

.wpa-lte-nav ul li a:hover,
.wpa-lte-nav ul li.active a {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border-left: 3px solid #6366f1;
}

.wpa-lte-nav .dashicons {
    margin-right: 12px;
    font-size: 18px;
    opacity: 0.7;
}

.active .dashicons,
a:hover .dashicons {
    opacity: 1;
    color: #6366f1;
}

/* Content Area */
.wpa-lte-content {
    flex-grow: 1;
    padding: 0;
    display: flex;
    flex-direction: column;
    background: #f8fafc;
    /* Greyish background for content area */
    min-width: 0;
}

.wpa-lte-header {
    padding: 15px 25px;
    background: #fff;
    border-bottom: 1px solid #dee2e6;
}

.wpa-lte-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
}

.wpa-lte-body {
    padding: 25px;
    background: transparent;
    /* Show background of content area */
    flex-grow: 1;
}

/* Status Dot Indicator */
.wpa-dot {
    height: 10px;
    width: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
}

.wpa-dot.aktif {
    background-color: #28a745;
    box-shadow: 0 0 5px #28a745;
}

.wpa-dot.pending {
    background-color: #ffc107;
}

.wpa-dot.tidak_aktif {
    background-color: #dc3545;
}

/* Responsive (Advanced Mobile Drawer) */
@media (max-width: 768px) {
    .wpa-lte-wrapper {
        flex-direction: column;
        overflow-x: hidden;
        position: relative;
    }

    .wpa-lte-sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        bottom: 0 !important;
        width: 270px !important;
        z-index: 99999 !important;
        transform: translateX(-100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        background: #04172a !important;
        box-shadow: 15px 0 40px rgba(0, 0, 0, 0.5) !important;
        visibility: hidden;
        overflow-y: auto !important;
        scrollbar-width: thin;
        -webkit-overflow-scrolling: touch;
    }

    .sidebar-open .wpa-lte-sidebar {
        transform: translateX(0);
        visibility: visible;
    }

    .wpa-lte-brand {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 22px 20px !important;
        text-align: left !important;
        font-size: 1.1rem !important;
    }

    .wpa-close-sidebar {
        background: rgba(255, 255, 255, 0.1);
        border: none;
        color: #fff;
        font-size: 28px;
        line-height: 1;
        cursor: pointer;
        padding: 0 10px;
        border-radius: 6px;
    }

    .wpa-mobile-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(5px);
        z-index: 99990;
    }

    .sidebar-open .wpa-mobile-overlay {
        display: block;
    }

    .wpa-mobile-toggle {
        display: flex !important;
        background: #04172a !important;
        color: #fff !important;
        width: 45px;
        height: 45px;
        border-radius: 12px;
        margin-right: 15px;
        border: none;
        align-items: center;
        justify-content: center;
    }

    .wpa-mobile-toggle .dashicons {
        font-size: 24px;
        width: 24px;
        height: 24px;
    }

    .wpa-lte-header {
        display: flex !important;
        align-items: center !important;
        padding: 15px 20px !important;
        background: #fff;
        position: sticky;
        top: 0;
        z-index: 999;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    }

    /* Pastikan menu di dalam sidebar tetap vertikal */
    .wpa-lte-nav ul {
        display: block !important;
        padding: 10px 0 !important;
    }

    .wpa-lte-nav ul li {
        margin: 0 0 5px 0 !important;
        width: 100% !important;
    }
}

.wpa-close-sidebar {
    display: none;
}

.wpa-mobile-toggle {
    display: none;
}



/* Dashboard Active (4 Cards Strategy) */
.wpa-lte-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 20px;
    margin-bottom: 25px;
}

.wpa-lte-info-box {
    position: relative;
    border-radius: 12px;
    color: #fff;
    padding: 20px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 110px;
}

.wpa-lte-info-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.wpa-info-inner h3,
.wpa-info-inner h4 {
    font-size: 28px;
    font-weight: 800;
    margin: 0;
    line-height: 1.2;
    color: #ffffff !important;
}

.wpa-info-inner p {
    font-size: 13px;
    font-weight: 700;
    margin: 5px 0 0;
    color: #ffffff !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 1;
}

.wpa-info-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
}

.wpa-info-icon .dashicons {
    font-size: 60px;
    width: 60px;
    height: 60px;
    color: rgba(255, 255, 255, 0.25) !important;
}

/* Premium Gradients */
.wpa-bg-info {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
}

.wpa-bg-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.wpa-bg-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.wpa-bg-indigo {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
}

.wpa-bg-danger {
    background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
}

/* Dashboard Header Title */
.wpa-lte-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333 !important;
    margin: 0;
    text-transform: capitalize;
}

/* --- MOBILE RESPONSIVE (2 Columns for Cards) --- */
@media (max-width: 1024px) {
    .wpa-lte-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 600px) {
    .wpa-lte-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px;
    }

    .wpa-info-inner h3,
    .wpa-info-inner h4 {
        font-size: 22px;
    }

    .wpa-info-inner p {
        font-size: 10px;
    }
}

@media (max-width: 992px) {
    .wpa-dashboard-row {
        flex-direction: column;
    }

    .wpa-lte-body {
        padding: 20px;
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .wpa-lte-wrapper {
        flex-direction: column;
    }

    .wpa-lte-sidebar {
        width: 100%;
    }

    .wpa-admin-grid {
        flex-direction: column;
    }

    .wpa-bank-display {
        font-size: 14px;
        padding: 15px;
    }

    .wpa-ins-judul {
        font-size: 20px;
    }
}

/* ================================================================
   6.  Referral Page Style
   ================================================================ */

.wpa-ref-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.wpa-ref-box {
    flex: 1;
}

.wpa-label-top {
    font-size: 11px;
    font-weight: 800;
    color: #a0aec0;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 15px;
}

/* Perbaikan Padding Field Referral */
.wpa-ref-input-large {
    padding: 10px 15px !important;
    /* Paksa padding lebih besar */
    height: auto !important;
    font-size: 15px !important;
    line-height: 1.5 !important;
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;
    background: #f8fafc !important;
}

/* Membuat item di kolom kanan punya jarak ke bawah */
.wpa-ref-group-item {
    margin-bottom: 15px !important;
    /* Memberikan jarak antar elemen dropdown & input */
    width: 100% !important;
}

/* Menghilangkan margin bottom pada item terakhir */
.wpa-ref-group-item:last-child {
    margin-bottom: 0 !important;
}

/* Memastikan tombol salin tingginya sama dengan input */
.wpa-input-group {
    display: flex;
    align-items: stretch;
    /* Membuat tombol dan input sama tinggi */
}

.wpa-btn-copy {
    padding: 0 20px !important;
    border-radius: 0 6px 6px 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Jarak antar kolom di desktop */
.wpa-ref-grid {
    gap: 15px !important;
    padding: 15px !important;
}

@media (max-width: 768px) {

    /* Paksa Grid jadi 1 Kolom ke Bawah */
    .wpa-ref-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 25px !important;
    }

    /* Input & Tombol Salin numpuk ke bawah di HP */
    .wpa-input-group {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        gap: 10px !important;
    }

    /* Reset sudut lengkung (border-radius) karena sekarang mereka bertumpuk */
    .wpa-input-group .wpa-ref-input-large,
    .wpa-input-group .wpa-btn-copy {
        width: 100% !important;
        border-radius: 8px !important;
        /* Buat sudut tumpul semua sisi */
        margin: 0 !important;
    }

    /* Perbesar area klik tombol salin di HP */
    .wpa-btn-copy {
        padding: 15px !important;
        justify-content: center !important;
        font-size: 15px !important;
    }
}


/* ================================================================
   7. ULTRA RESPONSIVE ADMIN FORM BUILDER
   ================================================================ */

.wpa-admin-form-pro .no-padding {
    padding: 0 !important;
}

/* Grid Pro - Fix Nabrak Samping */
.wpa-grid-container {
    display: grid;
    grid-template-columns: 1fr 1.8fr;
    /* Rasio seimbang */
    gap: 20px;
    width: 100%;
}

.wpa-table-pro-wrapper {
    width: 100%;
    overflow-x: hidden;
    /* Kita mainkan responsivitas kolom, bukan scroll */
}

/* Base Table Styling */
.wpa-table-pro {
    border: none !important;
    box-shadow: none !important;
    width: 100% !important;
}

.wpa-table-pro th,
.wpa-table-pro td {
    vertical-align: middle !important;
    padding: 12px 8px !important;
}

/* Column Widths */
.col-drag {
    width: 40px !important;
    text-align: center;
}

.col-type {
    width: 80px !important;
}

.col-req {
    width: 60px !important;
    text-align: center;
}

.col-action {
    width: 90px !important;
    text-align: right;
}

/* Meta Code Fix (Anti Nabrak) */
.meta-code {
    display: block;
    font-size: 10px;
    color: #94a3b8;
    background: #f8fafc;
    word-break: break-all;
    /* INI KUNCINYA: Potong teks jika kepanjangan */
    margin-top: 4px;
    padding: 2px 4px;
}

/* Checkbox Pro */
.wpa-checkbox-pro {
    display: flex !important;
    align-items: center;
    gap: 10px;
    background: var(--wpa-bg-color);
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
}

.wpa-checkbox-pro input {
    width: 18px !important;
    height: 18px !important;
    margin: 0 !important;
}

/* --- MOBILE VIEW (MAX 782PX) --- */
@media (max-width: 782px) {
    .wpa-grid-container {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    /* Sembunyikan kolom yang kurang penting di layar sangat kecil pada Form Builder */
    .wpa-table-pro .col-type,
    .wpa-table-pro .col-req,
    .wpa-table-pro .col-vis {
        display: none !important;
    }

    /* Beri ruang lebih untuk detail */
    .wpa-table-pro .col-detail {
        width: auto !important;
    }

    .wpa-table-pro tr,
    .wpa-table-pro thead,
    .wpa-table-pro tbody {
        min-width: auto !important;
        /* Reset inside pro form builder to allow stacking or better fit */
        display: table !important;
    }
}

/* Admin Card UI */
.wpa-card {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, .04);
}

.wpa-card-header {
    padding: 12px 15px;
    border-bottom: 1px solid #ccd0d4;
    background: #f8f9f9;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wpa-card-body {
    padding: 20px;
}

.wpa-card-footer {
    padding: 12px 20px;
    background: #fcfcfc;
    border-top: 1px solid #f1f1f1;
    text-align: right;
}

.wpa-badge {
    background: #eff6ff;
    color: #2563eb;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #dbeafe;
}

.wpa-tag-sys {
    font-size: 11px;
    color: #94a3b8;
    font-style: italic;
}

/* ================================================================
   7. 1. CHECKBOX TO SWITCH TOGGLE
   ================================================================ */

/* Container Utama Toggle */
.wpa-toggle-container {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center;
    background: #f8fafc;
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 10px;
}

.wpa-toggle-container:hover {
    background: var(--wpa-bg-color);
    border-color: #cbd5e0;
}

.wpa-toggle-label {
    font-weight: 600;
    color: #475569;
    font-size: 13px;
}

/* Switch Styling */
.wpa-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

/* Sembunyikan Checkbox Asli (Biang Kerok Kotak Biru) */
.wpa-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* Slider (Rel Kereta) */
.wpa-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e0;
    transition: .4s;
    border-radius: 34px;
}

/* Bola (Bullet) */
.wpa-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Warna Saat Aktif */
.wpa-switch input:checked+.wpa-slider {
    background-color: #3b82f6;
    /* Biru Brand lo */
}

/* Animasi Geser */
.wpa-switch input:checked+.wpa-slider:before {
    transform: translateX(20px);
}

/* Indikator Status di Tabel */
.wpa-status-ya {
    color: #10b981;
    font-weight: 700;
    background: #ecfdf5;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
}

.wpa-status-no {
    color: #94a3b8;
    background: #f8fafc;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
}

/* --- Penyesuaian Mobile Tambahan --- */
@media (max-width: 782px) {
    .wpa-toggle-container {
        padding: 10px;
    }
}


/* ================================================================
   8.  Jaringan Member
   ================================================================ */

/* Pastikan container tabel bisa di-scroll ke samping di HP */
.wpa-table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    /* Scroll smooth di iOS */
    border: 1px solid #e2e8f0;
    /* Kasih bingkai halus biar rapi */
    border-radius: 8px;
}

.wpa-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 650px;
    /* KUNCI UTAMA: Paksa tabel punya lebar minimal agar tidak tergencet di HP */
}

/* Kunci ukuran minimal masing-masing kolom agar lega */
.wpa-table th:nth-child(1),
.wpa-table td:nth-child(1) {
    min-width: 200px;
    /* Kolom Nama Member dibuat lega */
}

.wpa-table th:nth-child(2),
.wpa-table td:nth-child(2) {
    min-width: 220px;
    /* Kolom Kontak lega untuk email & WA */
}

.wpa-table th:nth-child(3),
.wpa-table td:nth-child(3) {
    min-width: 120px;
    /* Kolom Status */
}

.wpa-table th:nth-child(4),
.wpa-table td:nth-child(4) {
    min-width: 130px;
    /* Kolom Tanggal Gabung */
}

/* Perbaikan tampilan Foto & Nama agar SELALU SEJAJAR */
.wpa-user-flex {
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
    /* Jangan biarkan nama turun ke bawah foto */
}

.wpa-user-flex img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    /* Pastikan foto tidak gepeng kegencet */
}

/* Mempercantik tampilan icon WhatsApp dan kontak */
.wpa-contact-info {
    line-height: 1.6;
}

.wpa-link-wa {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #10b981;
    font-weight: 600;
    text-decoration: none;
    margin-top: 4px;
    white-space: nowrap;
    /* Teks WA tidak turun baris */
}

.wpa-link-wa .dashicons {
    font-size: 16px;
    line-height: 1.2;
}

/* Row Hover Effect */
.wpa-table tbody tr:hover {
    background: #f8fafc;
}

.wpa-no-data {
    text-align: center;
    padding: 50px !important;
    color: #999;
    font-style: italic;
}

/* Badge Status spesifik untuk tabel */
.wpa-status-tag {
    display: inline-block;
    min-width: 90px;
    text-align: center;
}

.wpa-card-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.wpa-filter-links {
    display: flex;
    gap: 10px;
}

.wpa-filter-links a {
    text-decoration: none;
    font-size: 13px;
    padding: 5px 12px;
    background: var(--wpa-bg-color);
    color: #64748b;
    border-radius: 4px;
    transition: 0.3s;
}

.wpa-filter-links a.active,
.wpa-filter-links a:hover {
    background: #3c8dbc;
    color: #fff;
}

.wpa-pagination {
    margin-top: 25px;
    text-align: center;
}

.wpa-pagination .page-numbers {
    padding: 8px 14px;
    background: #fff;
    border: 1px solid #dee2e6;
    text-decoration: none;
    color: #3c8dbc;
    margin: 0 2px;
    border-radius: 4px;
}

.wpa-pagination .page-numbers.current {
    background: #3c8dbc;
    color: #fff;
    border-color: #3c8dbc;
}

/* ================================================================
   9.  Admin Menu Form
   ================================================================ */

.wpa-admin-grid {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-top: 20px;
}

.wpa-admin-card-form {
    flex: 1;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #ccd0d4;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.wpa-admin-card-list {
    flex: 2;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #ccd0d4;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    padding: 15px;
}

.wpa-form-group {
    margin-bottom: 15px;
}

.wpa-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
}

.wpa-form-group input[type="text"],
.wpa-form-group select {
    width: 100%;
    padding: 8px;
    border-radius: 4px;
}

.wpa-drag-handle {
    cursor: move;
    color: #aaa;
    text-align: center;
}

.wpa-sortable-row:hover {
    background: #f0f6fb !important;
}

.ui-state-highlight {
    height: 50px;
    background: #fffbcc;
    border: 1px dashed #e6db55;
}

.wpa-badge-type {
    background: #e2e8f0;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    color: #4a5568;
}

.wpa-tag-system {
    background: #f1f1f1;
    color: #999;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
}

.wpa-btn-delete {
    color: #d63638;
    text-decoration: none;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.wpa-btn-delete:hover {
    color: #b32d2e;
}

.wpa-list-footer {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    text-align: right;
}

/* --- Fix Checkbox Box & Icon Alignment --- */
.wpa-checkbox-custom {
    display: flex !important;
    align-items: center !important;
    background: var(--wpa-surface);
    padding: 12px 15px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    box-sizing: border-box;
    margin-top: 10px;
}

.wpa-checkbox-custom:hover {
    border-color: #3b82f6;
    background: #f0f9ff;
}

/* Reset default WP styling yang bikin icon geser */
.wpa-checkbox-custom input[type="checkbox"] {
    appearance: none !important;
    -webkit-appearance: none !important;
    width: 22px !important;
    height: 22px !important;
    border: 2px solid #cbd5e0 !important;
    border-radius: 4px !important;
    background: #fff !important;
    margin: 0 12px 0 0 !important;
    position: relative !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Custom Checkmark Icon - Presisi di Tengah */
.wpa-checkbox-custom input[type="checkbox"]:checked {
    background: #3b82f6 !important;
    border-color: #3b82f6 !important;
}

.wpa-checkbox-custom input[type="checkbox"]:checked::after {
    content: "\f15e";
    /* Dashicon checkmark */
    font-family: dashicons;
    color: #fff;
    font-size: 16px;
    line-height: 1;
    display: block;
}

.wpa-checkbox-custom span {
    font-weight: 600;
    color: #334155;
    font-size: 14px;
    user-select: none;
}


/* ================================================================
   10.  Styling Box Sukses Pendaftaran 
   ================================================================ */

.wpa-registration-success {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    padding: 20px 10px !important;
    background: #ffffff !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 25px rgba(40, 167, 69, 0.1) !important;
}

.wpa-success-title {
    color: #28a745;
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 20px;
}

.wpa-success-content {
    font-size: 16px;
    line-height: 1.6;
    color: #4a5568;
    margin-bottom: 25px;
}

/* Responsif Mobile */
@media (max-width: 600px) {
    .wpa-registration-success {
        padding: 25px !important;
    }

    .wpa-success-title {
        font-size: 22px;
    }
}

/* ================================================================
   11.  Dashboard Layout
   ================================================================ */

.wpa-lte-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

/* Info Boxes */
.wpa-lte-info-box {
    position: relative;
    border-radius: 8px;
    padding: 20px;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.wpa-info-inner h3 {
    font-size: 32px;
    margin: 0;
    font-weight: 700;
}

.wpa-info-inner p {
    margin: 0;
    font-size: 15px;
    opacity: 0.9;
}

.wpa-info-icon .dashicons {
    font-size: 60px;
    width: 60px;
    height: 60px;
    opacity: 0.2;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}

/* Warna Class */
.wpa-bg-info {
    background: #17a2b8 !important;
}

.wpa-bg-success {
    background: #28a745 !important;
}

.wpa-bg-warning {
    background: #ffc107 !important;
}

/* Dashboard Content Row */
.wpa-dashboard-row {
    display: flex;
    gap: 25px;
    align-items: stretch;
}

.wpa-chart-container {
    flex: 2;
}

.wpa-recent-container {
    flex: 1;
}

.wpa-box-card {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.wpa-box-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--wpa-bg-color);
}

.wpa-box-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: #334155;
}

.wpa-box-body {
    padding: 20px;
    flex: 1;
}

/* Recent List */
.wpa-recent-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wpa-recent-list li {
    border-bottom: 1px solid var(--wpa-bg-color);
    padding: 5px 0;
}

.wpa-recent-list li:last-child {
    border: none;
}

.wpa-recent-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wpa-recent-item .dashicons {
    color: #94a3b8;
}

.wpa-recent-info strong {
    display: block;
    font-size: 14px;
    color: #1e293b;
}

.wpa-recent-info small {
    color: #64748b;
    font-size: 12px;
}

/* Pending Member Styles */
.wpa-card-pending-wrapper {
    background: #fff;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.wpa-bank-box {
    max-width: 500px;
    margin: 20px auto;
    border: 2px dashed #cbd5e0;
    border-radius: 10px;
    background: #f8fafc;
}

.wpa-bank-header {
    background: #edf2f7;
    padding: 10px;
    font-weight: 700;
    font-size: 13px;
    color: #4a5568;
    border-bottom: 1px dashed #cbd5e0;
}

.wpa-bank-body {
    padding: 20px;
    color: #1e293b;
    line-height: 1.6;
}

/* --- Member Area Content Container --- */
.wpa-member-container {
    max-width: 1100px;
    /* Standard wide container */
    margin: 0 auto;
}

/* --- Member Area Product Grid --- */
.wpa-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 25px;
}

.wpa-product-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.wpa-product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e1;
}

.wpa-product-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.wpa-product-placeholder {
    height: 160px;
    background: linear-gradient(135deg, var(--wpa-bg-color), #e2e8f0);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 50px;
}

.wpa-product-title {
    margin: 0 0 10px;
    font-size: 16px;
    color: #1e293b;
    font-weight: 700;
    line-height: 1.4;
    min-height: 44px;
    /* Fix height for 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wpa-product-btn {
    display: block;
    text-align: center;
    padding: 12px;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff !important;
    border-radius: 10px;
    text-decoration: none !important;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.2s;
}

.wpa-product-btn:hover {
    filter: brightness(1.1);
    transform: scale(1.02);
}

/* Responsive */
@media (max-width: 782px) {
    .wpa-lte-grid {
        grid-template-columns: 1fr;
    }

    .wpa-dashboard-row {
        flex-direction: column;
    }

    /* Referral Grid Mobile - Stacking handled by base class if needed, or keeping it clean */
    .wpa-ref-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 20px !important;
    }
}

@media (max-width: 992px) and (min-width: 783px) {
    .wpa-lte-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ================================================================
   12.  Layout Manajemen Member Admin
   ================================================================ */

.wpa-admin-tools-header {
    display: flex;
    justify-content: space-between;
    margin: 20px 0;
    align-items: center;
}

.wpa-status-badge {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    color: #fff;
}

.wpa-status-badge.status-aktif {
    background: #28a745;
}

.wpa-status-badge.status-belum_aktif {
    background: #ffc107;
    color: #000;
}

.wpa-status-badge.status-blokir {
    background: #dc3545;
}

.wpa-tag-sponsor {
    background: #e2e8f0;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    color: #4a5568;
    font-weight: 600;
}

.wpa-action-cell .button {
    margin-right: 5px;
    margin-bottom: 5px;
}

/* Button Warning & Danger Custom */
.wpa-btn-warning {
    background: #ffc107 !important;
    border-color: #ffc107 !important;
    color: #000 !important;
}

.wpa-btn-danger {
    background: #dc3545 !important;
    border-color: #dc3545 !important;
    color: #fff !important;
}

.wpa-btn-danger:hover {
    background: #c82333 !important;
    color: #fff !important;
}

/* Detail Container */
.wpa-detail-card {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 8px;
    padding: 20px;
}

/* ================================================================
   13. AUTH STYLES (LOGIN & FORGOT PASSWORD) - FIXED
   ================================================================ */
.wpa-auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
    /* Sedikit dikurangi biar gak terlalu tinggi di desktop */
    padding: 10px;
    background: #fff;
}

.wpa-auth-box {
    background: #fff;
    width: 100%;
    max-width: 420px;
    /* Sedikit lebih lebar */
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.wpa-auth-box h2 {
    font-weight: 800;
    margin-bottom: 10px;
    color: #1e293b;
    font-size: 28px;
}

.wpa-auth-box p {
    color: #64748b;
    margin-bottom: 30px;
    font-size: 15px;
}

.wpa-auth-form {
    text-align: left;
}

/* Area Checkbox & Link Lupa Password */
.wpa-auth-extra {
    display: flex;
    justify-content: space-between;
    /* Pisahkan kiri dan kanan */
    align-items: center;
    margin-bottom: 25px;
    font-size: 14px;
    gap: 15px;
    /* Jarak aman minimal antar elemen */
}

.wpa-forgot-link {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
    /* Jangan sampai teksnya turun baris */
}

/* FIX: Checkbox Style Khusus Auth */
.wpa-checkbox-auth {
    display: inline-flex !important;
    align-items: center !important;
    cursor: pointer;
    flex-shrink: 0;
    /* Jangan mau dipersempit */
}

.wpa-checkbox-auth input[type="checkbox"] {
    appearance: none !important;
    -webkit-appearance: none !important;
    width: 20px !important;
    height: 20px !important;
    border: 2px solid #cbd5e0 !important;
    border-radius: 4px !important;
    margin: 0 8px 0 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #fff !important;
    position: relative !important;
    cursor: pointer !important;
}

.wpa-checkbox-auth input[type="checkbox"]:checked {
    background: #3b82f6 !important;
    border-color: #3b82f6 !important;
}

/* Icon Centang Dashicons */
.wpa-checkbox-auth input[type="checkbox"]:checked::after {
    content: "\f15e";
    font-family: dashicons;
    color: #fff;
    font-size: 14px;
    /* Ukuran icon pas */
    line-height: 1;
    display: block;
}

.wpa-btn-block {
    width: 100%;
    padding: 15px;
    background: #3b82f6;
    color: #fff;
}

.wpa-btn-block:hover {
    background: #2563eb;
}

.wpa-btn-success {
    background: #16a34a;
    color: #fff;
}

.wpa-btn-success:hover {
    background: #15803d;
}

.wpa-auth-footer {
    margin-top: 25px;
    font-size: 14px;
    color: #64748b;
    border-top: 1px solid var(--wpa-bg-color);
    padding-top: 20px;
}

.wpa-auth-footer a {
    color: #3b82f6;
    font-weight: bold;
    text-decoration: none;
}

/* Responsive Mobile */
@media (max-width: 480px) {
    .wpa-auth-box {
        padding: 30px 20px;
    }

    /* Di HP, checkbox dan link lupa password tumpuk ke bawah */
    .wpa-auth-extra {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .wpa-forgot-link {
        align-self: flex-end;
    }

    /* Link lupa password di kanan bawah */
}

/* ================================================================
   14. EDIT PROFIL & UPLOAD FOTO
   ================================================================ */
.wpa-profile-container {
    max-width: 800px;
    /* Batasi lebar agar tidak melar di desktop besar */
    margin: 0 auto;
}

.wpa-profile-container .wpa-lte-card {
    background: #fff;
    border-radius: 8px;
    border-top: 4px solid #3b82f6;
    /* Aksen biru modern */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.wpa-card-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
}

/* Photo Upload Section */
.wpa-photo-upload-section {
    display: flex;
    justify-content: center;
    padding: 10px 0 20px;
}

.wpa-photo-preview-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.wpa-img-circle {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e2e8f0;
    padding: 3px;
    background: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.wpa-img-circle:hover {
    border-color: #3b82f6;
}

/* Tombol Custom Upload File */
.wpa-btn-upload-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--wpa-bg-color);
    color: #334155;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid #cbd5e0;
    transition: all 0.2s;
}

.wpa-btn-upload-label:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.wpa-btn-upload-label input[type="file"] {
    display: none;
    /* Sembunyikan input file asli yang jelek */
}

.wpa-upload-btn-wrapper small {
    display: block;
    text-align: center;
    color: #94a3b8;
    margin-top: 8px;
    font-size: 11px;
}

/* Form Layout */
.wpa-divider {
    border: 0;
    height: 1px;
    background: var(--wpa-bg-color);
    margin: 25px 0;
}

.wpa-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.wpa-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.wpa-section-title {
    margin: 30px 0 15px;
    font-size: 15px;
    font-weight: 700;
    color: #475569;
    border-bottom: 2px dashed #e2e8f0;
    padding-bottom: 8px;
}

.wpa-input-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: 14px;
    color: #334155;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.wpa-input-control:focus {
    border-color: #3b82f6;
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.wpa-input-control.readonly {
    background: #f8fafc;
    color: #64748b;
    cursor: not-allowed;
    border-color: #e2e8f0;
}

.wpa-text-muted {
    font-size: 12px;
    color: #94a3b8;
    display: block;
    margin-top: 5px;
}

.wpa-card-footer-profil {
    padding: 15px 20px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    text-align: right;
}

.wpa-card-footer-profil .wpa-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    padding: 10px 20px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .wpa-form-row {
        grid-template-columns: 1fr;
        /* Jadi satu kolom di HP */
        gap: 15px;
    }

    .wpa-card-footer-profil {
        text-align: center;
        /* Tombol di tengah saat di HP */
    }

    .wpa-card-footer-profil .wpa-btn-primary {
        width: 100%;
        justify-content: center;
    }
}

/* ================================================================
   15. PROFESSIONAL ADMIN GRID & CARDS (NO INLINE CSS)
   ================================================================ */

.wpa-admin-form-pro {
    margin-top: 20px;
    width: 100%;
}

/* Grid Container - Dipaksa 1fr 1fr supaya Full ke Kanan */
.wpa-grid-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    width: 100%;
    margin-bottom: 20px;
}

.wpa-full-container {
    width: 100%;
}

/* Card Styling */
.wpa-card {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, .04);
    margin-bottom: 20px;
}

.wpa-card-header {
    padding: 12px 15px;
    margin: 0;
    border-bottom: 1px solid #ccd0d4;
    background: #f8f9f9;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wpa-card-body {
    padding: 10px 20px 20px;
}

/* Form Elements Reset */
.wpa-card-body table.form-table {
    margin: 0;
    width: 100%;
}

.wpa-card-body table.form-table th {
    width: 200px;
    padding: 15px 10px 15px 0;
}

.wpa-card-body input[type="text"],
.wpa-card-body input[type="email"],
.wpa-card-body input[type="number"],
.wpa-card-body select,
.wpa-card-body textarea {
    width: 100%;
    max-width: 100%;
}

/* Footer Simpan */
.wpa-form-footer-pro {
    text-align: right;
    margin-top: 30px;
    padding: 20px;
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
}

.wpa-form-footer-pro .button-hero {
    padding: 8px 30px !important;
    height: auto !important;
    font-size: 15px !important;
}

/* Helper Class */
.wpa-hide {
    display: none;
}

/* Responsive Mobile */
@media (max-width: 900px) {
    .wpa-grid-container {
        grid-template-columns: 1fr;
    }
}


/* ================================================================
   16. SHORTCODE GENERATOR STYLES (MATCHING PRO ADMIN)
   ================================================================ */

.wpa-sc-item {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #e2e8f0;
}

.wpa-sc-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.wpa-sc-item label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1e293b;
    font-size: 13px;
}

.wpa-sc-copy-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: #f8fafc;
    padding: 10px 15px;
    border-radius: 6px;
    border: 1px solid #cbd5e0;
    transition: all 0.2s ease;
}

.wpa-sc-copy-box:hover {
    border-color: #3b82f6;
    background: var(--wpa-bg-color);
}

.wpa-sc-copy-box code {
    flex-grow: 1;
    background: none !important;
    padding: 0 !important;
    color: #2563eb !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    font-family: 'Courier New', Courier, monospace;
}

.wpa-sc-copy-box .button {
    height: 30px !important;
    line-height: 28px !important;
    padding: 0 12px !important;
    font-size: 12px !important;
    border-radius: 4px !important;
}

/* Penyesuaian deskripsi dalam kartu */
.wpa-card-body .description {
    margin-bottom: 20px;
    font-style: italic;
    color: #64748b;
}


/* ================================================================
   17. PROFESSIONAL MEMBER MANAGEMENT UI
   ================================================================ */

.wpa-member-tools {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
    gap: 15px;
}

/* Filter Pills Styling */
.wpa-filter-pills {
    display: flex;
    background: #fff;
    padding: 4px;
    border-radius: 8px;
    border: 1px solid #ccd0d4;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.wpa-filter-pills .pill {
    padding: 6px 15px;
    text-decoration: none;
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.2s;
}

.wpa-filter-pills .pill:hover {
    background: var(--wpa-bg-color);
    color: #1e293b;
}

.wpa-filter-pills .pill.active {
    background: #3b82f6;
    color: #fff;
}

/* Search Box Pro */
.wpa-search-form {
    display: flex;
    gap: 5px;
}

.wpa-search-form input[type="search"] {
    border-radius: 6px;
    border: 1px solid #ccd0d4;
    padding: 0 12px;
    min-width: 250px;
}

/* Table Responsive & Column Fixing */
.wpa-table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.wpa-member-table {
    min-width: 850px !important;
    border: none !important;
}

.wpa-member-table th,
.wpa-member-table td {
    padding: 15px 10px !important;
    vertical-align: middle !important;
}

/* Column Control */
.col-user {
    width: 20% !important;
}

.col-sponsor {
    width: 15% !important;
    text-align: center;
}

.col-status {
    width: 15% !important;
    text-align: center;
}

.col-bukti {
    width: 14% !important;
    text-align: center;
}

.col-date {
    width: 16% !important;
}

.col-action {
    width: 20% !important;
}

.wpa-mini-email {
    font-size: 10px;
    color: #94a3b8;
    background: transparent;
    padding: 0;
}

.wpa-badge-sponsor {
    background: var(--wpa-bg-color);
    color: #475569;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid #e2e8f0;
}

/* Status Labels (Sync with Dashboard) */
.wpa-status-dot-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 20px;
}

.wpa-status-dot-label.aktif {
    background: #ecfdf5;
    color: #10b981;
}

.wpa-status-dot-label.belum_aktif {
    background: #fffbeb;
    color: #f59e0b;
}

.wpa-status-dot-label.blokir {
    background: #fef2f2;
    color: #ef4444;
}

/* Pro Button Groups */
.wpa-btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: flex-end;
}

.wpa-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    color: #64748b;
    text-decoration: none;
}

.wpa-btn-icon:hover {
    color: #3b82f6;
    border-color: #3b82f6;
}

.wpa-btn-mini {
    padding: 5px 8px;
    font-size: 9px;
    font-weight: 800;
    border-radius: 4px;
    text-decoration: none;
    border: 1px solid transparent;
}

.wpa-btn-mini.success {
    background: #10b981;
    color: #fff;
}

.wpa-btn-mini.warning {
    background: #f59e0b;
    color: #fff;
}

.wpa-btn-mini.danger {
    background: #ef4444;
    color: #fff;
}

/* --- MOBILE RESPONSIVE (MAX 782PX) --- */
@media (max-width: 782px) {
    .wpa-member-tools {
        flex-direction: column;
        align-items: stretch;
    }

    .wpa-tool-left,
    .wpa-tool-right,
    .wpa-search-form {
        width: 100%;
    }

    .wpa-search-form input[type="search"] {
        flex-grow: 1;
        min-width: 0;
    }

    .wpa-filter-pills {
        overflow-x: auto;
        white-space: nowrap;
        justify-content: flex-start;
    }

    .col-action {
        min-width: 150px;
    }

    /* Pastikan tombol aksi gak kegencet pas geser */
}

/* Styling Khusus Menu Statistik Member */
.mt-30 {
    margin-top: 30px;
}

.wpa-box-body.no-padding {
    padding: 0;
}

.wpa-recent-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wpa-recent-list li {
    padding: 12px 15px;
    border-bottom: 1px solid var(--wpa-bg-color);
}

.wpa-recent-list li:last-child {
    border-bottom: none;
}

.wpa-recent-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wpa-recent-item .dashicons {
    color: #94a3b8;
    font-size: 18px;
}

.wpa-recent-info strong {
    display: block;
    font-size: 13px;
    color: #334155;
    word-break: break-all;
}

.wpa-recent-info small {
    font-size: 11px;
    color: #94a3b8;
}

@media (max-width: 768px) {
    .wpa-dashboard-row {
        flex-direction: column;
    }

    .wpa-chart-container,
    .wpa-recent-container {
        width: 100%;
    }
}

/* --- MARKETING KIT DASHBOARD --- */
.wpa-marketing-wrapper {
    background: #f8fafc;
    border-radius: 12px;
}

.wpa-tabs-header {
    display: flex;
    gap: 8px;
    background: #e2e8f0;
    padding: 5px;
    border-radius: 10px;
    margin-bottom: 30px;
    width: fit-content;
}

.wpa-tabs-header .pill {
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    color: #64748b;
    text-decoration: none;
    transition: 0.2s;
}

.wpa-tabs-header .pill.active {
    background: #fff;
    color: #4f46e5;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Card Grid */
.wpa-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

.wpa-item-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

.wpa-img-preview {
    height: 200px;
    background: var(--wpa-bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
}

.wpa-img-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.wpa-content {
    padding: 20px;
    text-align: left;
}

.wpa-content h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #1e293b;
    font-weight: 700;
}

/* Keterangan HTML Script */
.wpa-script-label {
    font-size: 10px;
    font-weight: 800;
    color: #94a3b8;
    text-transform: uppercase;
    margin-bottom: 5px;
    display: block;
}

.wpa-copy-field {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 20px;
}

.wpa-copy-field code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #475569;
    word-break: break-all;
    display: block;
    height: 45px;
    overflow-y: auto;
}

/* Buttons */
.wpa-btn-flex {
    display: flex;
    gap: 10px;
}

.wpa-btn-main {
    flex: 1;
    padding: 12px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
    border: none;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: 0.2s;
}

.wpa-btn-indigo {
    background: #4f46e5;
    color: #fff !important;
}

.wpa-btn-download {
    background: #475569;
    color: #fff !important;
}

/* Solid Background */
.wpa-btn-indigo:hover,
.wpa-btn-download:hover {
    opacity: 0.9;
}

/* AI Form Styles */
.wpa-ai-container {
    max-width: 700px;
    margin: 0 auto;
    background: #fff;
    padding: 30px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
}

.wpa-form-group {
    margin-bottom: 20px;
}

.wpa-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
    color: #1e293b;
}

.wpa-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: #475569;
}

.wpa-ai-output {
    background: var(--wpa-bg-color);
    padding: 25px;
    border-radius: 12px;
    margin-top: 25px;
    border: 1px solid #cbd5e0;
    white-space: pre-wrap;
    font-size: 14px;
    line-height: 1.6;
    color: #334155;
}


/* --- STATISTIK DASHBOARD --- */
.wpa-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.wpa-stat-card {
    padding: 25px;
    text-align: center;
}

.wpa-stat-card .wpa-label {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.wpa-stat-card .wpa-value {
    font-size: 36px;
    font-weight: 800;
    margin: 10px 0;
    display: block;
}

/* Warna Khusus Value */
.wpa-value.klik {
    color: var(--primary);
}

.wpa-value.reg {
    color: #10b981;
}

.wpa-value.konv {
    color: #f59e0b;
}

/* Filter Styles */
.wpa-filter-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wpa-select-small {
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--card-border);
    font-size: 13px;
    background: #fff;
    cursor: pointer;
}

/* --- GLOBAL ADMIN TAB SYSTEM (Pill Style) --- */
.wpa-settings-tabs,
.wpa-admin-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: none;
    background: transparent;
    padding: 0;
}

.wpa-settings-tab-link,
.wpa-tab-link {
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    margin: 0;
}

.wpa-settings-tab-link:hover,
.wpa-tab-link:hover {
    background: #f8fafc;
    color: #4f46e5;
    border-color: #94a3b8;
}

.wpa-settings-tab-link.active,
.wpa-tab-link.active {
    background: #4f46e5 !important;
    color: #fff !important;
    border-color: #4f46e5 !important;
    box-shadow: 0 4px 6px rgba(79, 70, 229, 0.2) !important;
}

.wpa-tab-link .dashicons,
.wpa-settings-tab-link .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    line-height: 1;
}

/* Responsive for mobile */
@media (max-width: 768px) {

    .wpa-settings-tabs,
    .wpa-admin-tabs {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .wpa-settings-tab-link,
    .wpa-tab-link {
        padding: 10px 5px;
        font-size: 12.5px;
        justify-content: center;
        text-align: center;
        flex-direction: column;
        gap: 4px;
        height: auto;
    }

    .wpa-settings-tab-link .dashicons,
    .wpa-tab-link .dashicons {
        margin-right: 0;
        font-size: 20px;
        width: 20px;
        height: 20px;
    }
}

/* Tab Content Visibility */
.wpa-settings-content {
    display: none;
}

.wpa-settings-content.active {
    display: block !important;
    animation: wpaFadeIn 0.3s ease-in-out;
}

@keyframes wpaFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Tab Content Styling --- */
.wpa-settings-body {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.wpa-field-section {
    margin-bottom: 40px;
}

.wpa-field-section:last-child {
    margin-bottom: 0;
}

.wpa-field-section-title {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 2px solid var(--wpa-bg-color);
    padding-bottom: 10px;
}

.wpa-field-section-title .dashicons {
    color: #4f46e5;
}

.wpa-form-table-clean tr th {
    width: 280px;
    padding: 20px 10px 20px 0;
    font-weight: 600;
    color: #475569;
}

.wpa-form-table-clean tr td {
    padding: 15px 0;
}

.wpa-form-table-clean input[type="text"],
.wpa-form-table-clean input[type="number"],
.wpa-form-table-clean input[type="password"],
.wpa-form-table-clean input[type="email"],
.wpa-form-table-clean select,
.wpa-form-table-clean textarea {
    width: 100%;
    max-width: 500px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 10px 14px;
    background-color: #fff;
    transition: all 0.2s;
}

.wpa-form-table-clean input:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    outline: none;
}

/* Radio Card Group */
.wpa-radio-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 15px;
    max-width: 800px;
}

.wpa-radio-item {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    display: flex !important;
    align-items: flex-start !important;
    gap: 12px !important;
    transition: all 0.2s;
    background: #fff;
}

.wpa-radio-item:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.wpa-radio-item.active {
    border-color: #4f46e5;
    background: #f5f3ff;
    box-shadow: 0 4px 6px rgba(79, 70, 229, 0.05);
}

.wpa-radio-item input[type="radio"] {
    flex-shrink: 0;
    margin-top: 2px !important;
}

.wpa-radio-info {
    display: flex;
    flex-direction: column;
}

.wpa-radio-label {
    display: block;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
}

.wpa-radio-desc {
    font-size: 12px;
    color: #64748b;
    line-height: 1.4;
}

/* Referral Selector Widget */
.wpa-referral-selector {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    max-width: 600px;
    overflow: hidden;
}

.wpa-ref-search {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    gap: 10px;
}

.wpa-ref-search .dashicons {
    color: #94a3b8;
}

.wpa-ref-search input {
    border: none !important;
    background: transparent !important;
    width: 100% !important;
    outline: none !important;
    font-size: 14px !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.wpa-ref-list {
    max-height: 250px;
    overflow-y: auto;
}

.wpa-ref-item {
    display: flex !important;
    align-items: flex-start !important;
    padding: 12px 15px !important;
    border-bottom: 1px solid var(--wpa-bg-color);
    cursor: pointer;
    transition: background 0.2s;
    margin: 0 !important;
    gap: 12px !important;
}

.wpa-ref-item:last-child {
    border-bottom: none;
}

.wpa-ref-item:hover {
    background: #f8fafc;
}

.wpa-ref-item input[type="checkbox"] {
    margin-top: 2px !important;
    flex-shrink: 0;
}

.wpa-ref-info {
    display: flex;
    flex-direction: column;
}

.wpa-ref-title {
    font-weight: 600;
    font-size: 14px;
    color: #1e293b;
    margin-bottom: 4px;
}

.wpa-ref-url {
    font-size: 12px;
    color: #64748b;
}

/* Alert/Note inside settings */
.wpa-alert-info-light {
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
    padding: 12px 15px;
    color: #1e40af;
    font-size: 13px;
    border-radius: 4px;
    margin-bottom: 20px;
}

/* Table horizontal scroll wrapper for mobile */
.wpa-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}

/* Filter Bar - Desktop */
.wpa-filter-bar {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.wpa-filter-form {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.wpa-filter-input {
    padding: 6px 10px !important;
    border-radius: 6px !important;
    border: 1px solid #ddd !important;
    font-size: 13px !important;
    height: 32px !important;
    min-width: 0 !important;
}

.wpa-filter-select {
    padding: 0 10px !important;
    border-radius: 6px !important;
    border: 1px solid #ddd !important;
    font-size: 13px !important;
    height: 32px !important;
    background: #fff !important;
    min-width: 0 !important;
}

.wpa-filter-btn {
    height: 32px !important;
    line-height: 30px !important;
}

.wpa-filter-reset {
    font-size: 12px !important;
}

.wpa-found-count {
    color: #94a3b8;
    font-size: 11px;
    white-space: nowrap;
}

/* Filter Bar - Mobile */
@media (max-width: 782px) {
    .wpa-filter-bar {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .wpa-filter-form {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
        width: 100% !important;
    }

    .wpa-filter-input,
    .wpa-filter-select {
        width: 100% !important;
        min-width: 0 !important;
    }

    .wpa-filter-btn,
    .wpa-filter-reset {
        grid-column: 1 / -1 !important;
        text-align: center !important;
        width: 100% !important;
        display: block !important;
    }

    .wpa-found-count {
        text-align: center;
        display: block;
    }
}



/* Pagination row - always horizontal, never stacks */
.wpa-pagination-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 5px !important;
    width: 100% !important;
    justify-content: center;
}

.wpa-pagination-bottom {
    margin: 15px 0;
}

.wpa-page-info {
    font-size: 12px;
    color: #64748b;
}

/* Form Footer */

.wpa-form-footer-pro {
    position: sticky;
    bottom: 0;
    z-index: 100;
    margin-left: -20px;
    margin-right: -20px;
}

@media (max-width: 782px) {
    .wpa-form-table-clean tr th {
        width: 100% !important;
        padding-bottom: 5px;
    }

    .wpa-form-table-clean input[type="text"],
    .wpa-form-table-clean input[type="number"],
    .wpa-form-table-clean select,
    .wpa-form-table-clean textarea {
        max-width: 100% !important;
    }

    .wpa-settings-body {
        padding: 15px;
    }
}

/* --- PAGINATION PREMIUM UI --- */
.wpa-admin-wrap .tablenav-pages {
    margin: 10px 0;
}

.wpa-admin-wrap .tablenav-pages .pagination-links,
.wpa-admin-wrap .wpa-pagination-unified,
.wpa-admin-wrap .wpa-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    /* important for mobile responsive! */
}

.wpa-admin-wrap .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    border-radius: 8px;
    background: var(--wpa-surface);
    border: 1px solid #cbd5e1;
    color: #475569;
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
    margin: 0 !important;
}

.wpa-admin-wrap a.page-numbers:hover {
    border-color: #4f46e5;
    color: #4f46e5;
    background: #f8fafc;
    transform: translateY(-1px);
}

.wpa-admin-wrap span.page-numbers.current {
    background: #4f46e5 !important;
    border-color: #4f46e5 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.2);
}

.wpa-admin-wrap span.page-numbers.dots {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    cursor: default;
    min-width: auto;
    padding: 0 2px;
}

@media (max-width: 600px) {
    .wpa-admin-wrap .page-numbers {
        min-width: 28px;
        height: 28px;
        padding: 0 8px;
        font-size: 11px;
    }
}

/* Dashboard Analytics Extra Styles */
.wpa-chart-wrapper {
    position: relative;
    height: 320px;
    width: 100%;
}

.wpa-chart-wrapper-square {
    position: relative;
    height: 250px;
    width: 100%;
}

.wpa-info-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.wpa-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--wpa-bg-color);
}

.wpa-info-item:last-child {
    border-bottom: none;
}

.wpa-info-item .label {
    color: #64748b;
    font-weight: 500;
    font-size: 14px;
}

.wpa-info-item .value {
    color: #1e293b;
    font-weight: 700;
    font-size: 14px;
}

/* Admin Dashboard Pro Enhancements */
.wpa-admin-subtitle {
    color: #64748b;
    font-size: 15px;
    margin: 10px 0 0;
}

.wpa-badge-pro {
    background: var(--wpa-bg-color);
    color: #475569;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid #e2e8f0;
}

.wpa-table-minimal tr:hover {
    background: #f8fafc;
}

.wpa-no-data {
    padding: 40px !important;
    text-align: center;
    color: #94a3b8;
    font-style: italic;
}

/* Sub-menu Dashboard Sidebar */
.wpa-lte-nav ul li.has-children.open>.wpa-sub-menu {
    display: block !important;
}

.wpa-lte-nav ul li.has-children.open>a .dashicons-arrow-down-alt2 {
    transform: rotate(180deg);
}

.wpa-sub-menu {
    list-style: none !important;
    margin: 0 !important;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    margin-left: 10px !important;
}

.wpa-sub-menu li a {
    border-bottom: none !important;
    border-radius: 0 !important;
    transition: all 0.2s;
    padding: 6px 15px !important;
    font-size: 13px !important;
}

.wpa-sub-menu li a:hover,
.wpa-sub-menu li.active a {
    background: transparent !important;
    color: #fff !important;
}

.wpa-arrow {
    transition: transform 0.3s ease !important;
    display: inline-block !important;
    transform: translateY(3px) !important;
}

.wpa-lte-nav ul li.open .wpa-arrow {
    transform: rotate(180deg) translateY(0px) !important;
}

.wpa-toggle-btn:hover .wpa-arrow {
    color: #fff;
}

/* ================================================================
   MEMBER AREA PAGINATION STANDARDIZATION
   ================================================================ */
.wpa-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.wpa-pagination .pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #475569;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.wpa-pagination .pill:hover {
    border-color: #6366f1;
    color: #6366f1;
    background: #f8fafc;
}

.wpa-pagination .pill.active {
    background: #6366f1;
    border-color: #6366f1;
    color: #fff;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.2);
}
