/* Dashboard Franquia 360 - Estilos */

.franquia-dashboard {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f8fafc;
    min-height: 100vh;
    padding: 20px;
    box-sizing: border-box;
}

/* Header */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 20px 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.greeting {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
}

.plan-badge {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.header-actions {
    display: flex;
    gap: 10px;
}

/* Botões */
.btn {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
    background: #e2e8f0;
    color: #475569;
}

.btn-secondary:hover {
    background: #cbd5e1;
}

.btn-outline {
    background: transparent;
    border: 2px solid #e2e8f0;
    color: #475569;
}

.btn-outline:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.btn-warning:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    width: 100%;
    justify-content: center;
    padding: 12px 20px;
    font-weight: 600;
}

.btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

/* Cards de Resumo */
.dashboard-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.summary-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.2s ease;
}

.summary-card:hover {
    transform: translateY(-2px);
}

.card-icon {
    font-size: 24px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border-radius: 10px;
}

.card-content h3 {
    margin: 0 0 5px 0;
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
}

.card-value {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 2px;
}

.card-subtitle {
    font-size: 12px;
    color: #64748b;
}

/* Layout Principal */
.dashboard-content {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
}

/* Seção de Leads */
.leads-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.section-header {
    padding: 25px 30px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
}

.leads-counter {
    background: #dbeafe;
    color: #1d4ed8;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

/* Filtros */
.filters {
    padding: 20px 30px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    gap: 15px;
}

.filter-select {
    padding: 10px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.filter-select:focus {
    outline: none;
    border-color: #3b82f6;
}

/* Lista de Leads */
.leads-list {
    max-height: 600px;
    overflow-y: auto;
}

.lead-card {
    padding: 25px 30px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: background-color 0.2s ease;
}

.lead-card:hover {
    background-color: #f8fafc;
}

.lead-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 18px;
}

.lead-info {
    flex: 1;
}

.lead-name {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}

.lead-location {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 4px;
}

.lead-time {
    font-size: 12px;
    color: #94a3b8;
    margin-bottom: 10px;
}

.lead-details {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.detail-tag {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

.detail-tag.investment {
    background: #dbeafe;
    color: #1d4ed8;
}

.detail-tag.experience {
    background: #dcfce7;
    color: #166534;
}

.detail-tag.segment {
    background: #fef3c7;
    color: #92400e;
}

.detail-tag.deadline {
    background: #fce7f3;
    color: #be185d;
}

.lead-actions {
    text-align: center;
}

.action-subtitle {
    font-size: 12px;
    color: #64748b;
    margin-top: 5px;
}

/* Load More */
.load-more {
    padding: 20px 30px;
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
}

.leads-info {
    padding: 20px 30px;
    text-align: center;
    color: #64748b;
    font-size: 14px;
}

/* Sidebar */
.dashboard-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 25px;
}

.sidebar-card h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
}

/* Detalhes do Plano */
.plan-details {
    margin-bottom: 20px;
}

.plan-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
}

.plan-item:last-child {
    border-bottom: none;
}

.plan-item .label {
    font-size: 14px;
    color: #64748b;
}

.plan-item .value {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}

.plan-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Atividades */
.activities-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.activity-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
}

.activity-text {
    font-size: 14px;
    color: #1e293b;
    margin-bottom: 2px;
}

.activity-time {
    font-size: 12px;
    color: #94a3b8;
}

/* Card de Upgrade */
.upgrade-card {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border: 2px solid #e2e8f0;
}

.upgrade-card p {
    font-size: 14px;
    color: #475569;
    margin-bottom: 15px;
}

.upgrade-features {
    margin-bottom: 20px;
}

.feature {
    font-size: 14px;
    color: #059669;
    margin-bottom: 5px;
}

.upgrade-price {
    text-align: center;
    font-size: 12px;
    color: #64748b;
    margin-top: 10px;
}

/* Performance Stats */
.performance-stats {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

.stat-label {
    font-size: 14px;
    color: #64748b;
}

.stat-value {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    padding: 25px 30px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
}

.modal-close {
    font-size: 24px;
    cursor: pointer;
    color: #64748b;
    line-height: 1;
}

.modal-close:hover {
    color: #1e293b;
}

.modal-body {
    padding: 20px 30px 30px;
}

/* Responsividade */
@media (max-width: 1024px) {
    .dashboard-content {
        grid-template-columns: 1fr;
    }
    
    .dashboard-sidebar {
        order: -1;
    }
}

@media (max-width: 768px) {
    .franquia-dashboard {
        padding: 10px;
    }
    
    .dashboard-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .dashboard-summary {
        grid-template-columns: 1fr;
    }
    
    .summary-card {
        padding: 20px;
    }
    
    .filters {
        flex-direction: column;
    }
    
    .lead-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding: 20px;
    }
    
    .lead-actions {
        width: 100%;
    }
    
    .lead-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .section-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .filters {
        padding: 15px 20px;
    }
    
    .lead-card {
        padding: 15px 20px;
    }
    
    .sidebar-card {
        padding: 20px;
    }
}

/* Animações */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lead-card {
    animation: fadeIn 0.3s ease;
}

/* Estados de Loading */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #3b82f6;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

