/* ============================================================
   HOMEPAGE PAYOUT SECTION - RESTORED
   ============================================================ */

.payout-section {
    --pay-primary: #6366f1;
    --pay-primary-light: #818cf8;
    --pay-primary-dark: #4f46e5;
    --pay-secondary: #8b5cf6;
    --pay-accent: #10b981;
    --pay-accent-light: #34d399;
    --pay-gold: #f59e0b;
    --pay-gold-light: #fbbf24;
    --pay-dark-bg: #0f172a;
    --pay-dark-card: #1e293b;
    --pay-dark-border: #334155;
    --pay-dark-text: #f1f5f9;
    --pay-dark-subtext: #cbd5e1;
    --pay-gradient-primary: linear-gradient(135deg, #6366f1, #8b5cf6);
    --pay-gradient-accent: linear-gradient(135deg, #10b981, #0d9488);
    --pay-gradient-gold: linear-gradient(135deg, #f59e0b, #d97706);
    --pay-gradient-multi: linear-gradient(135deg, #6366f1, #8b5cf6, #10b981);
    --pay-shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.4);
    --pay-shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.5);
    --pay-shadow-glow: 0 0 60px rgba(99, 102, 241, 0.25);

    position: relative;
    padding: 100px 0;
    background-color: var(--pay-dark-bg);
    color: var(--pay-dark-text);
    overflow: hidden;
    font-family: 'Outfit', sans-serif;
}

.payout-section .background-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background-color: var(--pay-dark-bg);
    overflow: hidden;
}

.payout-section .pattern-grid {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(99, 102, 241, 0.03) 1px, transparent 1px),
        radial-gradient(circle at 80% 70%, rgba(139, 92, 246, 0.03) 1px, transparent 1px);
    background-size: 100px 100px, 80px 80px;
    opacity: 0.5;
}

.payout-section .pattern-lines {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(90deg, transparent 49.9%, rgba(99, 102, 241, 0.02) 50%, transparent 50.1%),
        linear-gradient(transparent 49.9%, rgba(99, 102, 241, 0.02) 50%, transparent 50.1%);
    background-size: 50px 50px, 50px 50px;
    opacity: 0.3;
}

.payout-section .floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
}

.payout-section .floating-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.05;
    animation: payFloatShape 35s infinite ease-in-out;
}

@keyframes payFloatShape {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.05;
    }

    33% {
        transform: translate(60px, -70px) scale(1.15);
        opacity: 0.08;
    }

    66% {
        transform: translate(-40px, 50px) scale(0.9);
        opacity: 0.06;
    }
}

.payout-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

.payout-section .payout-header {
    text-align: center;
    margin-bottom: 60px;
}

.payout-section .payout-header h3 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    background: var(--pay-gradient-multi);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-family: 'Outfit', sans-serif;
}

.payout-section .statement-card {
    background: rgba(30, 41, 59, 0.7);
    border-radius: 24px;
    padding: 60px 50px;
    border: 1px solid var(--pay-dark-border);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    opacity: 0.6;
    transition: all 0.4s ease;
}

.payout-section .statement-card:hover {
    opacity: 1;
}

.payout-section .features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

.payout-section .feature-card {
    background: var(--pay-dark-card);
    border-radius: 20px;
    padding: 40px 32px;
    border: 1px solid var(--pay-dark-border);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    opacity: 0.6;
    /* Reduced opacity as requested */
}

.payout-section .feature-card:hover {
    transform: translateY(-10px);
    border-color: var(--pay-primary);
    box-shadow: var(--pay-shadow-xl);
    opacity: 1;
    /* Restore full visibility on hover */
}

.payout-section .feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--pay-gradient-primary);
}

.payout-section .feature-icon {
    width: 64px;
    height: 64px;
    background: var(--pay-gradient-primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    color: white;
    font-size: 24px;
}

.payout-section .feature-card:nth-child(2) .feature-icon {
    background: var(--pay-gradient-accent);
}

.payout-section .feature-card:nth-child(3) .feature-icon {
    background: var(--pay-gradient-gold);
}

.payout-section .feature-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: white;
    font-family: 'Outfit', sans-serif;
}

.payout-section .feature-description {
    font-size: 1rem;
    color: var(--pay-dark-subtext);
    line-height: 1.7;
}

