/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    background: #1e3a8a;
    color: white;
    height: 50px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    padding: 0 25px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 100%;
}

.header-left {
    display: flex;
    align-items: center;
}

.logo {
    height: 45px;
    width: auto;
    filter: brightness(0) invert(1);
}

.header-text {
    display: none;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.last-update {
    font-size: 0.85em;
    opacity: 0.9;
    text-align: right;
    display: flex;
    align-items: center;
    gap: 8px;
}

.refresh-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 4px;
    padding: 4px 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
}

.refresh-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: rotate(180deg);
}

/* Animação de spin para o botão de refresh */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Menu do Usuário */
.user-menu {
    position: relative;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 6px;
    transition: background-color 0.3s ease;
}

.user-info:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.user-name {
    font-size: 14px;
    font-weight: 500;
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-icon {
    font-size: 16px;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    margin-top: 8px;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: #374151;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 14px;
}

.dropdown-item:hover {
    background-color: #f3f4f6;
}

.dropdown-item:first-child {
    border-radius: 8px 8px 0 0;
}

.dropdown-item:last-child {
    border-radius: 0 0 8px 8px;
}

.dropdown-divider {
    height: 1px;
    background-color: #e5e7eb;
    margin: 4px 0;
}

.dropdown-item .icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

/* Filtros */
.filters-section {
    background: white;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    position: relative;
}

.filters-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    min-width: 120px;
}

.filter-group label {
    font-weight: 500;
    margin-bottom: 3px;
    color: #555;
    font-size: 12px;
}

.filter-group select,
.filter-group input {
    padding: 6px 8px;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
    font-size: 13px;
    transition: border-color 0.3s ease;
    height: 32px;
}

/* Melhorar comportamento de hover para selects múltiplos */
.filter-group select[multiple] {
    min-height: 80px;
    transition: all 0.3s ease;
}

.filter-group select[multiple]:hover {
    min-height: 120px;
    border-color: #1e3a8a;
    box-shadow: 0 2px 8px rgba(30, 58, 138, 0.15);
    z-index: 10;
    position: relative;
}

.filter-group select[multiple]:focus {
    min-height: 120px;
    border-color: #1e3a8a;
    box-shadow: 0 2px 8px rgba(30, 58, 138, 0.15);
}

.filter-group select[multiple] option {
    padding: 4px 8px;
    border-radius: 2px;
    margin: 1px 0;
}

.filter-group select[multiple] option:hover {
    background-color: #e0e7ff;
    color: #1e3a8a;
}

.filter-group select[multiple] option:checked {
    background-color: #1e3a8a;
    color: white;
}

/* Custom Dropdown Styles */
.custom-dropdown {
    position: relative;
    width: 100%;
}

.dropdown-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 8px;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    font-size: 13px;
    height: 32px;
    transition: border-color 0.3s ease;
}

.dropdown-button:hover {
    border-color: #1e3a8a;
}

.dropdown-button.active {
    border-color: #1e3a8a;
    box-shadow: 0 2px 8px rgba(30, 58, 138, 0.15);
}

.dropdown-text {
    flex: 1;
    text-align: left;
    color: #555;
}

.dropdown-arrow {
    color: #666;
    font-size: 10px;
    transition: transform 0.3s ease;
}

.dropdown-button.active .dropdown-arrow {
    transform: rotate(180deg);
}

/* Dropdown com largura adaptável */
.dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e1e5e9;
    border-top: none;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: none;
    max-height: 320px;
    overflow: hidden;
    min-width: 200px;
    max-width: 400px;
    width: max-content;
}

.dropdown-content.show {
    display: block;
}

.dropdown-header {
    padding: 8px;
    border-bottom: 1px solid #f0f0f0;
    background: #f8f9fa;
    display: flex;
    gap: 6px;
}

.dropdown-search {
    width: 100%;
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 12px;
    margin-bottom: 6px;
}

.dropdown-actions {
    display: flex;
    gap: 6px;
}

