/*
 * Tema visual NexEvel (v3.1.0): a marca como camada sobre os modos de cor do Bootstrap 5.3.
 * O <html> recebe data-bs-theme="dark" ou "light" (assets/js/theme.js, antes da pintura). Cada modo
 * define aqui as variáveis do Bootstrap (--bs-*) e as da marca (--nv-*); os componentes abaixo só
 * leem variáveis, nunca uma cor fixa de um modo. Assim um trecho com data-bs-theme próprio (o menu
 * lateral do admin, sempre escuro) usa as cores do seu modo, mesmo dentro do outro.
 * Para mudar cores ou fonte, ajuste só estes blocos.
 */
:root {
    /* Marca: as mesmas nos dois modos. */
    --nv-primary: #2FB9B2;
    --nv-primary-rgb: 47, 185, 178;
    --nv-primary-strong: #13827C;
    --nv-secondary: #163E63;
    --nv-secondary-rgb: 22, 62, 99;
    --nv-dark: #0B2239;
    --nv-gradient: linear-gradient(90deg, var(--nv-primary-strong), var(--nv-secondary));
    --nv-font: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --bs-font-sans-serif: var(--nv-font);
    --bs-body-font-family: var(--nv-font);
    --bs-primary: #2FB9B2;
    --bs-primary-rgb: 47, 185, 178;
}

:root,
[data-bs-theme=light] {
    --bs-body-bg: #F3F7FA;
    --bs-body-bg-rgb: 243, 247, 250;
    --bs-body-color: #0B2239;
    --bs-body-color-rgb: 11, 34, 57;
    --bs-emphasis-color: #061523;
    --bs-emphasis-color-rgb: 6, 21, 35;
    --bs-secondary-color: rgba(11, 34, 57, 0.74);
    --bs-secondary-color-rgb: 11, 34, 57;
    --bs-tertiary-color: rgba(11, 34, 57, 0.55);
    --bs-tertiary-color-rgb: 11, 34, 57;
    --bs-secondary-bg: #E4ECF2;
    --bs-secondary-bg-rgb: 228, 236, 242;
    --bs-tertiary-bg: #ECF2F6;
    --bs-tertiary-bg-rgb: 236, 242, 246;
    --bs-heading-color: inherit;
    --bs-link-color: #0F6E69;
    --bs-link-color-rgb: 15, 110, 105;
    --bs-link-hover-color: #0B5753;
    --bs-link-hover-color-rgb: 11, 87, 83;
    --bs-border-color: #D3DEE6;
    --bs-border-color-translucent: rgba(11, 34, 57, 0.14);
    --bs-primary-text-emphasis: #0B5753;
    --bs-primary-bg-subtle: #D5F1EF;
    --bs-primary-border-subtle: #9FDCD8;

    --nv-text: var(--bs-body-color);
    --nv-muted: var(--bs-secondary-color);
    --nv-strong: var(--bs-emphasis-color);
    --nv-border: rgba(11, 34, 57, 0.12);
    --nv-card: #FFFFFF;
    /* v3.4.0: gráficos do Dashboard (paleta validada contra o cartão: azul e laranja, AA de 3:1 e CVD). */
    --nv-chart-1: #2A78D6;
    --nv-chart-2: #EB6834;
    --nv-chart-grid: rgba(11, 34, 57, 0.10);
    --nv-chart-ink: rgba(11, 34, 57, 0.74);
    --nv-card-shadow: 0 12px 34px rgba(11, 34, 57, 0.08);
    --nv-surface: rgba(11, 34, 57, 0.03);
    --nv-surface-hover: rgba(11, 34, 57, 0.06);
    --nv-input-bg: #FFFFFF;
    --nv-input-border: rgba(11, 34, 57, 0.22);
    --nv-nav-bg: rgba(255, 255, 255, 0.88);
    --nv-glow-primary: rgba(47, 185, 178, 0.16);
    --nv-glow-secondary: rgba(22, 62, 99, 0.10);
    --nv-dash: rgba(11, 34, 57, 0.16);
    --nv-ghost-color: #0B2239;
    --nv-ghost-border: rgba(11, 34, 57, 0.32);
    --nv-ghost-hover-bg: rgba(11, 34, 57, 0.07);
    --nv-badge-light-ring: rgba(11, 34, 57, 0.18);
    --nv-badge-dark-ring: transparent;
}

[data-bs-theme=dark] {
    --bs-body-bg: #0B2239;
    --bs-body-bg-rgb: 11, 34, 57;
    --bs-body-color: #EAF6F6;
    --bs-body-color-rgb: 234, 246, 246;
    --bs-emphasis-color: #FFFFFF;
    --bs-emphasis-color-rgb: 255, 255, 255;
    --bs-secondary-color: rgba(234, 246, 246, 0.74);
    --bs-secondary-color-rgb: 234, 246, 246;
    --bs-tertiary-color: rgba(234, 246, 246, 0.55);
    --bs-tertiary-color-rgb: 234, 246, 246;
    --bs-secondary-bg: #143351;
    --bs-secondary-bg-rgb: 20, 51, 81;
    --bs-tertiary-bg: #0F2B47;
    --bs-tertiary-bg-rgb: 15, 43, 71;
    --bs-heading-color: inherit;
    --bs-link-color: #6FD6D0;
    --bs-link-color-rgb: 111, 214, 208;
    --bs-link-hover-color: #A2E7E3;
    --bs-link-hover-color-rgb: 162, 231, 227;
    --bs-border-color: rgba(234, 246, 246, 0.16);
    --bs-border-color-translucent: rgba(234, 246, 246, 0.12);
    --bs-primary-text-emphasis: #8BE0DB;
    --bs-primary-bg-subtle: rgba(47, 185, 178, 0.16);
    --bs-primary-border-subtle: rgba(47, 185, 178, 0.45);

    --nv-text: var(--bs-body-color);
    --nv-muted: var(--bs-secondary-color);
    --nv-strong: var(--bs-emphasis-color);
    --nv-border: rgba(234, 246, 246, 0.12);
    --nv-card: rgba(255, 255, 255, 0.06);
    /* v3.4.0: os mesmos dois tons, no passo do tema escuro (validados contra o cartão #1A2F45). */
    --nv-chart-1: #3987E5;
    --nv-chart-2: #D95926;
    --nv-chart-grid: rgba(234, 246, 246, 0.10);
    --nv-chart-ink: rgba(234, 246, 246, 0.74);
    --nv-card-shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
    --nv-surface: rgba(255, 255, 255, 0.03);
    --nv-surface-hover: rgba(255, 255, 255, 0.06);
    --nv-input-bg: rgba(255, 255, 255, 0.06);
    --nv-input-border: rgba(234, 246, 246, 0.18);
    --nv-nav-bg: rgba(11, 34, 57, 0.82);
    --nv-glow-primary: rgba(47, 185, 178, 0.22);
    --nv-glow-secondary: rgba(22, 62, 99, 0.30);
    --nv-dash: rgba(234, 246, 246, 0.14);
    --nv-ghost-color: #EAF6F6;
    --nv-ghost-border: rgba(234, 246, 246, 0.38);
    --nv-ghost-hover-bg: rgba(234, 246, 246, 0.12);
    --nv-badge-light-ring: transparent;
    --nv-badge-dark-ring: rgba(234, 246, 246, 0.38);
}

html,
body {
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
    font-family: var(--nv-font);
}

code,
.text-secondary-emphasis {
    color: inherit;
}

/* Tabelas no modo de cor da página, sem fundo próprio (ficam sobre o cartão). */
.table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--bs-body-color);
    --bs-table-border-color: var(--bs-border-color-translucent);
    --bs-table-striped-color: var(--bs-body-color);
    --bs-table-hover-color: var(--bs-body-color);
    --bs-table-active-color: var(--bs-body-color);
}

/* Botões com a marca: primário no azul-petróleo forte (texto branco com contraste AA). */
.btn-primary {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--nv-primary-strong);
    --bs-btn-border-color: var(--nv-primary-strong);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #0F6E69;
    --bs-btn-hover-border-color: #0F6E69;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #0B5753;
    --bs-btn-active-border-color: #0B5753;
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: var(--nv-primary-strong);
    --bs-btn-disabled-border-color: var(--nv-primary-strong);
    --bs-btn-focus-shadow-rgb: var(--nv-primary-rgb);
}

