﻿/* ═══════════════════════════════════════
   Módulo: Perfil Negócios Detalhes
   ═══════════════════════════════════════ */

.bizdet-wrapper {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 16px 16px 64px;
    font-family: 'Inter', system-ui, sans-serif;
}

/* ── Hero Banner ── */
.bizdet-hero {
    background: linear-gradient(180deg, #27a6e5 0%, #b2bbbf 100%);
    border-radius: 12px;
    padding: 32px 32px 28px 32px;
    color: #ffffff;
    margin-bottom: 24px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}

.bizdet-hero-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.bizdet-hero-title {
    font-size: 26px;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.5px;
}

.bizdet-verified-svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.bizdet-hero-sub {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.bizdet-hero-cnpj {
    font-size: 13px;
    font-weight: 500;
    opacity: 0.95;
    letter-spacing: 0.3px;
}

.bizdet-badge-transparent {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.bizdet-hero-desc {
    font-size: 14px;
    line-height: 1.6;
    font-weight: 400;
    opacity: 0.9;
    max-width: 100%;
    margin: 0 0 20px 0;
}

.bizdet-hero-loc {
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 0.9;
}

/* ── Grid Principal Lado a Lado ── */
.bizdet-grid {
    display: grid;
    /* Coluna esquerda ligeiramente maior (55% / 45%) para encaixar melhor as árvores */
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 24px;
}

.bizdet-col-left, .bizdet-col-right {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ── Cards Comuns ── */
.bizdet-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    min-height:360px;
}

.bizdet-card-title {
    font-size: 13px;
    font-weight: 600;
    color: #4b5563;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 20px 0;
}

.redeproxima-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.m-0 {
    margin: 0;
}

.mt-16 {
    margin-top: 16px;
}

.linhatres-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    min-height: 200px;
}

/* Divisor de Cabeçalho (Anexo 2) */
.bizdet-card-header.has-divider {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 16px;
    margin-bottom: 20px;
}

/* ── Dados Grid ── */
.bizdet-data-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.bizdet-data-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    .bizdet-data-item.full-width {
        grid-column: span 2;
    }

.bizdet-label {
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
}

.bizdet-value {
    font-size: 14px;
    color: #4b5563;
}

/* ── Tabelas Limpas (Anexo 4) ── */
.bizdet-table-responsive {
    overflow-x: auto;
}

.bizdet-simple-table {
    width: 100%;
    border-collapse: collapse;
}

    .bizdet-simple-table th {
        text-align: left;
        font-size: 13px;
        font-weight: 600;
        color: #111827;
        padding-bottom: 12px;
        border-bottom: 1px solid #e5e7eb;
    }

    .bizdet-simple-table.clean-table td {
        border-bottom: none;
    }
    /* Remove linhas entre TDs */
    .bizdet-simple-table td {
        padding: 12px 0;
        font-size: 14px;
        color: #4b5563;
    }

/* ── Linha do Tempo (Anexo 6) ── */
.bizdet-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 0;
}

.bizdet-timeline-item {
    position: relative;
    padding-left: 28px;
    padding-bottom: 24px;
}

    .bizdet-timeline-item:last-child {
        padding-bottom: 0;
    }
/* Remove espaçamento extra no último */
.bizdet-timeline-dot {
    position: absolute;
    left: 0;
    top: 4px;
    width: 14px;
    height: 14px;
    background-color: #e5e7eb;
    border-radius: 50%;
    z-index: 2;
}
/* Linha conectora que NÃO passa do último ponto */
.bizdet-timeline-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 18px;
    bottom: -4px;
    width: 2px;
    background-color: #e5e7eb;
    z-index: 1;
}

.bizdet-timeline-content {
    display: flex;
    flex-direction: column;
}

.bizdet-tl-title {
    font-size: 12px;
    font-weight: 600;
    color: #4b5563;
    text-transform: uppercase;
}

.bizdet-tl-date {
    font-size: 12px;
    color: #9ca3af;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.bizdet-tl-sub {
    font-size: 14px;
    font-weight: 400;
    color: #4b5563;
}

/* ── Árvore de Controle (Anexo 8) ── */
.bizdet-tree {
    font-size: 13px;
    color: #374151;
}

