body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 48px 0 0;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
    height: 100vh;
}

.sidebar .nav-link {
    font-weight: 500;
    color: #333;
    padding: 0.75rem 1rem;
}

.sidebar .nav-link.active {
    color: #0d6efd;
    background-color: rgba(13, 110, 253, 0.1);
}

.sidebar .nav-link:hover {
    color: #0d6efd;
    background-color: rgba(13, 110, 253, 0.1);
}

main {
    margin-left: 16.666667%; /* Ajuste para o menu lateral */
    padding-top: 1rem;
}

@media (max-width: 767.98px) {
    .sidebar {
        position: static;
        height: auto;
    }
    
    main {
        margin-left: 0;
    }
}
.card {
    margin-bottom: 20px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.sidebar {
    height: 100vh; /* Altura total da viewport */
    position: sticky;
    top: 0;
    overflow-y: auto; /* Adiciona scroll se o conteúdo for muito longo */
  }
  
  main {
    flex: 1; /* Ocupa o espaço restante */
    overflow: auto; /* Adiciona scroll se necessário */
  }

  .product-card {
    height: 100%;
    transition: transform 0.3s;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
.product-img {
    max-height: 150px;
    width: auto;
    display: block;
    margin: 0 auto 15px;
}
.price {
    font-weight: bold;
    color: #28a745;
    font-size: 1.2rem;
}
.stock-info {
    font-size: 0.9rem;
    color: #6c757d;
}
.badge-sold {
    background-color: #dc3545;
}
.badge-stock {
    background-color: #17a2b8;
}
.seller-header {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}
.card-anuncio {
    height: 100%;
    transition: transform 0.2s;
}
.card-anuncio:hover {
    transform: scale(1.02);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}
.thumbnail {
    height: 180px;
    object-fit: contain;
    padding: 10px;
}
.metricas {
    font-size: 0.85rem;
}
.badge-visitas {
    background-color: #17a2b8;
}
.badge-perguntas {
    background-color: #6c757d;
}
.badge-vendas {
    background-color: #28a745;
}
.progress {
    height: 8px;
}
.funnel-indicator {
    font-size: 0.75rem;
}
.pergunta-card {
    margin-bottom: 1rem;
    border-left: 4px solid #0d6efd;
}
.resposta-card {
    margin-left: 2rem;
    margin-bottom: 1rem;
    border-left: 4px solid #198754;
}
.product-info {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 0.25rem;
    margin-bottom: 1.5rem;
}
.chart-container {
    position: relative;
    height: 300px; /* Altura fixa */
    width: 100%;
}

canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

.funnel-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.funnel-stage {
    height: 60px;
    background-color: #4e73df;
    margin: 5px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    transition: all 0.3s ease;
    border-radius: 4px;
}
.funnel-stage-header {
    font-weight: bold;
    text-align: center;
}

.badge-status {
    font-size: 0.75em;
}        


.card-header {
    font-weight: bold;
    background-color: #f8f9fa;
}
.stat-card {
    text-align: center;
    padding: 15px;
}
.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: #0d6efd;
}
.stat-label {
    color: #6c757d;
}
.table-responsive {
    margin-top: 20px;
}
.revenue-value {
    font-weight: bold;
    margin: 0;
    line-height: 1;
    white-space: nowrap;
    transition: font-size 0.5s ease;
}

.section-title {
    color: var(--dark-color);
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
}

/* static/css/styles.css */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --header-height: 80px;
    --sidebar-left-width: 250px;
}

/* Container principal ajustado */
.main-container {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1;
}

/* Tabs container */
.tabs-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

/* Nav tabs styling */
.nav-tabs {
    background-color: white;
    padding: 0 15px;
    border-bottom: 1px solid #dee2e6;
    z-index: 10;
}

.nav-tabs .nav-link {
    border: none;
    border-bottom: 3px solid transparent;
    padding: 15px 20px;
    color: var(--dark-color);
    font-weight: 500;
    transition: all 0.3s;
}

.nav-tabs .nav-link.active {
    color: var(--secondary-color);
    border-bottom: 3px solid var(--secondary-color);
    background-color: transparent;
}

.nav-tabs .nav-link:hover:not(.active) {
    color: var(--secondary-color);
}

/* Tab content */
.tab-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.tab-pane {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0;
}

/* Chat area adjustments */
.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #f8f9fa;
    height: 100%;
    overflow: hidden;
}

/* Cabeçalho do chat */
.chat-header {
    background: white;
    padding: 15px;
    border-bottom: 1px solid #eee;
}

