/*
  Tema Caderno — Conferência de Frequência PDF
  V61.0.84 REV21

  Camada exclusivamente visual. Não contém regras de cálculo, parser,
  transformação de dados ou lógica de exportação.
*/

:root {
  --nb-paper: #f8f3e5;
  --nb-paper-soft: #fffdf6;
  --nb-paper-deep: #eee6d3;
  --nb-ink: #29272d;
  --nb-muted: #68636a;
  --nb-blue: #263f9a;
  --nb-blue-2: #3556bd;
  --nb-blue-soft: #edf1ff;
  --nb-red: #c34f60;
  --nb-red-soft: #fbecef;
  --nb-green: #3f7b62;
  --nb-green-soft: #eaf5ef;
  --nb-purple: #75529c;
  --nb-purple-soft: #f0eaf8;
  --nb-gold: #a9782f;
  --nb-gold-soft: #fbf1dc;
  --nb-line: rgba(74, 132, 184, 0.18);
  --nb-border: rgba(55, 52, 55, 0.17);
  --nb-shadow: 0 16px 38px rgba(48, 43, 31, 0.11);
  --nb-shadow-hover: 0 22px 50px rgba(48, 43, 31, 0.16);
  --nb-hand: "Segoe Print", "Bradley Hand", "Comic Sans MS", cursive;
  --nb-sans: "Segoe UI", Arial, sans-serif;
  --nb-mono: "Cascadia Code", Consolas, "Liberation Mono", monospace;
  --app-header-h: 92px;
  --app-bg: var(--nb-paper);
  --app-line: rgba(38, 63, 154, 0.18);
  --app-blue: var(--nb-blue);
  --app-blue-700: #1f347f;
  --app-cyan: #6689d8;
  --app-slate: var(--nb-ink);
  --app-muted: var(--nb-muted);
}

html {
  background: var(--nb-paper);
}

body.notebook-theme,
body {
  color: var(--nb-ink);
  font-family: var(--nb-sans);
  background:
    radial-gradient(circle at 18% 8%, rgba(255,255,255,.72), transparent 34%),
    linear-gradient(90deg, transparent 0 58px, rgba(203,80,98,.14) 59px 61px, transparent 62px),
    repeating-linear-gradient(0deg, rgba(77,134,184,.10) 0 1px, transparent 1px 34px),
    var(--nb-paper);
  background-attachment: fixed;
}

.notebook-paper-noise {
  position: fixed;
  inset: 0;
  z-index: -4;
  pointer-events: none;
  opacity: .35;
  background-image:
    radial-gradient(circle at 12% 15%, rgba(51,45,34,.10) 0 .7px, transparent .8px),
    radial-gradient(circle at 70% 30%, rgba(51,45,34,.08) 0 .55px, transparent .7px),
    radial-gradient(circle at 40% 75%, rgba(51,45,34,.07) 0 .6px, transparent .75px);
  background-size: 18px 18px, 23px 23px, 29px 29px;
}

.notebook-margin-line {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 58px;
  width: 2px;
  z-index: 1032;
  pointer-events: none;
  background: rgba(195,79,96,.23);
}

.notebook-binder-holes {
  position: fixed;
  top: 112px;
  bottom: 86px;
  left: 14px;
  width: 24px;
  z-index: 1033;
  pointer-events: none;
  background: radial-gradient(circle at 50% 14px, #b8b3aa 0 5px, #f7f1e2 5.5px 8px, transparent 8.5px) 0 0/24px 54px repeat-y;
  filter: drop-shadow(1px 2px 1px rgba(0,0,0,.16));
}

.app-root {
  min-height: 100vh;
  padding-bottom: 74px;
}

/* Appbar fixa e clean */
.app-topbar.notebook-appbar,
.app-topbar {
  position: sticky;
  top: 10px;
  z-index: 1040;
  width: min(1880px, calc(100% - 82px));
  min-height: 0;
  margin: 10px auto 0;
  border: 1px solid var(--nb-border) !important;
  border-radius: 22px;
  background: rgba(255,253,246,.93) !important;
  box-shadow: 0 13px 34px rgba(48,43,31,.12);
  backdrop-filter: blur(14px);
  overflow: visible;
}

.notebook-appbar .container-fluid {
  padding-inline: 18px !important;
}

.notebook-appbar-inner {
  min-height: 76px;
}

.notebook-brand {
  min-width: 0;
  color: inherit;
}

.notebook-brand-mark,
.brand-csv-icon {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #2d2a30;
  border-radius: 50%;
  color: #2d2a30;
  background: #fff;
  font-size: 1.45rem;
  box-shadow: 0 7px 16px rgba(42,37,25,.10);
}

.notebook-brand-copy {
  min-width: 0;
}

.notebook-brand-kicker {
  display: block;
  margin-bottom: 2px;
  color: var(--nb-red);
  font-size: .64rem;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.notebook-brand-title,
.brand strong {
  color: var(--nb-blue) !important;
  font-family: var(--nb-hand);
  font-size: clamp(1.35rem, 2vw, 2rem);
  font-weight: 800;
  line-height: 1.05 !important;
  letter-spacing: -.035em;
}

.notebook-brand-subtitle,
.brand small {
  display: block;
  max-width: 630px;
  margin-top: 4px;
  color: var(--nb-muted) !important;
  font-size: .76rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#desktopNav {
  flex-wrap: nowrap;
  align-items: center;
}

#desktopNav.nav-pills .nav-link,
.notebook-nav .nav-link,
.access-logout-btn {
  min-height: 40px;
  padding: .58rem .78rem;
  border: 1px solid rgba(38,63,154,.16);
  border-radius: 12px;
  color: #3e3a40;
  background: rgba(255,255,255,.74);
  box-shadow: none;
  font-size: .78rem;
  font-weight: 800;
  white-space: nowrap;
}

#desktopNav.nav-pills .nav-link:hover,
.notebook-nav .nav-link:hover,
.access-logout-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(38,63,154,.34);
  color: var(--nb-blue);
  background: var(--nb-blue-soft);
}

#desktopNav.nav-pills .nav-link.active,
.notebook-nav .nav-link.active {
  color: #fff;
  border-color: transparent;
  background: var(--nb-blue);
  box-shadow: 0 8px 18px rgba(38,63,154,.22);
}

#desktopNav .nav-link i,
.access-logout-btn i {
  color: currentColor;
}

/* Área das páginas em formato de folha/caderno */
.page-host {
  width: min(1880px, calc(100% - 82px));
  min-height: calc(100vh - 112px);
  margin: 12px auto 0;
  padding-bottom: 24px;
}

.page-host > .page-section,
.page-host > .table-page,
.page-host > [class*="-page"]:not(.floating-search) {
  position: relative;
  border: 1px solid var(--nb-border);
  border-radius: 20px;
  background: rgba(255,253,246,.80);
  box-shadow: 0 20px 50px rgba(42,37,25,.14);
}

.page-section {
  padding: 1.15rem 1.2rem 1.5rem;
}

.page-section::before,
.table-page::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background:
    linear-gradient(90deg, transparent 0 34px, rgba(195,79,96,.10) 35px 36px, transparent 37px),
    repeating-linear-gradient(0deg, rgba(77,134,184,.055) 0 1px, transparent 1px 34px),
    rgba(255,253,246,.86);
  pointer-events: none;
}

