/* ==================== CARDS DE MÉTRICAS COMPACTOS ==================== */
/* Aplica-se a todos os módulos: clientes, vendedores, produtos, vendedorAnalise */

/* Clientes */
.clientes-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.clientes-metric-card {
    background: white;
    border-radius: 10px;
    padding: 12px 16px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
    border-left: 3px solid #0891b2;
    min-height: 70px;
}

.clientes-metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.clientes-metric-card .metric-icon {
    font-size: 28px;
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.clientes-metric-card .metric-content {
    flex: 1;
    min-width: 0;
}

.clientes-metric-card .metric-label {
    font-size: 11px;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.clientes-metric-card .metric-value {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Vendedores */
.vendedores-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.vendedores-metric-card {
    background: white;
    border-radius: 10px;
    padding: 12px 16px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
    border-left: 3px solid #6366f1;
    min-height: 70px;
}

.vendedores-metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.vendedores-metric-card .metric-icon {
    font-size: 28px;
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.vendedores-metric-card .metric-content {
    flex: 1;
    min-width: 0;
}

.vendedores-metric-card .metric-label {
    font-size: 11px;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.vendedores-metric-card .metric-value {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Produtos */
.produtos-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.produtos-metric-card {
    background: white;
    border-radius: 10px;
    padding: 12px 16px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
    border-left: 3px solid #8b5cf6;
    min-height: 70px;
}

.produtos-metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.produtos-metric-card .metric-icon {
    font-size: 28px;
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.produtos-metric-card .metric-content {
    flex: 1;
    min-width: 0;
}

.produtos-metric-card .metric-label {
    font-size: 11px;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.produtos-metric-card .metric-value {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* VendedorAnalise */
.vendedor-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    padding: 20px 32px;
    background: white;
    border-bottom: 1px solid #e2e8f0;
}

.vendedor-metric-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: all 0.2s;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    min-height: 80px;
    justify-content: center;
}

.vendedor-metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #c7d2fe;
}

.vendedor-metric-card.highlight {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-color: #7dd3fc;
}

.vendedor-metric-card .metric-content {
    flex: 1;
    min-width: 0;
}

.vendedor-metric-card .metric-label {
    font-size: 10px;
    color: #64748b;
    margin: 0 0 4px 0;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vendedor-metric-card .metric-value {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vendedor-metric-card .metric-value-small {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    line-height: 1.2;
}

.vendedor-metric-card .metric-subtitle {
    font-size: 13px;
    color: #6366f1;
    font-weight: 600;
    margin: 2px 0 0 0;
}

/* ==================== BADGES DE MEDALHAS ==================== */

.medal-badge {
    font-size: 1.3em;
    margin-right: 6px;
    display: inline-block;
    vertical-align: middle;
    animation: medalPulse 2s ease-in-out infinite;
}

@keyframes medalPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.08);
    }
}

/* Estilo especial para linhas top 3 em todas as tabelas */
.clientes-table tbody tr:nth-child(1),
.clientes-table tbody tr:nth-child(2),
.clientes-table tbody tr:nth-child(3),
.vendedores-table tbody tr:nth-child(1),
.vendedores-table tbody tr:nth-child(2),
.vendedores-table tbody tr:nth-child(3),
.produtos-table tbody tr:nth-child(1),
.produtos-table tbody tr:nth-child(2),
.produtos-table tbody tr:nth-child(3),
.vendedor-table tbody tr.top-row {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.06) 0%, transparent 100%);
    font-weight: 500;
}

.clientes-table tbody tr:nth-child(1):hover,
.clientes-table tbody tr:nth-child(2):hover,
.clientes-table tbody tr:nth-child(3):hover,
.vendedores-table tbody tr:nth-child(1):hover,
.vendedores-table tbody tr:nth-child(2):hover,
.vendedores-table tbody tr:nth-child(3):hover,
.produtos-table tbody tr:nth-child(1):hover,
.produtos-table tbody tr:nth-child(2):hover,
.produtos-table tbody tr:nth-child(3):hover,
.vendedor-table tbody tr.top-row:hover {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.12) 0%, rgba(99, 102, 241, 0.05) 100%);
}

/* Animação suave ao passar o mouse sobre medalhas */
.medal-badge:hover {
    transform: scale(1.25) rotate(8deg);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ==================== RESPONSIVO ==================== */

@media (max-width: 1024px) {
    .clientes-metrics-grid,
    .vendedores-metrics-grid,
    .produtos-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .vendedor-metrics-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        padding: 16px 20px;
    }
}

@media (max-width: 640px) {
    .clientes-metrics-grid,
    .vendedores-metrics-grid,
    .produtos-metrics-grid,
    .vendedor-metrics-grid {
        grid-template-columns: 1fr;
    }

    .clientes-metric-card,
    .vendedores-metric-card,
    .produtos-metric-card,
    .vendedor-metric-card {
        min-height: 60px;
    }

    .metric-value {
        font-size: 18px !important;
    }

    .medal-badge {
        font-size: 1.1em;
    }
}
