/* Enhanced Affiliate Dashboard Styles - Matching Registration Design */

/* Override theme styles for dashboard page */
body.page .ars-dashboard,
.page .ars-dashboard,
.ars-dashboard {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%) !important;
    min-height: 100vh !important;
    margin: 0 !important;
    max-width: none !important;
    width: 100vw;
    position: relative;
    overflow-x: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Remove theme padding/margins for dashboard */
body.page .ars-dashboard {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.ars-dashboard {
    margin: 0 !important;
}

/* Background pattern overlay */
.ars-dashboard::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(120, 119, 198, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(99, 102, 241, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

/* Dashboard content wrapper */
.ars-dashboard > * {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
}

/* Dashboard Header */
.ars-dashboard-header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.ars-dashboard-header h1 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ars-dashboard-header p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

/* Logout button styling */
.ars-logout-btn {
    background: linear-gradient(135deg, #dc3545, #c82333) !important;
    color: white !important;
    padding: 12px 24px !important;
    text-decoration: none !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.ars-logout-btn:hover {
    background: linear-gradient(135deg, #c82333, #bd2130) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 10px 25px rgba(220, 53, 69, 0.3) !important;
    text-decoration: none !important;
    color: white !important;
}

/* Stats Grid */
.ars-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.ars-stat-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ars-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 35px 70px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

.ars-stat-icon {
    font-size: 2.5rem;
    padding: 20px;
    border-radius: 16px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 80px;
    height: 80px;
}

.ars-stat-content h3 {
    margin: 0 0 8px;
    font-size: 2.2rem;
    font-weight: 700;
    color: #1f2937;
}

.ars-stat-content p {
    margin: 0;
    color: #6b7280;
    font-size: 1rem;
    font-weight: 500;
}

/* Dashboard Navigation */
.ars-dashboard-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
    justify-content: center;
    padding: 25px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.ars-nav-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 14px 24px;
    cursor: pointer;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.95rem;
}

.ars-nav-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    transform: translateY(-2px);
}

.ars-nav-btn.active {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border-color: transparent;
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
}

/* Tab Content */
.ars-tab-panel {
    display: none;
}

.ars-tab-panel.active {
    display: block;
}

/* Cards */
.ars-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 25px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ars-card:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 35px 70px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

.ars-card h3 {
    color: #1f2937;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f3f4f6;
    font-size: 1.4rem;
    font-weight: 700;
    position: relative;
}

.ars-card h3::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 1px;
}

/* Dashboard Grid */
.ars-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
}

.ars-full-width {
    grid-column: 1 / -1;
}

/* Quick Actions */
.ars-quick-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ars-quick-actions button {
    padding: 16px 24px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    font-size: 0.95rem;
}

.ars-btn-primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
}

.ars-btn-primary:hover {
    background: linear-gradient(135deg, #5b21b6, #7c3aed);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
}

.ars-btn-secondary {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
    border: 2px solid rgba(99, 102, 241, 0.2);
}

.ars-btn-secondary:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: #6366f1;
}

/* Recent Activity */
.ars-recent-activity {
    max-height: 300px;
    overflow-y: auto;
}

.ars-activity-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f3f4f6;
}

.ars-activity-item:last-child {
    border-bottom: none;
}

.ars-activity-info strong {
    color: #1f2937;
}

.ars-tier {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-left: 10px;
    font-weight: 600;
}

.ars-activity-amount {
    font-weight: 700;
    color: #059669;
    font-size: 1.1rem;
}

