:root {
    --header-h: 72px;
}

html,
body {
    height: 100%;
}

body {
    background: #ffffff;
    color: #0f172a;
}

/* Layout em coluna para usar 100vh */
.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header.brandbar {
    height: var(--header-h);
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    padding: .5rem 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

header .title {
    line-height: 1.1;
}

header img.logo {
    height: 44px;
    width: auto;
    display: block;
}

main.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1rem;
}

.card {
    border-radius: 1rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 8px 30px rgba(16, 24, 40, .06);
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-body {
    display: flex;
    flex-direction: column;
    padding: 1rem;
}

/* Container da tabela ocupa todo o resto da tela */
.table-container {
    position: relative;
    flex: 1;
    /* ocupa o restante do card */
    min-height: 0;
    /* necessário para flex scroll */
    overflow: auto;
    /* rolagem vertical + horizontal se precisar */
}

/* Estilo da tabela */
table.dataTable {
    width: 100% !important;
}

.table thead th {
    position: sticky;
    top: 0;
    background: #f8fafc;
    z-index: 2;
}

.table tfoot th {
    position: sticky;
    bottom: 0;
    background: #ffffff;
    z-index: 1;
}

/* Linhas finas + sem quebra de linha */
.table th,
.table td {
    white-space: nowrap;
    /* sem quebra de linha */
    padding-top: .35rem;
    /* reduz altura */
    padding-bottom: .35rem;
    line-height: 1.25;
    vertical-align: middle;
}

/* Inputs do filtro por coluna (footer) */
tfoot input {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: .5rem;
    background: #ffffff;
    padding: .25rem .5rem;
    font-size: .9rem;
}

/* Badges/infos */
.badge-soft {
    background: #eef2ff;
    color: #3730a3;
    border: 1px solid #e0e7ff;
}

/* DataTables busca global */
.dataTables_wrapper .dataTables_filter input {
    border-radius: .75rem;
    border: 1px solid #e5e7eb;
    padding: .35rem .6rem;
}