.page-section > .container-fluid,
.page-section > .container,
.table-page > * {
  position: relative;
  z-index: 1;
}

/* Títulos com aparência de anotação */
.page-section h1,
.page-section h2,
.page-section .h1,
.page-section .h2,
.table-page h1,
.table-page h2,
.modal-title {
  color: var(--nb-blue);
  letter-spacing: -.025em;
}

.page-section h1,
.page-section > h2,
.page-section .page-title,
.upload-action-head h2,
.home-nt-hero h3,
.nucleo-page-title,
.map-frequency-title,
.totvs-title,
.modal-title {
  font-family: var(--nb-hand);
  font-weight: 800;
}

.page-section h3,
.page-section h4,
.page-section h5,
.page-section h6 {
  color: #343038;
}

.text-secondary,
.form-text,
small {
  color: var(--nb-muted) !important;
}

/* Cards principais — papel, borda de tinta e profundidade */
.app-card,
.card,
.accordion-item,
.version-card,
.upload-note-card,
.upload-note-highlight,
.upload-note-cover-panel,
.upload-note-section,
.home-nt-step,
.home-nt-info-card,
.export-summary-card,
.export-stat-card,
.kpi-card,
.rule-mini-card,
.rule-check-card,
.rule-block,
.stats-issue-card,
.stats-table-wrapper,
.memoria-verba-row,
.totvs-panel,
.totvs-format-icon-card,
.hr-ready-stat-card,
.nucleo-card,
.report-card,
[class*="report-card"],
[class*="summary-card"] {
  border-color: rgba(55,52,55,.15) !important;
  background-color: rgba(255,253,246,.96) !important;
  box-shadow: 0 11px 26px rgba(48,43,31,.075);
}

.app-card,
.card,
.accordion-item,
.version-card,
.upload-note-card,
.home-nt-step,
.home-nt-info-card,
.export-summary-card,
.export-stat-card,
.kpi-card,
.rule-mini-card,
.rule-check-card,
.rule-block,
.stats-issue-card,
.memoria-verba-row,
.totvs-panel,
.hr-ready-stat-card {
  border-radius: 16px !important;
}

.app-card,
.card,
.upload-note-card,
.home-nt-step,
.export-summary-card,
.export-stat-card,
.kpi-card,
.rule-mini-card,
.rule-check-card,
.stats-issue-card,
.memoria-verba-row,
.hr-ready-stat-card {
  position: relative;
}

.app-card::after,
.upload-note-card::after,
.home-nt-step::after,
.export-summary-card::after,
.kpi-card::after,
.rule-mini-card::after,
.rule-check-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 16px;
  right: 16px;
  height: 3px;
  border-radius: 0 0 999px 999px;
  background: linear-gradient(90deg, transparent, rgba(38,63,154,.30), transparent);
  pointer-events: none;
}

.app-card-hover,
.card,
.upload-note-card,
.home-nt-step,
.export-summary-card,
.export-stat-card,
.kpi-card,
.version-card,
.rule-mini-card,
.rule-check-card,
.hr-ready-stat-card {
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.app-card-hover:hover,
.card:hover,
.upload-note-card:hover,
.home-nt-step:hover,
.export-summary-card:hover,
.export-stat-card:hover,
.kpi-card:hover,
.version-card:hover,
.rule-mini-card:hover,
.rule-check-card:hover,
.hr-ready-stat-card:hover {
  transform: translateY(-2px) rotate(-.08deg);
  border-color: rgba(38,63,154,.30) !important;
  box-shadow: var(--nb-shadow-hover);
}

/* cartões com variações de cor */
.export-summary-card-success,
.is-success,
.nt-green,
.step-green,
.hr-ready-stat-card-strong {
  background: linear-gradient(145deg, var(--nb-paper-soft), var(--nb-green-soft)) !important;
}
.export-summary-card-warning,
.is-warning,
.nt-amber,
.step-amber {
  background: linear-gradient(145deg, var(--nb-paper-soft), var(--nb-gold-soft)) !important;
}
.export-summary-card-danger,
.is-danger,
.nt-rose,
.step-rose {
  background: linear-gradient(145deg, var(--nb-paper-soft), var(--nb-red-soft)) !important;
}
.nt-purple,
.step-purple {
  background: linear-gradient(145deg, var(--nb-paper-soft), var(--nb-purple-soft)) !important;
}
.nt-blue,
.nt-cyan,
.step-blue,
.step-cyan,
.export-summary-card-primary {
  background: linear-gradient(145deg, var(--nb-paper-soft), var(--nb-blue-soft)) !important;
}

/* Badges, pills e chips */
.badge,
.pill,
[class*="-pill"],
[class*="-badge"],
.nucleo-kicker,
.upload-section-label {
  border-radius: 999px !important;
  font-weight: 800;
  letter-spacing: .01em;
}

.badge:not(.text-bg-danger):not(.text-bg-warning):not(.text-bg-success),
.text-bg-primary-subtle,
.text-bg-light {
  color: var(--nb-blue) !important;
  border: 1px solid rgba(38,63,154,.16) !important;
  background: var(--nb-blue-soft) !important;
}

/* Botões como etiquetas do caderno */
.btn {
  border-radius: 12px;
  font-weight: 800;
  box-shadow: none;
}

.btn-app-primary,
.btn-primary {
  color: #fff;
  border-color: transparent !important;
  background: var(--nb-blue) !important;
  box-shadow: 0 8px 18px rgba(38,63,154,.20);
}

.btn-app-primary:hover,
.btn-primary:hover {
  color: #fff;
  background: #1f347f !important;
}

.btn-outline-primary {
  color: var(--nb-blue);
  border-color: rgba(38,63,154,.38);
  background: rgba(255,253,246,.75);
}

.btn-outline-primary:hover {
  color: #fff;
  border-color: var(--nb-blue);
  background: var(--nb-blue);
}

.btn-outline-secondary,
.btn-light {
  color: #4c474f;
  border-color: rgba(55,52,55,.20) !important;
  background: rgba(255,253,246,.88) !important;
}

.btn-outline-danger {
  color: #a83d50;
  border-color: rgba(195,79,96,.42);
  background: rgba(255,253,246,.78);
}

.btn:hover {
  transform: translateY(-1px);
}

/* Inputs e filtros */
.form-control,
.form-select,
.input-group-text,
.dropdown-menu,
.search-panel,
.appbar-filter-menu {
  border-color: rgba(38,63,154,.20) !important;
  background-color: rgba(255,253,246,.97) !important;
}

.form-control,
.form-select {
  min-height: 43px;
  border-radius: 11px;
  color: var(--nb-ink);
  font-weight: 650;
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
  border-color: rgba(38,63,154,.60) !important;
  box-shadow: 0 0 0 .22rem rgba(38,63,154,.11) !important;
}

.form-check-input:checked {
  border-color: var(--nb-blue);
  background-color: var(--nb-blue);
}

.dropdown-menu {
  border-radius: 14px;
  box-shadow: var(--nb-shadow);
}

.dropdown-item {
  border-radius: 9px;
}

.dropdown-item:hover,
.dropdown-item:focus {
  color: var(--nb-blue);
  background: var(--nb-blue-soft);
}

/* Upload */
.upload-hero {
  max-width: 1450px;
}

.upload-action-card {
  overflow: hidden;
}

.upload-action-head {
  padding-bottom: 15px;
  border-bottom: 2px solid rgba(38,63,154,.11);
}

.upload-section-label,
.nucleo-kicker,
.version-center-kicker {
  color: var(--nb-red) !important;
  font-family: var(--nb-mono);
  font-size: .68rem;
  text-transform: uppercase;
}

.dropzone,
.upload-dropzone-refined {
  min-height: 250px;
  border: 2px dashed rgba(38,63,154,.36) !important;
  border-radius: 18px !important;
  background:
    repeating-linear-gradient(0deg, rgba(77,134,184,.055) 0 1px, transparent 1px 30px),
    rgba(255,253,246,.88) !important;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--nb-blue) !important;
  background-color: var(--nb-blue-soft) !important;
}

