/* ============================================================================
   IMPLANTA BASE CSS  (2º na ordem de carga — ver docs/CSS_ARCHITECTURE.md)
   Estilos globais, tipografia, resets, elementos base (body, forms, tabelas).
   PODE ENTRAR AQUI: regras de elementos/tags e overrides globais de Bootstrap.
   NÃO PODE: componentes (→ components), layout de página (→ layouts),
   utilitários (→ utilities), valores literais que já tenham token (use
   var(--implanta-*) de implanta-colors.css).
   AO ALTERAR: bumpar ?v= em templates/base.html E CACHE_NAME em static/pwa/sw.js.
   ============================================================================ */

/* =================== CONFIGURAÇÕES GLOBAIS =================== */

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--implanta-light-gray);
    padding-bottom: 0;
    overflow-x: hidden;
}

/* =================== TIPOGRAFIA =================== */

h1, h2, h3, h4, h5, h6 {
    color: var(--implanta-dark-gray);
    font-weight: 700;
}

.h1, .h2, .h3, .h4, .h5, .h6 {
    color: var(--implanta-dark-gray);
    font-weight: 700;
}

/* Títulos de seção (padrão Prospects) */
.section-title {
    color: var(--implanta-primary);
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--implanta-light-gray);
    text-transform: uppercase;
}

/* =================== LINKS =================== */

a {
    color: var(--implanta-primary);
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: var(--implanta-secondary);
}

/* =================== FORMULÁRIOS =================== */

.form-control {
    border-radius: var(--implanta-radius);
    border: 1px solid #ced4da;
    padding: 0.6rem 0.75rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus {
    border-color: var(--implanta-primary);
    box-shadow: var(--implanta-focus-ring);
}

.form-select {
    border-radius: var(--implanta-radius);
    border: 1px solid #ced4da;
    padding: 0.6rem 0.75rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-select:focus {
    border-color: var(--implanta-primary);
    box-shadow: var(--implanta-focus-ring);
}

.form-check-input:checked {
    background-color: var(--implanta-primary);
    border-color: var(--implanta-primary);
}

.form-label {
    font-weight: 600;
    color: var(--implanta-dark-gray);
    margin-bottom: 0.5rem;
}

/* =================== TABELAS =================== */

.table {
    /* !important herdado da antiga cópia de implanta-colors.css (consolidada aqui) */
    color: var(--implanta-dark-gray) !important;
}

.table thead th {
    background-color: var(--implanta-very-light-gray) !important;
    color: var(--implanta-dark-gray) !important;
    font-weight: 600;
    border-bottom: 2px solid var(--implanta-light-gray);
}

.table tbody tr {
    transition: background-color 0.15s ease;
}

.table tbody tr:hover {
    background-color: var(--implanta-very-light-gray);
}

/* Tabela de dados (padrão Prospects) */
.data-table {
    width: 100%;
}

.data-row {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.data-row:last-child {
    border-bottom: none;
}

.data-label {
    font-weight: 600;
    color: #495057;
    min-width: 250px;
    flex-shrink: 0;
}

.data-label::after {
    content: ":";
    margin-left: 4px;
}

.data-value {
    color: #212529;
    flex: 1;
}

/* =================== PAGINAÇÃO =================== */

.pagination {
    margin-top: 20px;
    margin-bottom: 0;
}

.pagination .page-link {
    color: var(--implanta-primary);
    border-color: var(--implanta-light-gray);
    transition: var(--implanta-transition-fast);
}

.pagination .page-link:hover {
    background-color: var(--implanta-very-light-gray);
    border-color: var(--implanta-primary);
    color: var(--implanta-primary);
}

.pagination .page-item.active .page-link {
    background-color: var(--implanta-primary);
    border-color: var(--implanta-primary);
    color: white;
}

.pagination .page-item.disabled .page-link {
    color: var(--implanta-gray);
    border-color: var(--implanta-light-gray);
}

/* =================== SCROLLBAR CUSTOMIZADA =================== */

/* Webkit browsers (Chrome, Safari, Edge) */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--implanta-light-gray);
}

::-webkit-scrollbar-thumb {
    background: var(--implanta-sidebar-bg);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #444444;
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--implanta-sidebar-bg) var(--implanta-light-gray);
}

/* =================== ESTADOS DE FOCO E ACESSIBILIDADE =================== */

:focus-visible {
    outline: 2px solid var(--implanta-primary);
    outline-offset: 2px;
}

/* =================== RESPONSIVIDADE MOBILE =================== */

@media (max-width: 768px) {
    body {
        font-size: 14px;
    }
    
    .section-title {
        font-size: 1rem;
    }
    
    .data-label {
        min-width: 150px;
    }
    
    .form-control, .form-select {
        min-height: 44px !important;
        font-size: 16px !important;
    }
}

@media (max-width: 576px) {
    .data-row {
        flex-direction: column;
    }
    
    .data-label {
        min-width: auto;
        margin-bottom: 5px;
    }
}