/* Botão de contorno neutro (era btn-outline-light, invisível no fundo claro). */
.btn-outline-secondary {
    --bs-btn-color: var(--nv-ghost-color);
    --bs-btn-border-color: var(--nv-ghost-border);
    --bs-btn-hover-color: var(--bs-emphasis-color);
    --bs-btn-hover-bg: var(--nv-ghost-hover-bg);
    --bs-btn-hover-border-color: var(--nv-ghost-border);
    --bs-btn-active-color: var(--bs-emphasis-color);
    --bs-btn-active-bg: var(--nv-ghost-hover-bg);
    --bs-btn-active-border-color: var(--nv-ghost-border);
    --bs-btn-disabled-color: var(--bs-secondary-color);
    --bs-btn-disabled-border-color: var(--nv-border);
    --bs-btn-focus-shadow-rgb: var(--nv-primary-rgb);
}

/*
 * Contornos coloridos no tom de texto de cada modo (--bs-*-text-emphasis do Bootstrap): o vermelho
 * puro some no fundo escuro e o amarelo puro no claro. O preenchimento do hover continua o do Bootstrap.
 */
.btn-outline-danger {
    --bs-btn-color: var(--bs-danger-text-emphasis);
    --bs-btn-border-color: var(--bs-danger-text-emphasis);
}

.btn-outline-warning {
    --bs-btn-color: var(--bs-warning-text-emphasis);
    --bs-btn-border-color: var(--bs-warning-text-emphasis);
}

.btn-outline-success {
    --bs-btn-color: var(--bs-success-text-emphasis);
    --bs-btn-border-color: var(--bs-success-text-emphasis);
}

.btn-outline-info {
    --bs-btn-color: var(--bs-info-text-emphasis);
    --bs-btn-border-color: var(--bs-info-text-emphasis);
}

/* Selo primário no azul-petróleo forte: o branco sobre o #2FB9B2 da marca fica abaixo do AA. */
.text-bg-primary {
    color: #fff !important;
    background-color: var(--nv-primary-strong) !important;
}

/* Selos claro e escuro: o contorno aparece no modo em que o fundo do selo some no da página. */
.badge.text-bg-light {
    box-shadow: inset 0 0 0 1px var(--nv-badge-light-ring);
}

.badge.text-bg-dark {
    box-shadow: inset 0 0 0 1px var(--nv-badge-dark-ring);
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    border-color: rgba(var(--nv-primary-rgb), 0.55);
    box-shadow: 0 0 0 .2rem rgba(var(--nv-primary-rgb), 0.2);
}

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

.nv-admin-body {
    background:
        radial-gradient(900px 450px at 10% 10%, var(--nv-glow-primary), transparent 60%),
        radial-gradient(900px 450px at 90% 10%, var(--nv-glow-secondary), transparent 60%),
        var(--bs-body-bg);
}

.nv-nav {
    --bs-navbar-color: var(--bs-secondary-color);
    --bs-navbar-hover-color: var(--bs-emphasis-color);
    --bs-navbar-active-color: var(--bs-emphasis-color);
    --bs-navbar-brand-color: var(--bs-emphasis-color);
    --bs-navbar-brand-hover-color: var(--bs-emphasis-color);
    --bs-navbar-toggler-border-color: var(--nv-border);
    background: var(--nv-nav-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--nv-border);
}

.nv-logo {
    height: 34px;
    width: auto;
}

.nv-hero {
    position: relative;
    background:
        radial-gradient(1100px 600px at 18% 18%, var(--nv-glow-primary), transparent 60%),
        radial-gradient(1100px 600px at 85% 25%, var(--nv-glow-secondary), transparent 60%),
        linear-gradient(180deg, var(--nv-surface), transparent 35%);
}

.nv-title {
    letter-spacing: 0.02em;
}

.nv-slogan {
    font-size: 1.05rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--bs-secondary-color);
    font-weight: 700;
}

.nv-muted {
    color: var(--nv-muted);
}

.nv-link {
    color: var(--bs-body-color);
    text-decoration: none;
}

.nv-link:hover {
    color: var(--bs-emphasis-color);
    text-decoration: underline;
}

.nv-badge {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .35rem .75rem;
    border-radius: 999px;
    border: 1px solid var(--nv-border);
    background: var(--nv-surface);
    color: var(--bs-body-color);
    font-size: .9rem;
}

.nv-btn {
    background: var(--nv-gradient);
    border: none;
    color: #fff;
    font-weight: 700;
}

.nv-btn:hover {
    filter: brightness(1.08);
    color: #fff;
}

.nv-btn:active {
    filter: brightness(0.98);
}

.nv-card {
    background: var(--nv-card);
    border: 1px solid var(--nv-border);
    border-radius: 1.25rem;
    box-shadow: var(--nv-card-shadow);
}

.nv-feature {
    background: var(--nv-card);
    border: 1px solid var(--nv-border);
    border-radius: 1.25rem;
    padding: 1.25rem;
    transition: transform .15s ease, filter .15s ease;
}

.nv-feature:hover {
    transform: translateY(-2px);
    filter: brightness(1.03);
}

.nv-mini {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
}

.nv-mini-item {
    display: flex;
    align-items: center;
    gap: .55rem;
    color: var(--nv-muted);
    font-weight: 600;
}

.nv-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--nv-primary);
    box-shadow: 0 0 0 6px rgba(var(--nv-primary-rgb), 0.14);
}

.nv-section,
.nv-section-alt,
.nv-cta,
.nv-footer {
    border-top: 1px solid var(--nv-border);
}

.nv-section-alt {
    background: var(--nv-surface);
}

.nv-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.nv-list li,
.nv-ordered-list li {
    padding: .55rem 0;
    border-bottom: 1px dashed var(--nv-dash);
    color: var(--nv-muted);
}

.nv-list li:last-child,
.nv-ordered-list li:last-child {
    border-bottom: 0;
}

.nv-ordered-list {
    margin: 0;
    padding-left: 1.25rem;
}

.nv-cta {
    background:
        radial-gradient(900px 450px at 20% 50%, var(--nv-glow-secondary), transparent 60%),
        radial-gradient(900px 450px at 80% 35%, var(--nv-glow-primary), transparent 60%);
}

.nv-input,
.form-control-color {
    background-color: var(--nv-input-bg) !important;
    border: 1px solid var(--nv-input-border) !important;
    color: var(--bs-body-color) !important;
}

.nv-input::placeholder {
    color: var(--bs-tertiary-color);
}

/*
 * v3.2.0: a lista aberta do <select> é do navegador e não herda o fundo semitransparente do campo; no tema escuro ela
 * ficava branca com o texto claro do tema (ilegível). As opções ganham o fundo sólido e o texto do tema escuro, em todo
 * <select> (com .nv-input ou só .form-select, como na Configuração).
 */
[data-bs-theme=dark] select option,
[data-bs-theme=dark] select optgroup {
    background-color: var(--bs-secondary-bg);
    color: var(--bs-body-color);
}

.nv-input:focus,
.form-control-color:focus {
    box-shadow: 0 0 0 .2rem rgba(var(--nv-primary-rgb), 0.2) !important;
    border-color: rgba(var(--nv-primary-rgb), 0.55) !important;
}

.nv-placeholder {
    background: var(--nv-surface);
    border: 1px dashed var(--nv-dash);
}

.nv-placeholder-title {
    font-weight: 800;
    margin-bottom: .35rem;
}

.nv-footer {
    background: var(--nv-surface);
}

.nv-release-item {
    border: 1px solid var(--nv-border);
    border-radius: 1rem;
    padding: 1rem;
    background: var(--nv-surface);
}

@media (max-width: 991px) {
    .nv-slogan {
        letter-spacing: 0.10em;
    }

    .nv-logo {
        height: 30px;
    }
}

.nv-check-card {
    padding: .85rem 1rem;
    border: 1px solid var(--nv-border);
    border-radius: 1rem;
    background: var(--nv-surface);
}

