/* ============================================================================
   AGENT DASHBOARD - CONFLICT-FREE STYLES
   All classes prefixed with "agent-" to avoid conflicts
   ============================================================================ */

/* Hide Vue template syntax while loading */
[v-cloak] {
    display: none !important;
}

/* Main Container */
.agent-stats-dashboard {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
    font-family: 'Montserrat', sans-serif;
}

/* ============================================================================
   HERO SECTION
   ============================================================================ */

.agent-hero-section {
    margin-bottom: 3rem;
}

.agent-hero-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.agent-stat-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.agent-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.agent-stat-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    grid-column: span 2;
}

.agent-stat-primary .agent-stat-label,
.agent-stat-primary .agent-stat-subtitle {
    color: rgba(255, 255, 255, 0.9);
}

.agent-stat-icon-wrapper {
    margin-bottom: 1.5rem;
}

.agent-stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
}

.agent-icon-commission {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.agent-stat-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.agent-icon-clients {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.agent-icon-earnings {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.agent-icon-transactions {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.agent-stat-badge {
    padding: 0.375rem 0.875rem;
    border-radius: 20px;
    font-size: 0.8125rem;
    font-weight: 600;
}

.agent-badge-success {
    background: #10b981;
    color: white;
}

.agent-stat-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.agent-stat-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.agent-stat-value {
    font-size: 2.25rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
}

.agent-stat-primary .agent-stat-value {
    color: white;
}

.agent-stat-subtitle {
    font-size: 0.875rem;
    color: #6b7280;
}

/* ============================================================================
   SECTION HEADERS
   ============================================================================ */

.agent-section-header {
    margin: 3rem 0 1.5rem;
}

.agent-section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.5rem;
}

.agent-section-subtitle {
    font-size: 0.9375rem;
    color: #6b7280;
}

/* ============================================================================
   OVERVIEW CARDS (Transaction Breakdown)
   ============================================================================ */

.agent-overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 3rem;
}

.agent-overview-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.agent-overview-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.agent-overview-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
    flex-shrink: 0;
}

.agent-bg-primary { background: #6366f1; }
.agent-bg-success { background: #10b981; }
.agent-bg-warning { background: #f59e0b; }
.agent-bg-danger { background: #ef4444; }

.agent-overview-content {
    flex: 1;
}

.agent-overview-label {
    font-size: 0.8125rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.agent-overview-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    line-height: 1;
}

.agent-overview-amount {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

/* ============================================================================
   PERFORMANCE CARDS
   ============================================================================ */

.agent-performance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-bottom: 3rem;
}

.agent-performance-card {
    background: white;
    border-radius: 16px;
    padding: 1.75rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #f3f4f6;
}

.agent-performance-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    border-color: #6366f1;
}

.agent-performance-period {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6366f1;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f3f4f6;
}

.agent-performance-metrics {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.agent-metric-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.agent-metric-highlight {
    padding-top: 0.875rem;
    border-top: 1px solid #f3f4f6;
    margin-top: 0.5rem;
}

.agent-metric-label {
    font-size: 0.875rem;
    color: #6b7280;
}

.agent-metric-value {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
}

/* ============================================================================
   INFO GROUPS (Client Stats, Account Status, Withdrawals)
   ============================================================================ */

.agent-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.agent-info-group {
    background: white;
    border-radius: 16px;
    padding: 1.75rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.agent-info-title {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.agent-info-title i {
    color: #6366f1;
}

.agent-info-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.agent-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.agent-info-label {
    font-size: 0.875rem;
    color: #6b7280;
}

.agent-info-value {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
}

.agent-text-success { color: #10b981; }
.agent-text-warning { color: #f59e0b; }
.agent-text-danger { color: #ef4444; }
.agent-text-secondary { color: #6b7280; }

/* ============================================================================
   BALANCE DISTRIBUTION
   ============================================================================ */

.agent-balance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 3rem;
}

.agent-balance-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.agent-balance-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.agent-balance-icon {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.agent-balance-gray { border-color: #e5e7eb; }
.agent-balance-gray .agent-balance-icon { color: #6b7280; }
.agent-balance-gray:hover { border-color: #6b7280; }

.agent-balance-red { border-color: #fecaca; }
.agent-balance-red .agent-balance-icon { color: #ef4444; }
.agent-balance-red:hover { border-color: #ef4444; }

.agent-balance-orange { border-color: #fed7aa; }
.agent-balance-orange .agent-balance-icon { color: #f59e0b; }
.agent-balance-orange:hover { border-color: #f59e0b; }

.agent-balance-blue { border-color: #bfdbfe; }
.agent-balance-blue .agent-balance-icon { color: #3b82f6; }
.agent-balance-blue:hover { border-color: #3b82f6; }

.agent-balance-purple { border-color: #ddd6fe; }
.agent-balance-purple .agent-balance-icon { color: #6366f1; }
.agent-balance-purple:hover { border-color: #6366f1; }

.agent-balance-green { border-color: #bbf7d0; }
.agent-balance-green .agent-balance-icon { color: #10b981; }
.agent-balance-green:hover { border-color: #10b981; }

.agent-balance-label {
    font-size: 0.8125rem;
    color: #6b7280;
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.agent-balance-value {
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
}

/* ============================================================================
   DATA TABLES
   ============================================================================ */

.agent-tables-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.agent-data-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.agent-table-header {
    padding: 1.5rem;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f9fafb;
}

.agent-table-title {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.agent-table-title i {
    font-size: 1.25rem;
    color: #6366f1;
}

.agent-table-badge {
    background: #f59e0b;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.agent-table-wrapper {
    max-height: 400px;
    overflow-y: auto;
    position: relative;
}

.agent-table-wrapper::-webkit-scrollbar {
    width: 6px;
}

.agent-table-wrapper::-webkit-scrollbar-track {
    background: #f9fafb;
}

.agent-table-wrapper::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.agent-table-wrapper::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

.agent-table {
    width: 100%;
    border-collapse: collapse;
}

.agent-table thead {
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
    box-shadow: 0 1px 0 #f3f4f6;
}

.agent-table th {
    padding: 1rem 1.5rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.agent-table td {
    padding: 1rem 1.5rem;
    font-size: 0.875rem;
    color: #374151;
    border-bottom: 1px solid #f3f4f6;
}

.agent-table tbody tr {
    transition: all 0.2s ease;
}

.agent-table tbody tr:hover {
    background: #f9fafb;
}

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

.agent-rank-cell {
    font-weight: 600;
    color: #6366f1;
}

.agent-name-cell {
    font-weight: 500;
    color: #111827;
}

.agent-contact-cell {
    color: #6b7280;
    font-family: 'Courier New', monospace;
    font-size: 0.8125rem;
}

.agent-balance-cell {
    font-weight: 600;
}

.agent-balance-amount {
    color: #10b981;
}

.agent-balance-low {
    color: #ef4444;
}

.agent-date-cell {
    font-size: 0.8125rem;
    color: #6b7280;
}

.agent-text-right {
    text-align: right !important;
}

/* Status Badges */
.agent-status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}

.agent-status-verified,
.agent-status-success {
    background: #d1fae5;
    color: #065f46;
}

.agent-status-pending {
    background: #fef3c7;
    color: #92400e;
}

.agent-status-failed {
    background: #fee2e2;
    color: #991b1b;
}

/* Empty States */
.agent-empty-state {
    padding: 3rem 2rem;
    text-align: center;
    color: #6b7280;
}

.agent-empty-state i {
    font-size: 3rem;
    color: #d1d5db;
    margin-bottom: 1rem;
}

.agent-empty-state p {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    margin: 0.5rem 0;
}

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */

@media (max-width: 768px) {
    .agent-stats-dashboard {
        padding: 1rem 0.75rem;
    }

    .agent-hero-grid {
        grid-template-columns: 1fr;
    }

    .agent-stat-primary {
        grid-column: span 1;
    }

    .agent-stat-value {
        font-size: 1.875rem;
    }

    .agent-section-title {
        font-size: 1.25rem;
    }

    .agent-performance-grid,
    .agent-overview-grid {
        grid-template-columns: 1fr;
    }

    .agent-balance-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .agent-tables-grid {
        grid-template-columns: 1fr;
    }

    .agent-table th,
    .agent-table td {
        padding: 0.75rem 1rem;
    }
}

@media (max-width: 480px) {
    .agent-stat-card {
        padding: 1.5rem;
    }

    .agent-balance-grid {
        grid-template-columns: 1fr;
    }

    .agent-balance-value {
        font-size: 1.75rem;
    }
}

/* ============================================================================
   ANIMATIONS
   ============================================================================ */

@keyframes agentFadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.agent-stat-card,
.agent-performance-card,
.agent-balance-card,
.agent-data-card,
.agent-overview-card,
.agent-info-group {
    animation: agentFadeInUp 0.5s ease-out;
}

.agent-stat-card:nth-child(2) { animation-delay: 0.1s; }
.agent-stat-card:nth-child(3) { animation-delay: 0.2s; }
.agent-stat-card:nth-child(4) { animation-delay: 0.3s; }