.select-all-btn, .clear-all-btn {
    flex: 1;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
    background: white;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.2s ease;
    min-width: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.select-all-btn:hover {
    background: #e0e7ff;
    border-color: #1e3a8a;
    color: #1e3a8a;
    transform: scale(1.05);
}

.clear-all-btn:hover {
    background: #fee2e2;
    border-color: #dc2626;
    color: #dc2626;
    transform: scale(1.05);
}

/* Botões com ícones */
.btn-icon {
    min-width: 40px;
    padding: 8px 12px;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dropdown-options {
    max-height: 240px;
    overflow-y: auto;
    padding: 6px 0;
    text-align: left;
}

.dropdown-option {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 13px;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f8f9fa;
}

.dropdown-option:last-child {
    border-bottom: none;
}

.dropdown-option:hover {
    background-color: #f8f9fa;
    border-left: 3px solid #1e3a8a;
    padding-left: 9px;
}

.dropdown-option input[type="checkbox"] {
    margin-right: 10px;
    cursor: pointer;
    transform: scale(1.1);
}

.dropdown-option label {
    flex: 1;
    cursor: pointer;
    margin: 0;
    font-weight: 400;
    color: #333;
    line-height: 1.4;
}

.dropdown-option.hidden {
    display: none;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: #1e3a8a;
}

.custom-date {
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: end;
}

.custom-date label {
    margin-bottom: 0;
    white-space: nowrap;
    font-size: 11px;
}

/* Botões */
.btn-primary, .btn-secondary {
    padding: 6px 16px;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    height: 32px;
    line-height: 20px;
}

.btn-primary {
    background: #1e3a8a;
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(30, 58, 138, 0.4);
    background: #1e40af;
}

.btn-secondary {
    background: #f8f9fa;
    color: #6c757d;
    border: 2px solid #e9ecef;
}

.btn-secondary:hover {
    background: #e9ecef;
    color: #495057;
}

/* Navegação entre Painéis */
.panel-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.nav-btn {
    padding: 15px 30px;
    border: none;
    background: white;
    color: #6c757d;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.nav-btn.active {
    background: #1e3a8a;
    color: white;
}

.nav-btn:hover:not(.active) {
    background: #f8f9fa;
    transform: translateY(-2px);
}

/* Painéis */
.panel-view {
    display: none;
}

.panel-view.active {
    display: block;
}

/* KPIs */
.kpis-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.kpi-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.kpi-card:hover {
    transform: translateY(-5px);
}

.kpi-card h3 {
    color: #6c757d;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kpi-value {
    font-size: 2.5em;
    font-weight: 700;
    color: #1e3a8a;
    margin-bottom: 5px;
}

.kpi-label {
    color: #6c757d;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Gráficos */
.charts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
}

.chart-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* Overlay de Carregamento do Período */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
}

.loading-overlay.show {
    display: flex;
    animation: overlayFadeIn 350ms ease forwards;
}

.loading-overlay.hide {
    animation: overlayFadeOut 350ms ease forwards;
}

@keyframes overlayFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes overlayFadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

.loading-content {
    background: #ffffff;
    color: #1e3a8a;
    padding: 24px 28px;
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(0,0,0,0.25);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    min-width: 260px;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e5e7eb;
    border-top-color: #1e3a8a;
    border-radius: 50%;
    animation: spin 900ms linear infinite;
}

.loading-text {
    font-size: 14px;
    font-weight: 600;
    color: #1e3a8a;
}

@media (max-width: 480px) {
    .loading-content {
        width: 80%;
        min-width: unset;
    }
    .loading-text {
        font-size: 13px;
        text-align: center;
    }
}

.chart-card h3 {
    color: #333;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
}

.chart-card canvas {
    max-height: 300px;
}

/* Tabela */
.table-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    gap: 20px;
    flex-wrap: wrap;
}

.records-per-page {
    display: flex;
    align-items: center;
    gap: 8px;
}

.records-per-page label {
    font-size: 13px;
    color: #555;
    white-space: nowrap;
}

.records-per-page select {
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    background: white;
    cursor: pointer;
}20px;
    flex-wrap: wrap;
    gap: 15px;
}

.search-container input {
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    width: 300px;
    transition: border-color 0.3s ease;
}

.search-container input:focus {
    outline: none;
    border-color: #1e3a8a;
}

.pagination-info {
    color: #6c757d;
    font-size: 14px;
}

.table-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

th, td {
    padding: 10px 5px;
    text-align: center;
    border-bottom: 1px solid #e9ecef;
    font-size: 12px;
    overflow: visible;
    word-wrap: break-word;
    vertical-align: top;
}