.nv-check-card:hover {
    border-color: rgba(var(--nv-primary-rgb), 0.35);
    background: var(--nv-surface-hover);
}


.nv-code {
    margin: 0;
    padding: 1rem;
    border-radius: 1rem;
    background: rgba(6, 17, 29, 0.88);
    border: 1px solid rgba(234, 246, 246, 0.12);
    color: #d8f8f6;
    font-size: .92rem;
    line-height: 1.45;
    overflow: auto;
}

.nv-code code {
    color: inherit;
}


.nv-table-paginate thead th {
    white-space: nowrap;
}

.nv-table-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.nv-table-pagination__info {
    color: var(--nv-muted);
    font-size: .95rem;
}

.nv-table-pagination__actions {
    display: flex;
    align-items: end;
    gap: .75rem;
    flex-wrap: wrap;
}

.nv-table-pagination__size {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.nv-table-pagination__size label {
    margin-bottom: 0;
}

.nv-table-pagination__size select {
    min-width: 90px;
}

.nv-table-pagination__nav {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
}

.nv-table-pagination__state {
    min-width: 110px;
    text-align: center;
    color: var(--nv-muted);
    font-size: .9rem;
}

.nv-table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

/* v3.1.2: ações só com ícone ficam lado a lado, sem empilhar na coluna estreita. */
.nv-table-actions:has(> .nv-icon-btn, > form > .nv-icon-btn) {
    flex-wrap: nowrap;
    gap: .35rem;
}

/* v3.1.1: ação só com ícone nas listagens do admin (o texto fica escondido e vira a dica). Quadrado, sempre igual. */
.btn.nv-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    font-size: 1rem;
    line-height: 1;
}

.nv-table-stack {
    min-width: 240px;
}

.nv-table-stack details summary {
    cursor: pointer;
    color: var(--bs-body-color);
}

.nv-table-stack details[open] summary {
    margin-bottom: .5rem;
}

@media (max-width: 767px) {
    .nv-table-pagination__actions {
        width: 100%;
        justify-content: space-between;
    }

    .nv-table-pagination__nav {
        width: 100%;
    }

    .nv-table-pagination__nav .btn {
        flex: 1 1 auto;
    }

    .nv-table-pagination__state {
        width: 100%;
        text-align: left;
        min-width: 0;
    }
}

/* ---------------------------------------------------------------------------
 * v2.2.2: menu lateral do admin (layouts/admin + partials/admin_menu).
 * Um só <nav class="nv-sidebar offcanvas-lg">: no desktop (>= lg) é a barra fixa à esquerda,
 * 240 px, com rolagem própria, recolhível a 64 px (classe nv-sidebar-collapsed no <html>, posta
 * antes da pintura pelo script inline do layout, estado em localStorage "nv.sidebar"); no
 * celular é o offcanvas do Bootstrap, aberto pela barra superior .nv-topbar.
 * O layout velho (navbar superior) não usa nenhuma destas classes: só acréscimo.
 * ------------------------------------------------------------------------- */

.nv-shell {
    display: flex;
    align-items: flex-start;
    min-height: 100vh;
}

.nv-main {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 1480px;
    margin: 0 auto;
}

.nv-sidebar {
    --bs-offcanvas-width: 280px;
    --bs-offcanvas-bg: var(--bs-body-bg);
    --bs-offcanvas-color: var(--bs-body-color);
    --nv-sidebar-width: 240px;
    display: flex;
    flex-direction: column;
    color: var(--bs-body-color);
    /* .offcanvas-lg força background-color transparente no desktop: a cor vai por imagem. */
    background-image: linear-gradient(180deg, rgba(11, 34, 57, 0.94), rgba(11, 34, 57, 0.94));
    border-right: 1px solid var(--nv-border);
}

.nv-sidebar__head {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .85rem .9rem;
    border-bottom: 1px solid var(--nv-border);
}

.nv-sidebar__brand {
    display: flex;
    align-items: center;
    gap: .6rem;
    flex: 1 1 auto;
    min-width: 0;
    color: var(--bs-emphasis-color);
    text-decoration: none;
    font-weight: 700;
}

.nv-sidebar__brand:hover {
    color: var(--bs-emphasis-color);
}

.nv-sidebar__brand .nv-sidebar__label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nv-sidebar__toggle {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    padding: 0;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--nv-border);
    border-radius: .5rem;
    color: var(--nv-muted);
}

.nv-sidebar__toggle:hover {
    color: var(--bs-emphasis-color);
    border-color: rgba(var(--nv-primary-rgb), 0.6);
}

.nv-sidebar__icon-closed {
    display: none;
}

.nv-sidebar__body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: .75rem .6rem;
}

.nv-sidebar__group + .nv-sidebar__group {
    margin-top: .65rem;
}

.nv-sidebar__group-title {
    padding: 0 .6rem .25rem;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--nv-muted);
}

/*
 * v3.9.2: o título do grupo é um botão que abre e fecha a lista (sanfona, nexevel.js). Fechado, a lista some e o
 * selo dos itens aparece no título; aberto, o selo fica só no item.
 */
button.nv-sidebar__group-title {
    display: flex;
    align-items: center;
    gap: .4rem;
    width: 100%;
    margin: 0;
    padding-top: .3rem;
    background: transparent;
    border: 0;
    border-radius: .4rem;
    text-align: left;
    cursor: pointer;
}

button.nv-sidebar__group-title:hover {
    color: var(--bs-emphasis-color);
}

button.nv-sidebar__group-title .nv-sidebar__label {
    flex: 1 1 auto;
}

.nv-sidebar__chevron {
    flex: 0 0 auto;
    font-size: .7rem;
    transition: transform .15s ease;
}

/* Só com o JS no ar (classe nv-js no <html>, admin-head.js): sem ele, todos os grupos ficam abertos e alcançáveis. */
.nv-js .nv-sidebar__group.is-closed .nv-sidebar__chevron {
    transform: rotate(-90deg);
}

.nv-js .nv-sidebar__group.is-closed .nv-sidebar__list {
    display: none;
}

.nv-sidebar__group-badge {
    flex: 0 0 auto;
    letter-spacing: 0;
}

html:not(.nv-js) .nv-sidebar__group-badge,
.nv-sidebar__group:not(.is-closed) .nv-sidebar__group-badge {
    display: none;
}

.nv-sidebar__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 2px;
}

.nv-sidebar__link {
    position: relative;
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .42rem .6rem;
    border-radius: .6rem;
    color: var(--bs-body-color);
    text-decoration: none;
    font-weight: 500;
    font-size: .95rem;
}

.nv-sidebar__link .bi {
    flex: 0 0 auto;
    width: 1.25rem;
    text-align: center;
    font-size: 1.05rem;
}

.nv-sidebar__link:hover {
    background: var(--nv-surface-hover);
    color: var(--bs-emphasis-color);
}

.nv-sidebar__link.active {
    background: rgba(var(--nv-primary-rgb), 0.18);
    color: var(--bs-emphasis-color);
    box-shadow: inset 3px 0 0 var(--nv-primary);
}

.nv-sidebar__link .nv-sidebar__label {
    flex: 1 1 auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nv-sidebar__badge {
    flex: 0 0 auto;
}

.nv-sidebar__link:focus-visible,
.nv-sidebar__group-title:focus-visible,
.nv-sidebar__brand:focus-visible,
.nv-sidebar__toggle:focus-visible,
.nv-topbar__brand:focus-visible,
.nv-topbar__menu:focus-visible {
    outline: 2px solid var(--nv-primary);
    outline-offset: 2px;
}

/* Barra superior do celular (< lg; d-lg-none no layout). */
.nv-topbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .5rem .9rem;
    color: var(--bs-body-color);
    background: rgba(11, 34, 57, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--nv-border);
}

.nv-topbar__brand {
    display: flex;
    align-items: center;
    gap: .6rem;
    color: var(--bs-emphasis-color);
    text-decoration: none;
    font-weight: 700;
}

.nv-topbar__brand:hover {
    color: var(--bs-emphasis-color);
}