/* Área de mensagens com scroll independente */
.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    width: 100%;
    max-width: 100%;
}

/* Prompt fixo na parte inferior */
.prompt-container {
    background: white;
    padding: 15px;
    border-top: 1px solid #eee;
}

/* Indicadores styling */
.indicators-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
    overflow-y: auto;
    padding: 15px;
}

.indicator-card {
    height: auto;
    display: flex;
    flex-direction: column;
}

.indicator-card .card-body {
    overflow-y: auto;
    flex: 1;
}

/* Estilos das mensagens */
.message {
    max-width: 80%;
    margin-bottom: 10px;
    padding: 10px 15px;
    border-radius: 10px;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.user-message {
    background-color: #007bff;
    color: white;
    margin-left: auto;
}

.ai-message {
    background-color: #f1f1f1;
    margin-right: auto;
    min-width: 30%;
}

/* Estilo para o histórico de chat */
.chat-history-item {
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.2s;
}

.chat-history-item:hover {
    background-color: #e9ecef;
}

.chat-history-date {
    font-size: 0.8rem;
    color: #6c757d;
}

.chat-history-preview {
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Estilo para mensagem de boas-vindas */
.welcome-message {
    background-color: #f8f9fa;
    border-left: 4px solid var(--secondary-color);
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 0 8px 8px 0;
}

/* Modal de histórico de chat */
.history-modal .modal-dialog {
    max-width: 800px;
}

.history-modal .modal-content {
    height: 80vh;
}

.history-modal .modal-body {
    overflow-y: auto;
    padding: 20px;
}

.history-modal .chat-message {
    margin-bottom: 15px;
    padding: 10px 15px;
    border-radius: 8px;
    max-width: 90%;
}

.history-modal .user-message {
    background-color: #0d6efd;
    margin-left: auto;
    border: 1px solid #bbdefb;
}

.history-modal .ai-message {
    background-color: #f5f5f5;
    margin-right: auto;
    border: 1px solid #e0e0e0;
}

.history-modal .message-timestamp {
    font-size: 0.7rem;
    color: #757575;
    text-align: right;
    margin-top: 3px;
}

/* Gamification styles */
.gamification-card {
    border: none;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4edf5 100%);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.gamification-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(0,0,0,0.12);
}

.gamification-header {
    background: var(--primary-color);
    color: white;
    padding: 15px 20px;
    position: relative;
}

.gamification-header::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    clip-path: polygon(50% 100%, 0 0, 100% 0);
}

.seller-level {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

.level-badge {
    background: linear-gradient(135deg, #ffd700 0%, #ff9800 100%);
    color: #5e4200;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
}

.reputation-stars {
    display: flex;
    gap: 3px;
    margin-bottom: 15px;
    justify-content: center;
}

.star {
    color: #ffc107;
    font-size: 1.2rem;
}

.power-seller-badge {
    background: linear-gradient(135deg, #8e44ad 0%, #6c3483 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
    display: inline-block;
    margin-bottom: 15px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 15px;
}

.stat-card {
    background: white;
    border-radius: 10px;
    padding: 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    text-align: center;
    transition: all 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 10px rgba(0,0,0,0.08);
}

.stat-value {
    font-size: 1.4rem;
    font-weight: bold;
    margin: 5px 0;
}

.stat-label {
    font-size: 0.85rem;
    color: #6c757d;
}

.progress-container {
    margin-top: 5px;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
}

.positive {
    background: linear-gradient(90deg, #28a745, #2ecc71);
}

.negative {
    background: linear-gradient(90deg, #e74c3c, #ff6b6b);
}

.neutral {
    background: linear-gradient(90deg, #3498db, #1abc9c);
}

.gamification-points {
    background: white;
    border-radius: 10px;
    padding: 15px;
    margin-top: 20px;
    text-align: center;
    border: 2px dashed #3498db;
}

.points-value {
    font-size: 2rem;
    font-weight: bold;
    color: #e67e22;
    margin: 10px 0;
}

.objectives-list {
    margin-top: 20px;
    padding: 0;
    list-style: none;
}

.objective-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.objective-check {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
}

.objective-check.completed {
    background: #2ecc71;
    color: white;
}

.objective-text {
    flex: 1;
}

.objective-progress {
    font-weight: bold;
    color: #3498db;
}

/* Ajustes para responsividade */
@media (max-width: 992px) {
    .indicators-container {
        grid-template-columns: 1fr;
    }

    .history-modal .modal-dialog {
        max-width: 95%;
    }
}