.dropzone-icon,
.upload-dropzone-orbit,
.upload-cache-icon,
.hr-ready-stat-icon,
.config-access-icon {
  color: #fff !important;
  background: var(--nb-blue) !important;
  box-shadow: 0 9px 22px rgba(38,63,154,.21);
}

.upload-status-card,
.upload-cache-inner,
.upload-note-expander,
.upload-session-actions,
.access-side-note {
  border-color: rgba(55,52,55,.15) !important;
  background: rgba(255,253,246,.92) !important;
}

.upload-note-expander > summary,
details > summary {
  background: linear-gradient(90deg, rgba(237,241,255,.72), rgba(255,253,246,.90));
}

/* Accordions */
.accordion-button {
  color: #353139;
  background: rgba(255,253,246,.95) !important;
  box-shadow: none !important;
  font-weight: 800;
}

.accordion-button:not(.collapsed) {
  color: var(--nb-blue);
  background: var(--nb-blue-soft) !important;
}

.accordion-button::after {
  filter: saturate(.65);
}

.accordion-body {
  background:
    repeating-linear-gradient(0deg, rgba(77,134,184,.04) 0 1px, transparent 1px 32px),
    rgba(255,253,246,.92);
}

/* Tabelas */
.table-page {
  height: calc(100vh - 118px);
  padding: .75rem;
  overflow: hidden;
}

.table-appbar,
.table-shell,
.stats-table-wrapper {
  border-color: rgba(55,52,55,.16) !important;
  background: rgba(255,253,246,.96) !important;
  box-shadow: 0 12px 30px rgba(48,43,31,.09);
}

.table-appbar {
  border-radius: 15px;
}

.table-shell,
.stats-table-wrapper {
  border-radius: 16px;
}

.audit-table thead th,
.table thead th,
.stats-table thead th,
.map-frequency-table thead th {
  color: #fff !important;
  border-color: rgba(255,255,255,.17) !important;
  background: var(--nb-blue) !important;
  font-weight: 800;
}

.audit-table tbody td,
.table tbody td,
.stats-table tbody td,
.map-frequency-table tbody td {
  border-color: rgba(55,52,55,.09) !important;
  background: rgba(255,253,246,.83);
}

.audit-table tbody tr:nth-child(even) td,
.table-striped > tbody > tr:nth-of-type(odd) > * {
  background: rgba(237,241,255,.40) !important;
}

.audit-table tbody tr:hover td,
.table tbody tr:hover td,
.stats-table tbody tr:hover td {
  background: rgba(237,241,255,.83) !important;
}

/* Tabs e navegações internas */
.nav-tabs,
.export-stats-tabs,
.totvs-tabs {
  gap: 6px;
  border-bottom-color: rgba(38,63,154,.18);
}

.nav-tabs .nav-link,
.export-stats-tabs .nav-link,
.totvs-tab-btn {
  border: 1px solid rgba(38,63,154,.17) !important;
  border-radius: 11px 11px 5px 5px !important;
  color: #565158;
  background: rgba(238,230,211,.72) !important;
}

.nav-tabs .nav-link.active,
.export-stats-tabs .nav-link.active,
.totvs-tab-btn.active {
  color: var(--nb-blue) !important;
  border-color: rgba(38,63,154,.30) !important;
  background: var(--nb-paper-soft) !important;
}

/* Modais */
.modal-backdrop.show {
  opacity: .46;
}

.modal-content {
  overflow: hidden;
  border: 1px solid rgba(55,52,55,.18) !important;
  border-radius: 20px !important;
  background:
    repeating-linear-gradient(0deg, rgba(77,134,184,.045) 0 1px, transparent 1px 34px),
    var(--nb-paper-soft) !important;
  box-shadow: 0 28px 70px rgba(35,31,24,.25) !important;
}

.modal-header {
  border-bottom-color: rgba(38,63,154,.12) !important;
  background: rgba(255,253,246,.90);
}

.modal-footer {
  border-top-color: rgba(38,63,154,.12) !important;
  background: rgba(255,253,246,.90);
}

.version-center-grid .version-card.is-current-version,
.version-card.is-current-version {
  border-color: rgba(38,63,154,.38) !important;
  background: linear-gradient(145deg, var(--nb-paper-soft), var(--nb-blue-soft)) !important;
}

/* Alertas */
.alert {
  border-radius: 14px;
  border-color: rgba(55,52,55,.14);
  background-color: rgba(255,253,246,.92);
}

.alert-info {
  color: #24407d;
  background: var(--nb-blue-soft);
}

.alert-success {
  color: #2f684f;
  background: var(--nb-green-soft);
}

.alert-warning {
  color: #76551f;
  background: var(--nb-gold-soft);
}

.alert-danger {
  color: #963548;
  background: var(--nb-red-soft);
}

