/**
 * Estilos customizados - Radar de Vendas
 */

/* Variáveis */
:root {
    --primary-color: #0d6efd;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #0dcaf0;
}

/* Layout geral */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Navbar */
.navbar-brand {
    font-weight: 600;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    font-weight: 600;
}

/* Tabelas */
.table th {
    font-weight: 600;
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

.table-hover tbody tr:hover {
    background-color: #f1f3f4;
    cursor: pointer;
}

/* Badges de status */
.badge-ativo {
    background-color: var(--success-color);
}

.badge-inativo {
    background-color: var(--danger-color);
}

.badge-alta {
    background-color: var(--danger-color);
}

.badge-media,
.badge-média {
    background-color: #fd7e14;
    color: #fff !important;
}

.badge-baixa {
    background-color: var(--info-color);
    color: #212529;
}

/* Score badges */
.score-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-weight: bold;
    color: white;
}

.score-high {
    background-color: var(--danger-color);
}

.score-medium {
    background-color: var(--warning-color);
    color: #212529;
}

.score-low {
    background-color: var(--info-color);
    color: #212529;
}

/* Upload area */
.upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 0.5rem;
    padding: 3rem;
    text-align: center;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--primary-color);
    background-color: #e7f1ff;
}

.upload-area i {
    font-size: 4rem;
    color: #6c757d;
}

.upload-area.dragover i {
    color: var(--primary-color);
}

/* Progress */
.progress {
    height: 1.5rem;
}

.progress-bar {
    transition: width 0.3s ease;
}

/* Filtros */
.filter-section {
    background-color: #f8f9fa;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.filter-section .form-label {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

/* Paginação */
.pagination {
    margin-bottom: 0;
}

/* Cards de oportunidade */
.opportunity-card {
    border-left: 4px solid;
    margin-bottom: 0.5rem;
}

.opportunity-card.reativacao {
    border-left-color: var(--danger-color);
}

.opportunity-card.cliente_inativo {
    border-left-color: #6f42c1; /* purple */
}

.opportunity-card.cross_sell {
    border-left-color: var(--warning-color);
}

.opportunity-card.abandono_produto {
    border-left-color: var(--info-color);
}

.opportunity-card.queda_faturamento {
    border-left-color: #fd7e14; /* orange */
}

.opportunity-card.baixa_recorrencia {
    border-left-color: #20c997; /* teal */
}

/* Métricas */
.metrics-table .metric-label {
    color: #6c757d;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
}

.metrics-table .metric-value {
    text-align: right;
    font-weight: bold;
    color: var(--primary-color);
    padding: 0.5rem 1rem;
}

/* Cliente detail */
.client-info dt {
    font-weight: 600;
    color: #6c757d;
}

.client-info dd {
    margin-bottom: 0.75rem;
}

/* Tabs customizados */
.nav-tabs .nav-link {
    color: #6c757d;
    border: none;
    border-bottom: 2px solid transparent;
}

.nav-tabs .nav-link:hover {
    border-color: transparent;
    color: var(--primary-color);
}

.nav-tabs .nav-link.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    background: none;
}

/* Ranking */
.ranking-position {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-weight: bold;
    font-size: 0.875rem;
}

.ranking-position.gold {
    background-color: #ffd700;
    color: #212529;
}

.ranking-position.silver {
    background-color: #c0c0c0;
    color: #212529;
}

.ranking-position.bronze {
    background-color: #cd7f32;
    color: white;
}

.ranking-position.default {
    background-color: #e9ecef;
    color: #6c757d;
}

/* Responsivo */
@media (max-width: 768px) {
    .filter-section .row > div {
        margin-bottom: 0.5rem;
    }

    .table-responsive {
        font-size: 0.875rem;
    }

}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Alertas customizados */
.alert-dismissible .btn-close {
    padding: 1rem;
}

/* Tooltips em tabelas */
[data-bs-toggle="tooltip"] {
    cursor: help;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: #6c757d;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Clickable row */
.clickable-row {
    cursor: pointer;
}

.clickable-row:hover {
    background-color: #f8f9fa;
}

/* Stats cards */
.stats-card {
    transition: transform 0.2s ease;
}

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