/* Larguras específicas das colunas */
th:nth-child(1), td:nth-child(1) { width: 5%; } /* Protocolo */
th:nth-child(2), td:nth-child(2) { width: 8%; } /* Data/Hora */
th:nth-child(3), td:nth-child(3) { width: 10%; } /* Atendente */
th:nth-child(4), td:nth-child(4) { width: 7%; } /* Equipe */
th:nth-child(5), td:nth-child(5) { width: 8%; } /* Cliente */
th:nth-child(6), td:nth-child(6) { width: 10%; } /* Duração */
th:nth-child(7), td:nth-child(7) { width: 7%; } /* Pontuação Geral */
th:nth-child(8), td:nth-child(8) { width: 7%; } /* Abertura */
th:nth-child(9), td:nth-child(9) { width: 7%; } /* Sondagem */
th:nth-child(9), td:nth-child(9) { width: 7%; } /* Apresentação */
th:nth-child(10), td:nth-child(10) { width: 7%; } /* Contorno */
th:nth-child(11), td:nth-child(11) { width: 7%; } /* Fechamento */
th:nth-child(12), td:nth-child(12) { width: 9%; } /* Desfecho */

th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease;
}

th:hover {
    background: #e9ecef;
}

/* Estilos para ordenação de colunas */
th[data-sort] {
    cursor: pointer;
    user-select: none;
    position: relative;
}

th[data-sort]:hover {
    background-color: rgba(30, 58, 138, 0.1);
}

th[data-sort]::after {
    content: ' ↕';
    opacity: 0.5;
    font-size: 12px;
    color: #666;
}

th.sort-asc::after {
    content: ' ↑';
    opacity: 1;
    color: #1e3a8a;
    font-weight: bold;
}

th.sort-desc::after {
    content: ' ↓';
    opacity: 1;
    color: #1e3a8a;
    font-weight: bold;
}

tbody tr:hover {
    background: #f8f9fa;
}

.score-cell {
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 6px;
    text-align: center;
}

