:root { --hdr-h: 38px; --flt-h: 40px; }
html, body { height: 100%; }
body { overflow: hidden; }
.app-shell { height: 100vh; display: flex; flex-direction: column; }
.app-main { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.credentials { flex: 0 0 auto; }
.toolbar { flex: 0 0 auto; }

.global-search { width: min(380px, 100%); }
.columns-menu { width: 340px; max-width: 92vw; }
.columns-list { max-height: 50vh; overflow: auto; }
.columns-list .dropdown-item { cursor: pointer; }
.help code { white-space: nowrap; }

/* Tabela (visual próximo ao portal) */
.table-wrap { flex: 1 1 auto; min-height: 0; overflow: auto; border: 1px solid var(--bs-border-color); border-radius: .375rem; background: var(--bs-body-bg); }
.offers-table { font-size: .8125rem; width: 100%; }
.offers-table thead th { position: sticky; background: var(--bs-tertiary-bg); white-space: nowrap; z-index: 2; }
.offers-table .hdr-row th { top: 0; height: var(--hdr-h); padding: 0 .5rem; border-bottom: 0; }
.offers-table .flt-row th { top: var(--hdr-h); height: var(--flt-h); padding: .25rem .5rem; font-weight: 400; box-shadow: 0 1px 0 var(--bs-border-color); }
.flt-row .form-control, .flt-row .form-select { min-width: 0; width: 100%; font-size: .75rem; }
.sort-btn { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; gap: .35rem; cursor: pointer; font-weight: 600; width: 100%; height: var(--hdr-h); user-select: none; }
.sort-btn:focus-visible { outline: 2px solid var(--bs-primary); outline-offset: -2px; }
th.text-end .sort-btn { justify-content: flex-end; }
.sort-icon { font-size: .8rem; }
.sort-order { font-size: .65rem; font-weight: 700; background: var(--bs-primary); color: #fff; border-radius: 999px; min-width: 1.1rem; height: 1.1rem; display: inline-grid; place-items: center; }

/* Responsivo: textos quebram linha em vez de forçar rolagem horizontal; números ficam inteiros */
.offers-table td { vertical-align: top; padding: .5rem; overflow-wrap: anywhere; }
.offers-table td.cell-type-money, .offers-table td.cell-type-number, .offers-table td.cell-type-id { white-space: nowrap; }
.offers-table td.cell-type-money, .offers-table td.cell-type-number, .offers-table td.cell-type-id, .offers-table td.cell-type-date { font-variant-numeric: tabular-nums; }
.view-all { font-size: .75rem; }
.rule { font-size: .75rem; display: inline-block; }
.rule-include i { color: var(--bs-success); }
.rule-exclude { color: var(--bs-secondary-color); }
.rule-exclude i { color: var(--bs-danger); }
.thumb { width: 48px; height: 48px; object-fit: cover; border-radius: .25rem; }

.pager { flex: 0 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; padding: .5rem 0; }
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; color: var(--bs-secondary-color); text-align: center; padding: 3rem 1rem; }
.empty-state i { font-size: 2.5rem; }
.page-size { width: 6rem; }

/* Destaque do texto que casou na busca */
mark.hl { background: #ffe066; color: inherit; padding: 0 .1em; border-radius: .15rem; }
[data-bs-theme="dark"] mark.hl { background: rgba(255, 193, 7, .5); color: #fff; }

/* Abas de plataforma na barra superior */
.platform-tabs .nav-link { font-weight: 500; }
@media (max-width: 575.98px) {
  .platform-tabs { order: 3; width: 100%; margin: .5rem 0 0 !important; }
  .platform-tabs .nav-item { flex: 1 1 0; }
  .platform-tabs .nav-link { width: 100%; }
}
