/* Estilos para afiliados */

/* Plantilla de afiliados */
.affiliate-template-wrapper {
    padding: 0;
    background: #f0f5f5;
    min-height: 60vh;
}

.affiliate-page {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.affiliate-page-header {
    background-color: #f0f5f5;
    padding: 40px;
    text-align: center;
}

.affiliate-page-title {
    margin: 0 0 20px 0;
    font-size: 2.5em;
    font-weight: 700;
}

.user-role-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.role-badge {
    padding: 8px 16px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
}

.role-badge.admin {
    background: #ffd700;
    color: #333;
}

.role-badge.affiliate {
    background: #28a745;
    color: white;
}

.welcome-text {
    font-size: 18px;
    opacity: 0.9;
}

.affiliate-page-content {
    padding: 40px;
}

/* Accesos rápidos */
.affiliate-quick-actions,
.admin-quick-actions {
    margin-top: 40px;
    padding: 30px;
    background: #f0f5f5;
}

.affiliate-quick-actions h3,
.admin-quick-actions h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 1.4em;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    align-items: start;
}
 
.quick-actions-flex {
    display: flex;
    gap: 15px;
    align-items: center;
} 

.quick-action-btn {
    width: 35px;
    border: none;
    background: transparent; 
    cursor: pointer;
}

.quick-action-btn.dashboard {
    background: #007cba;
    color: white;
}

.quick-action-btn.dashboard:hover {
    background: #005a87;
    transform: translateY(-2px);
}

.quick-action-btn.copy-link {
    color: white;
    opacity: 0.5;
}

.quick-action-btn.copy-link:hover {
    transform: translateY(-2px);
}

.quick-action-btn.admin {
    background: #6c757d;
    color: white;
}

.quick-action-btn.admin:hover {
    background: #545b62;
    transform: translateY(-2px);
}

.affiliate-link-display {
    grid-column: 1 / -1;
    width: 100%;
}

.affiliate-link-display input {
    width: 100%;
    padding: 12px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    font-family: monospace;
    font-size: 14px;
    background: white;
}

.affiliate-link-display input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .affiliate-page-header {
        padding: 30px 20px;
    }
    
    .affiliate-page-title {
        font-size: 2em;
    }
    
    .affiliate-page-content {
        padding: 30px 20px;
    }
    
    .user-role-indicator {
        flex-direction: column;
        gap: 10px;
    }
    
    .quick-actions-grid {
        grid-template-columns: 1fr;
    }
}

/* Estadísticas mensuales */
.affiliate-monthly-stats {
    margin-top: 40px;
    padding: 30px; 
    background-color: #f0f5f5;
}
 
.affiliate-monthly-stats h3 {
    margin: 0 0 25px 0;
    color: #333;
    font-size: 1.4em;
}

.month-filter {
    margin-bottom: 30px;
}

.month-filter label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
}

.month-filter select {
    padding: 10px 15px;
    border: 2px solid #ced4da;
    border-radius: 6px;
    background: white;
    font-size: 16px;
    min-width: 200px;
    cursor: pointer;
}

.month-filter select:focus {
    outline: none;
    border-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
}

/* Resumen mensual */
.monthly-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    margin: 25px 0;
    padding: 20px;
    background: #768983;
    border-radius: 12px;
    color: white;
}

.summary-item {
    text-align: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.summary-item strong {
    display: block;
    font-size: 2em;
    font-weight: 700;
    margin-bottom: 5px;
}

/* Secciones de datos */
.data-section {
    margin: 30px 0;
}

.data-section h5 {
    margin: 0 0 15px 0;
    color: #495057;
    font-size: 1.2em;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

/* Tablas de datos */
.affiliate-data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.affiliate-data-table thead {
    background: #495057;
    color: white;
}

.affiliate-data-table th,
.affiliate-data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.affiliate-data-table th {
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.affiliate-data-table tbody tr:hover {
    background: #f0f5f5;
}

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

/* Responsive para estadísticas */
@media (max-width: 768px) {
    .monthly-summary {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
        padding: 15px;
    }
    
    .summary-item {
        padding: 10px;
    }
    
    .summary-item strong {
        font-size: 1.5em;
    }
    
    .affiliate-data-table {
        font-size: 14px;
    }
    
    .affiliate-data-table th,
    .affiliate-data-table td {
        padding: 8px 10px;
    }
    
    .month-filter select {
        width: 100%;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .monthly-summary {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .affiliate-data-table {
        font-size: 12px;
    }
    
    .affiliate-data-table th,
    .affiliate-data-table td {
        padding: 6px 8px;
    }
}