/* ================================================================
   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: 15px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.wpa-sponsor-icon {
    color: #3b82f6;
}
.wpa-sponsor-label {
    margin: 0;
    font-size: 12px;
    color: #64748b;
}
.wpa-sponsor-name {
    font-weight: 700;
    color: #1e293b;
    font-size: 16px;
}

.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:not([type="button"]):not([type="submit"]):not([type="checkbox"]):not([type="radio"]), 
.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 #f1f5f9;
}
.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 #f1f5f9; }

.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; }

/* --- MOBILE RESPONSIVE --- */
@media (max-width: 900px) {
    .wpa-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .wpa-content-grid, .wpa-grid-even { 
        grid-template-columns: 1fr !important; 
    }
}

@media (max-width: 782px) {
    .wpa-dashboard-pro { padding-right: 15px; }
    .wpa-stat-card .card-body { padding: 20px 15px; }
    .card-value { font-size: 30px; }
    
    /* Pastikan box tidak melewati batas layar di admin WP */
    .wpa-box-pro { margin-bottom: 15px; }
}

@media (max-width: 480px) {
    .wpa-stats-grid { grid-template-columns: 1fr; }
}

/* ================================================================
   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% !important;
    border: 1px solid #ddd !important;
    border-radius: 6px !important;
    padding: 10px !important;
    box-sizing: border-box !important;
    background: #fff !important;
    color: #333 !important;
    height: auto !important;
}
.wpa-input-file {
    width: 100% !important;
}
.wpa-input-readonly { background-color: #edf2f7 !important; cursor: not-allowed !important; font-weight: bold !important; }
/* Buttons */
.wpa-btn-primary {
    display: inline-block !important;
    padding: 12px 25px !important;
    border-radius: 8px !important;
    font-weight: bold !important;
    text-decoration: none !important;
    cursor: pointer !important;
    border: none !important;
    text-align: center !important;
    background: #3b82f6 !important;
    color: #fff !important;
}

/* ================================================================
   4. MEMBER AREA - AdminLTE Style Layout
   ================================================================ */
/* Modern Dashboard Theme - Starasukses */
        .wpa-lte-wrapper {
            display: flex;
            min-height: 800px;
            background: #f4f6f9;
            font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
            border: 1px solid #dee2e6;
            margin: 20px 0;
            border-radius: 8px;
            overflow: visible;
        }

        /* Sidebar Style */
        .wpa-lte-sidebar {
            width: 250px;
            background: #00152e; /* Deep Navy */
            color: #fff;
            flex-shrink: 0;
            transition: all 0.3s;
            border-right: 1px solid rgba(255,255,255,0.05);
        }

        .wpa-lte-brand {
            padding: 22px 20px;
            text-align: center;
            font-size: 1.25rem;
            font-weight: 800;
            background: #031933; /* Dark Navy-Teal Header */
            border-bottom: 2px solid rgba(0,0,0,0.1);
            color: #fff;
            text-transform: uppercase;
            letter-spacing: 1px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.2);
        }

        .wpa-lte-user-panel {
            padding: 25px 10px;
            text-align: center;
            background: rgba(0,0,0,0.1); /* Subtle contrast */
            border-bottom: 1px solid rgba(255,255,255,0.05);
        }

        .wpa-user-img img {
            width: 75px;
            height: 75px;
            border-radius: 50%;
            border: 2px solid #0e3c5d;
            margin-bottom: 12px;
            padding: 2px;
            background: #fff;
        }

        .wpa-user-info p {
            margin: 0;
            font-weight: 700;
            color: #fff;
            font-size: 15px;
        }

        .wpa-user-info small { 
            color: #64748b; 
            font-size: 11px; 
            text-transform: uppercase;
            letter-spacing: 1px;
            font-weight: 600;
        }

        /* Navigation */
        .wpa-lte-nav ul {
            list-style: none;
            padding: 15px 10px;
            margin: 0;
        }

        .wpa-lte-nav ul li { margin-bottom: 4px; }

        .wpa-lte-nav ul li a {
            display: flex;
            align-items: center;
            padding: 10px 15px;
            color: #94a3b8;
            text-decoration: none;
            transition: all 0.2s;
            font-size: 14px;
            font-weight: 600;
            border-radius: 8px;
        }

        .wpa-lte-nav ul li a:hover {
            background: rgba(14, 60, 93, 0.3); /* Steel Blue hover */
            color: #fff;
        }

        .wpa-lte-nav ul li.active a {
            background: #0e3c5d; /* Solid Steel Blue Active */
            color: #fff !important;
            font-weight: 700;
            box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        }

        .wpa-lte-nav .dashicons {
            margin-right: 12px;
            font-size: 18px;
            color: #64748b;
            transition: color 0.2s;
        }

        .wpa-lte-nav ul li.active a .dashicons,
        .wpa-lte-nav ul li a:hover .dashicons {
            color: #fff;
        }
        
        /* Submenu indicator support */
        .wpa-has-submenu { position: relative; }
        .wpa-chevron { margin-left: auto; font-size: 14px; opacity: 0.5; }

        /* Content Area */
        .wpa-lte-content {
            flex-grow: 1;
            padding: 0;
            display: flex;
            flex-direction: column;
            background: #fff;
            overflow-x: auto;
            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: #fff;
            flex-grow: 1;
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
        }

        /* 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 */
        @media (max-width: 768px) {
            .wpa-lte-wrapper { flex-direction: column; }
            .wpa-lte-sidebar { width: 100%; }
            .wpa-lte-nav ul { display: flex; flex-wrap: wrap; justify-content: center; }
            .wpa-lte-nav ul li { margin: 5px; }
            .wpa-lte-brand { padding: 10px; }
        }