.nv-topbar__menu {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 36px;
    background: transparent;
    border: 1px solid var(--nv-border);
    border-radius: .5rem;
    color: var(--bs-emphasis-color);
    font-size: 1.35rem;
    line-height: 1;
}

@media (min-width: 992px) {
    .nv-sidebar {
        position: sticky;
        top: 0;
        height: 100vh;
        flex: 0 0 var(--nv-sidebar-width);
        width: var(--nv-sidebar-width);
        transition: width .15s ease, flex-basis .15s ease;
    }

    .nv-main {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    /*
     * Ritmo vertical compacto no desktop: a barra tem altura fixa (100vh) e, para o super_admin
     * (5 grupos, 17 itens), cabeçalho + grupos + rodapé cabem em ~735 px, dentro de uma janela
     * de 1366x768 sem rolar (a rolagem própria do corpo continua como garantia). Só medidas:
     * cores, fontes, ícones e estrutura não mudam. No celular (offcanvas) ficam as medidas
     * base, mais folgadas para o toque.
     */
    .nv-sidebar__head {
        padding: .5rem .75rem;
    }

    .nv-sidebar__head .nv-logo {
        height: 26px;
    }

    .nv-sidebar__toggle {
        width: 28px;
        height: 28px;
    }

    .nv-sidebar__body {
        padding: .5rem .5rem;
    }

    .nv-sidebar__group + .nv-sidebar__group {
        margin-top: .3rem;
    }

    .nv-sidebar__group-title {
        padding: 0 .6rem .15rem;
        font-size: .66rem;
        line-height: 1.3;
    }

    .nv-sidebar__list {
        gap: 1px;
    }

    .nv-sidebar__link {
        padding: .34rem .6rem;
        font-size: .875rem;
        line-height: 1.3;
    }

    .nv-sidebar__link .bi {
        font-size: 1rem;
        line-height: 1;
    }

    /* Recolhida: 64 px, só ícones; os cabeçalhos dos grupos viram separadores. */
    .nv-sidebar-collapsed .nv-sidebar {
        --nv-sidebar-width: 64px;
    }

    .nv-sidebar-collapsed .nv-sidebar__label {
        display: none;
    }

    .nv-sidebar-collapsed .nv-sidebar__head {
        flex-direction: column;
        padding: .5rem .4rem;
    }

    .nv-sidebar-collapsed .nv-sidebar__brand {
        justify-content: center;
    }

    .nv-sidebar-collapsed .nv-sidebar__icon-open {
        display: none;
    }

    .nv-sidebar-collapsed .nv-sidebar__icon-closed {
        display: inline-block;
    }

    .nv-sidebar-collapsed .nv-sidebar__body {
        padding: .75rem .5rem;
    }

    .nv-sidebar-collapsed .nv-sidebar__group + .nv-sidebar__group {
        margin-top: .3rem;
    }

    .nv-sidebar-collapsed .nv-sidebar__group-title {
        height: 0;
        padding: 0;
        margin: 0 .35rem .3rem;
        border-top: 1px solid var(--nv-border);
    }

    .nv-sidebar-collapsed .nv-sidebar__group:first-child .nv-sidebar__group-title {
        border-top: 0;
        margin-bottom: 0;
    }

    /* v3.9.2: recolhida, os títulos são só separadores (sem clique, chevron nem selo) e todo grupo mostra os itens. */
    /* O botão é inline por natureza: a largura explícita (menos as margens laterais) mantém a linha do separador. */
    .nv-sidebar-collapsed button.nv-sidebar__group-title {
        width: calc(100% - .7rem);
        border-radius: 0;
        pointer-events: none;
    }

    .nv-sidebar-collapsed .nv-sidebar__chevron,
    .nv-sidebar-collapsed .nv-sidebar__group-badge {
        display: none;
    }

    .nv-sidebar-collapsed.nv-js .nv-sidebar__group.is-closed .nv-sidebar__list {
        display: grid;
    }

    .nv-sidebar-collapsed .nv-sidebar__link {
        justify-content: center;
        padding: .45rem 0;
    }

    .nv-sidebar-collapsed .nv-sidebar__badge {
        position: absolute;
        top: 2px;
        right: 4px;
        padding: .2em .4em;
        font-size: .6rem;
    }

}

/* ---------------------------------------------------------------------------
 * v3.1.0: botão do tema (partials/theme_toggle). O ícone mostrado é o da escolha atual
 * (data-nv-theme-choice no <html>, posto pelo theme.js); sem JS, o do automático.
 * ------------------------------------------------------------------------- */

/* Sem JS o tema fica no escuro de sempre e o botão não faria nada: some (só o theme.js põe a escolha no <html>). */
html:not([data-nv-theme-choice]) .nv-theme {
    display: none;
}

.nv-theme__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    min-width: 32px;
    height: 32px;
    padding: 0 .5rem;
    background: transparent;
    border: 1px solid var(--nv-border);
    border-radius: .5rem;
    color: var(--bs-body-color);
    line-height: 1;
}

.nv-theme__toggle:hover {
    color: var(--bs-emphasis-color);
    border-color: rgba(var(--nv-primary-rgb), 0.6);
}

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

.nv-theme__icon {
    display: none;
}

.nv-theme__icon--auto,
[data-nv-theme-choice=light] .nv-theme__icon--light,
[data-nv-theme-choice=dark] .nv-theme__icon--dark {
    display: inline-block;
}

[data-nv-theme-choice=light] .nv-theme__icon--auto,
[data-nv-theme-choice=dark] .nv-theme__icon--auto {
    display: none;
}

.nv-theme .dropdown-item.active,
.nv-theme .dropdown-item:active {
    color: var(--bs-emphasis-color);
    background-color: rgba(var(--nv-primary-rgb), 0.2);
}

.nv-theme-corner {
    position: fixed;
    top: .75rem;
    right: .75rem;
    z-index: 1030;
}

/* ---------------------------------------------------------------------------
 * v3.1.1: barra do topo do admin (partials/admin_topbar), antes do <main>, na coluna .nv-content: o fundo ocupa
 * toda a largura à direita do menu e o miolo (.nv-mainbar__inner) acompanha a largura do conteúdo. Estado à
 * esquerda; site, tema, usuário e "Sair" à direita. No desktop fica fixa no topo (o conteúdo rola por baixo, por
 * isso o fundo); no celular a barra fixa é a .nv-topbar, e esta fica no fluxo, logo abaixo.
 * ------------------------------------------------------------------------- */

.nv-content {
    flex: 1 1 auto;
    min-width: 0;
}

.nv-mainbar {
    background: var(--nv-nav-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--nv-border);
}

.nv-mainbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .5rem 1rem;
    max-width: 1480px;
    margin: 0 auto;
    padding: .55rem calc(var(--bs-gutter-x) * .5);
}

.nv-mainbar__status,
.nv-mainbar__actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem .75rem;
}

.nv-mainbar__actions {
    margin-left: auto;
}

.nv-mainbar__user {
    min-width: 0;
    max-width: 260px;
    line-height: 1.25;
    padding-left: .75rem;
    border-left: 1px solid var(--nv-border);
}

.nv-mainbar__who {
    display: flex;
    align-items: center;
    gap: .4rem;
    min-width: 0;
}

.nv-mainbar__name {
    font-weight: 600;
    font-size: .9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nv-mainbar__email {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: .78rem;
}

.nv-mainbar__logout .btn {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    white-space: nowrap;
}

/* Celular: o estado numa linha; site, tema, usuário (nome encurtado) e "Sair" na outra, sem quebrar. */
@media (max-width: 575.98px) {
    .nv-mainbar__actions {
        width: 100%;
        flex-wrap: nowrap;
    }

    .nv-mainbar__actions > .nv-link {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .nv-mainbar__user {
        flex: 1 1 auto;
        padding-left: .5rem;
    }

    .nv-mainbar__email,
    .nv-mainbar__who .badge {
        display: none;
    }
}

@media (min-width: 992px) {
    .nv-mainbar {
        position: sticky;
        top: 0;
        z-index: 1010;
    }

    .nv-mainbar__inner {
        padding: .6rem 1.5rem;
    }
}

/* ---------------------------------------------------------------------------
 * v3.1.2: padrão de telas próprias. Cabeçalho das listagens e das telas de cadastro/edição
 * (partials/admin_list_header e admin_form_header) e a área de exclusão no fim da edição.
 * ------------------------------------------------------------------------- */

.nv-page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .75rem 1rem;
    margin-bottom: 1.25rem;
}

.nv-page-head__text {
    min-width: 0;
    max-width: 760px;
}

.nv-page-head .btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    white-space: nowrap;
}