.payout-section .infrastructure-card {
    background: rgba(30, 41, 59, 0.8);
    border-radius: 24px;
    padding: 60px;
    border: 1px solid var(--pay-dark-border);
    text-align: center;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    margin-top: 80px;
    opacity: 0.6;
    transition: all 0.4s ease;
}

.payout-section .infrastructure-card:hover {
    opacity: 1;
}

.payout-section .infrastructure-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    background: var(--pay-gradient-multi);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-family: 'Outfit', sans-serif;
}

@media (max-width: 768px) {
    .payout-section {
        padding: 60px 0;
    }

    .payout-section .payout-header h3 {
        font-size: 2rem;
    }

    .payout-section .statement-card {
        padding: 40px 20px;
    }

    .payout-section .infrastructure-card {
        padding: 40px 20px;
    }

    .payout-section .infrastructure-title {
        font-size: 1.8rem;
    }
}

/* Particles Animation */
.payout-section .particle {
    position: absolute;
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
    animation-name: payParticleFloat;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
    bottom: -20px;
    /* Start below the section */
}

@keyframes payParticleFloat {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }

    20% {
        opacity: 0.5;
    }

    80% {
        opacity: 0.5;
    }

    100% {
        transform: translateY(-1000px) rotate(360deg);
        opacity: 0;
    }
}

/* Flow Line Animation */
.payout-section .flow-line {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.4), transparent);
    opacity: 0;
    pointer-events: none;
    animation-name: payFlowLine;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
}

@keyframes payFlowLine {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }

    50% {
        opacity: 0.3;
    }

    100% {
        transform: translateX(100vw);
        opacity: 0;
    }
}

/* --- Layout & Responsiveness --- */

.split-layout {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 2rem;
}

@media (max-width: 1024px) {
    .split-layout {
        grid-template-columns: 1fr;
    }
}

/* --- Method Card --- */
.method-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.method-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.method-card.default {
    border: 2px solid var(--success);
    background: #f0fdf4;
}

.method-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 1rem;
}

.method-info {
    flex: 1;
}

.method-name {
    font-weight: 600;
    color: var(--text-heading);
    margin-bottom: 0.25rem;
}

.method-meta {
    font-size: 0.85rem;
    color: var(--secondary);
}

.default-badge {
    position: absolute;
    top: 0;
    left: 0;
    background: var(--success);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.25rem 0.6rem;
    border-bottom-right-radius: 8px;
}

/* --- Form Section --- */
.form-section {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border: 1px solid #f1f5f9;
    height: fit-content;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-heading);
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px var(--primary-light);
}

.btn-submit {
    width: 100%;
    padding: 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
}

.btn-submit:hover {
    transform: translateY(-2px);
    background: var(--primary-dark);
}

/* --- Stats & Info --- */
.balance-card {
    background: #f0fdf4;
    padding: 1.25rem;
    border-radius: 16px;
    border: 1px solid #dcfce7;
}

.withdrawn-card {
    background: #f8fafc;
    padding: 1.25rem;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
}