/* Overlay de processamento */
.processing-overlay {
  background: rgba(38,34,28,.48);
  backdrop-filter: blur(7px);
}

.processing-card {
  border: 1px solid rgba(55,52,55,.18);
  border-radius: 22px;
  background:
    repeating-linear-gradient(0deg, rgba(77,134,184,.055) 0 1px, transparent 1px 32px),
    var(--nb-paper-soft);
  box-shadow: 0 28px 70px rgba(35,31,24,.28);
}

.processing-kicker {
  color: var(--nb-red);
  font-family: var(--nb-mono);
  letter-spacing: .12em;
}

.processing-progress .progress-bar {
  background: var(--nb-blue);
}

/* Busca flutuante */
.floating-search,
.frequency-floating-search {
  right: 22px !important;
  bottom: 82px !important;
}

.floating-search button,
.floating-search .btn,
.frequency-floating-search button {
  border-color: rgba(38,63,154,.22) !important;
  color: var(--nb-blue) !important;
  background: var(--nb-paper-soft) !important;
  box-shadow: 0 10px 26px rgba(48,43,31,.16) !important;
}

/* Rodapé/assinatura no padrão do Caderno Git */
.notebook-signature-pill {
  position: fixed;
  left: 50%;
  bottom: 14px;
  z-index: 1080;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  max-width: calc(100% - 120px);
  padding: 7px 12px;
  border: 1px solid rgba(55,52,55,.18);
  border-radius: 999px;
  color: #3b3740;
  background: rgba(255,253,246,.93);
  box-shadow: 0 8px 22px rgba(48,43,31,.13);
  backdrop-filter: blur(12px);
  text-decoration: none;
  transform: translateX(-50%);
  transition: transform .18s ease, box-shadow .18s ease;
}

.notebook-signature-pill:hover {
  color: var(--nb-blue);
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 0 12px 28px rgba(48,43,31,.18);
}

.notebook-signature-pill i {
  color: var(--nb-blue);
}

.notebook-signature-pill span {
  overflow: hidden;
  font-size: .76rem;
  font-weight: 800;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.notebook-signature-pill small {
  padding-left: 9px;
  border-left: 1px solid rgba(55,52,55,.16);
  color: var(--nb-red) !important;
  font-family: var(--nb-mono);
  font-size: .64rem;
  font-weight: 800;
  white-space: nowrap;
}

/* Navegação mobile */
.bottom-nav {
  border-top: 1px solid rgba(55,52,55,.16) !important;
  background: rgba(255,253,246,.94) !important;
  box-shadow: 0 -8px 28px rgba(48,43,31,.10);
  backdrop-filter: blur(12px);
}

.bottom-link {
  color: #5a555b;
}

.bottom-link.active,
.bottom-link:hover {
  color: var(--nb-blue);
}

/* Tela de acesso na mesma identidade */
.access-lock-screen {
  background:
    linear-gradient(90deg, transparent 0 58px, rgba(203,80,98,.14) 59px 61px, transparent 62px),
    repeating-linear-gradient(0deg, rgba(77,134,184,.10) 0 1px, transparent 1px 34px),
    var(--nb-paper) !important;
}

.access-lock-shell {
  width: min(1660px, calc(100% - 54px));
}

.access-lock-card,
.access-lock-side-card {
  border: 1px solid rgba(55,52,55,.17) !important;
  border-radius: 22px !important;
  background:
    repeating-linear-gradient(0deg, rgba(77,134,184,.045) 0 1px, transparent 1px 34px),
    rgba(255,253,246,.96) !important;
  box-shadow: var(--nb-shadow) !important;
}

.access-lock-title,
.access-guide-hero h2 {
  color: var(--nb-blue) !important;
  font-family: var(--nb-hand) !important;
  letter-spacing: -.03em;
}

.access-lock-kicker,
.access-guide-badge {
  color: var(--nb-red) !important;
  font-family: var(--nb-mono);
  letter-spacing: .12em;
}

.access-lock-icon,
.access-guide-step-number {
  background: var(--nb-blue) !important;
  box-shadow: 0 9px 20px rgba(38,63,154,.20) !important;
}

.access-lock-input {
  border-color: rgba(38,63,154,.22) !important;
  border-radius: 12px !important;
  background: rgba(255,253,246,.96) !important;
}

.access-lock-button {
  border-radius: 12px !important;
  background: var(--nb-blue) !important;
  box-shadow: 0 9px 20px rgba(38,63,154,.21) !important;
}

.access-guide-step,
.access-guide-detail-card,
.access-side-note {
  border-color: rgba(55,52,55,.15) !important;
  border-radius: 15px !important;
  background: rgba(255,253,246,.94) !important;
  box-shadow: 0 10px 24px rgba(48,43,31,.07) !important;
}

.access-lattes-pill,
.access-version-chip {
  border-color: rgba(55,52,55,.17) !important;
  color: #3c3840 !important;
  background: rgba(255,253,246,.94) !important;
  box-shadow: 0 8px 20px rgba(48,43,31,.12) !important;
}

/* Impressão permanece limpa e funcional */
@media print {
  .notebook-paper-noise,
  .notebook-margin-line,
  .notebook-binder-holes,
  .notebook-signature-pill,
  .app-topbar,
  .bottom-nav {
    display: none !important;
  }

  body,
  .page-host,
  .page-section,
  .table-page {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: #fff !important;
    box-shadow: none !important;
  }
}

/* Responsividade */
@media (max-width: 1399.98px) {
  .app-topbar,
  .page-host {
    width: calc(100% - 72px);
  }

  #desktopNav.nav-pills .nav-link {
    padding-inline: .65rem;
  }

  #desktopNav.nav-pills .nav-link i {
    margin-right: .35rem !important;
  }
}

@media (max-width: 1199.98px) {
  .notebook-brand-subtitle,
  .brand small {
    max-width: 430px;
  }

  .notebook-brand-title,
  .brand strong {
    font-size: 1.5rem;
  }
}

@media (max-width: 991.98px) {
  :root {
    --app-header-h: 76px;
  }

  .notebook-margin-line {
    left: 40px;
  }

  .notebook-binder-holes {
    left: 5px;
  }

  .app-topbar,
  .page-host {
    width: calc(100% - 48px);
  }

  .app-topbar {
    top: 6px;
    margin-top: 6px;
    border-radius: 17px;
  }

  .notebook-appbar-inner {
    min-height: 64px;
    padding-block: 8px !important;
  }

  .notebook-brand-mark,
  .brand-csv-icon {
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
  }

  .notebook-brand-kicker,
  .notebook-brand-subtitle,
  .brand small {
    display: none;
  }

  .page-host {
    margin-top: 8px;
    padding-bottom: 86px;
  }

  .page-host > .page-section,
  .page-host > .table-page,
  .page-host > [class*="-page"]:not(.floating-search) {
    border-radius: 16px;
  }

  .page-section {
    padding: .85rem;
  }

  .table-page {
    height: calc(100vh - 164px);
  }

  .notebook-signature-pill {
    bottom: 77px;
    max-width: calc(100% - 72px);
  }

  .floating-search,
  .frequency-floating-search {
    bottom: 142px !important;
  }
}