.nv-danger-zone {
    border-color: rgba(var(--bs-danger-rgb), 0.45);
}

/* v3.4.0: área dos gráficos do Dashboard (o Chart.js ocupa a altura do contêiner; maintainAspectRatio desligado). */
.nv-chart {
    position: relative;
    height: 260px;
}

/* v4.5.1: a conversa dos chamados (área do cliente e painel do atendimento). Caixa com rolagem própria e altura limitada
   pela tela (o formulário de resposta fica embaixo, fora dela), balões: quem vê à direita, o outro lado à esquerda, a nota
   interna em amarelo e o sistema no centro. */
.nv-chat {
    position: relative;
}
.nv-chat-scroll {
    max-height: max(280px, calc(100vh - var(--nv-chat-offset, 380px)));
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: .75rem;
    border: 1px solid var(--bs-border-color);
    border-radius: .75rem;
    background: var(--bs-tertiary-bg);
}
.nv-msg {
    display: flex;
    margin-bottom: .75rem;
}
.nv-msg--mine {
    justify-content: flex-end;
}
.nv-msg--system {
    justify-content: center;
}
.nv-bubble {
    max-width: min(80%, 640px);
    padding: .6rem .8rem;
    border-radius: 1rem;
    border: 1px solid var(--bs-border-color);
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
    overflow-wrap: anywhere;
}
.nv-msg--mine .nv-bubble {
    background: rgba(47, 185, 178, .16);
    border-color: rgba(47, 185, 178, .45);
    border-bottom-right-radius: .3rem;
}
.nv-msg--theirs .nv-bubble {
    border-bottom-left-radius: .3rem;
}
.nv-msg--note .nv-bubble {
    background: var(--bs-warning-bg-subtle);
    border-color: var(--bs-warning-border-subtle);
}
.nv-msg--system .nv-bubble {
    max-width: 90%;
    background: transparent;
    border-style: dashed;
    font-size: .875rem;
    text-align: center;
}
.nv-bubble-meta {
    font-size: .75rem;
    color: var(--bs-secondary-color);
    margin-bottom: .25rem;
}
.nv-chat-new {
    position: absolute;
    left: 50%;
    bottom: .75rem;
    transform: translateX(-50%);
    z-index: 5;
}

/* v4.6.0: a mídia no balão (imagem, áudio, vídeo) e o envio com fila, prévia, arrastar e gravar áudio (chat.js). */
.nv-att-img { display: block; max-width: 100%; max-height: 240px; border-radius: .6rem; border: 1px solid var(--bs-border-color); cursor: zoom-in; object-fit: contain; background: var(--bs-body-bg); }
.nv-att-audio { display: block; width: min(320px, 100%); height: 40px; }
.nv-att-video { display: block; max-width: 100%; max-height: 320px; border-radius: .6rem; background: #000; }
.nv-att .small a { overflow-wrap: anywhere; }
.nv-chat-lightbox-img { max-height: 80vh; }
.nv-canned-menu { width: min(420px, 92vw); }
.nv-canned-list { max-height: 320px; overflow-y: auto; }
.nv-attach.nv-attach--drop { outline: 2px dashed var(--bs-primary); outline-offset: 4px; border-radius: .5rem; }
form.nv-attach-dropzone { transition: outline-color .15s; }
form.nv-attach-dropzone.nv-attach--drop { outline: 2px dashed var(--bs-primary); outline-offset: 4px; border-radius: .5rem; }
.nv-attach-item { display: flex; align-items: center; gap: .5rem; max-width: 100%; padding: .35rem .5rem; border: 1px solid var(--bs-border-color); border-radius: .6rem; background: var(--bs-tertiary-bg); }
.nv-attach-thumb { width: 44px; height: 44px; flex: 0 0 44px; border-radius: .4rem; object-fit: cover; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; background: var(--bs-body-bg); }
.nv-attach-name { max-width: 14rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .85rem; }
.nv-attach-recording { padding: .35rem .5rem; border-radius: .6rem; background: var(--bs-danger-bg-subtle); }
.nv-attach-dot { width: .7rem; height: .7rem; border-radius: 50%; background: var(--bs-danger); animation: nv-attach-pulse 1s ease-in-out infinite; }
@keyframes nv-attach-pulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .nv-attach-dot { animation: none; } }

/* ---------------------------------------------------------------------------
 * v4.9.0: a área do cliente com moldura (layouts/portal) e o Início em cards (portal/home).
 * O menu é o .nv-sidebar do admin (sempre escuro), com itens mais folgados; no celular, a barra de cima
 * (.nv-topbar) abre o mesmo menu, e a barra de baixo (.nv-portal-tabbar) traz os atalhos.
 * Os cards (.nv-tile) só leem as variáveis do tema: valem no claro e no escuro.
 * ------------------------------------------------------------------------- */
.nv-sidebar--portal .nv-sidebar__link { padding: .55rem .75rem; font-size: .95rem; }
.nv-sidebar--portal .nv-sidebar__body { padding-top: 1rem; }
@media (min-width: 992px) {
    .nv-sidebar--portal .nv-sidebar__link { padding: .55rem .75rem; font-size: .925rem; line-height: 1.35; }
    .nv-sidebar--portal .nv-sidebar__link .bi { font-size: 1.1rem; }
    .nv-sidebar--portal .nv-sidebar__list { gap: 2px; }
    .nv-sidebar--portal .nv-sidebar__head { padding: .85rem .9rem; }
    .nv-sidebar--portal .nv-sidebar__head .nv-logo { height: 30px; }
}
.nv-portal-account { padding: .9rem 1rem 1rem; border-top: 1px solid var(--nv-border); }
.nv-portal-account__name { font-weight: 600; font-size: .9rem; color: var(--bs-emphasis-color); overflow-wrap: anywhere; }
.nv-portal-account__doc { font-size: .8rem; color: var(--nv-muted); }

.nv-portal-main { max-width: 1200px; margin: 0 auto; padding: 1.5rem 1rem 6.5rem; display: flex; flex-direction: column; gap: 1.25rem; }
@media (min-width: 992px) { .nv-portal-main { padding: 2rem 2.5rem 3rem; } }
.nv-portal-narrow { max-width: 640px; }
.nv-account-facts dt { font-size: .8rem; font-weight: 600; color: var(--nv-muted); }
.nv-account-facts dd { margin-bottom: .6rem; }

.nv-portal-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.nv-portal-head__date { margin: 0 0 .25rem; font-size: .85rem; color: var(--nv-muted); }
.nv-portal-head > div:first-child { flex: 1 1 18rem; min-width: 0; }
.nv-portal-head__title { margin: 0; font-size: clamp(1.5rem, 1.2rem + 1vw, 1.85rem); font-weight: 700; letter-spacing: -.02em; color: var(--nv-strong); overflow-wrap: anywhere; }
.nv-portal-main > * { min-width: 0; }
.nv-tile__value--text, .nv-tile__meta { overflow-wrap: anywhere; }
.nv-portal-head__lead { margin: .25rem 0 0; color: var(--nv-muted); }
.nv-portal-head__actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.nv-portal-head__actions .btn { min-height: 44px; display: inline-flex; align-items: center; gap: .4rem; }

.nv-portal-alerts { display: flex; flex-direction: column; gap: .6rem; }
.nv-portal-alert { display: flex; align-items: center; gap: .75rem; margin: 0; }
.nv-portal-alert > .bi { font-size: 1.15rem; flex: 0 0 auto; }
.nv-portal-alert__text { flex: 1 1 auto; min-width: 0; }
.nv-portal-alert__action { flex: 0 0 auto; white-space: nowrap; }
@media (max-width: 575.98px) { .nv-portal-alert { flex-wrap: wrap; } .nv-portal-alert__text { flex-basis: calc(100% - 2rem); } }