/* 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;
    gap: 15px;
    background: #fff;
    padding: 15px;
    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: #f1f5f9;
    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; } /* Tumpuk kartu */

    /* Sembunyikan kolom yang kurang penting di layar sangat kecil */
    .col-type, .col-req { display: none !important; } 

    /* Beri ruang lebih untuk detail */
    .col-detail { width: auto !important; }

    /* Sembunyikan teks "Hapus" di mobile, sisakan icon trash saja agar hemat tempat */
    .wpa-delete-icon .txt { display: none; }
    .wpa-delete-icon .dashicons { font-size: 20px; color: #ef4444; }
    
    .wpa-table-pro th, .wpa-table-pro td { padding: 15px 5px !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: #f1f5f9;
    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: #f1f5f9;
    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: #ffffff;
    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, .wpa-info-inner h4 { font-size: 32px; margin: 0; font-weight: 700; line-height: 1; }
.wpa-info-inner p { margin: 5px 0 0; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; opacity: 0.95; line-height: 1.2; }

.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 #f1f5f9;
}

.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 #f1f5f9; 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; }

/* Tombol WA Konfirmasi Member Area */
.wpa-btn-wa-confirm {
    display: inline-flex !important;
    align-items: center;
    gap: 10px;
    background: #10b981;
    color: #fff !important;
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    margin-top: 15px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}
.wpa-btn-wa-confirm:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(16, 185, 129, 0.3);
}
.wpa-btn-wa-confirm .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* Responsive */
@media (max-width: 992px) {
    .wpa-lte-grid { grid-template-columns: 1fr; }
    .wpa-dashboard-row { flex-direction: column; }
}

/* ================================================================
   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 !important;
    justify-content: center !important;
    align-items: center !important;
    min-height: 70vh !important;
    padding: 10px !important;
    background: #fff !important;
}

.wpa-auth-box {
    background: #fff !important;
    width: 100% !important;
    max-width: 420px !important;
    padding: 40px !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08) !important;
    text-align: center !important;
}

.wpa-auth-box h2 { font-weight: 800 !important; margin-bottom: 10px !important; color: #1e293b !important; font-size: 28px !important; }
.wpa-auth-box p { color: #64748b !important; margin-bottom: 30px !important; font-size: 15px !important; }

.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 10px 0 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-color: #ffffff !important;
    position: relative !important;
    cursor: pointer !important;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.05) !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" !important; 
    font-family: dashicons !important;
    color: #ffffff !important;
    font-size: 14px !important;
    line-height: 1 !important;
    display: block !important;
}

.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 #f1f5f9; 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: #f1f5f9;
    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: #f1f5f9;
    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%;
}

/* Referral Page Checklist Scrollable */
.wpa-page-checklist {
    height: 180px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #f8fafc;
    padding: 10px;
}

.wpa-page-check-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background 0.2s;
    cursor: pointer;
    font-size: 13px;
    color: #4a5568;
    margin-bottom: 2px;
}

.wpa-page-check-item:hover {
    background: #edf2f7;
}

.wpa-page-check-item input[type="checkbox"] {
    margin: 0 !important;
    width: 16px !important;
    height: 16px !important;
    cursor: pointer;
}

.wpa-page-check-item span {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 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: #f1f5f9;
}

.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: #f1f5f9; 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: 25% !important; }
.col-sponsor { width: 15% !important; text-align: center; }
.col-status { width: 15% !important; text-align: center; }
.col-date { width: 15% !important; }
.col-action { width: 30% !important; }

.wpa-mini-email { font-size: 10px; color: #94a3b8; background: transparent; padding: 0; }
.wpa-badge-sponsor { background: #f1f5f9; 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 #f1f5f9; }
.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; 
    padding: 25px; 
    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: #f1f5f9;
    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: #f1f5f9; 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;
}

/* --- PAGINATION PREMIUM UI --- */
.wpa-pagination {
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    border-top: 1px solid var(--card-border);
    background: #ffffff;
}

.wpa-pagination .pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 15px;
    border-radius: 10px;
    background: #ffffff; /* Background default putih */
    border: 1px solid var(--card-border);
    color: var(--text-muted);
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
}

/* Hover: Warna background dibuat agak gelap biar kelihatan */
.wpa-pagination .pill:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #edf2f7; /* Abu-abu lebih gelap sedikit dari f8fafc */
    transform: translateY(-2px);
}

/* Active: Pakai !important biar warna biru lo muncul paksa */
.wpa-pagination .pill.active {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(49, 130, 206, 0.4); /* Glow biru lo */
}

/* 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 #f1f5f9; }
.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: #f1f5f9; 
    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; }