.stat-label {
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.stat-value {
    font-size: 1.6rem;
    font-weight: 700;
}

.limit-card {
    padding: 1rem;
    border-radius: 10px;
    border: 1px solid;
}

.limit-title {
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.limit-value {
    font-weight: 700;
}

/* --- Table --- */
.payout-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.payout-table th {
    padding: 1rem 0.5rem;
    color: var(--secondary);
    border-bottom: 2px solid #f1f5f9;
    text-align: left;
}

.payout-table td {
    padding: 1rem 0.5rem;
    border-bottom: 1px solid #f1f5f9;
}

.pagination-wrapper {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.page-btn {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
}

.page-btn-outline {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.page-btn-primary {
    background: var(--primary);
    color: white;
}

.page-btn:disabled,
.page-btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

.status-paid {
    color: #16a34a;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
}

.status-rejected {
    color: #dc2626;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
}

.status-pending {
    color: #d97706;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
}

/* --- Utilities & Helper Classes --- */
.d-none {
    display: none !important;
}

.d-block {
    display: block !important;
}

.text-center {
    text-align: center;
}

.text-heading {
    color: var(--text-heading);
}

.text-secondary {
    color: var(--secondary);
}

.text-muted {
    color: #64748b;
}

.text-success {
    color: var(--success);
}

.text-danger {
    color: var(--danger);
}

.text-primary {
    color: var(--primary);
}

.text-warning {
    color: #f59e0b;
}

.text-green {
    color: #15803d;
}

.text-green-dark {
    color: #166534;
}

.text-slate {
    color: #64748b;
}

.text-slate-dark {
    color: #0f172a;
}

.text-brown {
    color: #92400e;
}

.text-amber {
    color: #d97706;
}

.text-blue {
    color: #2563eb;
}

.text-blue-dark {
    color: #1e40af;
}

.font-mono {
    font-family: monospace;
}

.fs-sm {
    font-size: 0.85rem;
}

.font-weight-500 {
    font-weight: 500;
}

.font-weight-600-lg {
    font-size: 1.1rem;
    font-weight: 600;
}

.fw-600 {
    font-weight: 600;
}

.w-100 {
    width: 100%;
}

.w-30 {
    width: 30%;
}

.m-0 {
    margin: 0;
}

.mt-2 {
    margin-top: 2rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

.mb-1-5 {
    margin-bottom: 1.5rem;
}

.mt-0-5 {
    margin-top: 0.5rem;
}

.p-2rem {
    padding: 2rem;
}

.pl-2-5 {
    padding-left: 2.5rem;
}

.ml-1 {
    margin-left: 0.5rem;
}

.opacity-50 {
    opacity: 0.5;
}

.display-flex {
    display: flex;
}

.justify-between {
    justify-content: space-between;
}

.align-center {
    align-items: center;
}

.gap-1 {
    gap: 1rem;
}

.flex-1 {
    flex: 1;
}

.flex-none {
    flex: none;
}

.main-container {
    max-width: 600px;
    margin: 0 auto;
}

.page-title {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.method-display {
    display: flex;
    align-items: center;
    width: 100%;
}

.btn-outline-primary {
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary {
    background: #e2e8f0;
    color: #64748b;
}

.btn-success {
    background: var(--success);
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

.plan-badge {
    background: var(--primary-light);
    color: var(--primary);
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.limit-min {
    background: #fffbeb;
    border-color: #fef3c7;
}

.limit-daily {
    background: #eff6ff;
    border-color: #dbeafe;
}

.table-scroll {
    overflow-x: auto;
}

/* --- Header Utilities (Synced) --- */
.user-info-sm {
    font-size: 0.9rem;
}

.user-chevron-custom {
    font-size: 0.7rem;
    margin-left: 5px;
    opacity: 0.7;
}

.user-name {
    color: #0f172a;
    font-weight: 500;
}

/* ============================================ */
/* Mobile Responsive Table - Adaptive Layout */
/* ============================================ */

@media (max-width: 768px) {

    /* 1. Container: Reset Scroll */
    .table-scroll {
        display: block;
        width: 100%;
        overflow-x: hidden !important;
        /* Force hide overflow */
    }

    /* 3. Convert Rows to Stylish Cards - Left Aligned Layout (User Request) */
    .payout-table,
    .payout-table tbody,
    .payout-table td {
        display: block !important;
        width: auto;
        border: none;
        padding: 0;
        box-sizing: border-box;
    }

    .payout-table thead {
        display: none;
    }

    .payout-table tr {
        display: grid !important;
        grid-template-columns: auto auto;
        /* Compact columns */
        grid-template-rows: auto auto;
        grid-template-areas:
            "amount status"
            "date status";
        justify-content: start;
        /* Align Layout to Left */
        /* Gap Control: 0.15rem vertical, 3.5rem (~2.5cm) horizontal between cols */
        gap: 0.15rem 3.5rem;

        position: relative;
        background: transparent;
        border: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        border-radius: 0;
        /* Vertical padding 0.75rem. Left padding 2rem (~1.5cm) as margin */
        padding: 0.75rem 0 0.75rem 2rem;
        margin-bottom: 0;
        box-shadow: none;
        width: 100%;
        box-sizing: border-box;
        align-items: center;
    }

    /* Date Styling - Left Column */
    .payout-table td:nth-child(1) {
        grid-area: date;
        width: auto !important;
        font-size: 0.75rem;
        color: #64748b;
        font-weight: 500;
        margin: 0 !important;
        padding: 0 !important;
        line-height: 1.2;
        text-align: left !important;
        /* Left aligned text */
    }

    /* Amount Styling - Left Column */
    .payout-table td:nth-child(2) {
        grid-area: amount;
        width: auto !important;
        font-size: 1.1rem;
        font-weight: 700;
        color: var(--text-heading);
        line-height: 1.2;
        margin: 0 !important;
        padding: 0 !important;
        text-align: left !important;
        /* Left aligned text */

        position: static;
        transform: none;
    }

    /* Status Styling - Right Column */
    .payout-table td:nth-child(3) {
        grid-area: status;
        width: auto !important;
        text-align: left !important;
        margin: 0 !important;
        padding: 0 !important;
        white-space: nowrap;
        align-self: center;

        position: static;
        right: auto;
        top: auto;
        transform: none;

        display: inline-block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    /* Optimized Badges */
    .status-paid,
    .status-rejected,
    .status-pending {
        display: inline-block;
        font-size: 0.85rem;
        /* Bigger */
        padding: 0.3rem 0.6rem;
        border-radius: 4px;
        font-weight: 700;
        /* Bold like price */
        letter-spacing: 0.02em;
        line-height: 1;
    }
}

/* Extra small devices (phones < 480px) */
/* Update to match Left Aligned Grid */
@media (max-width: 480px) {
    .payout-table tr {
        display: grid !important;
        grid-template-columns: auto auto;
        grid-template-areas:
            "amount status"
            "date status";
        justify-content: start;
        /* Align Left */
        gap: 0.15rem 3.5rem;
        /* ~2.5cm gap */
        padding: 0.85rem 0 0.85rem 2rem;
        /* ~1.5cm left pad */
    }

    .payout-table td {
        display: block !important;
    }

    .status-paid,
    .status-rejected,
    .status-pending {
        font-size: 0.85rem;
        /* Bigger */
        padding: 0.3rem 0.6rem;
        font-weight: 700;
        /* Bold */
    }
}

/* ===============================================
   Mobile Optimize: Wallet & Stats (User Request) 
   =============================================== */
@media (max-width: 768px) {

    /* 1. Compact Wallet Address */
    .method-card {
        padding: 0.75rem;
        border-radius: 12px;
        margin-bottom: 0.75rem;
    }

    .method-icon {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
        margin-right: 0.75rem;
        border-radius: 8px;
    }

    .method-name {
        font-size: 0.9rem;
        margin-bottom: 0.1rem;
    }

    .method-meta {
        font-size: 0.75rem;
        /* Truncate if too long */
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 200px;
    }

    .btn-update-mini {
        padding: 0.3rem 0.6rem !important;
        font-size: 0.75rem !important;
    }

    #changeWalletBtn {
        padding: 0.6rem;
        font-size: 0.85rem;
    }

    /* 2. Side-by-Side Stats & Limits */
    /* Force grid to 2 columns even on mobile */
    .stats-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 0.5rem;
        margin-bottom: 0.5rem;
        /* Reduced from 1rem */
    }

    /* Reduce form section padding on mobile */
    .form-section {
        padding: 1rem;
    }

    /* Tighter spacing for form inputs on mobile */
    .form-group {
        margin-bottom: 0.75rem;
        /* Reduced from 1.25rem */
    }

    .balance-card,
    .withdrawn-card,
    .limit-card {
        padding: 0.75rem;
        border-radius: 12px;
    }

    .stat-label {
        font-size: 0.7rem;
    }

    .stat-value {
        font-size: 1.2rem;
    }

    .limit-title {
        font-size: 0.65rem;
    }

    .limit-value {
        font-size: 0.9rem;
    }

    /* 3. Header Spacing (User Request) */
    .header-section {
        margin-top: -0.5rem;
        margin-bottom: 0.25rem !important;
    }

    /* Reduce gap between Wallet Card and Withdraw Section */
    .form-section.mt-2 {
        margin-top: 0.25rem;
    }

    /* Restore & Increase gap for Payout History (Last Section) */
    .form-section.mt-2:last-child {
        margin-top: 2rem !important;
        /* Plenty of space before History */
    }

    .page-title {
        margin-top: 0;
        margin-bottom: 0.2rem;
        font-size: 1.4rem;
    }

    .page-subtitle {
        font-size: 0.8rem;
        margin-top: 0;
        line-height: 1.3;
    }
}

/* New Mini Update Button Styles */
.btn-update-mini {
    background: var(--primary);
    /* Solid Primary Background */
    color: white;
    /* White Text */
    border: none;
    /* No Border */
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    margin-left: 1rem;
    flex-shrink: 0;
    transition: all 0.2s;
}

.btn-update-mini:hover {
    background: var(--primary-dark);
    /* Darker on hover */
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}