.nv-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.nv-portal-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
@media (max-width: 991.98px) { .nv-portal-row { grid-template-columns: minmax(0, 1fr); } }
.nv-portal-stack { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }

.nv-tile { background: var(--nv-card); border: 1px solid var(--nv-border); border-radius: 14px; padding: 1.15rem 1.25rem; display: flex; flex-direction: column; gap: .5rem; min-width: 0; }
.nv-tile__top { display: flex; align-items: center; justify-content: space-between; gap: .5rem .75rem; flex-wrap: wrap; }
.nv-tile__label { margin: 0; font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--nv-muted); }
.nv-tile__title { margin: 0; font-size: 1rem; font-weight: 700; display: flex; align-items: center; gap: .6rem; color: var(--nv-strong); }
.nv-tile__icon { width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.nv-tile__value { margin: 0; font-size: 1.75rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; color: var(--nv-strong); }
.nv-tile__value--text { font-size: 1.2rem; letter-spacing: -.01em; }
.nv-tile__unit { font-size: 1rem; font-weight: 500; color: var(--nv-muted); letter-spacing: 0; }
.nv-tile__meta { margin: 0; font-size: .875rem; color: var(--nv-muted); }
.nv-tile__link { margin-top: auto; padding-top: .25rem; font-weight: 600; font-size: .9rem; }
.nv-tile .btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; }
.nv-quota { height: 8px; background: var(--nv-surface-hover); }
.nv-quota .progress-bar { background: var(--nv-primary); }

.nv-machines { --bs-table-bg: transparent; }
.nv-machines th { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--nv-muted); font-weight: 600; }
.nv-machines td { vertical-align: middle; white-space: nowrap; }
.nv-dot { display: inline-block; width: .5rem; height: .5rem; border-radius: 50%; margin-right: .45rem; vertical-align: middle; }
.nv-dot--on { background: var(--bs-success); }
.nv-dot--idle { background: var(--nv-primary); }
.nv-dot--off { background: var(--bs-danger); }

.nv-modules { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .5rem; }
.nv-modules__item { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .6rem .8rem; border: 1px solid var(--nv-border); border-radius: 10px; font-weight: 600; font-size: .9rem; }
.nv-news { margin: 0 0 .5rem; padding-left: 1.1rem; font-size: .9rem; }
.nv-news li + li { margin-top: .25rem; }

.nv-portal-tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--nv-nav-bg); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-top: 1px solid var(--nv-border); padding: .25rem .25rem calc(.35rem + env(safe-area-inset-bottom)); }
.nv-portal-tabbar__item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem; min-height: 52px; color: var(--nv-muted); text-decoration: none; font-size: .72rem; background: none; border: 0; padding: 0; }
.nv-portal-tabbar__item:hover { color: var(--nv-strong); }
.nv-portal-tabbar__item.active { color: var(--bs-link-color); font-weight: 600; }
.nv-portal-tabbar__item:focus-visible { outline: 2px solid var(--bs-link-color); outline-offset: -2px; border-radius: .5rem; }
.nv-portal-tabbar__icon { position: relative; font-size: 1.25rem; line-height: 1; }
.nv-portal-tabbar__dot { position: absolute; top: -.4rem; right: -.75rem; min-width: 1.1rem; height: 1.1rem; padding: 0 .25rem; border-radius: 999px; font-size: .65rem; font-weight: 700; line-height: 1.1rem; text-align: center; }

