body, html {
    height: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
}

:root {
    --header-offset: 56px;
    --footer-offset: 56px;
    --localhost-banner-height: 0px;
}

.content {
    flex: 1;
    padding-top: var(--header-offset);
    padding-bottom: var(--footer-offset);
}


/* 1. Transforma o toolbar em Flexbox e alinha todos os filhos por baixo */
.fixed-table-toolbar {
  display: flex !important;
  align-items: flex-end !important;
  justify-content: space-between; /* Mantém os filtros na esquerda e as ações na direita */
  flex-wrap: wrap;
}

.fixed-table-toolbar .bs-bars {
  order: 1; /* Filtros e botão calcular (lado esquerdo) */
}

.fixed-table-toolbar .search {
  order: 2; /* Campo de pesquisa (fica no meio/direita, antes dos botões) */
  margin-left: auto !important; /* Empurra a pesquisa e os botões para a extrema direita */
}

.fixed-table-toolbar .columns-right {
  order: 3; /* Botões de ação (fica na extrema direita) */
}

/* Localhost Banner */
.localhost-banner {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1040;
    width: 100%;
    height: var(--localhost-banner-height);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    font-weight: 700;
    color: #1f1f1f;
    background: repeating-linear-gradient(
        -45deg,
        #ffda6a,
        #ffda6a 16px,
        #ffc107 16px,
        #ffc107 32px
    );
    border-bottom: 1px solid #d39e00;
}

.is-localhost {
    --localhost-banner-height: 24px;
    --header-offset: calc(56px + var(--localhost-banner-height));
}

.is-localhost .navbar.fixed-top {
    top: var(--localhost-banner-height);
}

/* Session Timer */
#sessionTimer {
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 6px;
    transition: background-color 200ms ease, box-shadow 200ms ease;
}

#sessionTimer.bg-danger {
    animation: pulse-danger 1s infinite;
}

@keyframes pulse-danger {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(220, 53, 69, 0);
    }
}