/* Dashboard Layout */
.affiliate-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.dashboard-section {
    margin-bottom: 40px;
    background: #fff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.dashboard-section h2 {
    margin-bottom: 20px;
    color: #333;
    font-size: 24px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.stat-card {
    display: flex;
    align-items: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    font-size: 24px;
    margin-right: 15px;
}

.stat-content h3 {
    color: #666;
    font-size: 14px;
    margin: 0 0 5px 0;
}

.stat-value {
    color: #333;
    font-size: 24px;
    font-weight: bold;
    margin: 0;
}

.chart-container {
    width: 100%;
    height: 400px;
    position: relative;
}

.link-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

.link-box {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.link-box input {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
}

.link-box button {
    padding: 12px 24px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.link-box button:hover {
    background: #45a049;
}

.link-help {
    color: #666;
    font-size: 14px;
    margin: 0;
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .link-box {
        flex-direction: column;
    }
    
    .link-box button {
        width: 100%;
    }
}

/* Status Badge */
.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-completed {
    background-color: #d4edda;
    color: #155724;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
}

.status-processing {
    background-color: #cce5ff;
    color: #004085;
}

.status-cancelled {
    background-color: #f8d7da;
    color: #721c24;
}

/* Statistics Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-box {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stat-box h3 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #6c757d;
}

.stat-box .amount {
    font-size: 24px;
    font-weight: 700;
    color: #28a745;
}

.stat-box .number {
    font-size: 24px;
    font-weight: 700;
    color: #007bff;
}

.stat-box .percent {
    font-size: 24px;
    font-weight: 700;
    color: #6c757d;
}

/* Affiliate Links Section */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.links-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.links-table th,
.links-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.links-table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.link-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.link-url {
    flex: 1;
    padding: 6px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background-color: #f8f9fa;
    font-size: 14px;
}

.link-description {
    display: block;
    color: #6c757d;
    font-size: 12px;
    margin-top: 4px;
}

/* Commission History */
.commission-table {
    width: 100%;
    border-collapse: collapse;
}

.commission-table th,
.commission-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.commission-table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .affiliate-dashboard {
        padding: 10px;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .link-info {
        flex-direction: column;
        align-items: stretch;
    }

    .copy-link {
        width: 100%;
        margin-top: 5px;
    }
}

/* Buttons and Actions */
.button {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

.button-primary {
    background-color: #007bff;
    color: #fff;
    border: none;
}

.button-primary:hover {
    background-color: #0056b3;
}

.copy-link {
    background-color: #6c757d;
    color: #fff;
    border: none;
    padding: 4px 8px;
    font-size: 12px;
}

.copy-link:hover {
    background-color: #5a6268;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.chart-header select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
}

/* Tabela de Vendas */
.sales-table-section {
    margin-top: 2rem;
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.sales-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.sales-table.striped tbody tr:nth-child(odd) {
    background-color: #f8f9fa;
}

.sales-table th,
.sales-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.sales-table th {
    background-color: #f8f9fa;
    font-weight: 600;
} 