.score-high { background: #d4edda; color: #155724; }
.score-medium { background: #fff3cd; color: #856404; }
.score-low { background: #f8d7da; color: #721c24; }

.btn-details {
    background: #1e3a8a;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.3s ease;
}

.btn-details:hover {
    background: #1e40af;
}

/* Paginação */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

#pageNumbers {
    display: flex;
    gap: 5px;
}

.page-btn {
    padding: 8px 12px;
    border: 1px solid #e9ecef;
    background: white;
    color: #6c757d;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.page-btn:hover {
    background: #f8f9fa;
}

.page-btn.active {
    background: #1e3a8a;
    color: white;
    border-color: #1e3a8a;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

/* Estilos para a seção de áudio */
.audio-section {
    margin-top: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.audio-section h4 {
    margin: 0 0 15px 0;
    color: #495057;
    font-size: 16px;
    font-weight: 600;
}

.audio-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.audio-controls button {
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.audio-controls button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

#playAudioBtn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

#stopAudioBtn {
    background: linear-gradient(135deg, #dc3545 0%, #fd7e14 100%);
    color: white;
}

#audioStatus {
    font-size: 14px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 5px;
    background: white;
    border: 1px solid #dee2e6;
}

#callAudio {
    width: 100%;
    margin-top: 10px;
    border-radius: 5px;
}

.modal-content {
    background-color: white;
    margin: 2% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.modal-header {
    padding: 25px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1e3a8a;
    color: white;
    border-radius: 12px 12px 0 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5em;
}

.close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.close:hover {
    opacity: 0.7;
}

.modal-body {
    padding: 25px;
}

/* Detalhes da Ligação no Modal */
.call-detail-section {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.call-detail-section h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.2em;
    border-bottom: 2px solid #1e3a8a;
    padding-bottom: 5px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-label {
    font-weight: 600;
    color: #6c757d;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.detail-value {
    color: #333;
    font-size: 14px;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.tag {
    background: #1e3a8a;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.steps-list {
    list-style: none;
}

.step-item {
    background: white;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    border-left: 4px solid #1e3a8a;
}

.step-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.step-name {
    font-weight: 600;
    color: #333;
}

.step-score {
    background: #1e3a8a;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.step-comment {
    color: #6c757d;
    font-size: 14px;
    line-height: 1.5;
}

.objection-item, .strength-item, .recommendation-item {
    background: white;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 8px;
    border-left: 4px solid #28a745;
}

.objection-item {
    border-left-color: #dc3545;
}

.recommendation-item {
    border-left-color: #ffc107;
}

/* Responsividade */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header {
        height: 45px;
        padding: 0 15px;
    }
    
    .header-content {
        flex-direction: row;
        justify-content: space-between;
    }
    
    .logo {
        height: 35px;
    }
    
    .last-update {
        font-size: 0.75em;
    }
    
    .filters-section {
        padding: 10px 12px;
        margin-bottom: 12px;
    }
    
    .filters-container {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .filter-group {
        min-width: auto;
    }
    
    .filter-group label {
        font-size: 11px;
    }
    
    .filter-group select,
    .filter-group input {
        font-size: 12px;
        height: 30px;
        padding: 5px 6px;
    }
    
    .btn-primary, .btn-secondary {
        height: 30px;
        font-size: 12px;
        padding: 5px 12px;
    }
    
    .custom-date {
        flex-direction: column;
        gap: 6px;
    }
    
    .kpis-container {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .charts-container {
        grid-template-columns: 1fr;
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    table {
        min-width: 800px;
    }
    
    .search-container input {
        width: 100%;
    }
    
    .table-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .modal-content {
        width: 95%;
        margin: 5% auto;
    }
    
    /* Responsividade para novos KPIs */
    .kpis-container {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 10px;
    }
    
    .kpi-card {
        padding: 12px;
    }
    
    .kpi-value {
        font-size: 1.5em;
    }
    
    .kpi-label {
        font-size: 0.8em;
    }
    
    /* Responsividade para seção de análise de fechamento */
    .closing-analysis {
        padding: 12px;
    }
    
    .closing-analysis h4 {
        font-size: 1.1em;
        margin-bottom: 10px;
    }
    
    .closing-field {
        margin-bottom: 8px;
    }
    
    .closing-field strong {
        font-size: 0.9em;
    }
    
    .resultado-badge {
        padding: 3px 8px;
        font-size: 10px;
    }
}

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

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Loading */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 50px;
    color: #6c757d;
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #1e3a8a;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin-right: 15px;
}

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

/* Estilos para badges de resultado da análise de fechamento */
.resultado-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.resultado-agendamento-visita {
    background-color: #4CAF50; /* Verde */
}

.resultado-agendamento-novo-contato {
    background-color: #FF9800; /* Laranja */
}

.resultado-venda {
    background-color: #2196F3; /* Azul */
}

.resultado-sem-exito {
    background-color: #f44336; /* Vermelho */
}

.resultado-indefinido {
    background-color: #9E9E9E;
}

/* Estilos para badges de tipo de aceitação */
.aceitacao-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    color: white;
}

.aceitacao-natural {
    background-color: #4CAF50;
}

.aceitacao-forcado {
    background-color: #FF5722;
}

.aceitacao-condicionado {
    background-color: #FF9800;
}

.aceitacao-indefinido {
    background-color: #9E9E9E;
}

/* Estilos para badges de oportunidade de venda direta */
.oportunidade-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    color: white;
}

.oportunidade-sim {
    background-color: #4CAF50;
}

.oportunidade-nao {
    background-color: #9E9E9E;
}

/* Estilo para contexto comprovante */
.context-quote {
    font-style: italic;
    background-color: #f8f9fa;
    padding: 10px;
    border-left: 4px solid #007bff;
    margin-top: 5px;
}

/* Estilo para itens de largura completa */
.detail-item.full-width {
    grid-column: 1 / -1;
}
    letter-spacing: 0.5px;
}

.resultado-agendamento-visita {
    background: linear-gradient(135deg, #4CAF50 0%, #81C784 100%); /* Verde suave - AGENDAMENTO_VISITA */
    color: white;
    box-shadow: 0 2px 4px rgba(76, 175, 80, 0.3);
}

.resultado-agendamento-novo-contato {
    background: linear-gradient(135deg, #FF9800 0%, #FFB74D 100%); /* Laranja suave - AGENDAMENTO_NOVO_CONTATO */
    color: white;
    box-shadow: 0 2px 4px rgba(255, 152, 0, 0.3);
}

.resultado-venda {
    background: linear-gradient(135deg, #2196F3 0%, #64B5F6 100%); /* Azul suave - VENDA */
    color: white;
    box-shadow: 0 2px 4px rgba(33, 150, 243, 0.3);
}

.resultado-sem-exito {
    background: linear-gradient(135deg, #F44336 0%, #EF5350 100%); /* Vermelho suave - SEM_EXITO */
    color: white;
    box-shadow: 0 2px 4px rgba(244, 67, 54, 0.3);
}

.resultado-indefinido {
    background: linear-gradient(135deg, #9E9E9E 0%, #BDBDBD 100%); /* Cinza suave */
    color: white;
    box-shadow: 0 2px 4px rgba(158, 158, 158, 0.3);
}
/* Indicador leve de atualização dos filtros */
.filters-section.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.6);
    z-index: 100;
}
.filters-section.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 22px;
    height: 22px;
    margin-top: -11px;
    margin-left: -11px;
    border: 3px solid #e5e7eb;
    border-top-color: #1e3a8a;
    border-radius: 50%;
    animation: spin 900ms linear infinite;
    z-index: 101;
}