/* NotifyHub - estilos das telas do plugin.
   Usa as variáveis do Tabler/GLPI 11 (--tblr-*) para seguir os temas claro e escuro. */

.nh-page {
   --nh-surface: var(--tblr-bg-surface, #fff);
   --nh-surface-2: var(--tblr-bg-surface-secondary, #f6f8fb);
   --nh-border: var(--tblr-border-color, #e6e8ec);
   --nh-text: var(--tblr-body-color, #1d273b);
   --nh-muted: var(--tblr-secondary, #667382);
   --nh-primary: var(--tblr-primary, #206bc4);
   --nh-radius: 14px;
   --nh-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 2px 8px rgba(16, 24, 40, .04);
   max-width: 1440px;
   margin: 0 auto;
   padding: 1rem 1rem 3rem;
   color: var(--nh-text);
}

/* Relatórios: contexto, decisão, indicadores e detalhamento em uma sequência estável. */
.nh-executive { border-inline-start: 4px solid var(--nh-primary); background: linear-gradient(110deg, color-mix(in srgb, var(--nh-primary) 6%, var(--nh-surface)), var(--nh-surface)); }
.nh-executive .nh-prod-headline { margin: 0 0 .8rem; font-size: 1.05rem; line-height: 1.7; }
.nh-rating-report .nh-kpi { border-top: 3px solid var(--nh-c); align-items: flex-start; min-height: 112px; }
.nh-rating-report .nh-kpi__value { color: var(--nh-c); font-size: clamp(1.5rem, 2.5vw, 2rem); margin-bottom: .6rem; }
.nh-rating-report .nh-card__title { margin-bottom: 1rem; }
.nh-rating-dist { display: grid; grid-template-columns: 65px minmax(80px,1fr) minmax(150px,220px); gap: 16px; align-items: center; margin: 14px 0; font-variant-numeric: tabular-nums; }
.nh-rating-dist meter { width: 100%; height: 24px; accent-color: var(--nh-primary); }
.nh-rating-feedback { white-space: pre-line; overflow-wrap: anywhere; max-width: 420px; }
@media(max-width:600px) { .nh-rating-dist { grid-template-columns: 50px 1fr; } .nh-rating-dist span { grid-column: 2; } .nh-executive .nh-card__head { flex-wrap: wrap; } }
@media print { .nh-rating-report form, .nh-rating-report nav { display: none!important; } .nh-rating-report .nh-card, .nh-executive { break-inside: avoid; box-shadow: none; } }

/* Paleta: cada .nh-c-* define --nh-c, usado por ícones, badges e destaques. */
.nh-page .nh-c-primary { --nh-c: var(--nh-primary); }
.nh-page .nh-c-blue { --nh-c: #206bc4; }
.nh-page .nh-c-azure { --nh-c: #2a8bd8; }
.nh-page .nh-c-indigo { --nh-c: #4263eb; }
.nh-page .nh-c-purple { --nh-c: #ae3ec9; }
.nh-page .nh-c-green { --nh-c: #2fb344; }
.nh-page .nh-c-teal { --nh-c: #0ca678; }
.nh-page .nh-c-cyan { --nh-c: #17a2b8; }
.nh-page .nh-c-yellow { --nh-c: #e8a100; }
.nh-page .nh-c-orange { --nh-c: #f76707; }
.nh-page .nh-c-red { --nh-c: #d63939; }
.nh-page .nh-c-secondary { --nh-c: #8592a3; }

/* ---------- Cabeçalho e navegação ---------- */
.nh-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.nh-header__title { display: flex; align-items: center; gap: .9rem; min-width: 0; }
.nh-header__actions { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.nh-logo {
   display: inline-grid; place-items: center; width: 48px; height: 48px; flex: none; border-radius: 14px;
   background: linear-gradient(135deg, var(--nh-primary), #7c3aed); color: #fff; font-size: 1.5rem;
   box-shadow: 0 6px 16px color-mix(in srgb, var(--nh-primary) 35%, transparent);
}
.nh-eyebrow { font-size: .75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--nh-primary); }
.nh-eyebrow span { color: var(--nh-muted); font-weight: 500; }
.nh-h1 { font-size: 1.5rem; font-weight: 700; margin: .1rem 0; line-height: 1.2; }
.nh-sub { margin: 0; color: var(--nh-muted); }

.nh-status {
   display: inline-flex; align-items: center; gap: .45rem; padding: .4rem .75rem; border-radius: 999px;
   font-size: .85rem; font-weight: 600; text-decoration: none; border: 1px solid var(--nh-border); background: var(--nh-surface);
}
.nh-status__dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.nh-status.is-on { color: #2fb344; }
.nh-status.is-on .nh-status__dot { box-shadow: 0 0 0 4px color-mix(in srgb, #2fb344 20%, transparent); }
.nh-status.is-off { color: var(--nh-muted); }

.nh-tabs {
   display: flex; gap: .25rem; overflow-x: auto; margin-bottom: 1.25rem; padding: .3rem;
   background: var(--nh-surface); border: 1px solid var(--nh-border); border-radius: 12px; scrollbar-width: thin;
}
.nh-tab {
   display: inline-flex; align-items: center; gap: .45rem; padding: .5rem .85rem; border-radius: 9px;
   color: var(--nh-muted); text-decoration: none; font-weight: 500; white-space: nowrap;
}
.nh-tab:hover { background: var(--nh-surface-2); color: var(--nh-text); }
.nh-tab.is-active { background: color-mix(in srgb, var(--nh-primary) 12%, transparent); color: var(--nh-primary); font-weight: 600; }

/* ---------- Cartões e grades ---------- */
.nh-card {
   background: var(--nh-surface); border: 1px solid var(--nh-border); border-radius: var(--nh-radius);
   box-shadow: var(--nh-shadow); padding: 1.15rem 1.25rem; margin-bottom: 1rem;
}
.nh-card--flush { padding: 0; overflow: hidden; }
.nh-card--flush > .nh-card__head { padding: 1rem 1.25rem 0; }
.nh-card__head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .9rem; }
.nh-card__title { display: flex; align-items: center; gap: .5rem; font-size: 1rem; font-weight: 600; margin: 0; }
.nh-card__title > .ti { color: var(--nh-muted); }
.nh-link { font-size: .85rem; font-weight: 500; text-decoration: none; white-space: nowrap; }

.nh-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.nh-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.nh-grid-2 > .nh-card, .nh-grid-3 > .nh-card { margin-bottom: 0; }
.nh-grid-2, .nh-grid-3 { margin-bottom: 1rem; }

.nh-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1rem; align-items: start; }
.nh-sticky { position: sticky; top: 1rem; }

/* ---------- KPIs e estatísticas ---------- */
.nh-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.nh-kpi {
   display: flex; align-items: center; gap: .85rem; padding: 1rem 1.1rem; border-radius: var(--nh-radius);
   background: var(--nh-surface); border: 1px solid var(--nh-border); box-shadow: var(--nh-shadow);
}
.nh-kpi__icon {
   display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 12px; font-size: 1.35rem;
   color: var(--nh-c); background: color-mix(in srgb, var(--nh-c) 13%, transparent);
}
.nh-kpi__value { font-size: 1.6rem; font-weight: 700; line-height: 1.1; }
.nh-kpi__label { font-size: .85rem; color: var(--nh-muted); }

.nh-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.nh-stat {
   display: flex; flex-direction: column; padding: .7rem .8rem; border-radius: 10px; text-decoration: none; color: var(--nh-text);
   background: color-mix(in srgb, var(--nh-c) 8%, transparent); border: 1px solid color-mix(in srgb, var(--nh-c) 18%, transparent);
}
.nh-stat strong { font-size: 1.35rem; color: var(--nh-c); line-height: 1.1; }
.nh-stat span { font-size: .8rem; color: var(--nh-muted); }
.nh-stat:hover { border-color: var(--nh-c); }

/* ---------- Primeiros passos ---------- */
.nh-onboarding { border-color: color-mix(in srgb, var(--nh-primary) 35%, var(--nh-border)); }
.nh-progress { width: 160px; height: 8px; border-radius: 99px; background: var(--nh-surface-2); overflow: hidden; }
.nh-progress span { display: block; height: 100%; background: var(--nh-primary); border-radius: inherit; }
.nh-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: .5rem; }
.nh-steps li { display: flex; align-items: center; gap: .5rem; padding: .6rem .75rem; border-radius: 10px; background: var(--nh-surface-2); }
.nh-steps li .ti { font-size: 1.2rem; color: var(--nh-muted); }
.nh-steps li.is-done { color: var(--nh-muted); }
.nh-steps li.is-done .ti { color: #2fb344; }
.nh-steps a { font-weight: 600; text-decoration: none; }

/* ---------- Listas ---------- */
.nh-rows { list-style: none; margin: 0; padding: 0; }
.nh-rows li { display: flex; align-items: center; gap: .65rem; padding: .5rem 0; border-bottom: 1px solid var(--nh-border); }
.nh-rows li:last-child { border-bottom: 0; }
.nh-rows__main { display: flex; flex-direction: column; flex: 1; min-width: 0; font-weight: 500; text-decoration: none; color: inherit; }
.nh-rows__main small { color: var(--nh-muted); font-weight: 400; }
.nh-lines { list-style: none; margin: 0; padding: 0; }
.nh-lines li { padding: .45rem .1rem; border-bottom: 1px dashed var(--nh-border); }
.nh-lines li:last-child { border-bottom: 0; }

/* ---------- Ícones de canal, badges, pills ---------- */
.nh-chan {
   display: inline-grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 9px; font-size: 1.05rem;
   color: var(--nh-c, #8592a3); background: color-mix(in srgb, var(--nh-c, #8592a3) 14%, transparent);
}
.nh-chan--lg { width: 42px; height: 42px; border-radius: 12px; font-size: 1.4rem; }
.nh-badge {
   display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .55rem; border-radius: 999px; white-space: nowrap;
   font-size: .75rem; font-weight: 600; color: var(--nh-c); background: color-mix(in srgb, var(--nh-c) 14%, transparent);
}
.nh-filters { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.nh-filters__select { width: auto; margin-left: auto; }
.nh-pill {
   display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .75rem; border-radius: 999px; text-decoration: none;
   font-size: .85rem; font-weight: 500; color: var(--nh-muted); background: var(--nh-surface); border: 1px solid var(--nh-border);
}
.nh-pill > span { padding: 0 .4rem; border-radius: 99px; font-size: .75rem; background: var(--nh-surface-2); }
.nh-pill:hover { color: var(--nh-text); }
.nh-pill.is-active { color: var(--nh-c, var(--nh-primary)); border-color: var(--nh-c, var(--nh-primary)); background: color-mix(in srgb, var(--nh-c, var(--nh-primary)) 10%, transparent); }

/* ---------- Destinos ---------- */
.nh-dest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1rem; }
.nh-dest {
   display: flex; flex-direction: column; gap: .8rem; padding: 1rem 1.1rem; text-decoration: none; color: inherit;
   background: var(--nh-surface); border: 1px solid var(--nh-border); border-radius: var(--nh-radius); box-shadow: var(--nh-shadow);
   transition: border-color .15s, transform .15s;
}
.nh-dest { position: relative; }
.nh-dest:hover { border-color: var(--nh-primary); transform: translateY(-1px); color: inherit; }
/* O link do nome cobre o cartão inteiro; o botão de teste fica por cima. */
.nh-dest__link { color: inherit; text-decoration: none; }
.nh-dest__link::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
.nh-dest__foot { align-items: center; }
.nh-dest__foot form { position: relative; z-index: 1; }
.nh-dest__action { padding: .15rem .5rem; }
.nh-dest.is-inactive { opacity: .65; }
.nh-dest__top { display: flex; align-items: center; gap: .75rem; }
.nh-dest__name { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.nh-dest__name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nh-dest__name span { font-size: .8rem; color: var(--nh-muted); }
.nh-dest__recipient { display: flex; align-items: center; gap: .45rem; padding: .5rem .65rem; border-radius: 9px; background: var(--nh-surface-2); min-width: 0; }
.nh-dest__kind { font-size: .8rem; font-weight: 600; color: var(--nh-muted); }
.nh-dest__recipient code { background: none; padding: 0; color: var(--nh-text); }
.nh-dest__foot { display: flex; justify-content: space-between; gap: .5rem; font-size: .8rem; color: var(--nh-muted); }
.nh-warn { color: #e8a100; font-weight: 600; }
.nh-quickstart { display: flex; justify-content: center; flex-wrap: wrap; gap: .6rem; padding: 0 1rem 1.5rem; }
.nh-quick {
   display: inline-flex; align-items: center; gap: .5rem; padding: .6rem 1rem; border-radius: 12px; text-decoration: none; font-weight: 600;
   color: var(--nh-c); background: color-mix(in srgb, var(--nh-c) 10%, transparent); border: 1px solid color-mix(in srgb, var(--nh-c) 25%, transparent);
}
.nh-quick .ti { font-size: 1.25rem; }
.nh-quick:hover { border-color: var(--nh-c); color: var(--nh-c); }

/* ---------- Escolhas em cartão (canal, tipo de regra) ---------- */
.nh-step {
   display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-size: .8rem; font-weight: 700;
   color: #fff; background: var(--nh-primary);
}
.nh-choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); gap: .6rem; }
.nh-choice-grid--compact { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-bottom: .9rem; }
.nh-choice { position: relative; margin: 0; cursor: pointer; --nh-c: var(--nh-primary); }
.nh-choice input { position: absolute; opacity: 0; pointer-events: none; }
.nh-choice__box {
   position: relative; display: flex; flex-direction: column; align-items: center; gap: .25rem; height: 100%; padding: .9rem .6rem;
   text-align: center; border: 1.5px solid var(--nh-border); border-radius: 12px; background: var(--nh-surface); transition: all .15s;
}
.nh-choice__box--row { flex-direction: row; text-align: left; gap: .6rem; padding: .65rem .8rem; }
.nh-choice__icon { font-size: 1.6rem; color: var(--nh-c); }
.nh-choice__box--row .nh-choice__icon { font-size: 1.25rem; }
.nh-choice__label { font-weight: 600; }
.nh-choice__meta { font-size: .75rem; color: var(--nh-muted); }
.nh-choice__flag { position: absolute; top: .4rem; right: .5rem; color: #e8a100; font-size: .9rem; }
.nh-choice:hover .nh-choice__box { border-color: color-mix(in srgb, var(--nh-c) 50%, var(--nh-border)); }
.nh-choice input:checked + .nh-choice__box {
   border-color: var(--nh-c); background: color-mix(in srgb, var(--nh-c) 8%, var(--nh-surface));
   box-shadow: 0 0 0 3px color-mix(in srgb, var(--nh-c) 18%, transparent);
}
.nh-choice input:focus-visible + .nh-choice__box { outline: 2px solid var(--nh-c); outline-offset: 2px; }
.nh-group-label { font-size: .75rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--nh-muted); margin: .25rem 0 .5rem; }

.nh-seg { margin-bottom: 1rem; flex-wrap: wrap; }
.nh-seg .btn { display: inline-flex; align-items: center; gap: .35rem; }

/* ---------- Formulários ---------- */
.nh-main .form-label { font-weight: 600; }
.nh-page .form-hint { margin-top: .35rem; font-size: .82rem; color: var(--nh-muted); }
.nh-mono { font-family: var(--tblr-font-monospace, ui-monospace, SFMono-Regular, Menlo, monospace); }
.nh-inline { display: inline-flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.nh-muted { color: var(--nh-muted); }
.nh-nowrap { white-space: nowrap; }
.nh-ellipsis { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.nh-page .btn .ti + span { margin-left: .35rem; }
.nh-page .btn.is-busy { opacity: .7; pointer-events: none; }
.nh-page .btn.is-busy .ti { animation: nh-spin 1s linear infinite; }
@keyframes nh-spin { to { transform: rotate(360deg); } }

.nh-recipient {
   display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-top: 1.1rem; padding: .65rem .8rem; border-radius: 10px;
   background: var(--nh-surface-2); border: 1px dashed var(--nh-border); font-size: .85rem; color: var(--nh-muted);
}
.nh-recipient code { font-size: .9rem; color: var(--nh-text); background: none; padding: 0; word-break: break-all; }

.nh-result { display: block; margin-top: .6rem; padding: .5rem .7rem; border-radius: 9px; font-size: .85rem; background: var(--nh-surface-2); }
.nh-inline .nh-result { margin-top: 0; }
.nh-result--success { color: #2b8a3e; background: color-mix(in srgb, #2fb344 12%, transparent); }
.nh-result--warning { color: #b07800; background: color-mix(in srgb, #e8a100 14%, transparent); }
.nh-result--danger { color: #c92a2a; background: color-mix(in srgb, #d63939 12%, transparent); }
.nh-result--muted { color: var(--nh-muted); }

.nh-picker { margin-top: .6rem; border: 1px solid var(--nh-border); border-radius: 12px; padding: .5rem; background: var(--nh-surface-2); }
.nh-picker__list { display: flex; flex-direction: column; gap: .3rem; max-height: 280px; overflow-y: auto; margin-top: .5rem; }
.nh-picker__item {
   display: flex; align-items: center; gap: .65rem; width: 100%; padding: .5rem .65rem; text-align: left; cursor: pointer;
   border: 1px solid transparent; border-radius: 9px; background: var(--nh-surface); color: inherit;
}
.nh-picker__item > .ti:first-child { font-size: 1.2rem; color: var(--nh-muted); }
.nh-picker__item span { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.nh-picker__item small { color: var(--nh-muted); font-family: var(--tblr-font-monospace, monospace); font-size: .75rem; overflow: hidden; text-overflow: ellipsis; }
.nh-picker__tick { visibility: hidden; color: var(--nh-primary); }
.nh-picker__item:hover { border-color: var(--nh-border); }
.nh-picker__item.is-selected { border-color: var(--nh-primary); }
.nh-picker__item.is-selected .nh-picker__tick { visibility: visible; }
.nh-picker__empty { padding: .75rem; text-align: center; color: var(--nh-muted); }

.nh-callout { display: flex; gap: .6rem; margin-top: .8rem; padding: .7rem .85rem; border-radius: 10px; font-size: .88rem; }
.nh-callout > .ti { font-size: 1.2rem; flex: none; }
.nh-callout--warning { background: color-mix(in srgb, #e8a100 12%, transparent); color: #9a6a00; }
.nh-callout--info { background: color-mix(in srgb, var(--nh-primary) 9%, transparent); }
.nh-callout--success { background: color-mix(in srgb, #2fb344 12%, transparent); }
.nh-callout--danger { background: color-mix(in srgb, #d63939 11%, transparent); color: #a52a2a; } /* 1.46.2: diagnóstico do webhook */
.nh-template-banner { align-items: flex-start; }
.nh-banner-actions { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .45rem; }
.nh-audience { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: .6rem; margin-bottom: .9rem; }
.nh-audience__opt { position: relative; margin: 0; cursor: pointer; }
.nh-audience__opt input { position: absolute; opacity: 0; pointer-events: none; }
.nh-audience__box {
   display: flex; gap: .7rem; align-items: flex-start; height: 100%; padding: .8rem .9rem; border-radius: 12px;
   border: 1.5px solid var(--nh-border); background: var(--nh-surface); transition: all .15s;
}
.nh-audience__box > span { display: flex; flex-direction: column; flex: 1; }
.nh-audience__box small { color: var(--nh-muted); font-size: .8rem; margin-top: .15rem; }
.nh-audience__icon { font-size: 1.4rem; color: var(--nh-muted); }
.nh-audience__tick { font-size: 1.2rem; color: var(--nh-primary); visibility: hidden; }
.nh-audience__opt input:checked + .nh-audience__box { border-color: var(--nh-primary); background: color-mix(in srgb, var(--nh-primary) 6%, var(--nh-surface)); }
.nh-audience__opt input:checked + .nh-audience__box .nh-audience__icon { color: var(--nh-primary); }
.nh-audience__opt input:checked + .nh-audience__box .nh-audience__tick { visibility: visible; }
.nh-audience__opt input:focus-visible + .nh-audience__box { outline: 2px solid var(--nh-primary); outline-offset: 2px; }
.nh-direct { padding: .8rem .9rem; border-radius: 12px; margin-bottom: .6rem; background: color-mix(in srgb, #2fb344 6%, var(--nh-surface)); border: 1px solid color-mix(in srgb, #2fb344 25%, var(--nh-border)); }
.nh-direct__head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .4rem; }
.nh-tech-option { padding: .7rem .85rem; border-radius: 12px; background: color-mix(in srgb, #2fb344 7%, var(--nh-surface)); border: 1px solid color-mix(in srgb, #2fb344 25%, var(--nh-border)); }

.nh-checks { display: flex; flex-wrap: wrap; gap: .4rem; }
.nh-check { margin: 0; cursor: pointer; }
.nh-check input { position: absolute; opacity: 0; pointer-events: none; }
.nh-check span {
   display: inline-block; padding: .3rem .7rem; border-radius: 999px; font-size: .82rem; border: 1px solid var(--nh-border);
   background: var(--nh-surface); user-select: none;
}
.nh-check input:checked + span { border-color: var(--nh-primary); color: var(--nh-primary); background: color-mix(in srgb, var(--nh-primary) 10%, transparent); font-weight: 600; }
.nh-check input:focus-visible + span { outline: 2px solid var(--nh-primary); outline-offset: 2px; }

.nh-switch { margin-bottom: .6rem; }
.nh-switch .form-check-label { font-weight: 600; }
.nh-switch small { display: block; font-weight: 400; color: var(--nh-muted); }

/* Campos do GLPI (entidade, grupo, técnico) dentro da grade. */
.nh-glpi-fields > .form-field { margin-bottom: 0; }

/* ---------- Editor de mensagem e pré-visualização ---------- */
.nh-editor { font-family: var(--tblr-font-monospace, ui-monospace, monospace); font-size: .88rem; line-height: 1.5; }
.nh-editor-foot { display: flex; justify-content: space-between; margin: .5rem 0 .35rem; font-size: .8rem; }
.nh-counter { color: var(--nh-muted); }
.nh-counter.is-over { color: #d63939; font-weight: 600; }
.nh-chips { display: flex; flex-wrap: wrap; gap: .3rem; }
.nh-chip {
   padding: .15rem .5rem; border-radius: 6px; font-size: .75rem; cursor: pointer; font-family: var(--tblr-font-monospace, monospace);
   border: 1px solid var(--nh-border); background: var(--nh-surface-2); color: var(--nh-text);
}
.nh-chip:hover { border-color: var(--nh-primary); color: var(--nh-primary); }

.nh-preview { padding: 1rem; border-radius: 12px; background: var(--nh-surface-2); min-height: 140px; }
.nh-preview[data-channel="waha"] { background: #e7ded3 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Ccircle cx='2' cy='2' r='1' fill='%23d6cabb'/%3E%3C/svg%3E"); }
.nh-preview[data-channel="telegram"] { background: linear-gradient(160deg, #a8d5a2, #7fb5d6); }
.nh-bubble {
   position: relative; max-width: 100%; padding: .6rem .75rem; border-radius: 10px; white-space: pre-wrap; word-break: break-word;
   font-size: .88rem; line-height: 1.45; background: var(--nh-surface); color: var(--nh-text); box-shadow: 0 1px 1px rgba(0, 0, 0, .08);
}
.nh-preview[data-channel="waha"] .nh-bubble { background: #d9fdd3; color: #111b21; border-top-right-radius: 2px; margin-left: 1.25rem; }
.nh-preview[data-channel="telegram"] .nh-bubble { background: #effdde; color: #0f1419; border-bottom-right-radius: 2px; margin-left: 1.25rem; }
.nh-preview__subject { font-weight: 700; padding-bottom: .5rem; margin-bottom: .5rem; border-bottom: 1px solid var(--nh-border); }

/* ---------- Vários destinos por regra ---------- */
.nh-dest-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .5rem; }
.nh-dest-pick { position: relative; margin: 0; cursor: pointer; }
.nh-dest-pick input { position: absolute; opacity: 0; pointer-events: none; }
.nh-dest-pick__box {
   display: flex; align-items: center; gap: .65rem; height: 100%; padding: .6rem .75rem; border-radius: 12px;
   border: 1.5px solid var(--nh-border); background: var(--nh-surface); transition: all .15s;
}
.nh-dest-pick__icon { font-size: 1.35rem; color: var(--nh-c); }
.nh-dest-pick__text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.nh-dest-pick__text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nh-dest-pick__text small { color: var(--nh-muted); font-size: .75rem; }
.nh-dest-pick__tick { color: var(--nh-c); font-size: 1.2rem; visibility: hidden; }
.nh-dest-pick:hover .nh-dest-pick__box { border-color: color-mix(in srgb, var(--nh-c) 50%, var(--nh-border)); }
.nh-dest-pick input:checked + .nh-dest-pick__box { border-color: var(--nh-c); background: color-mix(in srgb, var(--nh-c) 7%, var(--nh-surface)); }
.nh-dest-pick input:checked + .nh-dest-pick__box .nh-dest-pick__tick { visibility: visible; }
.nh-dest-pick input:focus-visible + .nh-dest-pick__box { outline: 2px solid var(--nh-c); outline-offset: 2px; }
.nh-dest-pick.is-inactive { opacity: .6; }
.nh-chan-stack { display: inline-flex; }
.nh-chan-stack .nh-chan { box-shadow: 0 0 0 2px var(--nh-surface); }
.nh-chan-stack .nh-chan + .nh-chan { margin-left: -8px; }

.nh-preview-tabs { display: flex; gap: .25rem; margin-bottom: .6rem; flex-wrap: wrap; }
.nh-preview-tab {
   padding: .25rem .7rem; border-radius: 999px; font-size: .8rem; font-weight: 500; cursor: pointer;
   border: 1px solid var(--nh-border); background: var(--nh-surface); color: var(--nh-muted);
}
.nh-preview-tab.is-active { border-color: var(--nh-primary); color: var(--nh-primary); background: color-mix(in srgb, var(--nh-primary) 10%, transparent); }
.nh-chart-preview { margin: .75rem 0 0; }
.nh-chart-preview img { display: block; width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--nh-border); background: #fff; }
.nh-chart-preview figcaption { font-size: .75rem; margin-top: .3rem; }
.nh-preview[data-channel="waha"] .nh-chart-preview, .nh-preview[data-channel="telegram"] .nh-chart-preview { margin-left: 1.25rem; }

/* ---------- Regras ---------- */
.nh-rule-list { list-style: none; margin: 0; padding: 0; }
.nh-rule { display: grid; grid-template-columns: auto minmax(0, 1.6fr) minmax(0, 1fr) auto auto auto; align-items: center; gap: .9rem; padding: .8rem 1.25rem; border-top: 1px solid var(--nh-border); }
.nh-rule__actions { display: inline-flex; gap: .25rem; }
.nh-rule__actions form { margin: 0; }

/* Biblioteca de modelos (prontos e salvos): compacta e recolhível */
.nh-library { padding: 0; }
.nh-library__summary { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .25rem 1rem; padding: .9rem 1.25rem; cursor: pointer; list-style: none; }
.nh-library__summary::-webkit-details-marker { display: none; }
.nh-library__summary::before { content: "▸"; color: var(--nh-muted); margin-right: .25rem; transition: transform .15s; }
.nh-library[open] .nh-library__summary::before { transform: rotate(90deg); }
.nh-library__group { min-width: 0; }
.nh-library__groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: .25rem 1.25rem; padding: 0 1.25rem .75rem; border-top: 1px solid var(--nh-border); }
.nh-library__list { list-style: none; margin: 0 0 .5rem; padding: 0; }
.nh-library__item { display: flex; align-items: center; gap: .6rem; padding: .45rem 0; border-bottom: 1px solid var(--nh-border); }
.nh-library__item:last-child { border-bottom: 0; }
.nh-library__item form { margin: 0; }
.nh-library__icon { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: var(--nh-surface-2); color: var(--nh-primary); }
.nh-library__text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.nh-library__text strong { font-size: .9rem; }
.nh-library__text small { color: var(--nh-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.nh-icon-btn { width: 34px; height: 34px; padding: 0; display: inline-grid; place-items: center; border-radius: 9px; }
.nh-icon-btn .ti { font-size: 1.15rem; }
.nh-test .d-grid .btn { justify-content: center; display: inline-flex; align-items: center; }
.nh-rule__icon {
   display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; font-size: 1.2rem;
   color: var(--nh-muted); background: var(--nh-surface-2);
}
.nh-rule.is-active .nh-rule__icon { color: var(--nh-primary); background: color-mix(in srgb, var(--nh-primary) 12%, transparent); }
.nh-rule__main { display: flex; flex-direction: column; min-width: 0; text-decoration: none; color: inherit; }
.nh-rule__main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nh-rule__main span { font-size: .82rem; color: var(--nh-muted); }
.nh-rule__main:hover strong { color: var(--nh-primary); }
.nh-rule__dest { display: flex; align-items: center; gap: .5rem; min-width: 0; font-size: .88rem; }
.nh-rule__dest small { display: block; color: var(--nh-muted); font-size: .75rem; }
.nh-toggle { display: inline-flex; align-items: center; gap: .3rem; min-width: 96px; justify-content: center; border-radius: 999px; }
.nh-toggle .ti { font-size: 1.3rem; }
.nh-toggle.is-on { color: #2fb344; border: 1px solid color-mix(in srgb, #2fb344 40%, transparent); background: color-mix(in srgb, #2fb344 10%, transparent); }
.nh-toggle.is-off { color: var(--nh-muted); border: 1px solid var(--nh-border); background: var(--nh-surface); }

/* ---------- Identidade do relatório ---------- */
.nh-brand__preview {
   display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 12px;
   background: var(--brand, #1e40af); color: #fff; max-width: 640px;
}
.nh-brand__logo { flex: none; display: grid; place-items: center; background: #fff; border-radius: 10px; padding: 6px 10px; max-width: 200px; }
.nh-brand__logo img { display: block; max-height: 44px; max-width: 180px; }
.nh-brand__text { display: flex; flex-direction: column; min-width: 0; }
.nh-brand__text small { font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.nh-brand__text strong { font-size: 1.1rem; }
.nh-brand__text span { font-size: .8rem; opacity: .85; }

/* ---------- Seções da fila ---------- */
.nh-section-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .75rem 1rem; }
.nh-section-group { display: flex; flex-direction: column; gap: .35rem; }
.nh-check--block { width: 100%; }
.nh-section-item { display: flex; align-items: center; gap: .4rem; }
.nh-section-item .nh-check--block { flex: 1; min-width: 0; }
.nh-rt { flex: none; display: inline-flex; align-items: center; gap: .25rem; font-size: .75rem; color: var(--nh-muted); cursor: pointer; white-space: nowrap; }
.nh-rt input { margin: 0; }
.nh-rt:has(input:checked) { color: #d97706; font-weight: 600; }
.nh-rt-box { padding: .9rem 1rem; border-radius: 10px; border: 1px dashed color-mix(in srgb, #d97706 45%, var(--nh-border)); background: color-mix(in srgb, #d97706 5%, transparent); }

/* ---------- Meus modelos ---------- */
.nh-mytpl-menu { min-width: 260px; max-height: 360px; overflow-y: auto; }
.nh-mytpl-menu .dropdown-item { white-space: normal; }
.nh-save-template { margin: 0 0 1rem; padding: .8rem 1rem; border-radius: 10px; background: var(--nh-surface-2); border: 1px dashed var(--nh-border); }
.nh-clamp { max-width: 520px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Filtro de categorias ---------- */
.nh-categories__search { max-width: 280px; }
.nh-categories__list {
   display: flex; flex-wrap: wrap; gap: .4rem; max-height: 220px; overflow-y: auto; padding: .5rem;
   border: 1px solid var(--nh-border); border-radius: 10px; background: var(--nh-surface-2);
}

/* ---------- Grupos do WhatsApp ---------- */
.nh-wg { margin-top: 1rem; }
.nh-wg__tools { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-bottom: .6rem; }
.nh-wg__tools input[type=search] { flex: 1 1 260px; }

/* ---------- Diagnóstico ---------- */
.nh-diag > summary { cursor: pointer; list-style: none; }
.nh-diag > summary::-webkit-details-marker { display: none; }
.nh-checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.nh-checklist li { display: flex; gap: .6rem; align-items: flex-start; padding: .55rem .7rem; border-radius: 10px; background: var(--nh-surface-2); }
.nh-checklist li > .ti { font-size: 1.2rem; margin-top: .1rem; }
.nh-checklist li.is-ok > .ti { color: #2fb344; }
.nh-checklist li.is-bad { background: color-mix(in srgb, #e8a100 10%, var(--nh-surface)); }
.nh-checklist li.is-bad > .ti { color: #e8a100; }
.nh-checklist .nh-muted { font-size: .85rem; word-break: break-word; }
.nh-diag__actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .9rem; }

/* ---------- Tabelas ---------- */
.nh-table { margin: 0; }
.nh-table thead th { font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; color: var(--nh-muted); background: var(--nh-surface-2); }
.nh-table td, .nh-table th { padding: .7rem 1rem; }
.nh-cell-msg { max-width: 460px; }
/* 1.12.1: Histórico — clicar na mensagem abre o texto inteiro. */
.nh-msg > summary { display: block; cursor: pointer; list-style: none; }
.nh-msg > summary::-webkit-details-marker { display: none; }
.nh-msg > summary::after { content: ' ▸'; color: var(--nh-muted, #6b7280); }
.nh-msg[open] > summary { font-size: 0; margin-bottom: .25rem; }
.nh-msg[open] > summary::after { content: '▾ fechar'; font-size: .78rem; }
.nh-msg__full { white-space: pre-wrap; word-break: break-word; font-size: .85rem; background: var(--tblr-bg-surface-secondary, rgba(0,0,0,.04)); border-radius: 6px; padding: .4rem .55rem; cursor: text; }
.nh-row-highlight > td { background: color-mix(in srgb, var(--nh-primary) 8%, transparent) !important; }
.nh-error { color: #d63939; font-size: .82rem; }
.nh-template-section { padding: 1rem; border: 1px solid var(--nh-border); border-radius: 10px; background: var(--nh-surface-2); }
.nh-template-section__head { display: flex; align-items: flex-start; gap: .55rem; }
.nh-template-section__head strong { display: block; font-size: .9rem; }
.nh-template-section__head small { display: block; color: var(--nh-muted); margin-top: .1rem; }
.nh-template-section__head { margin-bottom: .75rem; }
.nh-variables__list { max-height: 16rem; overflow-y: auto; margin-top: .65rem; padding: .2rem; }
.nh-variables .nh-chip { white-space: normal; text-align: left; overflow-wrap: anywhere; min-height: 36px; }
.nh-variables .nh-chip code { font-size: .72rem; }
.nh-template-section__number { display: inline-grid; place-items: center; flex: 0 0 1.55rem; height: 1.55rem; border-radius: 50%; background: var(--tblr-primary, #206bc4); color: #fff; font-size: .78rem; font-weight: 700; }
.nh-delivery-history { margin-top: .3rem; font-size: .78rem; min-width: 13rem; }
.nh-delivery-history > summary { color: var(--tblr-primary, #206bc4); cursor: pointer; }
.nh-delivery-history ol { margin: .45rem 0 0; padding-left: 1.1rem; }
.nh-delivery-history li { margin-bottom: .45rem; overflow-wrap: anywhere; }
.nh-delivery-history li:last-child { margin-bottom: 0; }

/* ---------- Configurações ---------- */
.nh-config { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 1rem; align-items: start; }
.nh-vtabs { display: flex; flex-direction: column; gap: .2rem; position: sticky; top: 1rem; padding: .35rem; background: var(--nh-surface); border: 1px solid var(--nh-border); border-radius: 12px; }
.nh-vtabs a { display: flex; align-items: center; gap: .55rem; padding: .55rem .75rem; border-radius: 9px; text-decoration: none; color: var(--nh-muted); font-weight: 500; }
.nh-vtabs a .ti { font-size: 1.15rem; }
.nh-vtabs a:hover { background: var(--nh-surface-2); color: var(--nh-text); }
.nh-vtabs a.is-active { background: color-mix(in srgb, var(--nh-primary) 12%, transparent); color: var(--nh-primary); font-weight: 600; }

.nh-vtabs__label { padding: .7rem .75rem .2rem; font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--nh-muted); }

/* Estado do canal: pronto / falta configurar / desligado */
.nh-state { display: inline-flex; align-items: center; gap: .35rem; font-size: .78rem; font-weight: 600; color: var(--nh-muted); }
.nh-state__dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: #adb5bd; }
.nh-state--ready { color: #2fb344; }
.nh-state--incomplete { color: #f59f00; }
.nh-state--ready .nh-state__dot, .nh-state__dot.nh-state--ready { background: #2fb344; }
.nh-state--incomplete .nh-state__dot, .nh-state__dot.nh-state--incomplete { background: #f59f00; }
.nh-card__head .nh-state { margin-left: auto; }

.nh-master { padding: .9rem 1rem; border-radius: 12px; border: 1px solid var(--nh-border); }
.nh-master.is-on { background: color-mix(in srgb, #2fb344 8%, transparent); border-color: color-mix(in srgb, #2fb344 35%, transparent); }
.nh-master.is-off { background: color-mix(in srgb, #d63939 7%, transparent); border-color: color-mix(in srgb, #d63939 30%, transparent); }

.nh-chgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .6rem; }
.nh-chcard {
   display: flex; align-items: center; gap: .75rem; padding: .8rem .9rem; border-radius: 12px; text-decoration: none; color: var(--nh-text);
   border: 1px solid var(--nh-border); background: var(--nh-surface); transition: border-color .15s, box-shadow .15s;
}
.nh-chcard:hover { border-color: var(--nh-primary); box-shadow: 0 2px 10px rgba(0, 0, 0, .06); color: var(--nh-text); }
.nh-chcard--off { opacity: .75; }
.nh-chcard--incomplete { border-color: color-mix(in srgb, #f59f00 45%, transparent); }
.nh-chcard__icon {
   width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 10px; font-size: 1.35rem;
   color: var(--nh-c); background: color-mix(in srgb, var(--nh-c) 14%, transparent);
}
.nh-chcard__body { display: flex; flex-direction: column; gap: .1rem; min-width: 0; flex: 1; }
.nh-chcard__body small { color: var(--nh-muted); line-height: 1.3; }
.nh-chcard__go { color: var(--nh-muted); }

.nh-howto { margin: 0 0 1rem; padding: .7rem 1rem .7rem 2.1rem; border-radius: 10px; background: var(--nh-surface-2); }
.nh-howto li { padding: .12rem 0; }

.nh-details { border: 1px solid var(--nh-border); border-radius: 10px; padding: .6rem .9rem; }
.nh-details > summary { cursor: pointer; font-weight: 600; }
/* 1.11.0: "O que cada canal faz" */
.nh-capmatrix { margin: 0; font-size: .875rem; }
.nh-capmatrix th, .nh-capmatrix td { vertical-align: top; }
.nh-capmatrix td:not(:first-child), .nh-capmatrix th:not(:first-child) { text-align: center; width: 15%; }
.nh-capmatrix small { font-size: .72rem; line-height: 1.25; text-align: left; }
.nh-cap { display: inline-flex; align-items: center; justify-content: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; font-weight: 700; }
.nh-cap--yes { background: rgba(47, 179, 68, .14); color: #2fb344; }
.nh-cap--na { background: var(--nh-border); color: var(--nh-muted, #6b7280); }

/* ---------- Barra de ações e estado vazio ---------- */
.nh-actions {
   position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: flex-end; gap: .5rem; flex-wrap: wrap;
   padding: .75rem 1rem; margin-top: .25rem; border-radius: var(--nh-radius);
   background: color-mix(in srgb, var(--nh-surface) 92%, transparent); border: 1px solid var(--nh-border);
   backdrop-filter: blur(6px); box-shadow: 0 -4px 16px rgba(16, 24, 40, .06);
}
.nh-empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 2rem 1rem; }
.nh-empty__icon { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; font-size: 1.7rem; color: var(--nh-muted); background: var(--nh-surface-2); margin-bottom: .75rem; }
.nh-empty__title { font-weight: 600; }
.nh-empty__text { color: var(--nh-muted); font-size: .88rem; margin-top: .2rem; }

.nh-help p { font-size: .88rem; margin-bottom: .6rem; }
.nh-help__steps { padding-left: 1.1rem; font-size: .88rem; margin: 0; }
.nh-help__steps li { margin-bottom: .4rem; }

/* ---------- Responsivo ---------- */
@media (max-width: 1199px) {
   .nh-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
   .nh-layout { grid-template-columns: minmax(0, 1fr); }
   .nh-sticky { position: static; }
   .nh-rule { display: flex; flex-wrap: wrap; }
   .nh-rule__main { flex: 1 1 60%; }
   .nh-rule__dest { flex: 1 1 100%; order: 5; padding-left: calc(38px + .9rem); }
   .nh-rule__status:empty { display: none; }
}
@media (max-width: 767px) {
   .nh-page { padding: .75rem .75rem 2rem; }
   .nh-grid-2, .nh-grid-3, .nh-config { grid-template-columns: minmax(0, 1fr); }
   .nh-vtabs { position: static; flex-direction: row; overflow-x: auto; }
   .nh-vtabs a { white-space: nowrap; }
   .nh-progress { display: none; }
   .nh-rule { gap: .6rem; }
   .nh-rule__dest { padding-left: 0; }
   .nh-filters__select { margin-left: 0; width: 100%; }
   .nh-h1 { font-size: 1.25rem; }
}

/* ---------- 1.4.4: painel com ferramentas, aparência e acesso ---------- */
.nh-page [hidden] { display: none !important; }
.nh-tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.nh-tool-post { display: contents; }
.nh-tool {
   display: flex; gap: .75rem; align-items: flex-start; text-align: left; width: 100%;
   padding: .85rem 1rem; border-radius: var(--nh-radius); border: 1px solid var(--nh-border);
   background: var(--nh-surface); color: var(--nh-text); text-decoration: none; box-shadow: var(--nh-shadow);
   font: inherit; cursor: pointer; transition: border-color .15s, transform .15s;
}
.nh-tool:hover { border-color: var(--nh-c, var(--nh-primary)); color: var(--nh-text); transform: translateY(-1px); }
.nh-tool > i { flex: none; display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 10px; font-size: 1.2rem;
   color: var(--nh-c, var(--nh-primary)); background: color-mix(in srgb, var(--nh-c, var(--nh-primary)) 12%, transparent); }
.nh-tool > span { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.nh-tool strong { font-weight: 600; }
.nh-tool small { color: var(--nh-muted); font-size: .78rem; line-height: 1.3; overflow-wrap: anywhere; }
.nh-tool--form { cursor: default; }
.nh-tool--form select { min-width: 0; flex: 1; }
.nh-customize { margin-bottom: 1rem; }
.nh-checks--stack { display: flex; flex-direction: column; gap: .35rem; }
.nh-checks--stack .nh-check { width: 100%; }
.nh-links-edit { display: flex; flex-direction: column; gap: .4rem; }
.nh-links-edit__row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) auto; gap: .35rem; }

/* Estilos de mensagem */
.nh-style-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .5rem; }
.nh-style { position: relative; margin: 0; cursor: pointer; }
.nh-style input { position: absolute; opacity: 0; pointer-events: none; }
.nh-style__box { display: flex; flex-direction: column; gap: .15rem; height: 100%; padding: .65rem .8rem; border: 1px solid var(--nh-border); border-radius: 10px; background: var(--nh-surface); }
.nh-style__box small { color: var(--nh-muted); font-size: .76rem; line-height: 1.3; }
.nh-style input:checked + .nh-style__box { border-color: var(--nh-primary); box-shadow: 0 0 0 2px color-mix(in srgb, var(--nh-primary) 25%, transparent); background: color-mix(in srgb, var(--nh-primary) 5%, var(--nh-surface)); }
.nh-style input:focus-visible + .nh-style__box { outline: 2px solid var(--nh-primary); outline-offset: 2px; }
.nh-style-sample { max-width: 420px; padding: .75rem .9rem; border-radius: 10px; background: #e7f8dc; color: #111b21; font-size: .85rem; line-height: 1.45; overflow-wrap: anywhere; }
.nh-style-sample__text { white-space: pre-wrap; }
.nh-style-sample__label { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: #54656f; margin-bottom: .35rem; }

/* Layout do relatório */
.nh-replayout { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 1rem; }
.nh-replayout__note { grid-column: 1 / -1; }

/* Configurações: tarefas comuns e modo simples */
.nh-tasks { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: .5rem; }
.nh-task { display: flex; gap: .65rem; align-items: flex-start; padding: .7rem .85rem; border: 1px solid var(--nh-border); border-radius: 10px; color: var(--nh-text); text-decoration: none; background: var(--nh-surface); }
.nh-task:hover { border-color: var(--nh-primary); color: var(--nh-text); }
.nh-task > i { font-size: 1.25rem; color: var(--nh-primary); margin-top: .1rem; }
.nh-task span { display: flex; flex-direction: column; }
.nh-task small { color: var(--nh-muted); font-size: .78rem; }
.nh-vtabs__mode { margin: .9rem .6rem 0; font-size: .8rem; color: var(--nh-muted); }

/* ---------- 1.6: produtividade ---------- */
.nh-prod-filter { margin-bottom: 1rem; }
.nh-prod-periods { display: flex; flex-wrap: wrap; gap: .4rem; }
.nh-pill { margin: 0; cursor: pointer; }
.nh-pill input { position: absolute; opacity: 0; pointer-events: none; }
.nh-pill span { display: inline-block; padding: .35rem .8rem; border: 1px solid var(--nh-border); border-radius: 999px; background: var(--nh-surface); font-size: .85rem; }
.nh-pill input:checked + span { background: var(--nh-primary); border-color: var(--nh-primary); color: #fff; }
.nh-pill input:focus-visible + span { outline: 2px solid var(--nh-primary); outline-offset: 2px; }
.nh-prod-headline { font-size: 1rem; margin: 0 0 1rem; }
/* 1.14.0: painel Atendimento uTalk — barras por atendente/setor e conversas por horário. */
.nh-ubar { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(60px, 1fr) auto; gap: .2rem .75rem; align-items: center; padding: .45rem 1rem; border-top: 1px solid var(--nh-border); }
.nh-ubar__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.nh-ubar__track { height: 8px; border-radius: 4px; background: var(--nh-border); overflow: hidden; }
.nh-ubar__track i { display: block; height: 100%; border-radius: 4px; background: var(--tblr-primary, #206bc4); }
.nh-ubar small { grid-column: 1 / -1; font-size: .78rem; }
.nh-hours { display: flex; align-items: flex-end; gap: 4px; height: 140px; padding: .5rem 1rem 1rem; }
.nh-hours__col { flex: 1 1 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-width: 14px; }
.nh-hours__bar { width: 70%; max-width: 22px; border-radius: 3px 3px 0 0; background: var(--tblr-primary, #206bc4); }
.nh-hours__col small { font-size: .7rem; color: var(--nh-muted, #6b7280); margin-top: 3px; }
/* 1.15.0: conversa completa da uTalk (cliente à esquerda, atendimento à direita, nota interna destacada). */
.nh-chat { padding: .75rem 1rem; display: flex; flex-direction: column; gap: .5rem; }
.nh-chat__day { text-align: center; margin: .5rem 0; }
.nh-chat__day span { font-size: .75rem; color: var(--nh-muted, #6b7280); background: var(--nh-border); border-radius: 999px; padding: .1rem .6rem; }
.nh-chat__msg { max-width: min(78%, 680px); border-radius: 12px; padding: .45rem .7rem; border: 1px solid var(--nh-border); }
.nh-chat__msg--contact { align-self: flex-start; background: var(--tblr-bg-surface, #fff); }
.nh-chat__msg--member, .nh-chat__msg--bot { align-self: flex-end; background: rgba(32, 107, 196, .08); }
.nh-chat__msg--bot { opacity: .85; }
.nh-chat__msg--note { align-self: flex-end; background: rgba(247, 103, 7, .12); border-color: rgba(247, 103, 7, .45); }
.nh-chat__head { display: flex; gap: .5rem; align-items: center; font-size: .8rem; margin-bottom: .15rem; flex-wrap: wrap; }
.nh-chat__text { white-space: normal; word-break: break-word; }
.nh-chat__media { font-style: italic; color: var(--nh-muted, #6b7280); font-size: .85rem; }
@media (max-width: 640px) { .nh-chat__msg { max-width: 92%; } }
.nh-prod-table th[data-dir="asc"]::after { content: " ▲"; font-size: .7em; }
.nh-prod-table th[data-dir="desc"]::after { content: " ▼"; font-size: .7em; }
.nh-prod-bar { height: 4px; border-radius: 4px; background: color-mix(in srgb, #2fb344 15%, transparent); margin-top: 4px; max-width: 220px; }
.nh-prod-bar span { display: block; height: 100%; border-radius: 4px; background: #2fb344; }
.nh-prod-legend { font-size: .8rem; color: var(--nh-muted); display: inline-flex; align-items: center; gap: .35rem; }
.nh-prod-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-left: .5rem; }
.nh-prod-legend .r, .nh-prod-day__bars .r { background: #4299e1; }
.nh-prod-legend .s, .nh-prod-day__bars .s { background: #2fb344; }
.nh-prod-days { display: flex; align-items: flex-end; gap: 4px; height: 170px; overflow-x: auto; padding-bottom: 2px; }
.nh-prod-day { flex: 1 0 22px; height: 100%; display: flex; flex-direction: column; align-items: center; }
.nh-prod-day__bars { flex: 1 1 auto; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 2px; }
.nh-prod-day__bars span { width: 45%; max-width: 16px; border-radius: 3px 3px 0 0; min-height: 0; }
.nh-prod-day small { font-size: .65rem; color: var(--nh-muted); white-space: nowrap; margin-top: 2px; }

/* 1.8.0: cronograma (dias e horários) e janela do intervalo. */
.nh-days { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.nh-day { position: relative; margin: 0; cursor: pointer; }
.nh-day input { position: absolute; opacity: 0; pointer-events: none; }
.nh-day span { display: inline-flex; align-items: center; justify-content: center; min-width: 46px; height: 34px; padding: 0 10px; border: 1px solid var(--tblr-border-color, #dce1e7); border-radius: 999px; font-weight: 600; font-size: .85rem; user-select: none; }
.nh-day input:checked + span { background: var(--tblr-primary, #206bc4); border-color: var(--tblr-primary, #206bc4); color: #fff; }
.nh-day input:focus-visible + span { outline: 2px solid var(--tblr-primary, #206bc4); outline-offset: 2px; }
.nh-days__quick { display: inline-flex; gap: 4px; margin-left: 6px; }
.nh-times { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.nh-time { display: inline-flex; align-items: center; gap: 2px; }
.nh-time input { width: 120px; }
.nh-next { font-size: .875rem; }
.nh-window { margin-top: 8px; }

/* ---------- 1.18.0: menu agrupado (Início, Atendimentos, Notificações, Acompanhamento, Configurações) ---------- */
.nh-menu { display: flex; align-items: center; gap: .25rem; padding: .3rem; margin-bottom: .5rem; background: var(--nh-surface); border: 1px solid var(--nh-border); border-radius: 12px; }
.nh-menu__toggle { display: none; }
.nh-menu__list { display: flex; flex-wrap: wrap; gap: .25rem; align-items: center; margin: 0; padding: 0; list-style: none; }
.nh-menu__item { position: relative; }
.nh-menu__link, .nh-menu__group > summary {
   display: inline-flex; align-items: center; gap: .45rem; padding: .5rem .85rem; border-radius: 9px;
   color: var(--nh-muted); text-decoration: none; font-weight: 500; white-space: nowrap; cursor: pointer; list-style: none; user-select: none;
}
.nh-menu__group > summary::-webkit-details-marker { display: none; }
.nh-menu__caret { font-size: .85rem; transition: transform .15s; }
.nh-menu__group[open] .nh-menu__caret { transform: rotate(180deg); }
.nh-menu__link:hover, .nh-menu__group > summary:hover { background: var(--nh-surface-2); color: var(--nh-text); }
.nh-menu__link:focus-visible, .nh-menu__group > summary:focus-visible { outline: 2px solid var(--nh-primary); outline-offset: 1px; }
.nh-menu__item.is-active > .nh-menu__link, .nh-menu__item.is-active > .nh-menu__group > summary {
   background: color-mix(in srgb, var(--nh-primary) 12%, transparent); color: var(--nh-primary); font-weight: 600;
}
.nh-menu__drop {
   position: absolute; top: calc(100% + 6px); left: 0; z-index: 1050; min-width: 260px; padding: .35rem;
   background: var(--nh-surface); border: 1px solid var(--nh-border); border-radius: 12px; box-shadow: 0 12px 32px rgba(16, 24, 40, .16);
}
.nh-menu__drop a { display: flex; gap: .6rem; align-items: flex-start; padding: .55rem .65rem; border-radius: 8px; color: var(--nh-text); text-decoration: none; }
.nh-menu__drop a:hover { background: var(--nh-surface-2); color: var(--nh-text); }
.nh-menu__drop a.is-active { background: color-mix(in srgb, var(--nh-primary) 10%, transparent); color: var(--nh-primary); font-weight: 600; }
.nh-menu__drop a > i { font-size: 1.15rem; color: var(--nh-muted); margin-top: .1rem; }
.nh-menu__drop small { display: block; color: var(--nh-muted); font-size: .76rem; font-weight: 400; }
.nh-subnav { display: flex; flex-wrap: wrap; gap: .25rem; margin: 0 0 1rem; padding-left: .3rem; }
.nh-subnav a { padding: .3rem .7rem; border: 1px solid transparent; border-radius: 999px; font-size: .82rem; color: var(--nh-muted); text-decoration: none; }
.nh-subnav a:hover { border-color: var(--nh-border); color: var(--nh-text); }
.nh-subnav a.is-active { background: var(--nh-surface); border-color: var(--nh-border); color: var(--nh-text); font-weight: 600; }
.nh-menu + .nh-callout, .nh-subnav + .nh-callout { margin-top: .5rem; }
.nh-menu:not(:has(+ .nh-subnav)) { margin-bottom: 1rem; }
@media (max-width: 767px) {
   .nh-menu { flex-direction: column; align-items: stretch; }
   .nh-menu__toggle {
      display: flex; justify-content: space-between; align-items: center; width: 100%; padding: .5rem .75rem;
      border: 0; border-radius: 9px; background: none; color: var(--nh-text); font: inherit; cursor: pointer;
   }
   /* Sem script a lista fica sempre aberta; com script ela recolhe atrás do botão "Menu". */
   .nh-menu.is-collapsible:not(.is-open) .nh-menu__list { display: none; }
   .nh-menu__list { flex-direction: column; align-items: stretch; }
   .nh-menu__link, .nh-menu__group > summary { display: flex; }
   .nh-menu__caret { margin-left: auto; }
   .nh-menu .nh-menu__drop { position: static; min-width: 0; padding: 0 0 0 1.2rem; border: 0; box-shadow: none; background: none; }
   .nh-subnav { display: none; }
}

/* ---------- 1.19.0: agente de IA (n8n) ---------- */
.nh-agent-flow { margin: 0; padding-left: 1.2rem; }
.nh-agent-flow li { margin-bottom: .45rem; }
.nh-checklist { list-style: none; margin: 0; padding: 0; }
.nh-checklist li { display: flex; gap: .5rem; align-items: flex-start; padding: .3rem 0; font-size: .88rem; }
.nh-checklist li > i { font-size: 1.1rem; margin-top: .05rem; }
.nh-checklist .is-ok > i { color: #2fb344; }
.nh-checklist .is-bad > i { color: #d63939; }
.nh-checklist .is-warn > i { color: #e8a100; }

/* ---------- 1.18.1: página Comandos do WhatsApp ---------- */
.nh-cmd-search { position: relative; margin-bottom: 1rem; }
.nh-cmd-search > i { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); color: var(--nh-muted); }
.nh-cmd-search input { padding-left: 2.2rem; }
.nh-cmds { list-style: none; margin: 0; padding: 0; }
.nh-cmd { display: flex; gap: .75rem; align-items: flex-start; justify-content: space-between; padding: .7rem 0; border-top: 1px solid var(--nh-border); }
.nh-cmd:first-child { border-top: 0; padding-top: 0; }
.nh-cmds--plain .nh-cmd { padding: .4rem 0; }
.nh-cmd__main { min-width: 0; flex: 1; }
.nh-cmd__title { font-weight: 600; }
.nh-cmd__short { color: var(--nh-text); font-size: .88rem; overflow-wrap: anywhere; }
.nh-cmd__meta { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-top: .3rem; font-size: .8rem; }
.nh-cmd__more { margin-top: .35rem; }
.nh-cmd__more > summary { cursor: pointer; font-size: .82rem; color: var(--nh-primary); width: fit-content; }
.nh-cmd__more[open] > summary { margin-bottom: .4rem; }
.nh-cmd__copy { flex: none; max-width: 45%; }
.nh-cmd__copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--tblr-font-monospace, monospace); font-size: .8rem; }
.nh-wa { font-size: .85rem; line-height: 1.45; overflow-wrap: anywhere; }
.nh-wa__line { min-height: 1.2em; }
.nh-wa--bubble { max-height: 70vh; overflow-y: auto; padding: .75rem .9rem; border-radius: 10px; background: #e7f8dc; color: #111b21; }
@media (max-width: 767px) {
   .nh-cmd { flex-direction: column; }
   .nh-cmd__copy { max-width: 100%; }
   .nh-wa--bubble { max-height: none; }
}

/* ---------- 1.18.0: painel enxuto ---------- */
.nh-quick { position: relative; }
.nh-quick > summary { list-style: none; }
.nh-quick > summary::-webkit-details-marker { display: none; }
.nh-quick .nh-menu__drop { left: auto; right: 0; min-width: 300px; }
.nh-quick__btn { display: flex; gap: .6rem; align-items: flex-start; width: 100%; padding: .55rem .65rem; border: 0; border-radius: 8px; background: none; color: var(--nh-text); font: inherit; text-align: left; cursor: pointer; }
.nh-quick__btn:hover { background: var(--nh-surface-2); }
.nh-quick__btn > i { font-size: 1.15rem; color: var(--nh-c, var(--nh-muted)); margin-top: .1rem; }
.nh-quick__btn small { display: block; color: var(--nh-muted); font-size: .76rem; }
.nh-quick__label { padding: .45rem .65rem 0; border-top: 1px solid var(--nh-border); margin-top: .25rem; font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; color: var(--nh-muted); }
.nh-quick__report { display: flex; gap: .35rem; padding: .35rem .65rem .45rem; }
.nh-quick__report select { flex: 1; min-width: 0; }
.nh-shortcuts { display: flex; flex-wrap: wrap; gap: .4rem; margin: -.25rem 0 1rem; }
.nh-shortcuts a { display: inline-flex; align-items: center; gap: .3rem; padding: .25rem .65rem; border: 1px solid var(--nh-border); border-radius: 999px; background: var(--nh-surface); color: var(--nh-text); font-size: .8rem; text-decoration: none; }
.nh-shortcuts a:hover { border-color: var(--nh-primary); }
.nh-strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin-bottom: 1rem; overflow: hidden; background: var(--nh-surface); border: 1px solid var(--nh-border); border-radius: var(--nh-radius); box-shadow: var(--nh-shadow); }
.nh-strip__cell { padding: .75rem 1rem; border-right: 1px solid var(--nh-border); color: var(--nh-text); text-decoration: none; }
.nh-strip__cell:last-child { border-right: 0; }
a.nh-strip__cell:hover { background: var(--nh-surface-2); color: var(--nh-text); }
.nh-strip__cell strong { display: block; font-size: 1.35rem; line-height: 1.1; color: var(--nh-c, var(--nh-text)); }
.nh-strip__cell span { font-size: .78rem; color: var(--nh-muted); }
.nh-health { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .6rem 1rem; align-items: center; margin: 0; }
.nh-health dt { font-size: .82rem; font-weight: 500; color: var(--nh-muted); }
.nh-health dd { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; }
.nh-pill { display: inline-flex; align-items: center; gap: .3rem; padding: .18rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 500; text-decoration: none;
   color: var(--nh-c, var(--nh-muted)); background: color-mix(in srgb, var(--nh-c, #8592a3) 12%, transparent); }
a.nh-pill:hover { color: var(--nh-c, var(--nh-muted)); filter: brightness(.95); }
.nh-errs { width: 100%; margin: 0; padding: 0; list-style: none; }
.nh-errs li { display: flex; gap: .6rem; padding: .45rem 0; border-top: 1px dashed var(--nh-border); font-size: .85rem; }
.nh-errs li:first-child { border-top: 0; padding-top: 0; }
.nh-errs__n { flex: none; min-width: 2rem; height: fit-content; padding: .1rem .3rem; border-radius: 6px; text-align: center; font-size: .75rem; font-weight: 700; color: #d63939; background: color-mix(in srgb, #d63939 12%, transparent); }
.nh-errs small { color: var(--nh-muted); }
.nh-grid-dash { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1rem; margin-bottom: 1rem; }
.nh-grid-dash > .nh-card { margin-bottom: 0; }
.nh-dtable { width: 100%; border-collapse: collapse; }
.nh-dtable th { padding: .45rem .5rem; border-bottom: 1px solid var(--nh-border); font-size: .7rem; font-weight: 600; letter-spacing: .04em; text-align: left; text-transform: uppercase; color: var(--nh-muted); }
.nh-dtable td { padding: .5rem; border-bottom: 1px solid color-mix(in srgb, var(--nh-border) 60%, transparent); vertical-align: top; }
.nh-dtable tr:last-child td { border-bottom: 0; }
.nh-dtable .nh-num { text-align: right; font-variant-numeric: tabular-nums; }
.nh-dtable__id { font-weight: 600; white-space: nowrap; }
.nh-dtable__title small { display: block; color: var(--nh-muted); }
.nh-dtable__title .nh-dtable__owner-sm { display: none; }
.nh-tag { display: inline-block; padding: .12rem .5rem; border-radius: 999px; font-size: .74rem; font-weight: 600; white-space: nowrap; color: var(--nh-c); background: color-mix(in srgb, var(--nh-c) 13%, transparent); }
.nh-split { display: flex; min-width: 80px; height: 6px; overflow: hidden; border-radius: 4px; background: var(--nh-surface-2); }
.nh-split i { display: block; height: 100%; }
.nh-split__new { background: #2a8bd8; }
.nh-split__proc { background: #4263eb; }
.nh-split__pend { background: #e8a100; }
.nh-legend { margin-top: .5rem; font-size: .75rem; color: var(--nh-muted); }
.nh-legend i { display: inline-block; width: .6rem; height: .6rem; margin: 0 .25rem 0 .5rem; border-radius: 2px; vertical-align: baseline; }
.nh-legend i:first-child { margin-left: 0; }
@media (max-width: 1199px) {
   .nh-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
   .nh-strip__cell:nth-child(3n) { border-right: 0; }
   .nh-strip__cell:nth-child(-n+3) { border-bottom: 1px solid var(--nh-border); }
   .nh-grid-dash { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) {
   .nh-quick .nh-menu__drop { left: 0; right: auto; min-width: min(300px, calc(100vw - 2rem)); }
   .nh-health { grid-template-columns: minmax(0, 1fr); gap: .25rem; }
   .nh-health dd { margin-bottom: .5rem; }
   .nh-dtable .nh-hide-sm { display: none; }
   .nh-dtable__title .nh-dtable__owner-sm { display: block; }
}
/* ---------- 1.21.0: auditoria de modelos ---------- */
.nh-audit__list { list-style: none; margin: 0; padding: 0 1rem 1rem; }
.nh-audit__item { display: flex; gap: .75rem; align-items: flex-start; padding: .7rem 0; border-top: 1px solid var(--nh-border, rgba(128,128,128,.25)); }
.nh-audit__item:first-child { border-top: 0; }
.nh-audit__item > i { flex: none; width: 2rem; height: 2rem; display: grid; place-items: center; border-radius: 10px; font-size: 1.1rem; color: #b45309; background: rgba(232,161,0,.14); }
.nh-audit--info > i { color: #2563eb; background: rgba(37,99,235,.12); }
.nh-audit__text { min-width: 0; flex: 1; display: flex; flex-direction: column; font-size: .88rem; }
.nh-audit__text span { opacity: .75; }
.nh-audit__actions { display: flex; gap: .35rem; flex-wrap: wrap; }
@media (max-width: 767px) { .nh-audit__item { flex-wrap: wrap; } .nh-audit__actions { width: 100%; padding-left: 2.75rem; } }
/* ---------- 1.21.1: alerta da uTalk por modelo ---------- */
.nh-utalk-watch { border: 1px solid var(--nh-border, rgba(128,128,128,.28)); border-radius: 12px; padding: .75rem 1rem; }
.nh-utalk-watch__head { display: flex; flex-wrap: wrap; gap: .4rem .75rem; align-items: center; margin-bottom: .5rem; }
.nh-utalk-watch__row { display: grid; grid-template-columns: minmax(180px, 1.2fr) auto; gap: .25rem 1rem; align-items: center; padding: .55rem 0; border-top: 1px solid var(--nh-border, rgba(128,128,128,.2)); }
.nh-utalk-watch__num { display: inline-flex; align-items: center; gap: .4rem; }
.nh-utalk-watch__num input { width: 5.5rem; }
.nh-utalk-watch__help { grid-column: 1 / -1; opacity: .7; font-size: .8rem; }
@media (max-width: 575px) { .nh-utalk-watch__row { grid-template-columns: 1fr; } }
/* ---------- 1.22.1: interface moderna nas páginas do GLPI (mesma linguagem dos relatórios) ---------- */
.nh-page { --nh-faint: color-mix(in srgb, var(--nh-text) 62%, var(--nh-surface)); }
.nh-page .nh-muted { color: var(--nh-faint); }
.nh-page :focus-visible { outline: 2px solid var(--nh-primary); outline-offset: 2px; }
/* KPIs: número grande e faixa de cor */
.nh-kpis { gap: .85rem; }
.nh-kpi { border-radius: var(--nh-radius); box-shadow: var(--nh-shadow); }
.nh-kpi__value { font-size: 1.85rem; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.nh-kpi__label { line-height: 1.3; }
/* Barra de filtros compacta: etiquetas + canal + busca na mesma linha */
.nh-filterbar { gap: .5rem .6rem; padding: .6rem; border: 1px solid var(--nh-border); border-radius: var(--nh-radius); background: var(--nh-surface); box-shadow: var(--nh-shadow); }
.nh-filterbar__pills { display: flex; flex-wrap: wrap; gap: .35rem; flex: 1 1 100%; }
.nh-filterbar .nh-filters__select { margin-left: 0; width: auto; min-width: 11rem; }
.nh-filterbar__search { position: relative; flex: 1 1 14rem; margin: 0; }
.nh-filterbar__search > i { position: absolute; left: .7rem; top: 50%; transform: translateY(-50%); color: var(--nh-faint); }
.nh-filterbar__search input { padding-left: 2.1rem; }
.nh-result-count { margin: 0 0 .5rem; font-size: .85rem; }
/* Paginação */
.nh-pager { display: flex; align-items: center; justify-content: center; gap: .6rem; flex-wrap: wrap; margin: 1rem 0 0; }
.nh-pager__pages { display: inline-flex; gap: .25rem; flex-wrap: wrap; justify-content: center; }
.nh-pager__num, .nh-pager__btn { display: inline-flex; align-items: center; justify-content: center; gap: .3rem; min-width: 2.4rem; min-height: 2.4rem; padding: 0 .75rem; border: 1px solid var(--nh-border); border-radius: 10px; background: var(--nh-surface); color: var(--nh-text); text-decoration: none; font-weight: 600; font-variant-numeric: tabular-nums; }
.nh-pager__num:hover, .nh-pager__btn:hover { border-color: var(--nh-primary); color: var(--nh-primary); }
.nh-pager__num.is-active { background: var(--nh-primary); border-color: var(--nh-primary); color: #fff; }
.nh-pager__btn.is-disabled { opacity: .45; pointer-events: none; }
.nh-pager__gap { color: var(--nh-faint); padding: 0 .15rem; }
/* Tabelas: cabeçalho fixo na rolagem, linhas com respiro */
.nh-table thead th { position: sticky; top: 0; z-index: 1; }
.nh-table tbody tr:hover > td { background: color-mix(in srgb, var(--nh-primary) 5%, transparent); }
.nh-table td, .nh-table th { padding: .8rem 1rem; }
/* Busca nas configurações */
.nh-cfgsearch { position: relative; margin: 0 0 .75rem; }
.nh-cfgsearch__field { position: relative; display: block; margin: 0; }
.nh-cfgsearch__field > i { position: absolute; left: .7rem; top: 50%; transform: translateY(-50%); color: var(--nh-faint); }
.nh-cfgsearch__field input { padding-left: 2.1rem; height: 2.5rem; border-radius: 10px; }
.nh-cfgsearch__results { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); max-height: 20rem; overflow: auto; background: var(--nh-surface); border: 1px solid var(--nh-border); border-radius: 12px; box-shadow: 0 8px 24px rgba(16, 24, 40, .16); padding: .3rem; }
.nh-cfgsearch__hit { display: flex; flex-direction: column; align-items: flex-start; gap: .1rem; width: 100%; text-align: left; border: 0; background: none; color: var(--nh-text); padding: .55rem .65rem; border-radius: 8px; cursor: pointer; }
.nh-cfgsearch__hit:hover, .nh-cfgsearch__hit:focus-visible { background: color-mix(in srgb, var(--nh-primary) 10%, transparent); }
.nh-cfgsearch__hit small, .nh-cfgsearch__empty { color: var(--nh-faint); font-size: .8rem; }
.nh-cfgsearch__empty { padding: .6rem; }
@keyframes nh-flash { 0% { background: color-mix(in srgb, #facc15 55%, transparent); } 100% { background: transparent; } }
.nh-flash { animation: nh-flash 1.8s ease-out; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { .nh-flash { animation: none; background: color-mix(in srgb, #facc15 45%, transparent); } }
/* Celular: alvos de 44 px, KPIs em 2 colunas e tabelas viram cartões */
@media (max-width: 767px) {
   .nh-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
   .nh-kpi__value { font-size: 1.5rem; }
   .nh-page .btn, .nh-page .form-select, .nh-page .form-control, .nh-pill { min-height: 44px; }
   .nh-filterbar .nh-filters__select, .nh-filterbar__search { flex: 1 1 100%; }
   .nh-pager__num { min-width: 2.75rem; min-height: 2.75rem; }
   .nh-table--cards thead { display: none; }
   .nh-table--cards, .nh-table--cards tbody, .nh-table--cards tr, .nh-table--cards td { display: block; width: 100%; }
   .nh-table--cards tr { border: 1px solid var(--nh-border); border-radius: 12px; margin: .6rem .75rem; width: auto; padding: .35rem .75rem; background: var(--nh-surface); }
   .nh-table--cards td { border: 0; padding: .35rem 0; display: flex; justify-content: space-between; gap: .75rem; text-align: right; }
   .nh-table--cards td { min-width: 0; overflow-wrap: anywhere; }
   .nh-table--cards td > * { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
   .nh-table--cards td::before { content: attr(data-label); flex: none; color: var(--nh-faint); font-size: .78rem; font-weight: 600; text-align: left; }
   .nh-table--cards td:not([data-label])::before { content: none; }
   .nh-table--cards td.text-end { justify-content: flex-start; flex-wrap: wrap; }
   .nh-table--cards td.nh-cell-msg { flex-direction: column; text-align: left; }
}
/* ---------- Relatórios por link: busca e leitura rápida ---------- */
.nh-reports-list__head { align-items: flex-start; padding: 1rem 1.25rem 0; }
.nh-reports-list__head .nh-muted { margin-top: .25rem; font-size: .84rem; }
.nh-reports-total { flex: none; padding: .25rem .65rem; border: 1px solid var(--nh-border); border-radius: 999px; color: var(--nh-muted); background: var(--nh-surface-2); font-size: .8rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.nh-reports-controls { display: flex; align-items: center; gap: .65rem; flex-wrap: wrap; padding: .75rem 1.25rem; border-top: 1px solid var(--nh-border); border-bottom: 1px solid var(--nh-border); background: color-mix(in srgb, var(--nh-surface-2) 55%, var(--nh-surface)); }
.nh-reports-search { position: relative; display: block; flex: 1 1 18rem; min-width: min(100%, 14rem); margin: 0; }
.nh-reports-search > i { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); color: var(--nh-muted); pointer-events: none; }
.nh-reports-search input { min-height: 2.55rem; padding-left: 2.25rem; border-radius: 10px; }
.nh-reports-status { flex: 0 1 12rem; min-width: 10rem; margin: 0; }
.nh-reports-status select { min-height: 2.55rem; border-radius: 10px; }
.nh-reports-tests { display: inline-flex; align-items: center; gap: .45rem; min-height: 2.5rem; margin: 0; color: var(--nh-muted); font-size: .84rem; white-space: nowrap; cursor: pointer; }
.nh-reports-tests input { margin: 0; }
.nh-reports-count { margin-left: auto; color: var(--nh-muted); font-size: .82rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nh-reports-list .nh-table td { vertical-align: middle; }
.nh-report-expiry { display: inline-flex; align-items: center; gap: .35rem; color: var(--nh-text); font-weight: 600; white-space: nowrap; }
.nh-report-expiry .ti { color: #17803d; font-size: 1rem; }
.nh-report-views { display: inline-grid; min-width: 2rem; min-height: 2rem; place-items: center; padding: 0 .45rem; border-radius: 8px; background: var(--nh-surface-2); font-variant-numeric: tabular-nums; }
.nh-report-actions { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: .35rem; }
.nh-report-actions .btn { margin: 0; }
.nh-reports-no-match { display: flex; flex-direction: column; align-items: center; gap: .2rem; padding: 2rem 1rem; color: var(--nh-muted); text-align: center; }
.nh-reports-no-match[hidden] { display: none; }
.nh-reports-no-match > .ti { margin-bottom: .3rem; font-size: 1.6rem; opacity: .75; }
.nh-reports-no-match strong { color: var(--nh-text); }
.nh-reports-list [data-nh-report-row][hidden] { display: none !important; }
@media (max-width: 767px) {
   .nh-reports-list__head { padding: .9rem 1rem .75rem; }
   .nh-reports-list__head .nh-muted { max-width: 34rem; font-size: .8rem; }
   .nh-reports-controls { align-items: stretch; gap: .5rem; padding: .75rem 1rem; }
   .nh-reports-search, .nh-reports-status { flex: 1 1 100%; min-width: 0; }
   .nh-reports-tests { min-height: 44px; }
   .nh-reports-count { align-self: center; margin-left: auto; }
   .nh-report-actions { justify-content: flex-start; }
   .nh-report-actions .btn { min-height: 44px; }
}
@media (prefers-reduced-motion: no-preference) {
   .nh-reports-list tbody tr { transition: background-color .15s ease; }
}

/* 1.42.0: painel de configurações no padrão do FluxOS. */
.nh-page--config .nh-header { padding: 1rem 1.15rem; background: var(--nh-surface); border: 1px solid var(--nh-border); border-radius: var(--nh-radius); box-shadow: var(--nh-shadow); }
.nh-page--config .nh-logo { background: var(--nh-primary); box-shadow: none; }
.nh-page--config .nh-config { grid-template-columns: 260px minmax(0, 1fr); }
.nh-page--config .nh-vtabs { top: .75rem; max-height: calc(100vh - 1.5rem); overflow-y: auto; padding: .6rem; }
.nh-page--config .nh-vtabs a { color: var(--nh-text); }
.nh-page--config .nh-vtabs a .ti { color: var(--nh-muted); }
.nh-page--config .nh-vtabs a.is-active { background: var(--nh-primary); color: #fff; }
.nh-page--config .nh-vtabs a.is-active .ti { color: #fff; }
.nh-page--config .nh-config__panes > .nh-card { padding: 0 1.25rem 1.15rem; overflow: visible; }
.nh-page--config .nh-config__panes > .nh-card > .nh-card__head:first-child { margin: 0 -1.25rem 1rem; padding: 1rem 1.25rem; background: var(--nh-surface-2); border-bottom: 1px solid var(--nh-border); border-radius: var(--nh-radius) var(--nh-radius) 0 0; }
.nh-page--config .nh-config__panes > .nh-card > .nh-card__head:first-child .nh-card__title > .ti { color: var(--nh-primary); }
.nh-page--config .nh-switch .form-check-input { width: 2.4rem; height: 1.3rem; cursor: pointer; }
.nh-page--config .nh-switch .form-check-label { padding-left: .35rem; }
.nh-cfg-muted { opacity: .5; }
.nh-savebar { position: sticky; bottom: .75rem; z-index: 15; display: flex; align-items: center; justify-content: flex-end; gap: .9rem; padding: .7rem 1rem; background: var(--nh-surface); border: 1px solid var(--nh-border); border-radius: 12px; box-shadow: 0 6px 20px rgba(16, 24, 40, .12); }
.nh-savebar__state { display: inline-flex; align-items: center; gap: .3rem; font-weight: 600; color: #b25e09; }
.nh-savebar__state[hidden] { display: none; }
@media (max-width: 992px) {
   .nh-page--config .nh-config { grid-template-columns: minmax(0, 1fr); }
   .nh-page--config .nh-vtabs { max-height: none; overflow-x: auto; }
   .nh-page--config .nh-vtabs__label, .nh-page--config .nh-vtabs__mode { display: none; }
   .nh-page--config .nh-cfgsearch { flex: 0 0 220px; margin: 0; }
}

/* 1.42.0: abas e evolução da página Produtividade. */
.nh-prod-tabs { margin-bottom: 1rem; }
.nh-prod-tabs .nh-badge { margin-left: .25rem; }
[data-nh-prod-pane][hidden] { display: none !important; }
.nh-evo__range { display: flex; gap: .35rem; flex-wrap: wrap; }
.nh-pill-link { padding: .3rem .7rem; border: 1px solid var(--nh-border); border-radius: 999px; color: var(--nh-text); text-decoration: none; font-size: .85rem; }
.nh-pill-link:hover { background: var(--nh-surface-2); }
.nh-pill-link.is-active { background: var(--nh-primary); border-color: var(--nh-primary); color: #fff; }
.nh-evo__chart { display: flex; align-items: stretch; gap: .5rem; height: 210px; margin: 1rem 0 1.25rem; overflow-x: auto; }
.nh-evo__bar { flex: 1 0 54px; display: flex; flex-direction: column; align-items: center; gap: .25rem; min-width: 54px; }
.nh-evo__track { flex: 1; display: flex; align-items: flex-end; width: 100%; max-width: 56px; min-height: 0; background: var(--nh-surface-2); border-radius: 8px 8px 0 0; overflow: hidden; }
.nh-evo__track > span { display: block; width: 100%; background: var(--nh-primary); border-radius: 6px 6px 0 0; }
.nh-evo__bar.is-partial .nh-evo__track > span { opacity: .45; }
.nh-evo__bar small { color: var(--nh-muted); text-align: center; white-space: nowrap; font-size: .75rem; }
.nh-evo__diff { font-weight: 600; color: var(--nh-muted); }
.nh-evo__diff.is-up { color: #1c7e33; }
.nh-evo__diff.is-down { color: #c0392b; }

/* 1.43.0: evolução com conclusão e linhas de tempo e SLA. */
.nh-evo__note { margin: 0 0 1rem; padding: .6rem .8rem; border-left: 3px solid var(--nh-primary); background: color-mix(in srgb, var(--nh-primary) 7%, var(--nh-surface)); border-radius: 0 8px 8px 0; }
.nh-evo__minis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.nh-evo__mini { margin: 0; padding: .75rem; border: 1px solid var(--nh-border); border-radius: 10px; }
.nh-evo__mini figcaption { font-weight: 600; margin-bottom: .25rem; }
.nh-evo__mini svg { display: block; width: 100%; height: auto; overflow: visible; }
.nh-evo__mini polyline { fill: none; stroke: var(--nh-primary); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.nh-evo__mini circle { fill: var(--nh-primary); }
.nh-evo__mini text { fill: var(--nh-text); font-size: 11px; font-weight: 600; }
.nh-evo__axis { display: flex; justify-content: space-between; color: var(--nh-muted); font-size: .75rem; }
@media (max-width: 640px) { .nh-evo__minis { grid-template-columns: minmax(0, 1fr); } }

/* 1.46.1: texto da nota interna do CPF/CNPJ (Configurações › uTalk). */
.nh-doc-vars { display: flex; flex-wrap: wrap; gap: .35rem .9rem; font-size: .85rem; color: var(--nh-muted, #667085); }
.nh-doc-var code { font-size: .8rem; }
.nh-doc-preview { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .9rem; line-height: 1.45; min-height: 5.5rem; padding: .6rem .75rem; border-radius: 8px; background: #fff8dc; border: 1px solid #f0e2a8; color: #3b3523; }
[data-bs-theme="dark"] .nh-doc-preview { background: #3a3420; border-color: #5c5230; color: #f3ead0; }

/* ==========================================================================
   NotifyHub 1.59.0 — Refinamentos Visuais e Hierarquia de Menus
   ========================================================================== */
.nh-page--config .nh-vtabs {
   box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
   border-color: var(--nh-border, #e2e8f0);
}
.nh-page--config .nh-vtabs__label {
   position: relative;
   margin-top: 0.4rem;
   padding-bottom: 0.25rem;
   border-bottom: 1px solid var(--nh-border, #e2e8f0);
   color: var(--nh-primary, #206bc4);
   font-size: 0.72rem;
   letter-spacing: 0.08em;
}
.nh-page--config .nh-vtabs a {
   transition: all 0.18s ease-in-out;
}
.nh-page--config .nh-vtabs a:hover {
   transform: translateX(2px);
}
.nh-page--config .nh-vtabs a.is-active {
   box-shadow: 0 2px 6px rgba(32, 107, 196, 0.25);
}
.nh-page--config .nh-config__panes > .nh-card {
   border-radius: 14px;
   border: 1px solid var(--nh-border, #e2e8f0);
   box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
   transition: box-shadow 0.2s ease;
}
.nh-page--config .nh-config__panes > .nh-card:hover {
   box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}
.nh-page--config .nh-savebar {
   backdrop-filter: blur(8px);
   background: color-mix(in srgb, var(--nh-surface, #ffffff) 92%, transparent);
}