/* v4.9.1: Área do cliente › Terminais (portal/terminals): os cards de cada máquina e a faixa dos 30 dias de contato. */
.nv-tiles--compact { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.nv-machine { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem; }
.nv-machine__id { flex: 1 1 240px; display: flex; align-items: center; gap: .85rem; min-width: 0; }
.nv-machine__name { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.nv-machine__name .nv-tile__title { overflow-wrap: anywhere; }
.nv-machine__seen { flex: 0 1 140px; display: flex; flex-direction: column; gap: .15rem; }
.nv-machine__strip { flex: 1 1 280px; display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.nv-machine__actions { flex: 0 0 auto; display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.nv-machine__actions .btn { min-height: 38px; }
.nv-strip { display: grid; grid-template-columns: repeat(30, minmax(0, 1fr)); gap: 3px; }
.nv-strip__day { height: 18px; border-radius: 3px; background: var(--nv-surface-hover); }
.nv-strip__day.is-on { background: var(--nv-primary); }

/* v4.10.0: Área do cliente › Minha loja (portal/store): o seletor de período, a variação, as barras (sem script) e as linhas. */
.nv-segmented { display: inline-flex; flex-wrap: wrap; gap: .25rem; padding: .25rem; border-radius: 12px; background: var(--nv-card); border: 1px solid var(--nv-border); }
.nv-segmented__item { display: inline-flex; align-items: center; min-height: 40px; padding: 0 .9rem; border-radius: 9px; color: var(--nv-muted); text-decoration: none; font-size: .9rem; font-weight: 500; }
.nv-segmented__item:hover { color: var(--nv-strong); background: var(--nv-surface-hover); }
.nv-segmented__item.active { background: var(--nv-primary-strong); color: #FFFFFF; font-weight: 600; }
.nv-delta { display: inline-flex; align-items: center; gap: .2rem; font-weight: 600; font-size: .875rem; }
.nv-bars { display: flex; align-items: flex-end; gap: 4px; height: 200px; padding-bottom: 1.4rem; border-bottom: 1px solid var(--nv-border); position: relative; }
.nv-bars--short { height: 160px; }
.nv-bars__col { flex: 1 1 0; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; position: relative; }
.nv-bars__bar { display: block; width: 100%; background: var(--nv-primary-strong); border-radius: 4px 4px 0 0; }
.nv-bars__bar.is-current { background: var(--nv-primary); }
.nv-bars__bar.is-peak { background: var(--nv-secondary); }
[data-bs-theme=dark] .nv-bars__bar.is-peak { background: #A2E7E3; }
.nv-bars__label { position: absolute; left: 50%; bottom: -1.3rem; transform: translateX(-50%); font-size: .68rem; color: var(--nv-muted); white-space: nowrap; }
.nv-bars__col:hover .nv-bars__bar { filter: brightness(1.15); }
.nv-numbers summary { cursor: pointer; font-size: .875rem; color: var(--bs-link-color); margin-top: .5rem; }
.nv-hbars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .7rem; }
.nv-hbars__head { display: flex; justify-content: space-between; gap: .75rem; font-size: .9rem; margin-bottom: .25rem; }
.nv-hbars__track { height: 10px; border-radius: 999px; background: var(--nv-surface-hover); overflow: hidden; }
.nv-hbars__bar { display: block; height: 100%; border-radius: 999px; background: var(--nv-primary-strong); }
.nv-store-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1rem; align-items: start; }
.nv-store-empty { align-items: flex-start; max-width: 720px; }
.nv-wrap { white-space: normal !important; overflow-wrap: anywhere; }
@media (max-width: 575.98px) { .nv-bars__label { font-size: .6rem; } .nv-bars { gap: 2px; } }

/* ---------------------------------------------------------------------------
 * v4.11.0: o admin com o visual novo. A barra do topo ganha a busca de clientes (Ctrl K) e o sino de avisos (no HTML eles
 * vêm depois do "Sair"; a ordem visual é do CSS); a lista de clientes ganha os filtros em fichas e as linhas com a situação;
 * a ficha ganha o cabeçalho 360°, os cards e a Visão geral; o Dashboard, as tarefas e o "Atendimento agora".
 * ------------------------------------------------------------------------- */
.nv-mainbar__status { order: 0; }
.nv-mainbar__search { order: 1; flex: 1 1 280px; max-width: 460px; }
.nv-mainbar__bell { order: 2; margin-left: auto; }
.nv-mainbar__actions { order: 3; margin-left: 0; }
.nv-search { display: flex; align-items: center; gap: .5rem; min-height: 40px; margin: 0; padding: 0 .75rem; border-radius: 10px; border: 1px solid var(--nv-border); background: var(--nv-card); color: var(--nv-muted); }
.nv-search:focus-within { border-color: rgba(var(--nv-primary-rgb), .7); box-shadow: 0 0 0 .2rem rgba(var(--nv-primary-rgb), .18); }
.nv-search input { flex: 1 1 auto; min-width: 0; border: 0; background: transparent; color: var(--bs-body-color); font: inherit; font-size: .9rem; outline: none; }
.nv-search--top { min-height: 38px; }
.nv-search__kbd { font-size: .7rem; padding: .1rem .4rem; border-radius: 5px; border: 1px solid var(--nv-border); background: transparent; color: var(--nv-muted); }
.nv-bell { position: relative; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--nv-border); background: var(--nv-card); color: var(--bs-body-color); display: inline-flex; align-items: center; justify-content: center; }
.nv-bell:hover { border-color: rgba(var(--nv-primary-rgb), .6); }
.nv-bell__count { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: #F2B544; color: #0B2239; font-size: .68rem; font-weight: 700; line-height: 18px; text-align: center; }
.nv-bell__count.is-danger { background: #B4232A; color: #FFFFFF; }
.nv-bell__menu { min-width: 300px; padding: .4rem; }
.nv-bell__head { padding: .35rem .6rem .5rem; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--nv-muted); }
.nv-bell__empty { padding: .5rem .6rem; font-size: .875rem; }
.nv-bell__item { display: flex; align-items: center; gap: .6rem; border-radius: 8px; padding: .5rem .6rem; font-size: .9rem; white-space: normal; }
.nv-bell__dot { width: .55rem; height: .55rem; border-radius: 50%; flex: 0 0 auto; }
.nv-bell__dot--danger { background: #E5484D; }
.nv-bell__dot--warning { background: #F2B544; }
.nv-bell__dot--info { background: #3987E5; }
@media (max-width: 991.98px) { .nv-mainbar__search { order: 4; flex-basis: 100%; max-width: none; } .nv-mainbar__bell { margin-left: 0; } }

.nv-list-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.nv-list-tools .nv-search { flex: 1 1 260px; max-width: 360px; }
.nv-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.nv-chip { display: inline-flex; align-items: center; gap: .4rem; min-height: 36px; padding: 0 .8rem; border-radius: 999px; border: 1px solid var(--nv-border); color: var(--bs-body-color); text-decoration: none; font-size: .85rem; font-weight: 600; }
.nv-chip:hover { border-color: rgba(var(--nv-primary-rgb), .6); color: var(--bs-emphasis-color); }
.nv-chip.active { background: var(--nv-primary-strong); border-color: var(--nv-primary-strong); color: #FFFFFF; }
.nv-chip__count { font-size: .72rem; padding: .05rem .45rem; border-radius: 999px; background: var(--nv-surface-hover); }
.nv-chip.active .nv-chip__count { background: rgba(0, 0, 0, .28); color: #FFFFFF; }
.nv-clients-table { --bs-table-bg: transparent; }
.nv-clients-table th { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--nv-muted); font-weight: 600; padding-top: .9rem; padding-bottom: .9rem; }
.nv-clients-table td:first-child, .nv-clients-table th:first-child { padding-left: 1.1rem; }
.nv-clients-table td:last-child, .nv-clients-table th:last-child { padding-right: 1.1rem; }
.nv-client-cell { display: flex; align-items: center; gap: .75rem; color: var(--bs-body-color); text-decoration: none; min-width: 220px; }
.nv-client-cell:hover .fw-semibold { color: var(--bs-link-color); }
.nv-client-cell__text { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.nv-avatar { width: 36px; height: 36px; border-radius: 10px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .8rem; color: #0B2239; }
.nv-avatar--lg { width: 56px; height: 56px; border-radius: 14px; font-size: 1.2rem; }
.nv-avatar--teal { background: #5FD3CC; }
.nv-avatar--blue { background: #A9C8F5; }
.nv-avatar--amber { background: #F6C96B; }
.nv-avatar--green { background: #8FE0B5; }
.nv-avatar--rose { background: #F5A49C; }
.nv-avatar--violet { background: #C9B6F2; }
.nv-mini-quota { display: flex; flex-direction: column; gap: .25rem; width: 96px; }
.nv-mini-quota .nv-quota { height: 6px; }

.nv-client-head { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.25rem; padding: 1.1rem 1.25rem; }
.nv-client-head__main { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: .3rem; }
.nv-client-head__name { margin: 0; font-size: 1.35rem; font-weight: 700; letter-spacing: -.01em; overflow-wrap: anywhere; }
.nv-client-head__pills { display: flex; flex-wrap: wrap; gap: .35rem; }
.nv-client-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .75rem; }
.nv-tile--compact { padding: .85rem 1rem; gap: .25rem; }
.nv-tile--compact .nv-tile__value--text { font-size: 1.05rem; }
.nv-overview { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
@media (max-width: 991.98px) { .nv-overview { grid-template-columns: minmax(0, 1fr); } }
.nv-overview__side { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.nv-timeline { list-style: none; margin: 0; padding: 0; }
.nv-timeline__item { display: flex; align-items: flex-start; gap: .85rem; padding: .7rem 0; border-top: 1px solid var(--nv-border); }
.nv-timeline__item:first-child { border-top: 0; }
.nv-timeline__icon { width: 32px; height: 32px; border-radius: 9px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; }
.nv-timeline__body { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }

.nv-dash-top { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.nv-dash-top > .nv-card:only-child { grid-column: 1 / -1; }
@media (max-width: 991.98px) { .nv-dash-top { grid-template-columns: minmax(0, 1fr); } }
.nv-tasks { display: flex; flex-direction: column; }
.nv-task { display: flex; align-items: center; gap: .85rem; padding: .7rem 0; border-top: 1px solid var(--nv-border); }
.nv-task:first-child { border-top: 0; }
.nv-task__icon { width: 34px; height: 34px; border-radius: 10px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; font-size: 1rem; }
.nv-task__body { flex: 1 1 auto; min-width: 0; }
.nv-task__action { flex: 0 0 auto; white-space: nowrap; }
@media (max-width: 575.98px) { .nv-task { flex-wrap: wrap; } .nv-task__action { margin-left: calc(34px + .85rem); } }
.nv-queue { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.nv-queue__item { display: flex; flex-direction: column; gap: .1rem; padding: .75rem; border-radius: 10px; background: var(--nv-surface-hover); color: var(--bs-body-color); text-decoration: none; }
.nv-queue__item:hover { background: rgba(var(--nv-primary-rgb), .14); }
.nv-queue__n { font-size: 1.4rem; font-weight: 700; line-height: 1.2; }

/*
 * v4.13.0: o painel do atendimento com o visual novo (layouts/atendimento e as telas atendimento/*). A moldura é a do admin
 * (.nv-sidebar, .nv-mainbar, .nv-bell); aqui, o status do atendente, a fila, o chamado em três colunas e as métricas.
 */
.min-w-0 { min-width: 0; }
.nv-sidebar__count { background: rgba(255, 255, 255, .16); color: #FFFFFF; }
.nv-attend-account .nv-avatar { width: 34px; height: 34px; border-radius: 50%; }
.nv-attend-status { margin: 0; }
.nv-attend-status__btn { display: inline-flex; align-items: center; gap: .5rem; min-height: 40px; padding: 0 .9rem; border-radius: 999px; border: 1px solid var(--nv-border); background: transparent; color: var(--bs-emphasis-color); font-weight: 600; font-size: .9rem; }
.nv-attend-status__btn:hover { border-color: rgba(var(--nv-primary-rgb), .6); }
.nv-attend-status__dot { width: 10px; height: 10px; border-radius: 50%; background: #F2B544; flex: 0 0 auto; }
.nv-attend-status__btn.is-on .nv-attend-status__dot { background: #2E9E68; }
.nv-attend-status__action { font-weight: 500; font-size: .8rem; color: var(--nv-muted); padding-left: .5rem; border-left: 1px solid var(--nv-border); }
.nv-attend-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .75rem 1rem; margin-bottom: 1rem; }
.nv-attend-head__title { margin: 0; font-size: 1.5rem; font-weight: 700; letter-spacing: -.01em; }
.nv-attend-head__sub { color: var(--nv-muted); font-size: .9rem; }
.nv-attend-tiles { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: 1rem; }
.nv-attend-tile { color: var(--bs-body-color); text-decoration: none; }
.nv-attend-tile:hover { border-color: rgba(var(--nv-primary-rgb), .6); color: var(--bs-body-color); }
.nv-attend-tile.is-current { box-shadow: inset 0 0 0 1px rgba(var(--nv-primary-rgb), .8); }
.nv-attend-tile.is-danger { border-color: rgba(229, 72, 77, .55); }
.nv-attend-filters { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1rem; }
.nv-attend-filters .nv-chips { flex: 1 1 480px; }
.nv-attend-more { margin-top: .75rem; }
.nv-attend-more > summary { display: inline-block; cursor: pointer; font-size: .875rem; font-weight: 600; color: var(--bs-link-color); }
.nv-attend-more__q { width: 16rem; max-width: 100%; }
.nv-attend-table > thead th { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--nv-muted); white-space: nowrap; }
.nv-attend-table__subject { min-width: 260px; }
.nv-attend-table__link { color: var(--bs-emphasis-color); text-decoration: none; font-weight: 500; }
.nv-attend-table__link:hover { color: var(--bs-link-color); }
.nv-attend-table tr.is-unread .nv-attend-table__link { font-weight: 700; }
.nv-unread-dot { display: inline-block; width: 8px; height: 8px; margin-right: .45rem; border-radius: 50%; background: var(--nv-primary); vertical-align: middle; }
.btn-check:checked + .nv-segmented__item { background: var(--nv-primary-strong); color: #FFFFFF; font-weight: 600; }
.btn-check:checked + .nv-segmented__item--note { background: #8A5A00; color: #FFFFFF; }
.btn-check:focus-visible + .nv-segmented__item { outline: 2px solid var(--nv-primary); outline-offset: 2px; }
label.nv-segmented__item { margin: 0; cursor: pointer; }
.nv-ticket-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: .75rem 1.25rem; margin-bottom: 1rem; }
.nv-ticket-head__title { margin: 0 0 .4rem; font-size: 1.4rem; font-weight: 700; letter-spacing: -.01em; overflow-wrap: anywhere; }
.nv-ticket-head__actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.nv-ticket-head__actions form { margin: 0; }
.nv-ticket-head__actions .btn { min-height: 40px; display: inline-flex; align-items: center; gap: .4rem; }
.nv-ticket-grid { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); align-items: start; }
.nv-ticket-mine { display: none; padding: .75rem; }
.nv-ticket-mine__list { display: grid; gap: 2px; }
.nv-ticket-mine__item { display: flex; flex-direction: column; gap: .15rem; padding: .55rem .6rem; border-radius: 10px; color: var(--bs-body-color); text-decoration: none; border: 1px solid transparent; }
.nv-ticket-mine__item:hover { background: var(--nv-surface-hover); color: var(--bs-emphasis-color); }
.nv-ticket-mine__item.active { background: rgba(var(--nv-primary-rgb), .14); border-color: rgba(var(--nv-primary-rgb), .45); }
.nv-ticket-mine__subject { font-size: .85rem; overflow-wrap: anywhere; }
.nv-ticket-mine__meta { display: flex; justify-content: space-between; gap: .5rem; font-size: .75rem; color: var(--nv-muted); min-width: 0; }
.nv-ticket-side { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.nv-ticket-side__h { margin: .75rem 0 .3rem; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--nv-muted); }
.nv-ticket-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.nv-ticket-tile { display: flex; flex-direction: column; gap: .1rem; padding: .5rem .6rem; border-radius: 10px; background: var(--nv-surface-hover); min-width: 0; }
.nv-ticket-tile__label { font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--nv-muted); }
.nv-ticket-tile__value { font-size: .9rem; font-weight: 700; overflow-wrap: anywhere; }
.nv-ticket-erp { border-color: rgba(90, 150, 230, .45); }
.nv-ticket-terminals li { display: flex; align-items: baseline; gap: .4rem; padding: .15rem 0; }
.nv-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--nv-muted); flex: 0 0 auto; }
.nv-dot--ok { background: #2E9E68; }
.nv-composer__as-note { display: none; }
.nv-composer:has(#interna:checked) .nv-composer__as-note { display: inline; }
.nv-composer:has(#interna:checked) .nv-composer__as-reply { display: none; }
.nv-composer:has(#interna:checked) textarea { border-style: dashed; border-color: #C98A00; background: rgba(242, 181, 68, .06); }
@media (min-width: 992px) {
    .nv-ticket-grid { grid-template-columns: minmax(0, 1fr) 320px; }
}
@media (min-width: 1400px) {
    .nv-ticket-grid { grid-template-columns: 240px minmax(0, 1fr) 330px; }
    .nv-ticket-mine { display: block; position: sticky; top: 76px; }
}
.nv-attend-metric-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .5rem .75rem; }
.nv-attend-metric-filters label { display: flex; flex-direction: column; gap: .2rem; margin: 0; }
.nv-attend-kpis { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.nv-attend-metric-grid { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 992px) { .nv-attend-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.nv-attend-metric-grid__wide { grid-column: 1 / -1; }
.nv-chart { display: flex; gap: .5rem; height: 200px; }
.nv-chart__axis { display: flex; flex-direction: column; justify-content: space-between; width: 2.6rem; flex: 0 0 auto; margin: -.45em 0; font-size: .72rem; color: var(--nv-muted); text-align: right; }
.nv-chart__plot { position: relative; flex: 1 1 auto; border-bottom: 1px solid var(--nv-border); }
.nv-chart__grid { position: absolute; inset: 0; border-top: 1px solid var(--nv-border); background: linear-gradient(var(--nv-border), var(--nv-border)) 0 50% / 100% 1px no-repeat; pointer-events: none; }
.nv-chart__target { position: absolute; left: 0; right: 0; border-top: 2px dashed #C98A00; z-index: 1; pointer-events: none; }
.nv-chart__bars { position: absolute; inset: 0; display: flex; align-items: flex-end; gap: 6px; padding: 0 2px; }
.nv-chart__bars.is-dense { gap: 2px; }
.nv-chart__slot { flex: 1 1 0; height: 100%; min-width: 0; display: flex; align-items: flex-end; }
.nv-chart__bar { display: block; width: 100%; background: var(--nv-primary); border-radius: 4px 4px 0 0; }
.nv-chart__slot:hover .nv-chart__bar { background: var(--nv-primary-strong); }
.nv-chart__bar.is-empty { background: var(--nv-border); }
.nv-chart__labels { display: flex; justify-content: space-between; margin-top: .35rem; padding-left: 3.1rem; font-size: .72rem; color: var(--nv-muted); }
.nv-dist { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr) 5.5rem; align-items: center; gap: .5rem; margin: .3rem 0; font-size: .85rem; }
.nv-dist__track { display: block; height: 10px; border-radius: 4px; background: var(--nv-surface-hover); overflow: hidden; }
.nv-dist__fill { display: block; height: 100%; border-radius: 4px; background: var(--nv-primary); }
.nv-dist__value { text-align: right; font-variant-numeric: tabular-nums; }
.nv-reviews__item { padding: .6rem 0; border-top: 1px solid var(--nv-border); }
.nv-reviews__item:first-child { border-top: 0; padding-top: 0; }
.nv-bar-cell { display: inline-flex; align-items: center; gap: .5rem; white-space: nowrap; }
.nv-bar-cell__track { display: inline-block; width: 72px; height: 8px; border-radius: 4px; background: var(--nv-surface-hover); overflow: hidden; }
.nv-bar-cell__fill { display: block; height: 100%; background: var(--nv-primary); }
.nv-ticket-mine { min-width: 0; overflow: hidden; }
.nv-ticket-mine__item > * { min-width: 0; }
.nv-ticket-mine__meta > .text-truncate { min-width: 0; }
.nv-attend-kpis { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
@media (max-width: 575.98px) {
    .nv-attend .nv-mainbar__actions { width: auto; margin-left: auto; }
}