/* Performance Grid */
.ars-performance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.ars-performance-item {
    text-align: center;
    padding: 25px;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ars-performance-item:hover {
    transform: translateY(-3px);
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
}

.ars-performance-item h4 {
    font-size: 2.2rem;
    color: #6366f1;
    margin-bottom: 8px;
    font-weight: 700;
}

.ars-performance-item p {
    color: #64748b;
    margin: 0;
    font-weight: 500;
}

/* Marketing Tools */
.ars-marketing-tools {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.ars-tool-section {
    padding: 25px 0;
    border-bottom: 1px solid #f3f4f6;
}

.ars-tool-section:last-child {
    border-bottom: none;
}

.ars-tool-section label {
    display: block;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.ars-link-container {
    display: flex;
    gap: 12px;
    align-items: center;
}

.ars-link-container input {
    flex: 1;
    padding: 16px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-family: monospace;
    background: #f8fafc;
    color: #1f2937;
    font-size: 0.9rem;
}

.ars-copy-btn {
    padding: 16px 24px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.ars-copy-btn:hover {
    background: linear-gradient(135deg, #5b21b6, #7c3aed);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
}

.ars-code-container {
    display: flex;
    align-items: center;
    gap: 20px;
}

.ars-affiliate-code {
    font-family: monospace;
    font-size: 1.8rem;
    font-weight: 700;
    color: #6366f1;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    padding: 15px 30px;
    border-radius: 16px;
    border: 2px dashed #6366f1;
}

.ars-qr-container {
    display: flex;
    align-items: center;
    gap: 25px;
}

#qr-code {
    padding: 15px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Social Share */
.ars-social-share {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.ars-social-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.9rem;
}

.ars-social-btn.whatsapp { background: linear-gradient(135deg, #25d366, #1ebe57); }
.ars-social-btn.facebook { background: linear-gradient(135deg, #1877f2, #166fe5); }
.ars-social-btn.twitter { background: linear-gradient(135deg, #1da1f2, #1a91da); }
.ars-social-btn.telegram { background: linear-gradient(135deg, #0088cc, #007bb5); }

.ars-social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* Tables */
.ars-table-responsive {
    overflow-x: auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.ars-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.ars-table th,
.ars-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid #f3f4f6;
}

.ars-table th {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    font-weight: 700;
    color: #1f2937;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ars-table tr:hover {
    background: #f8fafc;
}

.ars-code {
    font-family: monospace;
    background: #f3f4f6;
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 600;
    color: #6366f1;
}

/* Status badges */
.ars-status {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ars-status.active { background: #dcfce7; color: #166534; }
.ars-status.inactive { background: #fee2e2; color: #991b1b; }
.ars-status.pending { background: #fef3c7; color: #92400e; }
.ars-status.approved { background: #dbeafe; color: #1e40af; }
.ars-status.completed { background: #dcfce7; color: #166534; }
.ars-status.failed { background: #fee2e2; color: #991b1b; }
.ars-status.processing { background: #f3f4f6; color: #374151; }

.ars-tier-badge {
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
}

.ars-tier-badge.tier-1 { background: linear-gradient(135deg, #059669, #047857); }
.ars-tier-badge.tier-2 { background: linear-gradient(135deg, #0891b2, #0e7490); }

/* Empty State */
.ars-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.ars-empty-state p {
    font-size: 1.1rem;
    margin: 0;
}

/* Payout Section */
.ars-payout-info {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 25px;
    border: 1px solid #bae6fd;
}

.ars-payout-info p {
    margin: 8px 0;
    color: #0c4a6e;
}

.ars-payout-list {
    max-height: 300px;
    overflow-y: auto;
}

.ars-payout-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #f3f4f6;
}

.ars-payout-item:last-child {
    border-bottom: none;
}

.ars-payout-date {
    display: block;
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 5px;
}

/* Form Elements in Dashboard */
.ars-form-group {
    margin-bottom: 25px;
}

.ars-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 0.95rem;
}

.ars-form-group input,
.ars-form-group select,
.ars-form-group textarea {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    color: #1f2937;
}

.ars-form-group input:focus,
.ars-form-group select:focus,
.ars-form-group textarea:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

/* Profile Section */
.ars-affiliate-info {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    padding: 25px;
    border-radius: 16px;
    margin-top: 25px;
    border: 1px solid #e2e8f0;
}

.ars-affiliate-info h4 {
    color: #6366f1;
    margin-bottom: 20px;
    font-size: 1.2rem;
    font-weight: 700;
}

.ars-affiliate-info p {
    margin: 12px 0;
    color: #475569;
}

/* Messages */
.ars-message {
    margin-top: 25px;
    text-align: center;
}

.ars-message .success {
    color: #065f46;
    background: #d1fae5;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #a7f3d0;
    font-weight: 600;
}

.ars-message .error {
    color: #991b1b;
    background: #fee2e2;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #fecaca;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 1247px) {
    .ars-dashboard {
        padding: 40px 10px !important;
    }
}

@media (max-width: 1024px) {
    .ars-dashboard {
        padding: 30px 15px !important;
    }
    
    .ars-dashboard-header h1 {
        font-size: 2.5rem;
    }
    
    .ars-stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .ars-dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .ars-dashboard {
        padding: 20px 15px !important;
    }
    
    .ars-dashboard-header h1 {
        font-size: 2rem;
    }
    
    .ars-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .ars-stat-card {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    /* Logout button styling */
    .ars-logout-btn {
    padding: 6px 12px !important;
    }

    .ars-dashboard-nav {
        flex-direction: column;
        gap: 10px;
    }
    
    .ars-nav-btn {
        width: 100%;
        text-align: center;
    }
    
    .ars-link-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .ars-qr-container {
        flex-direction: column;
        gap: 20px;
    }
    
    .ars-social-share {
        justify-content: center;
    }
    
    .ars-performance-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .ars-dashboard-header h1 {
        font-size: 1.8rem;
    }
    
     /* Logout button styling */
    .ars-logout-btn {
    padding: 6px 12px !important;
    }

    .ars-card {
        padding: 20px;
    }
    
    .ars-performance-grid {
        grid-template-columns: 1fr;
    }
    
    .ars-table th,
    .ars-table td {
        padding: 12px 8px;
        font-size: 0.9rem;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Ensure the dashboard takes full width */
body.page .ars-dashboard {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

.ars-dashboard {
    padding: 40px 20px !important;
}

@media (max-width: 1247px) {
    .ars-dashboard {
        padding: 40px 10px !important;
    }
}


/* Enhanced Quick Actions Styling */
.ars-quick-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.ars-quick-actions button {
    padding: 16px 24px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 54px;
}

.ars-btn-primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
    color: white !important;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}

.ars-btn-primary:hover {
    background: linear-gradient(135deg, #5b21b6, #7c3aed) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.ars-btn-secondary {
    background: rgba(99, 102, 241, 0.1) !important;
    color: #6366f1 !important;
    border: 2px solid rgba(99, 102, 241, 0.2) !important;
}

.ars-btn-secondary:hover {
    background: rgba(99, 102, 241, 0.15) !important;
    border-color: #6366f1 !important;
    transform: translateY(-1px);
}

/* Success state for copy button */
.ars-btn-primary.copied {
    background: linear-gradient(135deg, #10b981, #059669) !important;
}

.ars-btn-primary.copied::before {
    content: '✓ ';
}

/* Mobile responsive */
@media (max-width: 768px) {
    .ars-quick-actions button {
        padding: 14px 20px;
        font-size: 0.95rem;
    }
}