.bizdet-tree-node {
    margin-top: 16px;
    position: relative;
}

.bizdet-tree-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #1f2937;
}

    .bizdet-tree-label i {
        color: #1f2937;
        font-size: 14px;
    }

.bizdet-tree-children {
    margin-left: 5px;
    padding-left: 24px;
    border-left: 1px solid #e5e7eb;
    position: relative;
}
    /* Conector horizontal para os filhos */
    .bizdet-tree-children .bizdet-tree-node::before {
        content: '';
        position: absolute;
        left: -24px;
        top: 10px;
        width: 16px;
        height: 1px;
        background-color: #e5e7eb;
    }

/* Tags da Árvore */
.bizdet-tag-grey {
    background: #e5e7eb;
    color: #374151;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
}

.bizdet-tag-blue {
    background: #0ea5e9;
    color: #ffffff;
    font-size: 11px;
    font-weight: 500;
    padding: 2px 10px;
    border-radius: 12px;
}

/* ── Empresas Similares ── */
.bizdet-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bizdet-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bizdet-avatar-square {
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-weight: 600;
    border-radius: 8px;
}

.bizdet-list-info h4 {
    margin: 0 0 2px 0;
    font-size: 14px;
    color: #111827;
}

.bizdet-list-info span {
    font-size: 13px;
    color: #6b7280;
}

.bizdet-link {
    font-size: 13px;
    color: #0ea5e9;
    text-decoration: none;
    font-weight: 500;
    margin-left: auto;
}

.bizdet-divider {
    border: 0;
    border-top: 1px solid #e5e7eb;
    margin: 20px 0;
}

.bizdet-group-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.bizdet-group-text strong {
    font-size: 14px;
    color: #111827;
    display: block;
}

/* ── Gráfico Score (Anexo 3) ── */
.bizdet-score-chart {
    position: relative;
    width: 160px;
    margin: 0 auto 24px;
}

.gauge-svg {
    display: block;
    width: 100%;
    overflow: visible;
}