@media (max-width: 575.98px) {
  body {
    background:
      repeating-linear-gradient(0deg, rgba(77,134,184,.085) 0 1px, transparent 1px 32px),
      var(--nb-paper);
  }

  .notebook-margin-line,
  .notebook-binder-holes {
    display: none;
  }

  .app-topbar,
  .page-host,
  .access-lock-shell {
    width: calc(100% - 16px);
  }

  .app-topbar {
    top: 4px;
    margin-top: 4px;
  }

  .notebook-appbar .container-fluid {
    padding-inline: 10px !important;
  }

  .notebook-brand-mark,
  .brand-csv-icon {
    width: 40px;
    height: 40px;
  }

  .notebook-brand-title,
  .brand strong {
    max-width: 235px;
    font-size: 1.13rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .page-host {
    min-height: calc(100vh - 80px);
  }

  .page-section {
    padding: .65rem;
  }

  .page-section::before,
  .table-page::before {
    background:
      repeating-linear-gradient(0deg, rgba(77,134,184,.045) 0 1px, transparent 1px 31px),
      rgba(255,253,246,.86);
  }

  .notebook-signature-pill span {
    max-width: 175px;
  }

  .notebook-signature-pill small {
    display: none;
  }
}


/* ==========================================================
   V61.0.84 REV21 — refinamentos visuais e de usabilidade
   Camada exclusivamente visual; não altera cálculos.
   ========================================================== */

/* Guia de acesso: sempre inicia pelo topo e possui rolagem vertical real. */
body.access-locked {
  overflow: hidden !important;
}
.access-lock-screen {
  align-items: flex-start !important;
  justify-content: center !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.access-lock-shell {
  flex: 0 0 auto;
  margin: 0 auto !important;
}

/* Assinatura contextual: somente login, Nota Técnica e Configurações. */
.notebook-context-signature-wrap {
  display: flex;
  justify-content: center;
  width: 100%;
  margin: 1.35rem 0 .25rem;
}
.notebook-context-signature {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  max-width: calc(100% - 24px);
  padding: .48rem .82rem;
  border: 1px solid rgba(55,52,55,.18);
  border-radius: 999px;
  color: #3b3740;
  background: rgba(255,253,246,.96);
  box-shadow: 0 8px 22px rgba(48,43,31,.11);
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.notebook-context-signature:hover {
  color: var(--nb-blue);
  border-color: rgba(38,63,154,.32);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(48,43,31,.16);
}
.notebook-context-signature i { color: var(--nb-blue); }
.notebook-context-signature span {
  overflow: hidden;
  font-size: .76rem;
  font-weight: 850;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.notebook-context-signature small {
  padding-left: .58rem;
  border-left: 1px solid rgba(55,52,55,.16);
  color: var(--nb-red) !important;
  font-family: var(--nb-mono);
  font-size: .62rem;
  font-weight: 850;
  white-space: nowrap;
}
.notebook-config-signature { margin-top: 1.7rem; }

/* Hero do Núcleo: o texto utiliza toda a largura disponível. */
.nucleo-export-page .nucleo-hero,
.nucleo-export-page .nucleo-hero > div {
  width: 100% !important;
}
.nucleo-export-page .nucleo-hero p {
  width: 100% !important;
  max-width: none !important;
}

/* Selo NOVIDADE animado, com movimento discreto e brilho. */
.nucleo-export-page .nucleo-special-export-section > .nucleo-exporters-summary .nucleo-kicker {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  animation: notebookNoveltyPulse 2.35s ease-in-out infinite;
}
.nucleo-export-page .nucleo-special-export-section > .nucleo-exporters-summary .nucleo-kicker::after {
  content: "";
  position: absolute;
  inset: -40% auto -40% -48%;
  z-index: -1;
  width: 34%;
  transform: skewX(-18deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.92), transparent);
  animation: notebookNoveltyShine 2.35s ease-in-out infinite;
}
@keyframes notebookNoveltyPulse {
  0%, 100% { transform: translateY(0) scale(1); box-shadow: 0 8px 20px rgba(14,165,233,.08); }
  50% { transform: translateY(-2px) scale(1.035); box-shadow: 0 12px 26px rgba(14,165,233,.18); }
}
@keyframes notebookNoveltyShine {
  0%, 34% { left: -48%; opacity: 0; }
  48% { opacity: 1; }
  68%, 100% { left: 118%; opacity: 0; }
}

/* Cards especiais em cores distintas: azul bebê e verde folha. */
.nucleo-export-page .feature-folha-verbas-special {
  border-color: #9fcdf7 !important;
  background:
    radial-gradient(circle at 0 0, rgba(96,165,250,.22), transparent 34%),
    radial-gradient(circle at 100% 100%, rgba(186,230,253,.30), transparent 36%),
    linear-gradient(145deg, #eef8ff 0%, #ffffff 52%, #dff1ff 100%) !important;
  box-shadow: 0 22px 52px rgba(37,99,235,.13) !important;
}
.nucleo-export-page .feature-folha-verbas-special .nucleo-special-selectors,
.nucleo-export-page .feature-folha-verbas-special .nucleo-special-controls {
  border-color: #b8ddff !important;
  background: rgba(255,255,255,.84) !important;
}
.nucleo-export-page .feature-frequency-linear-special {
  border-color: #9fd59a !important;
  background:
    radial-gradient(circle at 0 0, rgba(74,164,89,.19), transparent 34%),
    radial-gradient(circle at 100% 100%, rgba(187,230,177,.32), transparent 36%),
    linear-gradient(145deg, #f0faed 0%, #ffffff 52%, #e0f3da 100%) !important;
  box-shadow: 0 22px 52px rgba(47,125,65,.13) !important;
}
.nucleo-export-page .feature-frequency-linear-special .nucleo-linear-selectors,
.nucleo-export-page .feature-frequency-linear-special .nucleo-special-controls {
  border-color: #b9dfb3 !important;
  background: rgba(255,255,255,.84) !important;
}
.nucleo-export-page .feature-frequency-linear-special .nucleo-feature-icon,
.nucleo-export-page .feature-frequency-linear-special .nucleo-special-badge {
  background: linear-gradient(135deg, #347b43, #5aa85f) !important;
  box-shadow: 0 14px 30px rgba(52,123,67,.20) !important;
}

/* Menus e selects sempre acima de tabelas, cards e cabeçalhos sticky. */
.table-appbar,
.table-appbar-clean,
.table-filter-row,
.appbar-filter-value,
.appbar-filter-type {
  position: relative;
  overflow: visible !important;
}
.table-appbar,
.table-appbar-clean { z-index: 6200 !important; }
.appbar-filter-value { z-index: 6300 !important; }
.appbar-filter-menu,
.dropdown-menu.show,
.verbas-multi-panel.show,
.freq-wide-filter-panel,
.freq-wide-employee-panel {
  z-index: 6500 !important;
}
.table-shell { position: relative; z-index: 1 !important; }
.page-section,
.nucleo-exporters-section,
.nucleo-exporters-body,
.nucleo-special-pair-grid,
.nucleo-special-body {
  overflow: visible;
}

/* Busca flutuante: painel sempre junto da lupa, no canto inferior direito. */
.floating-search,
.frequency-floating-search,
.freq-wide-floating-search {
  right: 22px !important;
  bottom: 82px !important;
  left: auto !important;
  top: auto !important;
  z-index: 7000 !important;
}
.search-panel,
.freq-wide-search-panel {
  position: fixed !important;
  inset: auto 22px 150px auto !important;
  width: min(420px, calc(100vw - 32px)) !important;
  margin: 0 !important;
  transform: none !important;
  z-index: 7010 !important;
}

/* Estados selecionados: contraste garantido entre fundo e texto. */
:is(.pill,.badge,[class*="-pill"],[class*="-badge"]).active,
:is(.pill,.badge,[class*="-pill"],[class*="-badge"]).is-active,
:is(.pill,.badge,[class*="-pill"],[class*="-badge"]).is-selected,
:is(.pill,.badge,[class*="-pill"],[class*="-badge"])[aria-selected="true"],
:is(.pill,.badge,[class*="-pill"],[class*="-badge"])[aria-pressed="true"],
.btn-check:checked + .btn-outline-primary,
.btn-check:active + .btn-outline-primary,
.btn-outline-primary.active,
.btn-outline-primary:active {
  color: #fff !important;
  border-color: var(--nb-blue) !important;
  background: var(--nb-blue) !important;
  -webkit-text-fill-color: #fff !important;
}
:is(.pill,.badge,[class*="-pill"],[class*="-badge"]).active *,
:is(.pill,.badge,[class*="-pill"],[class*="-badge"]).is-active *,
:is(.pill,.badge,[class*="-pill"],[class*="-badge"]).is-selected *,
:is(.pill,.badge,[class*="-pill"],[class*="-badge"])[aria-selected="true"] *,
:is(.pill,.badge,[class*="-pill"],[class*="-badge"])[aria-pressed="true"] * {
  color: inherit !important;
  -webkit-text-fill-color: inherit !important;
}

@media (max-width: 991.98px) {
  .search-panel,
  .freq-wide-search-panel {
    inset: auto 14px 208px auto !important;
    width: min(420px, calc(100vw - 28px)) !important;
  }
}
@media (max-width: 575.98px) {
  .notebook-context-signature small { display: none; }
  .notebook-context-signature span { max-width: 220px; }
}
@media (prefers-reduced-motion: reduce) {
  .nucleo-export-page .nucleo-special-export-section > .nucleo-exporters-summary .nucleo-kicker,
  .nucleo-export-page .nucleo-special-export-section > .nucleo-exporters-summary .nucleo-kicker::after {
    animation: none !important;
  }
}

/* ==========================================================
   V61.0.84 REV21 — contraste, atalhos, área útil e buscas
   ========================================================== */

/* Hover previsível: ícones e textos sempre herdam a cor do botão. */
:is(button,.btn,.nav-link,.bottom-link,[role="button"]):hover :is(i,span,strong,small,svg),
:is(button,.btn,.nav-link,.bottom-link,[role="button"]):focus-visible :is(i,span,strong,small,svg) {
  color: inherit !important;
  fill: currentColor;
  stroke: currentColor;
  -webkit-text-fill-color: currentColor !important;
}

:is(.btn-app-primary,.btn-primary,.nav-link.active,.bottom-link.active,.appbar-actions-toggle.active,
    [aria-pressed="true"].btn,[aria-selected="true"].btn,.is-selected.btn,.is-active.btn):hover,
:is(.btn-app-primary,.btn-primary,.nav-link.active,.bottom-link.active,.appbar-actions-toggle.active,
    [aria-pressed="true"].btn,[aria-selected="true"].btn,.is-selected.btn,.is-active.btn):focus-visible {
  color: #fff !important;
  border-color: #22388d !important;
  background: linear-gradient(135deg,#22388d,#3150bb) !important;
  -webkit-text-fill-color: #fff !important;
  box-shadow: 0 12px 28px rgba(34,56,141,.24) !important;
}

:is(.btn-outline-primary,.btn-outline-info):hover,
:is(.btn-outline-primary,.btn-outline-info):focus-visible {
  color: #fff !important;
  border-color: var(--nb-blue) !important;
  background: var(--nb-blue) !important;
  -webkit-text-fill-color: #fff !important;
}

:is(.btn-light,.btn-outline-secondary,.nav-link:not(.active),.bottom-link:not(.active)):hover,
:is(.btn-light,.btn-outline-secondary,.nav-link:not(.active),.bottom-link:not(.active)):focus-visible {
  color: #19326f !important;
  border-color: #a9bee9 !important;
  background: #eef4ff !important;
  -webkit-text-fill-color: #19326f !important;
}

:is(.btn-outline-danger,.btn-app-danger,.btn-danger):hover,
:is(.btn-outline-danger,.btn-app-danger,.btn-danger):focus-visible {
  color: #fff !important;
  border-color: #b4233b !important;
  background: #c7354d !important;
  -webkit-text-fill-color: #fff !important;
}

button:disabled:hover,
.btn.disabled:hover,
.btn:disabled:hover {
  filter: none !important;
  box-shadow: none !important;
}

/* Pills clicáveis/selecionadas não podem ficar com texto branco sobre fundo branco. */
:is(.pill,.badge,[class*="-pill"],[class*="-badge"]):hover {
  color: #20336f;
  border-color: rgba(38,63,154,.28);
  background: #eef4ff;
}
:is(.pill,.badge,[class*="-pill"],[class*="-badge"]):is(.active,.is-active,.is-selected,[aria-selected="true"],[aria-pressed="true"]):hover {
  color: #fff !important;
  background: #263f9a !important;
  -webkit-text-fill-color: #fff !important;
}

/* Guia rápido: ações ao final, alinhadas à direita; versão discreta no rodapé. */
.access-guide-side-card { position: relative; }
.access-guide-footer {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .65rem;
  margin: 20px 0 4px 72px;
  padding: 0 2px 2px;
}
.access-guide-footer .access-guide-cta {
  min-width: 190px;
  margin: 0;
}
.access-guide-footer .access-version-card-bottom {
  position: static !important;
  inset: auto !important;
  min-height: 0 !important;
  padding: .27rem .58rem !important;
  border: 1px dashed rgba(38,63,154,.28) !important;
  color: #53627a !important;
  background: rgba(255,255,255,.72) !important;
  box-shadow: none !important;
  font-size: .66rem !important;
  opacity: .84;
}

/* Portal das buscas: position fixed deixa de depender de ancestrais com transform. */
body > .ahgora-floating-search-portal.floating-search,
body > .ahgora-floating-search-portal.frequency-floating-search,
body > .ahgora-floating-search-portal.freq-wide-floating-search {
  position: fixed !important;
  right: 22px !important;
  bottom: 24px !important;
  left: auto !important;
  top: auto !important;
  z-index: 10920 !important;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0 !important;
  border: 1px solid rgba(38,63,154,.24) !important;
  border-radius: 50% !important;
  color: var(--nb-blue) !important;
  background: rgba(255,253,246,.96) !important;
  box-shadow: 0 12px 30px rgba(48,43,31,.18) !important;
  backdrop-filter: blur(10px);
}
body > .ahgora-floating-search-portal.floating-search:hover,
body > .ahgora-floating-search-portal.frequency-floating-search:hover,
body > .ahgora-floating-search-portal.freq-wide-floating-search:hover {
  color: #fff !important;
  border-color: var(--nb-blue) !important;
  background: var(--nb-blue) !important;
  transform: translateY(-2px);
}
body > .ahgora-floating-search-portal.search-panel,
body > .ahgora-floating-search-portal.freq-wide-search-panel {
  position: fixed !important;
  inset: auto 22px 84px auto !important;
  width: min(420px,calc(100vw - 32px)) !important;
  margin: 0 !important;
  transform: none !important;
  z-index: 10930 !important;
}

/* Área útil das páginas com tabelas: margem mínima, sem perder a moldura do caderno. */
body[data-route="tabela"] .page-host,
body[data-route="mapa-frequencia"] .page-host,
body[data-route="memoria-calculo"] .page-host,
body[data-route="auditoria"] .page-host,
body[data-route="exportacao-nucleo"] .page-host {
  padding-inline: 4px !important;
  padding-bottom: 8px !important;
}
body[data-route="tabela"] .table-page,
body[data-route="mapa-frequencia"] .freq-wide-page,
body[data-route="memoria-calculo"] .page-section,
body[data-route="auditoria"] .page-section,
body[data-route="exportacao-nucleo"] .page-section {
  margin-inline: 0 !important;
  padding-inline: 5px !important;
}
body[data-route="tabela"] .table-shell,
body[data-route="mapa-frequencia"] .freq-wide-table-shell,
body[data-route="auditoria"] .table-responsive,
body[data-route="memoria-calculo"] .table-responsive {
  margin-inline: 0 !important;
  border-radius: 12px !important;
}

/* Modal de limpeza total mais legível e com hierarquia forte. */
.ahgora-modal-layer[data-tone="danger"] .ahgora-modal-card {
  border-color: rgba(196,53,77,.45);
  box-shadow: 0 30px 80px rgba(91,27,39,.28);
}
.ahgora-modal-layer[data-tone="danger"] .ahgora-modal-icon {
  color: #fff;
  background: linear-gradient(135deg,#b4233b,#dc5268);
}

@media (max-width: 980px) {
  .access-guide-footer { margin-left: 48px; }
}
@media (max-width: 720px) {
  .access-guide-footer { margin-left: 0; align-items: stretch; }
  .access-guide-footer .access-guide-cta { width: 100%; min-width: 0; }
  .access-guide-footer .access-version-card-bottom { align-self: flex-end; }
}
@media (max-width: 575.98px) {
  body > .ahgora-floating-search-portal.floating-search,
  body > .ahgora-floating-search-portal.frequency-floating-search,
  body > .ahgora-floating-search-portal.freq-wide-floating-search {
    right: 14px !important;
    bottom: calc(var(--app-bottom-h,72px) + 14px) !important;
  }
  body > .ahgora-floating-search-portal.search-panel,
  body > .ahgora-floating-search-portal.freq-wide-search-panel {
    inset: auto 14px calc(var(--app-bottom-h,72px) + 72px) auto !important;
    width: calc(100vw - 28px) !important;
  }
}

/* Controles de seleção customizados: hover claro sempre usa tinta escura. */
:is(.freq-wide-employee-button,.verbas-multi-button,.totvs-format-current,
    .export-check-button,.filter-check-item,.verbas-check,.freq-wide-employee-option):hover,
:is(.freq-wide-employee-button,.verbas-multi-button,.totvs-format-current,
    .export-check-button):focus-visible {
  color: #19326f !important;
  border-color: #9db7e8 !important;
  background: #eef4ff !important;
  -webkit-text-fill-color: #19326f !important;
}
:is(.freq-wide-employee-button,.verbas-multi-button,.totvs-format-current,
    .export-check-button,.filter-check-item,.verbas-check,.freq-wide-employee-option):hover * {
  color: inherit !important;
  -webkit-text-fill-color: currentColor !important;
}

/* ==========================================================
   V61.0.84 REV21 — modo amplo para Tabela/Frequência
   ========================================================== */

html,
body.notebook-theme {
  max-width: 100%;
  overflow-x: hidden;
}

/* As tabelas nunca aumentam a largura da página: o excesso fica dentro da área rolável. */
body[data-route="tabela"] .table-page,
body[data-route="mapa-frequencia"] .freq-wide-page,
body[data-route="tabela"] .table-shell,
body[data-route="mapa-frequencia"] .freq-wide-table-shell {
  min-width: 0 !important;
  max-width: 100% !important;
}

body[data-route="tabela"] .table-responsive-full,
body[data-route="mapa-frequencia"] .freq-wide-scroll {
  width: 100% !important;
  max-width: 100% !important;
  overflow: auto !important;
  overscroll-behavior: contain;
  scrollbar-gutter: stable both-edges;
  scrollbar-width: thin;
  scrollbar-color: rgba(38,63,154,.52) rgba(237,241,255,.7);
}

body[data-route="tabela"] .table-responsive-full::-webkit-scrollbar,
body[data-route="mapa-frequencia"] .freq-wide-scroll::-webkit-scrollbar {
  width: 11px;
  height: 11px;
}
body[data-route="tabela"] .table-responsive-full::-webkit-scrollbar-track,
body[data-route="mapa-frequencia"] .freq-wide-scroll::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(237,241,255,.78);
}
body[data-route="tabela"] .table-responsive-full::-webkit-scrollbar-thumb,
body[data-route="mapa-frequencia"] .freq-wide-scroll::-webkit-scrollbar-thumb {
  border: 2px solid rgba(237,241,255,.78);
  border-radius: 999px;
  background: rgba(38,63,154,.56);
}

body[data-route="tabela"] .audit-table,
body[data-route="mapa-frequencia"] .freq-wide-table {
  width: max-content !important;
  min-width: 100% !important;
}

body[data-route="tabela"] .table-filter-row,
body[data-route="mapa-frequencia"] .freq-wide-table-topline {
  min-width: 0;
}

/* Toggle flutuante de tela ampla — mesmo desenho visual da lupa. */
.ahgora-wide-mode-toggle {
  position: fixed;
  right: 82px;
  bottom: 24px;
  z-index: 10920;
  display: none;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(38,63,154,.24);
  border-radius: 50%;
  color: var(--nb-blue);
  background: rgba(255,253,246,.96);
  box-shadow: 0 12px 30px rgba(48,43,31,.18);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: transform .18s ease, color .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}
body.ahgora-data-wide-capable .ahgora-wide-mode-toggle:not([hidden]) {
  display: grid;
}
.ahgora-wide-mode-toggle i {
  margin: 0 !important;
  font-size: 1.18rem;
  line-height: 1;
}
.ahgora-wide-mode-toggle:hover,
.ahgora-wide-mode-toggle:focus-visible,
.ahgora-wide-mode-toggle.is-active {
  color: #fff !important;
  border-color: var(--nb-blue) !important;
  background: var(--nb-blue) !important;
  box-shadow: 0 15px 34px rgba(38,63,154,.28);
  transform: translateY(-2px);
  outline: none;
}
.ahgora-wide-mode-toggle:focus-visible {
  box-shadow: 0 0 0 4px rgba(38,63,154,.16), 0 15px 34px rgba(38,63,154,.28);
}

/* Identidade única da lupa em qualquer rota da aplicação. */
body > .ahgora-floating-search-portal.floating-search,
body > .ahgora-floating-search-portal.frequency-floating-search,
body > .ahgora-floating-search-portal.freq-wide-floating-search {
  width: 48px !important;
  height: 48px !important;
  display: grid !important;
  place-items: center !important;
  padding: 0 !important;
  border: 1px solid rgba(38,63,154,.24) !important;
  border-radius: 50% !important;
  color: var(--nb-blue) !important;
  background: rgba(255,253,246,.96) !important;
  box-shadow: 0 12px 30px rgba(48,43,31,.18) !important;
  backdrop-filter: blur(10px);
}
body > .ahgora-floating-search-portal.floating-search i,
body > .ahgora-floating-search-portal.frequency-floating-search i,
body > .ahgora-floating-search-portal.freq-wide-floating-search i,
body > .ahgora-floating-search-portal.floating-search .material-symbols-rounded {
  margin: 0 !important;
  font-size: 1.2rem !important;
  line-height: 1 !important;
}

/* Modo amplo: a appbar some e a área de dados assume todo o viewport. */
body.ahgora-data-wide-mode {
  overflow: hidden !important;
}
body.ahgora-data-wide-mode .app-topbar,
body.ahgora-data-wide-mode #bottomNav,
body.ahgora-data-wide-mode .notebook-margin-line,
body.ahgora-data-wide-mode .notebook-binder-holes {
  display: none !important;
}
body.ahgora-data-wide-mode .app-root {
  min-height: 100dvh;
  padding: 0 !important;
}
body.ahgora-data-wide-mode .page-host {
  position: fixed;
  inset: 0;
  z-index: 1035;
  width: 100vw !important;
  max-width: 100vw !important;
  height: 100dvh !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 4px !important;
  overflow: hidden !important;
}
body.ahgora-data-wide-mode .page-host > .table-page,
body.ahgora-data-wide-mode .page-host > .freq-wide-page {
  width: 100% !important;
  max-width: 100% !important;
  height: calc(100dvh - 8px) !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 4px !important;
  border-radius: 12px !important;
  box-shadow: none !important;
  overflow: hidden !important;
}
body.ahgora-data-wide-mode .table-page,
body.ahgora-data-wide-mode .freq-wide-page {
  display: flex !important;
  flex-direction: column !important;
}
body.ahgora-data-wide-mode .table-appbar,
body.ahgora-data-wide-mode .freq-wide-expander {
  flex: 0 0 auto;
  margin: 0 0 4px !important;
  border-radius: 10px !important;
}
body.ahgora-data-wide-mode .table-shell,
body.ahgora-data-wide-mode .freq-wide-table-shell {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  border-radius: 10px !important;
  overflow: hidden !important;
}
body.ahgora-data-wide-mode .table-filter-row {
  overflow-x: auto;
  overflow-y: visible;
  scrollbar-width: thin;
}
body.ahgora-data-wide-mode .table-responsive-full,
body.ahgora-data-wide-mode .freq-wide-scroll {
  height: 100% !important;
}
body.ahgora-data-wide-mode .ahgora-wide-mode-toggle {
  right: 82px;
  bottom: 14px;
}
body.ahgora-data-wide-mode > .ahgora-floating-search-portal.floating-search,
body.ahgora-data-wide-mode > .ahgora-floating-search-portal.frequency-floating-search,
body.ahgora-data-wide-mode > .ahgora-floating-search-portal.freq-wide-floating-search {
  right: 22px !important;
  bottom: 14px !important;
}
body.ahgora-data-wide-mode > .ahgora-floating-search-portal.search-panel,
body.ahgora-data-wide-mode > .ahgora-floating-search-portal.freq-wide-search-panel {
  inset: auto 22px 74px auto !important;
}

@media (max-width: 575.98px) {
  .ahgora-wide-mode-toggle {
    right: 72px;
    bottom: calc(var(--app-bottom-h,72px) + 14px);
  }
  body.ahgora-data-wide-mode .ahgora-wide-mode-toggle {
    right: 72px;
    bottom: 14px;
  }
  body.ahgora-data-wide-mode > .ahgora-floating-search-portal.floating-search,
  body.ahgora-data-wide-mode > .ahgora-floating-search-portal.frequency-floating-search,
  body.ahgora-data-wide-mode > .ahgora-floating-search-portal.freq-wide-floating-search {
    right: 14px !important;
    bottom: 14px !important;
  }
  body.ahgora-data-wide-mode > .ahgora-floating-search-portal.search-panel,
  body.ahgora-data-wide-mode > .ahgora-floating-search-portal.freq-wide-search-panel {
    inset: auto 14px 74px auto !important;
    width: calc(100vw - 28px) !important;
  }
}

@media print {
  .ahgora-wide-mode-toggle { display: none !important; }
}