.bizdet-score-number {
    position: absolute;
    top: 75%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

    .bizdet-score-number strong {
        display: block;
        font-size: 38px;
        font-weight: 800;
        color: #111827;
        line-height: 1;
    }

    .bizdet-score-number span {
        font-size: 13px;
        color: #6b7280;
        font-weight: 600;
    }

.bizdet-bars {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bizdet-bar-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bizdet-bar-labels {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
}

.bizdet-bar-track {
    height: 8px;
    background: #e0e7ff;
    border-radius: 4px;
    overflow: hidden;
}

.bizdet-bar-fill {
    height: 100%;
    border-radius: 4px;
}

.bg-navy {
    background-color: #0f172a;
}

.bg-danger {
    background-color: #dc2626;
}

/* ── Alerta Risco (Anexo 5 - Refatorado) ── */
.card-risk {
    background-color: #f87171;
    border: none;
    padding: 24px;
    border-radius: 12px;
}

.card-risk-title {
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    margin: 0 0 16px 0;
    letter-spacing: 0.5px;
}

.risk-inner {
    background: #ffffff;
    border-radius: 8px;
    padding: 16px;
}

.risk-header {
    color: #b91c1c;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.risk-text {
    font-size: 13px;
    color: #374151;
    margin: 0;
    line-height: 1.6;
}

/* ── Sócios (Anexo 7) ── */
.socio-card {
    background-color: #f0f9ff;
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.socio-avatar-wrap {
    position: relative;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

.socio-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.socio-check {
    position: absolute;
    bottom: -2px;
    right: -2px;
    background: #10b981;
    color: white;
    border: 2px solid #f0f9ff;
    border-radius: 50%;
    font-size: 9px;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Mapa Localização (Anexo 9) ── */
.bizdet-map-wrap {
    height: 200px;
    background-image: url('data:image/svg+xml;utf8,<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><path d="M0,0 L100,100 M100,0 L0,100" stroke="%23e5e7eb" stroke-width="0.5"/></svg>');
    background-color: #f3f4f6;
    border-radius: 8px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.bizdet-map-pin {
    background: #fff;
    padding: 10px 16px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #111827;
}

.text-primary {
    color: #0ea5e9;
    font-size: 16px;
}

/* ── Cores Genéricas ── */
.bg-teal-500 {
    background-color: #14b8a6;
}

.bg-red-800 {
    background-color: #991b1b;
}

.text-danger {
    color: #dc2626;
}

.text-muted {
    color: #6b7280;
}

/* ── Correções de Layout 100% (Anexo 1) ── */

/* Título de seção externa (Quadro Societário) */
.bizdet-section-title {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin: 32px 0 16px 0;
}

/* Modificadores de Card */
.p-0 {
    padding: 0 !important;
}

.mt-24 {
    margin-top: 24px;
}

.pt-16 {
    padding-top: 16px;
}

/* Listas full-width (Empresas similares e Rede) */
.bizdet-list-full {
    display: flex;
    flex-direction: column;
}

.bizdet-list-item-full {
    display: flex;
    align-items: center;
    padding: 16px 0;
    gap: 16px;
}

.border-bottom-item {
    border-bottom: 1px solid #f3f4f6;
}

.bizdet-list-item-full:last-child {
    border-bottom: none;
}

/* Link com Seta e Botão Primário */
.bizdet-link {
    font-size: 13px;
    color: #0ea5e9;
    text-decoration: none;
    font-weight: 500;
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
}

    .bizdet-link i {
        font-size: 10px;
    }

.bizdet-btn-primary {
    background: #0ea5e9;
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
}

    .bizdet-btn-primary:hover {
        background: #0284c7;
    }

/* Tabela Full */
.full-table th {
    background-color: #f9fafb !important; /* Força o fundo cinza claro */
    padding: 14px 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: #6b7280;
    border-bottom: 1px solid #e5e7eb;
}

.full-table td {
    padding: 18px 20px;
    vertical-align: middle;
    border-bottom: 1px solid #f3f4f6;
}

/* Textos da Tabela */
.text-dark {
    color: #111827;
}

.font-bold {
    font-weight: 700;
    font-size: 15px;
}

.font-15 {
    font-size: 15px;
}

/* Status customizado (Texto e Bolinha) */
.bizdet-status {
    font-weight: 600;
    display: flex;
    align-items: center;
    font-size: 13px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
}

.bizdet-status.ativo {
    color: #16a34a;
}
    /* Verde vivo do Figma */
    .bizdet-status.ativo .status-dot {
        background-color: #16a34a;
    }

.bizdet-status.inativo {
    color: #374151;
}
    /* Cinza escuro */
    .bizdet-status.inativo .status-dot {
        background-color: #374151;
    }

/* Paginação Agrupada (Botões colados) */
.bizdet-pagination-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #fff;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

.bizdet-pagination-box {
    display: flex;
    align-items: center;
}

    .bizdet-pagination-box button {
        background: #fff;
        border: 1px solid #d1d5db;
        color: #4b5563;
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        font-size: 13px;
        margin-left: -1px; /* Faz as bordas se sobreporem e colar os botões */
    }

        /* Arredonda apenas as pontas do grupo de botões */
        .bizdet-pagination-box button:first-child {
            margin-left: 0;
            border-top-left-radius: 6px;
            border-bottom-left-radius: 6px;
        }

        .bizdet-pagination-box button:last-child {
            border-top-right-radius: 6px;
            border-bottom-right-radius: 6px;
        }

        .bizdet-pagination-box button:hover {
            background: #f9fafb;
        }

        .bizdet-pagination-box button.active {
            background: #eff6ff;
            color: #0ea5e9;
            font-weight: 600;
            position: relative;
            z-index: 1; 
        }

.full-table {
    width: 100%;
    border-collapse: collapse;
}

    .full-table th:first-child,
    .full-table td:first-child {
        width: 5%;
        text-align: center;
    }

    .full-table th:nth-child(2),
    .full-table td:nth-child(2) {
        width: 25%;
    }



/* ── Responsivo (Mobile) ── */
@media (max-width: 900px) {
    .bizdet-grid {
        grid-template-columns: 1fr;
    }

    .bizdet-data-grid {
        grid-template-columns: 1fr;
    }

    .bizdet-data-item.full-width {
        grid-column: span 1;
    }
}
