
:root {
  --menu-bg: #0b5c9e;
  /* Cor unica das superficies de navegacao (topbar + barra lateral) para ficarem identicas. */
  --topbar-bg: #06653a;
  --menu-text: #ffffff;
  --page-bg: #f2f6fb;
  --portal-font-family: "Manrope", sans-serif;
  --card-bg: #ffffff;
  --line: #d7e0eb;
  --text: #1f2937;
  /* #6b7280 dava ~4.36:1 sobre as superficies tonalizadas (--surface-3/--page-bg), abaixo do
     AA (4.5:1). #5e6675 mantem o aspecto "muted" e passa AA em todas as superficies (~5.2:1). */
  --muted: #5e6675;
  --primary: #0b5c9e;
  --primary-700: #084a7f;
  --primary-text: #ffffff;
  --icon-accent: #0b5c9e;
  --danger: #d6342a; /* 4.79:1 sobre #fff (WCAG AA p/ texto); antes #df3c30 = 4.35:1 (reprovava) */
  --success-bg: #065f96;
  --shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  --input-border: #c5d2e2;
  --input-focus-ring: rgba(11, 92, 158, 0.16);
  --toggle-width: 40px;
  --toggle-height: 22px;
  --toggle-thumb-size: 16px;
  --toggle-track-off: #d3d9e3;
  --toggle-track-on: var(--menu-bg);
  --toggle-track-border: #c7d0dd;
  --toggle-thumb-color: #ffffff;
  --toggle-focus-ring: rgba(11, 92, 158, 0.22);
  --menu-item-font-size: 13px;
  --menu-item-child-font-size: 13px;
  --menu-field-label-size: 13px;
  --menu-field-input-size: 14px;
  --btn-height: 34px;
  --topbar-pad-y: 8px;
  --topbar-pad-x: 12px;
  --topbar-title-size: 20px;
  --topbar-logo-width: 84px;
  --topbar-logo-height: 34px;
  --topbar-avatar-size: 26px;
  --table-cell-padding-y: 9px;
  --table-cell-padding-x: 10px;
  --table-row-divider: #e5edf5;
  --table-action-size: 32px;
  --surface-1: #ffffff;
  --surface-2: #f7fbff;
  --surface-3: #eef4fa;
  --card-shadow-soft: 0 8px 24px rgba(15, 23, 42, 0.06);
  --card-shadow-elevated: 0 14px 34px rgba(15, 23, 42, 0.1);
  --line-strong: #c9d6e5;
  --focus-ring: 0 0 0 3px rgba(6, 101, 58, 0.2);
  --empty-bg: linear-gradient(135deg, rgba(6, 101, 58, 0.08), rgba(11, 92, 158, 0.06));
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--portal-font-family);
  color: var(--text);
  background: radial-gradient(circle at top right, #e7f2ff 0, #eff5fb 42%, #ebf1f7 100%);
  padding-bottom: 0;
}

.shell {
  min-height: 100dvh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: var(--shell-padding, 14px);
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--card-radius, 14px);
  box-shadow: var(--card-shadow-soft);
}

.card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--card-shadow-elevated);
}

.hidden { display: none !important; }

:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* Modo de alto contraste do SO (forced-colors): box-shadow e ignorado, entao o
   anel de foco baseado em sombra desaparece. Garante foco de teclado visivel via
   outline nativo para nao quebrar a navegacao por teclado nesses ambientes. */
@media (forced-colors: active) {
  :focus-visible,
  a:focus-visible,
  button:focus-visible,
  input:focus-visible,
  select:focus-visible,
  textarea:focus-visible,
  [tabindex]:focus-visible {
    outline: 2px solid Highlight;
    outline-offset: 2px;
  }
}

/* Skeleton de carregamento: placeholders animados para listas/tabelas enquanto os dados
   chegam (substitui a sensacao de "tela vazia"). Respeita prefers-reduced-motion. */
.skeleton {
  display: inline-block;
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.18) 25%, rgba(148, 163, 184, 0.34) 37%, rgba(148, 163, 184, 0.18) 63%);
  background-size: 400% 100%;
  border-radius: 6px;
  animation: skeleton-shimmer 1.4s ease infinite;
}
.skeleton-text {
  width: 100%;
  height: 0.9em;
  vertical-align: middle;
}
.skeleton-row td {
  padding-top: 12px;
  padding-bottom: 12px;
}
@keyframes skeleton-shimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}
@media (prefers-reduced-motion: reduce) {
  .skeleton { animation: none; }
}

.global-loading {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.24);
}
.global-loading-card {
  min-width: 220px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow);
  font-weight: 700;
}
.operation-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 14px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.97);
  color: #334155;
  font-size: 13px;
}
.operation-footer-main {
  min-width: 0;
  flex: 1 1 auto;
}
.operation-footer-text {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.operation-footer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.operation-footer.success { color: #0f766e; font-weight: 700; }
.operation-footer.error { color: #b91c1c; font-weight: 700; }
.operation-footer.info { color: var(--primary, #0b5c9e); }
.operation-footer .ghost.small {
  min-height: 30px;
  height: 30px;
  padding: 0 10px;
  white-space: nowrap;
}
.operation-footer-actions .small:not(.ghost) {
  min-height: 30px;
  height: 30px;
  padding: 0 14px;
  white-space: nowrap;
  box-shadow: none;
}
#status-details-modal {
  z-index: 1050;
}
.status-details-content {
  margin: 0;
  max-height: 60vh;
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
  color: #0f172a;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: "Consolas", "Courier New", monospace;
  font-size: 13px;
  line-height: 1.5;
}
.global-spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #dbe3ec;
  border-top-color: var(--primary);
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

h1, h2, h3, h4, h5 {
  font-family: "Sora", sans-serif;
  margin: 0;
}
.material-symbols-outlined {
  font-variation-settings:
    "FILL" var(--icon-fill, 0),
    "wght" var(--icon-weight, 400),
    "GRAD" 0,
    "opsz" 24;
  line-height: 1;
}
.ui-btn-icon {
  font-size: var(--action-icon-size, 18px);
}

.brand {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #2f855a;
  margin-bottom: 8px;
}

.subtitle, .tip {
  color: var(--muted);
  font-size: 13px;
}
.tip.success { color: #0f766e; }
.tip.error { color: #b91c1c; }
.tip.info { color: var(--primary, #0b5c9e); }

label {
  font-size: var(--menu-field-label-size);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

input, select, textarea {
  width: 100%;
  border: 1px solid var(--input-border);
  border-radius: var(--input-radius, 10px);
  padding: 9px 12px;
  font-family: inherit;
  font-size: var(--menu-field-input-size);
  line-height: 1.25;
  background: #ffffff;
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--input-focus-ring);
}
/* Validacao inline: campos marcados com aria-invalid="true" ganham destaque visual
   (alem do anuncio por leitores de tela). O foco preserva o anel de erro. */
input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: var(--danger);
}
input[aria-invalid="true"]:focus,
select[aria-invalid="true"]:focus,
textarea[aria-invalid="true"]:focus {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(223, 60, 48, 0.18);
}
textarea { min-height: 86px; resize: vertical; }

button {
  border: 1px solid transparent;
  border-radius: var(--btn-radius, 10px);
  min-height: var(--btn-height);
  height: var(--btn-height);
  padding: 0 14px;
  font-weight: 700;
  font-family: "Manrope", sans-serif;
  font-size: 0.9rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  background: var(--primary);
  color: var(--primary-text);
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
  white-space: nowrap;
}
button:hover { background: var(--primary-700); }
button:active { transform: translateY(1px); }
button.ghost {
  background: #fff;
  color: var(--primary);
  border: 1px solid var(--primary);
}
button.danger {
  background: #fff;
  color: var(--danger);
  border: 1px solid var(--danger);
}
button.ghost[id$="cancel"],
button.ghost[id*="-cancel"],
button.ghost[id^="cancel"],
button.ghost[data-action="cancel"] {
  color: var(--danger);
  border-color: var(--danger);
}
button.ghost[id$="cancel"]:hover,
button.ghost[id*="-cancel"]:hover,
button.ghost[id^="cancel"]:hover,
button.ghost[data-action="cancel"]:hover {
  background: rgba(214, 52, 42, 0.08);
}
button.small {
  min-height: var(--btn-height);
  height: var(--btn-height);
  padding: 0 10px;
  font-size: 12px;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.login-card {
  width: min(450px, calc(100vw - 30px));
  margin: 50px auto;
  padding: 26px;
}

.login-form { display: flex; flex-direction: column; gap: 12px; }
.login-divider {
  margin: 16px 0 12px;
  border-top: 1px solid var(--line);
  text-align: center;
  position: relative;
}
.login-divider span {
  background: #fff;
  position: relative;
  top: -10px;
  padding: 0 10px;
  color: var(--muted);
}
.social-login-actions {
  display: grid;
  gap: 10px;
}
.login-secondary-actions {
  margin-top: 14px;
  display: flex;
}
.login-signup-link {
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  text-decoration: none;
  border-radius: 14px;
  border: 1px solid #cfe0f2;
  background: linear-gradient(180deg, #ffffff 0%, #f5faff 100%);
  box-shadow: 0 10px 20px rgba(11, 92, 158, 0.08);
  color: var(--primary);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.login-signup-link:hover {
  border-color: #9dc2e3;
  background: linear-gradient(180deg, #fdfefe 0%, #ecf5ff 100%);
  box-shadow: 0 12px 24px rgba(11, 92, 158, 0.14);
  transform: translateY(-1px);
}
.login-signup-link .material-symbols-outlined {
  font-size: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: rgba(11, 92, 158, 0.08);
}
.login-signup-link-text {
  display: grid;
  gap: 2px;
  text-align: left;
}
.login-signup-link-text strong {
  font-size: 1rem;
  line-height: 1.1;
}
.login-signup-link-text small {
  color: #4b5563;
  font-size: 0.8rem;
  line-height: 1.2;
}

#app-panel {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.app-main-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
#report-layout {
  flex: 1;
  min-height: 0;
}

.topbar {
  background: var(--topbar-bg, #06653a);
  color: var(--menu-text);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: var(--topbar-pad-y) var(--topbar-pad-x);
  margin-bottom: var(--topbar-gap, 12px);
  display: grid;
  gap: 10px;
  overflow: visible;
  box-shadow: 0 14px 32px rgba(2, 70, 37, 0.25);
}
.topbar-main-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.topbar-main-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  overflow: visible;
}
.topbar-title-wrap {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 0 0 auto;
}
.topbar-title {
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: var(--topbar-title-size);
  color: #ffffff;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.logo-home-button {
  border: 0;
  background: transparent;
  padding: 0;
  color: #fff;
}
.logo-home-button:hover { background: transparent; }
.logo-image-wrap {
  width: var(--topbar-logo-width);
  height: var(--topbar-logo-height);
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  overflow: hidden;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.12);
}
.topbar-company-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}
.topbar-company-logo-fallback {
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
}
.primary-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  overflow: visible;
  white-space: nowrap;
  min-width: 0;
  flex: 1 1 auto;
  flex-wrap: nowrap;
  padding-bottom: 2px;
  position: relative;
  z-index: 30;
}
.primary-nav-item {
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #fff;
  padding: 0 10px;
  font-size: var(--menu-item-font-size);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: calc(var(--btn-height) - 2px);
  height: calc(var(--btn-height) - 2px);
}
.primary-nav-item:hover,
.primary-nav-item:focus-visible {
  background: rgba(255, 255, 255, 0.16);
}
.primary-nav-item:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.75);
  outline-offset: 1px;
}
.primary-nav-icon {
  font-size: 18px;
}
.primary-nav-label {
  white-space: nowrap;
}
.primary-nav-image-wrap {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.24);
}
.primary-nav-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Cascading nav */
.primary-nav-group {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.primary-nav-root-arrow {
  font-size: 18px;
  opacity: 0.86;
  transition: transform 0.18s ease;
}
.primary-nav-group.is-open > .primary-nav-item-root .primary-nav-root-arrow,
.primary-nav-group:focus-within > .primary-nav-item-root .primary-nav-root-arrow {
  transform: rotate(180deg);
}
.primary-nav-submenu {
  display: none;
  position: absolute;
  top: calc(100% - 1px);
  left: 0;
  flex-direction: column;
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  padding: 4px 0;
  min-width: 220px;
  z-index: 520;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.22);
  max-height: calc(100vh - 100px);
  overflow: visible;
}
.primary-nav.hover-suppressed .primary-nav-submenu,
.primary-nav.hover-suppressed .primary-nav-submenu-entry > .primary-nav-submenu {
  display: none !important;
}
.primary-nav-group.align-right > .primary-nav-submenu {
  left: auto;
  right: 0;
}
.primary-nav-group:focus-within > .primary-nav-submenu,
.primary-nav-group.is-open > .primary-nav-submenu {
  display: flex;
}
.primary-nav-submenu-entry {
  position: relative;
}
.primary-nav-submenu-entry > .primary-nav-submenu {
  top: -5px;
  left: calc(100% - 1px);
  z-index: 530;
}
.primary-nav-submenu-entry.open-left > .primary-nav-submenu {
  left: auto;
  right: calc(100% - 1px);
}
.primary-nav-submenu-entry:focus-within > .primary-nav-submenu,
.primary-nav-submenu-entry.is-open > .primary-nav-submenu {
  display: flex;
}
.primary-nav-leaf-row {
  display: flex;
  align-items: stretch;
  width: 100%;
}
.primary-nav-leaf-row .primary-nav-item,
.primary-nav-leaf-row .primary-nav-item-child {
  flex: 1 1 auto;
  min-width: 0;
}
.primary-nav-leaf-row.top-level {
  width: auto;
  border-radius: 4px;
  overflow: hidden;
}
.primary-nav-item-child {
  border: none;
  border-radius: 0;
  background: transparent;
  color: #111827;
  padding: 0 12px;
  font-size: var(--menu-item-child-font-size);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  text-align: left;
  white-space: nowrap;
  justify-content: flex-start;
  min-height: calc(var(--btn-height) + 2px);
  transition: background-color 0.12s ease;
}
.primary-nav-item-child:hover,
.primary-nav-item-child:focus-visible {
  background: #e5e7eb;
  color: #111827;
  outline: none;
}
.primary-nav-item-child .primary-nav-image-wrap {
  background: #e5e7eb;
}
.primary-nav-item-child .primary-nav-icon {
  color: #4b5563;
}
.primary-nav-item-has-children {
  padding-right: 8px;
}
.primary-nav-child-arrow {
  margin-left: auto;
  font-size: 17px;
  color: #5e6675;
}
.primary-nav-favorite-btn {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 36px;
  width: 36px;
  min-height: calc(var(--btn-height) + 2px);
  color: #64748b;
  background: #f8fafc;
  border-left: 1px solid #e5e7eb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
}
.primary-nav-favorite-btn .material-symbols-outlined {
  font-size: 18px;
}
.primary-nav-favorite-btn:hover,
.primary-nav-favorite-btn:focus-visible,
.primary-nav-favorite-btn.is-active {
  color: #f59e0b;
}
.primary-nav-favorite-btn:hover,
.primary-nav-favorite-btn:focus-visible {
  background: #eef2f7;
  outline: none;
}
.primary-nav-leaf-row.top-level .primary-nav-favorite-btn {
  background: rgba(255, 255, 255, 0.1);
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.92);
}
.primary-nav-leaf-row.top-level .primary-nav-favorite-btn:hover,
.primary-nav-leaf-row.top-level .primary-nav-favorite-btn:focus-visible,
.primary-nav-leaf-row.top-level .primary-nav-favorite-btn.is-active {
  background: rgba(255, 255, 255, 0.18);
  color: #ffd166;
}

.topbar-main-right {
  display: flex;
  align-items: center;
  gap: 6px;
}
.topbar-company-context {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 8px 18px rgba(3, 23, 46, 0.12);
  backdrop-filter: blur(10px);
  color: #fff;
  font-size: 12px;
}
.topbar-company-context-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  font-size: 16px;
  flex: 0 0 auto;
}
.topbar-company-context-select-wrap {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 132px;
}
.topbar-environment-context {
  padding-inline: 8px;
}
.topbar-environment-context .topbar-company-context-select-wrap {
  min-width: 0;
  max-width: 168px;
}
.topbar-environment-context select {
  min-width: 0;
  max-width: 168px;
  font-size: 11px;
}
.topbar-company-context select {
  min-width: 132px;
  border: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  outline: none;
  font-weight: 700;
  padding: 0 18px 0 0;
  line-height: 1.1;
  appearance: none;
  cursor: pointer;
  text-overflow: ellipsis;
}
.topbar-company-context select option {
  color: #111827;
}
.topbar-company-context-chevron {
  position: absolute;
  right: 0;
  pointer-events: none;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.82);
}
.topbar-company-logo-fallback.is-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  letter-spacing: 0;
}
.icon-btn {
  min-width: var(--btn-height);
  width: var(--btn-height);
  min-height: var(--btn-height);
  height: var(--btn-height);
  padding: 6px;
  font-size: 14px;
  position: relative;
}

/* Skip link (WCAG 2.4.1): oculto fora da tela ate receber foco via teclado. */
.skip-link {
  position: absolute;
  left: 8px;
  top: -48px;
  z-index: 100000;
  padding: 10px 16px;
  background: var(--topbar-bg, #06653a);
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  transition: top 0.16s ease;
}
.skip-link:focus {
  top: 0;
  outline: 3px solid #ffffff;
  outline-offset: 2px;
}
#app-main-content:focus {
  outline: none;
}
.topbar .icon-btn.ghost.active {
  background: #fff;
  color: var(--primary, #0b5c9e);
  border-color: #fff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}
.topbar-notify-count {
  position: absolute;
  top: -4px;
  right: -3px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}
.hamburger-wrap {
  position: relative;
}
.topbar-user-trigger {
  min-height: var(--btn-height);
  height: var(--btn-height);
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 3px 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  text-align: left;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
.topbar-user-trigger:hover {
  background: rgba(255, 255, 255, 0.2);
}
.topbar-user-avatar-wrap {
  width: var(--topbar-avatar-size);
  height: var(--topbar-avatar-size);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.18);
  display: grid;
  place-items: center;
}
.topbar-user-avatar-wrap.company-logo-wrap {
  background: #ffffff;
  border-radius: 8px;
  padding: 2px;
  box-sizing: border-box;
}
.topbar-user-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.topbar-user-avatar.company-logo-avatar {
  object-fit: contain;
  background: #ffffff;
}
.topbar-user-avatar-fallback {
  font-size: 15px;
}
.topbar-user-text {
  display: grid;
  line-height: 1.08;
  min-width: 0;
}
.topbar-user-text strong {
  font-size: clamp(12px, 0.78vw, 13px);
  font-weight: 800;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topbar-user-text small {
  font-size: 11px;
  opacity: 0.9;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hamburger-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 156px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  padding: 5px;
  z-index: 60;
}
.hamburger-item {
  width: 100%;
  text-align: left;
  background: transparent;
  color: #111827;
  border: 0;
  border-radius: 6px;
  padding: 8px 9px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  font-weight: 600;
  font-size: 0.96rem;
}
.hamburger-item .material-symbols-outlined {
  font-size: 17px;
  color: currentColor;
}
.hamburger-item:hover {
  background: #f3f4f6;
}
.hamburger-item.danger {
  color: #b91c1c;
}
.topbar-secondary-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.topbar-search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: auto;
  bottom: auto;
  z-index: 95;
  background: transparent;
  padding: 0;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
}
.topbar-search-panel {
  width: 100%;
  max-width: none;
  margin: 0;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
  background: transparent;
}
.topbar-search-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 6px 0 4px;
  background: var(--menu-bg);
}
#topbar-search-input {
  border: 0;
  border-radius: 0;
  min-height: 42px;
  height: 42px;
  padding: 0 12px;
  font-size: 15px;
  background: #ffffff;
  color: #0f172a;
  box-shadow: none;
}
#topbar-search-input::placeholder {
  color: #8b97a8;
}
#topbar-search-input:focus {
  box-shadow: none;
}
.topbar-search-head .icon-btn {
  color: var(--menu-text);
  border: 0;
  background: transparent;
  min-width: 36px;
  width: 36px;
  min-height: 36px;
  height: 36px;
  padding: 0;
  border-radius: 0;
}
.topbar-search-head .icon-btn:hover {
  background: transparent;
  opacity: 0.82;
}
.topbar-search-head .icon-btn .material-symbols-outlined {
  font-size: 26px;
}
.topbar-search-results {
  min-height: 310px;
  max-height: min(72vh, 760px);
  overflow: auto;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-top: 0;
  box-shadow: 0 14px 26px rgba(15, 23, 42, 0.16);
}
.topbar-search-item {
  width: 100%;
  border: 0;
  border-top: 1px solid #eef2f7;
  background: #ffffff;
  color: #0f172a;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(280px, 1.5fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  min-height: 60px;
  text-align: left;
}
.topbar-search-item:hover {
  background: #f8fbff;
}
.topbar-search-item strong {
  font-size: 14px;
}
.topbar-search-item small {
  color: #64748b;
  font-size: 12px;
}
.topbar-search-item .material-symbols-outlined {
  color: var(--menu-bg);
}
.topbar-search-item .material-symbols-outlined {
  font-size: 20px;
  color: #0b3f72;
}
.topbar-search-empty {
  padding: 22px 16px;
  color: #64748b;
}
.appearance-editor-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
}
.appearance-editor-fields {
  display: grid;
  gap: 12px;
}
.appearance-company-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 320px) auto;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
}
.appearance-company-toolbar .domain-company-selector {
  min-width: 0;
  margin: 0;
}
.appearance-company-toolbar .domain-company-selector select {
  min-width: 100%;
}
.appearance-company-toolbar #domain-appearance-apply,
.appearance-company-toolbar #domain-blocking-apply,
.appearance-company-toolbar #domain-layout-apply {
  min-width: 118px;
  height: 42px;
  align-self: end;
}
.layout-editor-sections {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.layout-editor-section h5 {
  margin: 0 0 10px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.layout-editor-section h5 .material-symbols-outlined {
  font-size: 1.1rem;
  color: var(--primary);
  opacity: 0.7;
}
.appearance-controls-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}
.appearance-controls-grid > label {
  min-width: 0;
}
.appearance-control-card {
  display: grid;
  gap: 8px;
  align-content: start;
  min-height: 100%;
  padding: 10px 12px;
  border: 1px solid #dbe5f0;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.04);
}
.appearance-control-card button {
  justify-self: flex-start;
}
.appearance-control-card input:not([type="checkbox"]):not([type="file"]),
.appearance-control-card select {
  width: 100%;
}
.appearance-control-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
}
.appearance-control-card-color {
  gap: 10px;
}
.appearance-color-control {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}
.appearance-color-input {
  width: 56px;
  min-width: 56px;
  height: 38px;
  padding: 4px;
  border-radius: 10px;
  border: 1px solid #cfd9e6;
  background: #ffffff;
  cursor: pointer;
}
.appearance-color-preview {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #d7e0eb;
  background: #ffffff;
}
.appearance-color-preview strong {
  font-size: 13px;
  color: #0f172a;
  letter-spacing: 0.03em;
}
.appearance-color-preview-swatch {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  flex: 0 0 auto;
}
.appearance-toggle-card {
  grid-template-columns: 1fr;
}
.appearance-toggle-card.profile-check {
  min-height: auto;
  display: flex;
  align-items: center;
}
.appearance-toggle-card.profile-check span {
  font-weight: 700;
}
.appearance-context-card,
.appearance-preview-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
  overflow: hidden;
  position: sticky;
  top: 12px;
}
.appearance-context-card {
  padding: 12px 14px;
  display: grid;
  gap: 4px;
}
.appearance-context-card strong {
  font-size: 0.92rem;
  color: #0f172a;
}
.appearance-context-card span {
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--primary, #0b5c9e);
}
.appearance-context-card small,
.appearance-preview-head small {
  color: #64748b;
  line-height: 1.45;
}
.appearance-preview-head {
  padding: 14px 16px;
  border-bottom: 1px solid #e6edf5;
  display: grid;
  gap: 4px;
}
.appearance-preview-shell {
  min-height: 320px;
  padding: 16px;
  display: grid;
  gap: 14px;
}
.appearance-preview-topbar {
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.16);
}
.appearance-preview-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.appearance-preview-logo-wrap {
  width: 70px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.22);
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: 0 0 auto;
}
.appearance-preview-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #ffffff;
}
.appearance-preview-logo-fallback {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.appearance-preview-brand-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.appearance-preview-brand-copy strong,
.appearance-preview-brand-copy small {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.appearance-preview-user {
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  flex: 0 0 auto;
}
.appearance-preview-body {
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(148, 163, 184, 0.24);
  padding: 16px;
  display: grid;
  gap: 16px;
  backdrop-filter: blur(6px);
}
.appearance-preview-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.appearance-preview-nav span {
  border-radius: 999px;
  background: #e8f1fb;
  color: var(--icon-accent);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
}
.appearance-preview-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}
.appearance-preview-action-card {
  min-height: 88px;
  border-radius: 14px;
  border: 1px solid #dbe5f0;
  background: #ffffff;
  padding: 14px;
  display: grid;
  gap: 6px;
  align-content: start;
  justify-items: start;
}
.appearance-preview-action-card .material-symbols-outlined {
  font-size: 24px;
  color: var(--icon-accent);
}
.appearance-preview-action-card small {
  color: #475569;
  font-weight: 700;
}
.appearance-preview-kpi {
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid #dbe5f0;
  padding: 14px;
  display: grid;
  gap: 4px;
}
.appearance-preview-kpi strong {
  font-size: 1.4rem;
  color: #0f172a;
}
.appearance-preview-kpi small {
  color: #64748b;
}
.appearance-preview-content > button {
  justify-self: start;
}
.login-config-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.login-config-card {
  min-height: 100%;
  padding: 14px;
  gap: 14px;
}
.login-toggle-stack {
  gap: 12px;
}
.toggle-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 14px;
  align-items: start;
}
.toggle-card-grid .profile-check {
  height: 100%;
}
.login-config-card .domain-grid {
  margin-top: 2px;
}
.domain-grid-span-2 {
  grid-column: 1 / -1;
}
.favorites-modal-card {
  width: min(1280px, calc(100vw - 26px));
  max-height: min(94dvh, 960px);
}
.notifications-modal-card {
  width: min(760px, calc(100vw - 26px));
  max-height: min(92dvh, 860px);
}
.notifications-modal-toolbar {
  padding: 0 18px 12px;
  display: flex;
  justify-content: flex-end;
}
.notifications-modal-list {
  padding: 0 18px 18px;
  display: grid;
  gap: 12px;
  overflow: auto;
}
.notification-card {
  border: 1px solid #dbe5f0;
  border-radius: 12px;
  background: #fff;
  padding: 14px;
  display: grid;
  gap: 8px;
}
.notification-card.is-read {
  opacity: 0.82;
  background: #f8fafc;
}
.notification-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.notification-card-head strong {
  color: #0f172a;
}
.notification-card p {
  margin: 0;
  color: #334155;
}
.notification-card small {
  color: #64748b;
}
.notification-card-actions {
  display: flex;
  justify-content: flex-end;
}
.capacity-modal-card {
  width: min(1080px, calc(100vw - 26px));
}
.capacity-logs-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin: 0 0 12px;
}
.capacity-log-stat {
  border: 1px solid #d9e6f3;
  border-radius: 14px;
  padding: 12px 14px;
  background: linear-gradient(180deg, #fbfdff 0%, #f2f7fc 100%);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
  display: grid;
  gap: 4px;
}
.capacity-log-stat small {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.capacity-log-stat strong {
  color: #0f172a;
  font-size: 1.1rem;
}
.capacity-logs-table-wrap {
  max-height: min(60vh, 620px);
}
.capacity-logs-table {
  width: 100%;
  table-layout: fixed;
}
.capacity-logs-table th,
.capacity-logs-table td {
  vertical-align: top;
}
.capacity-log-date-cell {
  width: 132px;
}
.capacity-log-meta-cell {
  white-space: normal;
  word-break: break-word;
}
.capacity-log-execution-cell {
  white-space: normal;
  word-break: break-all;
  font-family: "Fira Code", "Cascadia Code", monospace;
  font-size: 0.78rem;
}
.capacity-log-detail-cell {
  white-space: normal;
  min-width: 0;
  word-break: break-word;
}
.capacity-log-detail-line {
  color: #334155;
  line-height: 1.35;
}
.capacity-log-detail-line + .capacity-log-detail-line {
  margin-top: 4px;
}
.favorites-modal-form {
  gap: 12px;
}
.favorites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.favorite-card {
  border: 1px solid #dbe5f0;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  overflow: hidden;
  display: grid;
}
.favorite-card-head {
  padding: 12px 12px 8px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.favorite-card-head small {
  display: block;
  margin-bottom: 4px;
  color: #64748b;
  font-size: 11px;
}
.favorite-card-head strong {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 14px;
  color: #0f172a;
}
.favorite-card-path {
  padding: 0 12px;
  color: #64748b;
  font-size: 11px;
  min-height: 32px;
}
.favorite-card-preview {
  min-height: 132px;
  background: linear-gradient(180deg, #eef2f7 0%, #e5ebf2 100%);
  display: grid;
  place-items: center;
  color: #64748b;
}
.favorite-card-preview .material-symbols-outlined {
  font-size: 38px;
}
.favorite-card-footer {
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.favorite-card-actions {
  display: inline-flex;
  gap: 6px;
}
.favorite-card-actions button {
  min-height: 34px;
  height: 34px;
}
table thead th.table-sortable {
  cursor: pointer;
  user-select: none;
}
table thead th.table-sortable::after {
  content: "↕";
  margin-left: 6px;
  font-size: 11px;
  color: #94a3b8;
}
table thead th.table-sortable.sorted-asc::after {
  content: "▲";
  color: #0f172a;
}
table thead th.table-sortable.sorted-desc::after {
  content: "▼";
  color: #0f172a;
}
.simulation-banner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: var(--sim-banner-padding, 12px) 12px;
  border-radius: 8px;
  border: 1px solid rgba(59, 130, 246, 0.32);
  background: linear-gradient(90deg, #eff6ff 0%, #e0ecff 100%);
  color: #0f172a;
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(30, 64, 175, 0.08);
}
.simulation-banner-main {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #1e3a8a;
}
.simulation-banner .material-symbols-outlined {
  font-size: 17px;
  color: #1d4ed8;
}
.simulation-banner-exit {
  min-height: 28px;
  height: 28px;
  padding: 0 10px;
  border-radius: 6px;
  border: 1px solid #93c5fd;
  background: #ffffff;
  color: #1e3a8a;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.simulation-banner-exit:hover {
  background: #eff6ff;
}
.topbar-welcome {
  min-width: 240px;
}
.topbar .brand { color: #d7e4ff; margin: 0 0 4px; font-size: 14px; letter-spacing: 0.1em; }
.topbar h2 { font-size: 14px; color: #fff; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.actions button {
  min-width: 84px;
  min-height: var(--btn-height);
  height: var(--btn-height);
  padding: 0 10px;
  font-size: 0.88rem;
  line-height: 1.1;
}

.top-report-menu {
  display: flex;
  gap: 6px;
  flex: 1;
  overflow: auto;
  padding: 2px 4px;
}
.top-report-item {
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  padding: 8px 12px;
}
.top-report-item:hover {
  background: rgba(255, 255, 255, 0.16);
}
.top-report-item.active {
  background: rgba(255, 255, 255, 0.95);
  color: #0f5132;
}

.home-panel {
  margin-bottom: 0;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f9fcff;
  border-color: #d8e4f0;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
.home-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.home-switches {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.home-switch {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  min-width: 190px;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafd;
  font-weight: 600;
}
.home-switch span {
  order: 1;
  flex: 1;
}
.home-switch input[type="checkbox"] {
  order: 2;
}
.home-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  flex: none;
}
.home-kpi-card {
  border: 1px solid #d8e5f3;
  border-radius: 14px;
  background: #f6faff;
  padding: 10px 50px 10px 12px;
  display: grid;
  gap: 4px;
  position: relative;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
  isolation: isolate;
}
.home-kpi-card::before {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  top: 0;
  height: 3px;
  border-radius: 999px;
  background: rgba(5, 85, 45, 0.8);
  z-index: -1;
}
.home-kpi-card span {
  color: #5e6675;
  font-size: 13px;
}
.home-kpi-card strong {
  font-family: "Sora", sans-serif;
  font-size: clamp(22px, 1.9vw, 30px);
}
.home-kpi-icon {
  position: absolute;
  right: 14px;
  bottom: 12px;
  width: 24px;
  height: 24px;
  color: var(--icon-accent);
  opacity: 0.9;
}
.home-kpi-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.home-chart-card {
  border: 1px solid #d8e5f3;
  border-radius: 14px;
  background: #f8fbff;
  padding: 10px 12px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
  display: flex;
  flex-direction: column;
  flex: 1.2 1 0;
  min-height: 0;
}
.home-chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  flex: none;
}
.home-chart-title {
  display: grid;
  gap: 2px;
}
.home-chart-head h4 {
  font-size: 18px;
}
.home-chart-head small {
  color: #5e6675;
}
.home-chart-modes {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.home-chart-mode-btn {
  border: none;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  color: #334155;
  font-weight: 700;
  padding: 9px 16px;
  cursor: pointer;
}
.home-chart-mode-btn:last-child {
  border-right: none;
}
.home-chart-mode-btn.active {
  background: #e5edf8;
  color: #0f172a;
}
.home-chart-insights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 6px;
  flex: none;
}
.home-chart-insight {
  border: 1px solid #d3dfed;
  border-radius: 8px;
  background: #f4f9ff;
  padding: 7px 10px;
  display: grid;
  gap: 2px;
}
.home-chart-insight span {
  font-size: 11px;
  color: #64748b;
}
.home-chart-insight strong {
  font-size: 18px;
  line-height: 1.15;
  color: #1f2937;
}
.home-chart-focus {
  color: #475569;
  font-size: 12px;
  margin: 0 2px 6px;
  min-height: 16px;
  flex: none;
}
.home-chart-bars {
  min-height: 120px;
  flex: 1 1 auto;
  display: grid;
  align-items: end;
  justify-content: center;
  gap: clamp(2px, 0.45vw, 10px);
  overflow-x: hidden;
  padding: 0 8px 4px;
}
.home-chart-col {
  height: 100%;
  width: 100%;
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: end;
  gap: 6px;
}
.home-chart-value {
  width: 100%;
  background: var(--primary, #0b5c9e);
  border-radius: 6px 6px 0 0;
  min-height: 6px;
}
.home-chart-col small {
  text-align: center;
  color: #64748b;
  font-size: 11px;
}
.home-chart-empty {
  margin: 0;
  color: #5e6675;
  font-size: 13px;
  text-align: center;
  width: min(100%, 360px);
  justify-self: center;
  align-self: center;
}
.home-chart-tooltip {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1400;
  pointer-events: none;
  border-radius: 8px;
  background: rgba(17, 24, 39, 0.95);
  color: #fff;
  padding: 8px 10px;
  min-width: 120px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
  font-size: 13px;
  line-height: 1.25;
}
.home-chart-tooltip strong {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
}
.home-chart-tooltip-metric {
  display: flex;
  align-items: center;
  gap: 6px;
}
.home-chart-tooltip-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--primary, #0b5c9e);
  border: 1px solid #9fc7ec;
  flex: none;
}
.home-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 12px;
  flex: 1 1 0;
  min-height: 0;
}
.home-list-card {
  border: 1px solid #d8e5f3;
  border-radius: 14px;
  background: #f8fbff;
  padding: 12px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.home-list-card h4 {
  margin-bottom: 8px;
  flex: none;
}
.home-list-card .table-wrap {
  border: 1px solid #e3eaf4;
  border-radius: 10px;
  overflow: auto;
  flex: 1 1 auto;
  min-height: 0;
}
.home-list-card tbody tr:nth-child(even) td {
  background: #fbfdff;
}
.home-list-card tbody tr:hover td {
  background: #f2f7ff;
}
.home-top-reports {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  align-content: start;
  overflow: auto;
  min-height: 0;
  flex: 1 1 auto;
}
.home-top-reports li {
  display: grid;
  gap: 4px;
}
.home-top-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.home-top-line span {
  font-weight: 700;
}
.home-top-line small {
  color: #5e6675;
}
.home-top-bar {
  height: 7px;
  border-radius: 999px;
  background: #dce7f6;
}
.home-top-bar span {
  display: block;
  height: 7px;
  border-radius: 999px;
  background: var(--primary, #0b5c9e);
}

.profile-panel { margin-bottom: 12px; padding: 14px; }
.profile-panel > h3 { margin-bottom: 12px; }
.profile-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 12px;
}
.profile-side { padding: 12px; }
.profile-avatar-wrap {
  min-height: 270px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
}
.profile-avatar {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
}
.profile-side-name { text-align: center; margin: 12px 0 0; font-weight: 700; }

.profile-main { padding: 0; overflow: hidden; }
.profile-tabs {
  display: flex;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
}
.profile-tab {
  border-radius: 0;
  background: transparent;
  color: #555;
  border: none;
  padding: 12px 16px;
  font-weight: 600;
}
.profile-tab.active {
  color: #111827;
  border-bottom: 2px solid var(--primary);
}
.profile-tab-content {
  display: none;
  padding: 14px;
}
.profile-tab-content.active { display: block; }
.profile-form { display: flex; flex-direction: column; gap: 10px; }
.profile-actions { display: flex; gap: 8px; margin-top: 6px; }
.profile-check {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, #fbfdff 0%, #f4f8fc 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}
.profile-check.disabled {
  opacity: 0.5;
  pointer-events: none;
  cursor: not-allowed;
  background: #f0f2f5;
}
.profile-check span {
  flex: 1;
  min-width: 0;
  color: #334155;
  font-weight: 600;
  line-height: 1.25;
}
.profile-check input[type="checkbox"] {
  margin-left: auto;
}
.profile-check .field-label-head {
  flex: 1;
  min-width: 0;
  gap: 8px;
}
.profile-check .field-label-caption {
  display: block;
  min-width: 0;
}
.profile-check .field-help-icon {
  margin: 0;
  flex: 0 0 auto;
}
.profile-check-with-hint {
  align-items: center;
}
.profile-dropzone {
  min-height: 120px;
  border: 1px dashed #aab4c2;
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: #fafbfc;
}
.profile-dropzone.active {
  border-color: var(--primary);
  background: #f0f8ff;
}

.admin-panel {
  padding: 14px;
  margin-bottom: 12px;
  border-color: #d7e4f2;
  background: #f9fcff;
}
.admin-panel > h3 { margin-bottom: 12px; }

.admin-main-tabs, .admin-subtabs, .modal-tabs, .stepper {
  display: flex;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  gap: 2px;
}
.admin-main-tab, .admin-subtab, .entity-subtab, .audit-subtab, .audit-mini-tab, .domain-subtab, .plan-subtab, .modal-tab, .system-config-tab {
  border: none;
  border-radius: 10px 10px 0 0;
  background: transparent;
  color: #556274;
  padding: 11px 16px;
  font-weight: 600;
  position: relative;
  transition: color 0.2s ease, background-color 0.2s ease, transform 0.12s ease;
}
.admin-main-tab .ui-btn-icon,
.admin-subtab .ui-btn-icon,
.entity-subtab .ui-btn-icon,
.audit-subtab .ui-btn-icon,
.audit-mini-tab .ui-btn-icon,
.domain-subtab .ui-btn-icon,
.plan-subtab .ui-btn-icon,
.system-config-tab .ui-btn-icon,
.profile-tab .ui-btn-icon {
  font-size: 17px;
}
.admin-main-tab::after, .admin-subtab::after, .entity-subtab::after, .audit-subtab::after, .audit-mini-tab::after, .domain-subtab::after, .plan-subtab::after, .modal-tab::after, .system-config-tab::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--primary);
  transform: scaleX(0.3);
  opacity: 0;
  transition: transform 0.18s ease, opacity 0.18s ease;
}
.admin-main-tab:hover, .admin-subtab:hover, .entity-subtab:hover, .audit-subtab:hover, .audit-mini-tab:hover, .domain-subtab:hover, .plan-subtab:hover, .modal-tab:hover, .system-config-tab:hover {
  color: var(--primary);
  background: rgba(11, 92, 158, 0.09);
  transform: translateY(-1px);
}
.admin-main-tab:hover::after, .admin-subtab:hover::after, .entity-subtab:hover::after, .audit-subtab:hover::after, .audit-mini-tab:hover::after, .domain-subtab:hover::after, .plan-subtab:hover::after, .modal-tab:hover::after, .system-config-tab:hover::after {
  transform: scaleX(1);
  opacity: 0.6;
}
.admin-main-tab:focus-visible, .admin-subtab:focus-visible, .entity-subtab:focus-visible, .audit-subtab:focus-visible, .audit-mini-tab:focus-visible, .domain-subtab:focus-visible, .plan-subtab:focus-visible, .modal-tab:focus-visible, .system-config-tab:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px rgba(11, 92, 158, 0.32);
}
.admin-main-tab.active, .admin-subtab.active, .entity-subtab.active, .audit-subtab.active, .audit-mini-tab.active, .domain-subtab.active, .plan-subtab.active, .modal-tab.active, .system-config-tab.active {
  color: #0f172a;
  background: rgba(5, 85, 45, 0.12);
}
.admin-main-tab.active::after, .admin-subtab.active::after, .entity-subtab.active::after, .audit-subtab.active::after, .audit-mini-tab.active::after, .domain-subtab.active::after, .plan-subtab.active::after, .modal-tab.active::after, .system-config-tab.active::after {
  transform: scaleX(1);
  opacity: 1;
}

.admin-main-content, .admin-tab-panel, .modal-tab-content, .import-step {
  display: none;
}
.admin-main-content.active, .admin-tab-panel.active, .modal-tab-content.active, .import-step.active {
  display: block;
}

.table-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px 14px;
  margin: 10px 0 12px;
  flex-wrap: wrap;
}
.entities-scope-banner {
  margin: 12px 0 2px;
  padding: 10px 12px;
  border: 1px solid #d8e3ef;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fbff 0%, #eef5fb 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  flex-wrap: wrap;
}
.entities-scope-banner-copy {
  display: grid;
  gap: 2px;
}
.entities-scope-banner-copy strong {
  color: #0f172a;
  font-size: 0.92rem;
}
.entities-scope-banner-copy span {
  color: #33506d;
  font-size: 0.84rem;
}
.table-toolbar-left, .table-toolbar-right {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.table-toolbar-left {
  min-width: min(100%, 340px);
}
.table-toolbar-right {
  margin-left: auto;
}
.table-export-hidden {
  display: none !important;
}
.table-toolbar-right.table-toolbar-filtered {
  flex: 1 1 560px;
  min-width: min(100%, 360px);
  justify-content: flex-end;
}
.table-toolbar-right.table-toolbar-export-only {
  display: inline-flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: nowrap;
}
.table-filter-pack {
  width: min(860px, 100%);
  margin-left: auto;
  display: grid;
  grid-template-columns: minmax(160px, 240px) minmax(280px, 1fr) auto;
  align-items: end;
  gap: 8px 12px;
}
.table-filter-pack.no-scope {
  grid-template-columns: minmax(280px, 1fr) auto;
}
.table-filter-actions {
  align-self: end;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-width: var(--btn-height);
  min-height: var(--btn-height);
}
.table-filter-actions:empty {
  display: none;
}
.table-filter-scope,
.table-filter-search {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.table-filter-scope span,
.table-filter-search span {
  font-size: 11px;
  font-weight: 600;
  color: #475569;
}
.table-filter-select,
.table-filter-input {
  width: 100%;
  min-height: var(--btn-height);
  height: var(--btn-height);
  border: 1px solid var(--input-border);
  border-radius: 10px;
  padding: 0 12px;
  background: #fff;
  color: #0f172a;
  font-size: var(--menu-field-input-size);
}
.table-filter-select:focus,
.table-filter-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--input-focus-ring);
}
.table-filter-icon {
  align-self: end;
  justify-self: end;
  min-width: var(--btn-height);
  min-height: var(--btn-height);
  width: var(--btn-height);
  height: var(--btn-height);
  border-radius: 10px;
  border: 1px solid #cdd7e6;
  color: #0f172a;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.07);
}
.table-export-trigger-icon {
  font-size: 20px;
  line-height: 1;
  font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 20;
}

.table-wrap {
  overflow-x: auto;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  scrollbar-gutter: stable both-edges;
}
.dataset-table-wrap {
  overflow-x: auto;
  overflow-y: auto;
  max-height: clamp(320px, 68dvh, 760px);
  scrollbar-gutter: stable both-edges;
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 100%;
  table-layout: auto;
  background: #fff;
}
th, td {
  padding: var(--table-cell-padding-y) var(--table-cell-padding-x);
  text-align: left;
  border-bottom: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  font-size: 0.82rem;
  line-height: 1.2;
  vertical-align: middle;
}
.table-wrap th:last-child,
.table-wrap td:last-child {
  padding-right: calc(var(--table-cell-padding-x) + 10px);
}
tbody tr {
  background-image: linear-gradient(to right, var(--table-row-divider), var(--table-row-divider));
  background-repeat: no-repeat;
  background-position: left bottom;
  background-size: 100% 1px;
  transition: background-color 0.12s ease;
}
tbody tr:nth-child(even) {
  background-color: #f8fafc;
}
tbody tr:hover {
  background-color: rgba(11, 92, 158, 0.04);
}
tbody tr:last-child {
  background-image: none;
}
th {
  color: #5e6675;
  font-size: var(--table-header-font-size, 0.75rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 1px solid var(--table-row-divider);
  background: #f1f5f9;
}
#entity-dataset-table {
  min-width: 1280px;
}
#entity-dataset-table th[data-dataset-sort] {
  cursor: pointer;
  user-select: none;
}
#entity-dataset-table th[data-dataset-sort].sorted-asc::after {
  content: " ▲";
  color: #374151;
  font-size: 11px;
}
#entity-dataset-table th[data-dataset-sort].sorted-desc::after {
  content: " ▼";
  color: #374151;
  font-size: 11px;
}
#entity-dataset-table th:last-child,
#entity-dataset-table td:last-child {
  white-space: nowrap;
  width: 1%;
}
#entity-dataset-table .table-actions {
  flex-wrap: nowrap;
  white-space: nowrap;
  gap: 4px;
}
#entity-dataset-table .table-actions button {
  flex: 0 0 auto;
  min-height: var(--table-action-size);
  height: var(--table-action-size);
  padding: 0 8px;
  font-size: 0.74rem;
}
.table-empty {
  text-align: center;
  color: #5e6675;
}

.nps-modal-head-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nps-rating-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nps-rating-label {
  font-weight: 700;
  color: #172033;
}

.nps-rating-scale {
  display: grid;
  grid-template-columns: repeat(11, minmax(0, 1fr));
  gap: 8px;
}

.nps-rating-option {
  min-height: 40px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  background: var(--primary, #0b5c9e);
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.nps-rating-option:hover,
.nps-rating-option:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
  border-color: rgba(15, 23, 42, 0.18);
  outline: none;
}

.nps-rating-option.active {
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.92), 0 10px 24px rgba(15, 23, 42, 0.16);
}

.modal-actions-between {
  justify-content: space-between;
}

.audit-feedback-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.audit-feedback-summary-card {
  padding: 14px 16px;
  border: 1px solid #d7e3f5;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.audit-feedback-summary-card small {
  color: #637189;
}

.audit-feedback-summary-card strong {
  font-size: 1.45rem;
  color: #0d3f70;
}

.audit-feedback-admin-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.audit-feedback-card {
  padding: 14px;
}

.audit-feedback-card-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}

.audit-feedback-card-head small {
  color: #637189;
}

.audit-filter-strip {
  padding: 14px 16px;
  margin-bottom: 14px;
}

.audit-filter-strip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.audit-filter-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.audit-filter-field span {
  font-size: 0.8rem;
  font-weight: 600;
  color: #4c5a70;
}

.audit-filter-field select {
  min-height: 40px;
}

.audit-filter-field.is-disabled {
  opacity: 0.8;
}

.audit-gerencial-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 14px;
}

.audit-gerencial-hero strong {
  display: block;
  font-size: 1.05rem;
  color: #0f172a;
}

.audit-gerencial-hero small {
  color: #637189;
}

.audit-gerencial-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.audit-kpi-card {
  padding: 14px 16px;
  border: 1px solid #d7e3f5;
  border-left: 4px solid #94a3b8;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
}
.audit-kpi-card .audit-kpi-icon {
  font-size: 28px;
  opacity: 0.7;
  flex-shrink: 0;
}
.audit-kpi-card .audit-kpi-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.audit-kpi-card small {
  color: #637189;
  font-size: 0.74rem;
}

.audit-kpi-card strong {
  font-size: 1.35rem;
  color: #0d3f70;
}

.audit-kpi-card.kpi-success { border-left-color: #22c55e; }
.audit-kpi-card.kpi-success .audit-kpi-icon { color: #16a34a; }
.audit-kpi-card.kpi-error { border-left-color: #ef4444; }
.audit-kpi-card.kpi-error .audit-kpi-icon { color: #dc2626; }
.audit-kpi-card.kpi-info { border-left-color: var(--primary, #0b5c9e); }
.audit-kpi-card.kpi-info .audit-kpi-icon { color: var(--primary, #0b5c9e); }
.audit-kpi-card.kpi-geo { border-left-color: #14b8a6; }
.audit-kpi-card.kpi-geo .audit-kpi-icon { color: #0d9488; }
.audit-kpi-card.kpi-neutral { border-left-color: #94a3b8; }
.audit-kpi-card.kpi-neutral .audit-kpi-icon { color: #64748b; }

.audit-gerencial-panel {
  display: none;
}

.audit-gerencial-panel.active {
  display: block;
}

.audit-gerencial-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.audit-gerencial-grid-main {
  margin-bottom: 14px;
}

.audit-gerencial-span-2 {
  grid-column: span 2;
}

.audit-gerencial-card {
  padding: 14px;
}

.audit-gerencial-card-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

.audit-gerencial-card-head small {
  color: #637189;
}

.audit-bar-series {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(52px, 1fr));
  gap: 10px;
  min-height: 240px;
  align-items: end;
}

.audit-series-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-height: 220px;
}

.audit-series-value {
  font-size: 0.78rem;
  font-weight: 700;
  color: #0d3f70;
}

.audit-series-bar {
  width: 100%;
  min-height: 16px;
  border-radius: 12px 12px 4px 4px;
  background: linear-gradient(180deg, #22b4e6 0%, #0b5c9e 100%);
  box-shadow: 0 10px 20px rgba(11, 92, 158, 0.15);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.audit-series-col:hover .audit-series-bar {
  transform: scaleY(1.06);
  box-shadow: 0 12px 24px rgba(11, 92, 158, 0.25);
}

.audit-series-col small {
  color: #637189;
  text-align: center;
}

.audit-pill-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
}

.audit-pill {
  border: 1px solid #d7e3f5;
  border-radius: 999px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #fff;
}
.audit-pill[data-bucket="green"]  { border-color: #86efac; background: #f0fdf4; }
.audit-pill[data-bucket="yellow"] { border-color: #fde68a; background: #fefce8; }
.audit-pill[data-bucket="orange"] { border-color: #fdba74; background: #fff7ed; }
.audit-pill[data-bucket="red"]    { border-color: #fca5a5; background: #fef2f2; }

.audit-pill strong {
  color: #0f172a;
}

.audit-pill span {
  color: #0d3f70;
  font-weight: 700;
}
.audit-pill[data-bucket="green"]  span { color: #16a34a; }
.audit-pill[data-bucket="yellow"] span { color: #ca8a04; }
.audit-pill[data-bucket="orange"] span { color: #ea580c; }
.audit-pill[data-bucket="red"]    span { color: #dc2626; }

.audit-ranking-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.audit-ranking-item {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(100px, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.audit-ranking-item-compact {
  grid-template-columns: minmax(0, 1fr) auto;
}

.audit-ranking-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.audit-ranking-copy strong,
.saved-filter-copy strong {
  color: #0f172a;
}
.audit-ranking-pos {
  color: #94a3b8;
  font-weight: 600;
  font-size: 0.78rem;
  margin-right: 4px;
}

.audit-ranking-copy small,
.saved-filter-copy small {
  color: #637189;
}

.audit-ranking-meter {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: #ebf3fb;
  overflow: hidden;
}

.audit-ranking-bar {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #27c0a9 0%, #0b5c9e 100%);
}

.audit-ranking-value {
  font-weight: 700;
  color: #0d3f70;
}

.audit-empty {
  padding: 20px 16px;
  border: 1px dashed #cbd8eb;
  border-radius: 12px;
  text-align: center;
  color: #637189;
  background: #f8fbff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.audit-empty .material-symbols-outlined {
  font-size: 28px;
  opacity: 0.5;
}
.audit-empty small {
  font-size: 0.76rem;
  color: #94a3b8;
}

.saved-filters-modal-card { max-width: 640px; }
.report-print-modal-card { max-width: 860px; }
.report-print-modal-form { overflow-x: hidden; }

.saved-filters-modal-toolbar {
  display: flex;
  justify-content: flex-start;
}

.saved-filters-modal-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.saved-filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid #d7e3f5;
  border-radius: 14px;
  background: #fff;
}

.saved-filter-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.saved-filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.report-print-options {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.report-print-option {
  border: 1px solid #d7e3f5;
  border-radius: 10px;
  background: #ffffff;
  color: #0f172a;
  padding: 10px 14px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  text-align: left;
  flex: 1;
  min-width: 0;
  min-height: 0;
  height: auto;
  white-space: normal;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.report-print-option:hover {
  border-color: #93c5fd;
  background: #f0f7ff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.report-print-option:focus-visible {
  outline: 2px solid var(--primary, #0b5c9e);
  outline-offset: 2px;
  background: #ffffff;
}

.report-print-option .material-symbols-outlined {
  font-size: 22px;
  color: #0b5c9e;
}

.report-print-option-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.report-print-option strong {
  color: #0f172a;
  font-size: 0.92em;
  line-height: 1.25;
  white-space: nowrap;
}

.report-print-option small {
  color: #637189;
  font-size: 0.78em;
  line-height: 1.35;
  white-space: nowrap;
}

.report-print-smart-panel {
  margin-top: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.report-print-result {
  border: 1px solid #bbf0d0;
  border-radius: 10px;
  background: #f0faf4;
  padding: 10px 14px;
  display: grid;
  gap: 10px;
}

.report-print-result-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.report-print-result-actions > .tip {
  margin-left: auto;
  font-size: 0.78em;
  color: #475569;
}

.report-print-email-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}

.report-print-email-form {
  flex: 1;
  min-width: 260px;
  display: grid;
  gap: 10px;
}

.report-print-email-row > button {
  align-self: flex-end;
}

.report-print-email-row .report-print-email-label {
  flex: 1;
  min-width: 200px;
}

.report-print-inline-check {
  margin: 0;
}

.report-print-email-note {
  display: block;
  color: #475569;
  line-height: 1.4;
}

.report-print-email-label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-weight: 600;
  color: #0f172a;
}

.report-print-email-label input,
.report-print-email-label textarea {
  width: 100%;
}

.report-print-email-label textarea {
  min-height: 56px;
  resize: vertical;
}

.report-print-email-custom-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.report-print-email-custom-fields .report-print-email-label:last-child {
  grid-column: 1 / -1;
}

.report-print-email-custom-fields textarea {
  min-height: 96px;
}

.report-print-smart-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 12px;
  background: #f1f5f9;
  border-radius: 10px;
}

.report-print-smart-toolbar > small {
  color: #475569;
  font-size: 0.82em;
  margin-right: auto;
}

.report-print-smart-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.report-print-pages {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
  max-height: 460px;
  overflow-y: auto;
  padding-right: 4px;
}

/* Filtro de busca de paginas do Exportar PDF (relatorios com muitas paginas). */
.report-print-pages-filter {
  width: 100%;
  margin-bottom: 10px;
  padding: 8px 12px;
  border: 1px solid #d7e3f5;
  border-radius: 10px;
  font-size: 0.85rem;
}

.report-print-page.is-filtered-out {
  display: none;
}

.report-print-pages-empty-filter {
  grid-column: 1 / -1;
  color: #637189;
  font-size: 0.85rem;
  padding: 12px 4px;
}

.report-print-page {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid #d7e3f5;
  border-radius: 10px;
  background: #ffffff;
  min-height: 0;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.report-print-page:hover {
  border-color: #9fc5ea;
  background: #f7faff;
}

.report-print-page.is-selected {
  border-color: #0f6b3a;
  background: #f4fbf6;
}

.report-print-page-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  inline-size: 1px;
  block-size: 1px;
}

.report-print-page-order {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eaf4ff;
  color: #0b5c9e;
  font-weight: 700;
  font-size: 0.75rem;
}

.report-print-page.is-selected .report-print-page-order {
  background: #dff6e7;
  color: #0f6b3a;
}

.report-print-page-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.report-print-page-copy strong {
  color: #0f172a;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  font-size: 0.88rem;
  word-break: break-word;
}

.report-print-page-copy small {
  color: #637189;
  line-height: 1.25;
  font-size: 0.75rem;
  white-space: nowrap;
}

.report-print-page-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.report-print-page-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: #ecfdf3;
  color: #0f6b3a;
  font-size: 0.7rem;
  font-weight: 700;
}

.report-print-page-badge.is-muted {
  background: #eef3f8;
  color: #5b6b81;
}

.report-print-page-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eef5ff;
  color: #0b5c9e;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
  /* Largura fixa: o rotulo "Selecionada"/"Selecionar" nao empurra/espreme o titulo. */
  min-width: 104px;
  flex-shrink: 0;
}

.report-print-page-toggle .material-symbols-outlined {
  font-size: 0.9rem;
}

.report-print-page.is-selected .report-print-page-toggle {
  background: #0f6b3a;
  color: #fff;
}

#report-print-status.status:empty {
  display: none;
}

#report-print-status.status {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid #d9e5f3;
  border-radius: 14px;
  background: #f8fbff;
  color: #33506c;
  line-height: 1.5;
}

#report-print-status.status.info {
  border-color: #c9dbf0;
  background: #f4f8ff;
  color: #21405e;
}

#report-print-status.status.error {
  border-color: #f1d2d2;
  background: #fff8f8;
  color: #c62828;
}

#report-print-status.status.success {
  border-color: #cfe8da;
  background: #f4fbf7;
  color: #0f6b3a;
}

.action-confirm-card {
  max-width: 520px;
}

.action-confirm-copy h3 {
  margin: 0;
}

.action-confirm-body {
  gap: 16px;
}

.action-confirm-alert {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border: 1px solid #f1d3d3;
  border-radius: 14px;
  background: linear-gradient(180deg, #fff8f8 0%, #fff 100%);
}

.action-confirm-alert .material-symbols-outlined {
  color: #c0392b;
  font-size: 26px;
}

.action-confirm-alert strong,
.action-confirm-alert small {
  display: block;
}

.action-confirm-alert small {
  margin-top: 4px;
  color: #5e6675;
  line-height: 1.45;
}

.action-confirm-actions {
  justify-content: flex-end;
}

@media (max-width: 1200px) {
  .audit-feedback-admin-grid {
    gap: 10px;
  }
  .audit-gerencial-grid,
  .report-print-options {
    flex-direction: column;
  }
  .audit-gerencial-span-2 {
    grid-column: span 1;
  }
}

@media (max-width: 860px) {
  .nps-rating-scale {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .audit-ranking-item,
  .audit-ranking-item-compact {
    grid-template-columns: 1fr;
  }
  .audit-ranking-meter {
    order: 3;
  }
  .saved-filter-row {
    flex-direction: column;
    align-items: stretch;
  }
  .saved-filter-actions {
    justify-content: flex-end;
  }
  .report-print-smart-head {
    flex-direction: column;
  }
  .report-print-smart-tools {
    justify-content: flex-start;
  }
  .report-print-page {
    grid-template-columns: auto 1fr;
  }
  .report-print-page-meta {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}
.table-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: nowrap;
  justify-content: flex-end;
  min-width: max-content;
}
.table-actions button {
  min-height: var(--table-action-size);
  height: var(--table-action-size);
  padding: 0 8px;
  font-size: 0.75rem;
}
.table-actions button .material-symbols-outlined {
  font-size: 18px;
}
.table-actions button.icon-only {
  width: var(--table-action-size);
  min-width: var(--table-action-size);
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.table-actions button.icon-only .material-symbols-outlined {
  font-size: 18px;
}

/* Menu hierarchy tree */
#cfg-menu-tbody tr td:first-child {
  word-break: break-word;
}
.menu-tree-cell {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.menu-tree-prefix {
  color: #94a3b8;
  font-family: "Consolas", "Courier New", monospace;
  font-size: 12px;
  letter-spacing: 0;
  white-space: pre;
  user-select: none;
}
.menu-tree-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.menu-icon-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: #f8fafc;
  color: #334155;
}
.menu-icon-chip .material-symbols-outlined {
  font-size: 16px;
}
.menu-icon-chip small {
  color: #64748b;
}
.row-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}

.badge {
  display: inline-flex;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.badge.success { background: var(--primary, #0b5c9e); color: #fff; }
.badge.online { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.badge.offline { background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; }
.badge.error { background: #fef2f2; color: #b91c1c; border: 1px solid #fca5a5; }
.badge.danger { background: #ef4444; color: #fff; }
.badge.neutral { background: #f3f4f6; color: #374151; }

.layout {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 12px;
  flex: 1;
  min-height: 0;
}
#report-layout.report-wide.layout {
  grid-template-columns: 1fr;
}
#report-layout.report-wide .sidebar {
  display: none;
}
body.presentation-mode-active #report-layout.layout {
  grid-template-columns: 1fr;
}
body.presentation-mode-active {
  padding-bottom: 0;
}
body.presentation-mode-active #report-layout .sidebar {
  display: none;
}
body.presentation-mode-active .viewer-head {
  display: none;
}
body.presentation-mode-active #operation-footer {
  display: none !important;
}
body.presentation-player-page {
  overflow: hidden;
  padding-bottom: 0;
}
body.presentation-player-page .shell {
  padding: 0;
  min-height: 100dvh;
}
body.presentation-player-loading #login-panel,
body.presentation-player-loading #app-panel {
  visibility: hidden;
}
body.presentation-player-loading::before {
  content: "Carregando apresentação...";
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  color: #0f172a;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.01em;
}
body.presentation-player-page #app-panel {
  padding: 0;
  min-height: 100dvh;
}
body.presentation-player-page #app-panel .topbar,
body.presentation-player-page #app-panel #status-message,
body.presentation-player-page #app-panel #home-panel,
body.presentation-player-page #app-panel #admin-panel,
body.presentation-player-page #app-panel #profile-panel,
body.presentation-player-page #app-panel #simulation-banner,
body.presentation-player-page #sidebar-nav,
body.presentation-player-page #operation-footer {
  display: none !important;
}
body.presentation-player-page #operation-footer {
  display: none !important;
}
body.presentation-player-page #report-layout.layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  min-height: 100dvh;
  height: 100dvh;
  width: 100vw;
  max-width: 100vw;
}
body.presentation-player-page #report-layout .viewer {
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: #fff;
  width: 100vw;
  max-width: 100vw;
  min-height: 100dvh;
}
body.presentation-player-page #report-host {
  border: 0;
  border-radius: 0;
  background: #fff;
  min-height: 100dvh;
  height: 100dvh;
  width: 100vw;
  max-width: 100vw;
}
body.presentation-player-page #report-host iframe,
body.presentation-player-page #report-host .report-iframe-fallback {
  background: #fff;
}
body.portal-embed-mode #app-panel .topbar,
body.portal-embed-mode #app-panel #status-message,
body.portal-embed-mode #app-panel #home-panel,
body.portal-embed-mode #app-panel #admin-panel,
body.portal-embed-mode #app-panel #profile-panel,
body.portal-embed-mode #app-panel #simulation-banner,
body.portal-embed-mode #sidebar-nav,
body.portal-embed-mode #operation-footer,
body.portal-embed-mode #report-layout .sidebar,
body.portal-embed-mode #report-layout .viewer-head {
  display: none !important;
}
body.portal-embed-mode .shell,
body.portal-embed-mode #app-panel {
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
}
body.portal-embed-mode #report-layout.layout {
  grid-template-columns: 1fr;
  gap: 0;
}
body.portal-embed-mode #report-layout .viewer {
  border-radius: 0;
  min-height: 100dvh;
}
body.portal-embed-mode #report-host,
body.portal-embed-mode #report-host iframe,
body.portal-embed-mode #report-host .report-iframe-fallback {
  min-height: 100dvh;
}
.sidebar {
  padding: 12px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.sidebar-head { display: grid; gap: 8px; }
#report-list {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow: auto;
}
.report-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}
.report-item.active { border-color: #2f855a; }
.report-main {
  border: none;
  background: transparent;
  color: inherit;
  text-align: left;
  padding: 0;
}
.report-main span { display: block; font-weight: 700; }
.report-main small { color: var(--muted); }
.favorite {
  min-width: 38px;
  min-height: var(--btn-height);
  height: var(--btn-height);
  padding: 0;
  background: #f8fafc;
  color: #f59e0b;
  border: 1px solid var(--line);
}

.viewer {
  padding: var(--viewer-padding, 12px);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.viewer-head {
  margin-bottom: 6px;
}
.viewer-report-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.viewer-bar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  flex: 1 1 auto;
  min-width: 220px;
}
.viewer-bar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex-wrap: wrap;
}
.viewer-bar-right .ghost,
.viewer-bar-left .ghost {
  min-height: 30px;
  height: 30px;
  padding: 0 8px;
  font-size: 0.82rem;
  line-height: 1.1;
  gap: 4px;
}
.viewer-bar-right .ghost .material-symbols-outlined,
.viewer-bar-left .ghost .material-symbols-outlined {
  font-size: 18px;
}
.viewer-updated {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 26px;
  padding: 2px 8px 2px 6px;
  border-radius: 999px;
  border: 1px solid #b9cbe3;
  background: linear-gradient(180deg, #f7fafe 0%, #eef4fb 100%);
  color: #0f172a;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
  font-size: 0.76rem;
}
.viewer-updated-icon {
  font-size: 15px;
  color: var(--icon-accent);
}
.viewer-updated-copy {
  display: inline-flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.viewer-updated small {
  color: #475569;
  font-size: 0.6rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 800;
  line-height: 1;
}
.viewer-updated strong {
  font-size: 0.78rem;
  color: #0f172a;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.viewer-updated-relative {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 0 7px;
  border-radius: 999px;
  border: 1px solid rgba(11, 92, 158, 0.22);
  background: rgba(11, 92, 158, 0.14);
  color: var(--primary, #0b5c9e);
  font-size: 0.66rem;
  font-weight: 800;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.viewer-title {
  margin: 0;
  display: none;
}
.status { margin-top: 6px; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }
.status:empty { display: none; margin: 0; }
.status.success { color: #0f766e; }
.status.error { color: #b91c1c; max-height: 260px; overflow: auto; }
#report-host {
  flex: 1;
  height: 100%;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #f8fafc;
}
#report-host iframe {
  width: 100%;
  height: 100%;
  min-height: 100%;
  border: 0;
}
#report-host:fullscreen {
  width: 100vw;
  height: 100dvh;
  min-height: 100dvh;
  border: 0;
  border-radius: 0;
  background: #fff;
}
#report-host:fullscreen iframe {
  height: 100dvh;
  min-height: 100dvh;
}
#report-host:-webkit-full-screen {
  width: 100vw;
  height: 100dvh;
  min-height: 100dvh;
  border: 0;
  border-radius: 0;
  background: #fff;
}
#report-host:-webkit-full-screen iframe {
  height: 100dvh;
  min-height: 100dvh;
}
.report-iframe-fallback {
  width: 100%;
  height: 100%;
  min-height: 100%;
  border: 0;
  display: block;
  background: #fff;
}
.empty-state {
  min-height: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 24px;
  border: 1px dashed var(--line-strong);
  border-radius: 16px;
  background: var(--empty-bg);
  color: var(--muted);
  text-align: center;
  font-weight: 700;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.38);
  display: grid;
  place-items: center;
  z-index: 40;
  padding: 12px;
}
.modal-card {
  width: min(760px, calc(100vw - 30px));
  max-height: 92vh;
  overflow: auto;
  background: #fff;
  border-radius: 8px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.modal-md { width: min(560px, calc(100vw - 30px)); }
.modal-lg { width: min(950px, calc(100vw - 30px)); }
.modal-xl { width: min(1650px, calc(100vw - 30px)); }
.modal-report-editor {
  width: min(1480px, calc(100vw - 30px));
}
.modal-import-editor {
  width: min(1320px, calc(100vw - 30px));
}
.presentation-picker-card {
  width: min(980px, calc(100vw - 30px));
}
.presentation-picker-card .modal-head {
  gap: 10px;
}
#presentation-picker-filter {
  width: min(320px, 100%);
  margin-left: auto;
}
.presentation-picker-card .table-wrap {
  max-height: 58vh;
}
.presentation-picker-card .table-actions {
  justify-content: center;
}
.delivery-logs-card {
  width: min(1120px, calc(100vw - 24px));
  max-height: min(92dvh, 860px);
}
.delivery-logs-card .modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.delivery-logs-card .modal-head h3 {
  flex: 1 1 auto;
}
.delivery-logs-card .modal-head .danger {
  flex: 0 0 auto;
  margin-left: auto;
}
.delivery-logs-card .table-wrap {
  max-height: 68dvh;
  overflow-x: hidden;
}
.delivery-logs-card table,
.delivery-admin-table {
  min-width: 0;
  table-layout: auto;
}
.delivery-logs-card th,
.delivery-logs-card td,
.delivery-admin-table th,
.delivery-admin-table td {
  white-space: normal;
  word-break: break-word;
  vertical-align: top;
}
.delivery-logs-table th:nth-child(1),
.delivery-logs-table td:nth-child(1) {
  width: 132px;
}
.delivery-logs-table th:nth-child(2),
.delivery-logs-table td:nth-child(2) {
  width: 88px;
}
.delivery-logs-table th:nth-child(3),
.delivery-logs-table td:nth-child(3) {
  width: 124px;
}
.delivery-logs-table th:nth-child(5),
.delivery-logs-table td:nth-child(5) {
  width: 84px;
}
.delivery-logs-table th:nth-child(1),
.delivery-logs-table td:nth-child(1),
.delivery-logs-table th:nth-child(2),
.delivery-logs-table td:nth-child(2),
.delivery-logs-table th:nth-child(3),
.delivery-logs-table td:nth-child(3) {
  white-space: nowrap;
}
.delivery-log-detail {
  display: inline-block;
  color: #334155;
  overflow-wrap: anywhere;
}
.delivery-log-status,
.delivery-admin-status,
.delivery-admin-last-run {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
.delivery-log-origin {
  color: #334155;
  font-weight: 700;
}
.delivery-log-actions {
  justify-content: center;
  flex-wrap: nowrap;
  gap: 4px;
}
.delivery-admin-table td,
.delivery-admin-table th {
  font-size: 0.8rem;
}
.delivery-admin-table .table-actions {
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 4px;
}
.external-link-card textarea {
  font-family: "JetBrains Mono", monospace;
}
.modal-head { padding: 16px 18px 10px; }
.modal-head-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.modal-internal-id {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid #d6d9de;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}
.modal-form { padding: 14px 18px 18px; display: flex; flex-direction: column; gap: 12px; }
.crud-modal-body {
  display: block;
}
.crud-modal-body-with-preview {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.9fr);
  gap: 12px;
  align-items: start;
}
.crud-preview-panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 360px;
}
.crud-preview-panel h4 {
  margin: 0;
  font-size: 14px;
  color: #0f172a;
}
.crud-preview-description {
  margin: 0;
  color: #475569;
  font-size: 12px;
}
.crud-preview-toolbar {
  display: flex;
  justify-content: flex-end;
}
.crud-preview-content {
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  background: #fff;
  padding: 8px;
  overflow: auto;
  max-height: 56vh;
}
#crud-modal[data-crud-type="usuarios"] .crud-preview-content {
  overflow: visible;
  max-height: none;
}
.crud-preview-empty {
  margin: 0;
  color: #64748b;
  font-size: 13px;
}
.access-preview-root {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.access-preview-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.access-preview-sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.access-preview-kpi {
  border: 1px solid #d6d9de;
  border-radius: 8px;
  background: #f8fafc;
  padding: 7px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.access-preview-kpi strong {
  color: #0f172a;
  font-size: 15px;
}
.access-preview-kpi span {
  color: #64748b;
  font-size: 11px;
}
.access-preview-section {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.access-preview-section h5 {
  margin: 0;
  color: #1f2937;
  font-size: 12px;
}
.access-preview-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
}
.access-preview-item {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 5px 8px;
  border-bottom: 1px solid #e5e7eb;
}
.access-preview-item:last-child {
  border-bottom: 0;
}
.access-preview-item span {
  color: #0f172a;
  font-size: 12px;
}
.access-preview-item small {
  color: #64748b;
  font-size: 11px;
}
.access-preview-more {
  color: #64748b;
  font-size: 11px;
  padding-left: 2px;
}
#crud-modal[data-crud-type="menus"] .modal-card {
  width: min(1120px, calc(100vw - 20px));
  max-height: min(95dvh, 900px);
}
#crud-modal[data-crud-type="usuarios"] .modal-card {
  width: min(1320px, calc(100vw - 20px));
  max-height: min(95dvh, 920px);
}
#crud-modal[data-crud-type="permissoes"] .modal-card {
  width: min(780px, calc(100vw - 24px));
}
#crud-modal[data-crud-type="permissoes-acessos"] .modal-card {
  width: min(1160px, calc(100vw - 24px));
  max-height: min(95dvh, 920px);
}
#crud-modal[data-crud-type="apresentacoes"] .modal-card {
  width: min(1180px, calc(100vw - 20px));
  max-height: min(95dvh, 920px);
}
#crud-modal[data-crud-type="encaminhamento"] .modal-card {
  width: min(1280px, calc(100vw - 20px));
  max-height: min(95dvh, 920px);
}
#crud-modal[data-crud-type="permissoes-usuarios"] .modal-card {
  width: min(860px, calc(100vw - 24px));
}
#crud-modal[data-crud-type="menus"] .modal-form {
  padding: 10px 14px 14px;
  gap: 10px;
}
#crud-modal[data-crud-type="usuarios"] .modal-form {
  padding: 10px 14px 14px;
  gap: 10px;
}
#crud-modal[data-crud-type="apresentacoes"] .modal-form {
  padding: 10px 14px 14px;
  gap: 10px;
}
#crud-modal[data-crud-type="permissoes"] .modal-form,
#crud-modal[data-crud-type="permissoes-acessos"] .modal-form,
#crud-modal[data-crud-type="permissoes-usuarios"] .modal-form {
  padding: 10px 14px 14px;
  gap: 10px;
}
#crud-modal[data-crud-type="menus"] #crud-modal-fields.crud-fields-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}
#crud-modal[data-crud-type="usuarios"] #crud-modal-fields.crud-fields-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}
#crud-modal[data-crud-type="apresentacoes"] #crud-modal-fields.crud-fields-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}
#crud-modal[data-crud-type="usuarios"] .crud-field[data-crud-tab="dados"] {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
  background: #fbfcff;
}
#crud-modal[data-crud-type="usuarios"] .crud-field[data-crud-tab="dados"] > input:not([type="checkbox"]):not([type="radio"]),
#crud-modal[data-crud-type="usuarios"] .crud-field[data-crud-tab="dados"] > select,
#crud-modal[data-crud-type="usuarios"] .crud-field[data-crud-tab="dados"] > textarea {
  min-height: 36px;
}
#crud-modal[data-crud-type="usuarios"] .crud-field[data-crud-tab="dados"] .crud-radio-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 10px;
  padding: 2px 0;
}
#crud-modal[data-crud-type="usuarios"] .crud-field[data-crud-tab="dados"] .crud-radio-option {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  border: 1px solid #dbe5f1;
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
  min-height: 36px;
}
#crud-modal[data-crud-type="permissoes"] #crud-modal-fields.crud-fields-grid,
#crud-modal[data-crud-type="permissoes-acessos"] #crud-modal-fields.crud-fields-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}
#crud-modal[data-crud-type="menus"] .crud-field {
  min-width: 0;
}
#crud-modal[data-crud-type="usuarios"] .crud-field {
  min-width: 0;
}
#crud-modal[data-crud-type="apresentacoes"] .crud-field {
  min-width: 0;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 12px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}
#crud-modal[data-crud-type="apresentacoes"] .crud-field.crud-field-presentation-slides {
  padding: 0;
  border: 0;
  background: transparent;
}
#crud-modal[data-crud-type="permissoes"] .crud-field,
#crud-modal[data-crud-type="permissoes-acessos"] .crud-field,
#crud-modal[data-crud-type="permissoes-usuarios"] .crud-field {
  min-width: 0;
}
#crud-modal[data-crud-type="menus"] .crud-field-hint {
  font-size: 11px;
}
#crud-modal[data-crud-type="usuarios"] .crud-field-hint {
  font-size: 11px;
}
#crud-modal[data-crud-type="apresentacoes"] .crud-field-hint {
  font-size: 11px;
}
#crud-modal[data-crud-type="permissoes"] .crud-field-hint,
#crud-modal[data-crud-type="permissoes-acessos"] .crud-field-hint,
#crud-modal[data-crud-type="permissoes-usuarios"] .crud-field-hint {
  font-size: 11px;
}
#crud-modal[data-crud-type="menus"] .modal-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  padding-top: 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.84) 0%, #ffffff 28%);
}
#crud-modal[data-crud-type="usuarios"] .modal-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  padding-top: 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.84) 0%, #ffffff 28%);
}
#crud-modal[data-crud-type="apresentacoes"] .modal-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  padding-top: 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.84) 0%, #ffffff 28%);
}
#crud-modal[data-crud-type="permissoes-acessos"] .modal-actions,
#crud-modal[data-crud-type="permissoes-usuarios"] .modal-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  padding-top: 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.84) 0%, #ffffff 28%);
}
.crud-fields-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
}
.crud-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.crud-section-title {
  grid-column: 1 / -1;
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #334155;
}
.crud-field-hint {
  color: var(--muted);
  font-size: 12px;
}
.crud-field-hint.warning {
  color: #92400e;
  font-weight: 600;
}
.crud-field-disabled {
  opacity: 0.72;
}
.crud-field-disabled .crud-field-hint {
  opacity: 0.9;
}
.crud-field-span-2 {
  grid-column: 1 / -1;
}
.crud-subtabs {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
  margin-bottom: 4px;
}
.crud-subtab {
  border: none;
  background: transparent;
  color: #556274;
  border-radius: 10px 10px 0 0;
  padding: 10px 14px;
  font-weight: 600;
}
.crud-subtab.active {
  color: var(--primary);
  box-shadow: inset 0 -2px 0 var(--primary);
  background: rgba(11, 92, 158, 0.08);
}
.crud-radio-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 0 2px;
}
.crud-radio-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #0f172a;
  font-size: 14px;
}
.crud-radio-option input[type="radio"] {
  accent-color: var(--primary, #0b5c9e);
}
.crud-checklist {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.crud-checklist-toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
}
.crud-checklist-search {
  flex: 1 1 auto;
  min-height: 34px;
  height: 34px;
  border: 1px solid var(--input-border);
  border-radius: 8px;
  padding: 0 10px;
}
.crud-checklist-actions {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}
.crud-checklist-count {
  color: #64748b;
  font-size: 12px;
}
.crud-multi-dropdown {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 8px;
}
.crud-multi-dropdown > summary {
  list-style: none;
  cursor: pointer;
  font-weight: 600;
  color: #1f2937;
}
.crud-multi-dropdown > summary::-webkit-details-marker {
  display: none;
}
.crud-checklist-list {
  max-height: 220px;
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}
.crud-checklist-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-bottom: 1px solid #e5e7eb;
  font-size: 14px;
  color: #0f172a;
}
.crud-checklist-item:last-child {
  border-bottom: 0;
}
.crud-toggle-input,
.crud-checklist-item input[type="checkbox"],
.profile-check input[type="checkbox"],
.home-switch input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: var(--toggle-width);
  height: var(--toggle-height);
  margin: 0;
  border-radius: 999px;
  border: 1px solid var(--toggle-track-border);
  background: var(--toggle-track-off);
  cursor: pointer;
  position: relative;
  flex: 0 0 auto;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.crud-toggle-input::before,
.crud-checklist-item input[type="checkbox"]::before,
.profile-check input[type="checkbox"]::before,
.home-switch input[type="checkbox"]::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: var(--toggle-thumb-size);
  height: var(--toggle-thumb-size);
  border-radius: 50%;
  background: var(--toggle-thumb-color);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.25);
  transition: transform 0.2s ease;
}
.crud-toggle-input:checked,
.crud-checklist-item input[type="checkbox"]:checked,
.profile-check input[type="checkbox"]:checked,
.home-switch input[type="checkbox"]:checked {
  background: var(--toggle-track-on);
  border-color: var(--toggle-track-on);
}
.crud-toggle-input:checked::before,
.crud-checklist-item input[type="checkbox"]:checked::before,
.profile-check input[type="checkbox"]:checked::before,
.home-switch input[type="checkbox"]:checked::before {
  transform: translateX(calc(var(--toggle-width) - var(--toggle-thumb-size) - 6px));
}
.crud-toggle-input:disabled,
.crud-checklist-item input[type="checkbox"]:disabled,
.profile-check input[type="checkbox"]:disabled,
.home-switch input[type="checkbox"]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.crud-toggle-input:focus-visible,
.crud-checklist-item input[type="checkbox"]:focus-visible,
.profile-check input[type="checkbox"]:focus-visible,
.home-switch input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--toggle-focus-ring);
}
.crud-checklist-empty {
  margin: 0;
  padding: 10px;
  color: #5e6675;
  font-size: 13px;
}
.crud-tree-panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.crud-menu-tree {
  max-height: 320px;
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  padding: 4px 0;
}
.crud-menu-tree-branch {
  display: flex;
  flex-direction: column;
}
.crud-menu-tree-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  min-height: 38px;
  border-bottom: 1px solid #e5e7eb;
  padding: 4px 6px 4px 2px;
}
.crud-menu-tree-row:last-child {
  border-bottom: 0;
}
.crud-menu-tree-toggle {
  border: none;
  background: transparent;
  color: #475569;
  width: 12px;
  min-width: 12px;
  text-align: center;
  padding: 0;
}
.crud-menu-tree-toggle.spacer {
  display: inline-block;
}
.crud-inline-toggle {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}
.crud-menu-tree-check {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  justify-content: flex-start;
}
.crud-menu-tree-check span {
  line-height: 1.25;
  text-align: left;
  overflow-wrap: anywhere;
}
.crud-menu-tree-check .crud-toggle-input {
  margin: 0;
}
.crud-inline-toggle.center {
  justify-content: center;
}
.crud-inline-toggle span {
  line-height: 1.25;
}
.crud-report-rules {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.crud-report-rules-table {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  background: #f8fafc;
}
.crud-report-rules-head,
.crud-report-rules-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1.65fr) 110px 110px minmax(180px, 1fr);
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-top: 1px solid #e5e7eb;
}
.crud-report-rules-head {
  background: #e2e8f0;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  text-transform: uppercase;
}
.crud-report-rules-body {
  max-height: 300px;
  overflow: auto;
}
.crud-report-rules-head > span,
.crud-report-rules-row > * {
  justify-self: start;
  text-align: left;
}
.crud-report-rules-head > span:nth-child(1),
.crud-report-rules-head > span:nth-child(3),
.crud-report-rules-head > span:nth-child(4) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  width: 100%;
  min-height: 34px;
  text-align: center;
}
.crud-report-rules-row .crud-report-toggle-cell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  width: 100%;
  min-height: 34px;
}
.crud-report-rules-row .crud-report-toggle-cell.with-note {
  padding-right: 0;
}
.crud-report-toggle-core {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--toggle-width);
  min-width: var(--toggle-width);
}
.crud-report-toggle-note {
  display: inline-block;
  font-size: 12px;
  color: #64748b;
  line-height: 1.15;
  text-align: center;
  max-width: 110px;
}
.crud-report-toggle-note:empty {
  display: none;
}
.crud-report-rls-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid #94a3b8;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  cursor: help;
  user-select: none;
  background: #f8fafc;
}
.crud-report-rls-help .material-symbols-outlined {
  font-size: 14px;
  line-height: 1;
}
.crud-report-label {
  color: #0f172a;
  font-weight: 600;
}
.crud-report-roles-input {
  min-height: 34px;
  border: 1px solid var(--input-border);
  border-radius: 8px;
  padding: 0 10px;
}
.crud-profile-users {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.crud-profile-users-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}
.crud-profile-users-select {
  min-height: 34px;
  border: 0;
  border-bottom: 1px solid var(--input-border);
  border-radius: 0;
  padding-inline: 2px;
}
.crud-profile-users-table {
  width: 100%;
}
.crud-profile-users-table .table-actions {
  justify-content: flex-end;
}
.menu-icon-preview {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #374151;
  border: 1px solid #d6d9de;
  border-radius: 8px;
  padding: 8px 10px;
  width: fit-content;
}
.menu-icon-preview .material-symbols-outlined {
  font-size: 18px;
}
.menu-icon-preview small {
  color: #5e6675;
}
.crud-icon-input {
  margin: 0;
}
.menu-icon-options {
  max-height: 260px;
  overflow: auto;
  border: 1px solid #d6d9de;
  border-radius: 8px;
  background: #fff;
  display: grid;
  gap: 2px;
  padding: 4px;
}
.menu-icon-option {
  border: 0;
  background: transparent;
  color: #1f2937;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-start;
  text-align: left;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 6px;
}
.menu-icon-option .material-symbols-outlined {
  font-size: 18px;
}
.menu-icon-option:hover {
  background: #eef2ff;
  color: #1d4ed8;
}
.menu-icon-option.active {
  background: #dbeafe;
  color: #1d4ed8;
}
.crud-image-input {
  border: 1px dashed #94a3b8;
  border-radius: 8px;
  padding: 8px 10px;
}
.crud-image-preview {
  min-height: 56px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  padding: 8px;
  display: grid;
  place-items: center;
  background: #f8fafc;
}
.crud-image-preview img {
  max-width: 100%;
  max-height: 120px;
  object-fit: contain;
}
.crud-image-preview small {
  color: #64748b;
}
.modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-start;
}
#report-modal .modal-card {
  width: min(1280px, calc(100vw - 20px));
  max-height: min(95dvh, 920px);
}
.report-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
}
.report-environment-scope {
  display: grid;
  gap: 10px;
  grid-column: 1 / -1;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #fbfdff 0%, #f6faff 100%);
}
.report-environment-scope-head {
  display: grid;
  gap: 4px;
}
.report-environment-scope-head strong {
  font-size: 14px;
  color: #0f172a;
}
.report-environment-scope-head small {
  color: #64748b;
  line-height: 1.4;
}
.report-environment-scope-all {
  min-height: 42px;
}
.report-environment-toggle-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.report-environment-toggle-grid.is-disabled {
  opacity: 0.72;
}
.report-environment-toggle-grid .profile-check {
  min-height: 42px;
}
.report-environment-scope-empty {
  margin: 0;
  color: #64748b;
  font-size: 12px;
}
.report-params-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 16px;
}
.report-default-page-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
}
.report-default-page-row .ghost.small {
  min-height: 34px;
  padding: 6px 10px;
}
.delivery-schedule-builder {
  display: grid;
  gap: 12px;
  border: 1px solid #d9e4f0;
  border-radius: 14px;
  padding: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}
.delivery-schedule-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.delivery-schedule-head-copy {
  display: grid;
  gap: 4px;
}
.delivery-schedule-head-copy strong {
  color: #0f172a;
  font-size: 14px;
}
.delivery-schedule-head-copy p,
.delivery-schedule-summary {
  margin: 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
}
.delivery-schedule-toggle {
  min-width: 240px;
}
.delivery-schedule-top-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 14px;
}
.delivery-schedule-field {
  display: grid;
  gap: 6px;
}
.delivery-schedule-field > span {
  color: #475569;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.delivery-schedule-panel {
  display: grid;
  gap: 10px;
  border: 1px solid #dbe5f1;
  border-radius: 14px;
  background: #ffffff;
  padding: 12px 14px;
}
.delivery-schedule-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.delivery-schedule-panel-head strong {
  color: #0f172a;
  font-size: 13px;
}
.delivery-schedule-panel-head small {
  color: #64748b;
}
.delivery-schedule-weekdays {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.delivery-schedule-weekday {
  min-height: 44px;
}
.delivery-schedule-time-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.delivery-schedule-time-toolbar input[type="time"] {
  width: auto;
  min-width: 180px;
}
.delivery-schedule-time-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.delivery-schedule-time-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 6px 0 12px;
  border-radius: 999px;
  border: 1px solid #d6e2f0;
  background: #ffffff;
  color: #334155;
}
.delivery-schedule-time-chip strong {
  font-size: 12px;
}
.rls-editor {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.rls-smart-section {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}
.rls-smart-section h5 {
  margin: 0;
}
.rls-add-row {
  display: grid;
  grid-template-columns: 1fr 1.6fr auto auto;
  gap: 12px;
  align-items: end;
}
.rls-rule-empty {
  color: var(--muted);
}
.preview-form {
  gap: 8px;
  min-height: 0;
  height: calc(100dvh - 154px);
}
.preview-head {
  align-items: flex-start;
  padding-top: 10px;
  padding-bottom: 6px;
  position: relative;
}
#report-preview-title { display: none; }
#report-preview-modal #preview-updated-badge {
  position: absolute;
  top: 8px;
  left: 12px;
  z-index: 2;
}
.preview-toolbar {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-left: auto;
  justify-content: flex-end;
}
.preview-toolbar .ghost,
.preview-toolbar .danger {
  flex: 0 0 auto;
  padding: 0 8px;
  min-height: 30px;
  height: 30px;
  font-size: 0.82rem;
  line-height: 1.1;
  gap: 4px;
}
.preview-toolbar .ghost .material-symbols-outlined,
.preview-toolbar .danger .material-symbols-outlined {
  font-size: 18px;
}
.preview-status-fallback {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.preview-host {
  flex: 1;
  min-height: clamp(440px, 76dvh, 980px);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #f8fafc;
}
.preview-host iframe { width: 100%; height: 100%; border: none; }
.auto-refresh-config { display: flex; gap: 10px; align-items: center; padding: 4px 0 4px 28px; }
.auto-refresh-config.hidden { display: none; }
.auto-refresh-config label { font-size: 0.84rem; display: flex; align-items: center; gap: 4px; }
.auto-refresh-config input, .auto-refresh-config select { font-size: 0.84rem; }
.preview-host .report-iframe-fallback {
  width: 100%;
  height: 100%;
  min-height: 100%;
}
.preview-host:fullscreen {
  width: 100vw;
  height: 100vh;
  border: 0;
  border-radius: 0;
  background: #fff;
}
.preview-host:fullscreen .report-iframe-fallback {
  height: 100vh;
  min-height: 100vh;
}
.preview-host:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  border: 0;
  border-radius: 0;
  background: #fff;
}
.preview-host:-webkit-full-screen .report-iframe-fallback {
  height: 100vh;
  min-height: 100vh;
}
.presentation-player-controls {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 980;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.55);
  background: rgba(15, 23, 42, 0.38);
  color: #f8fafc;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(4px);
}
.presentation-player-controls .ghost {
  color: #f1f5f9;
  border-color: rgba(148, 163, 184, 0.5);
  background: rgba(15, 23, 42, 0.1);
  width: 40px;
  min-width: 40px;
  min-height: 40px;
  height: 40px;
  padding: 0;
}
.presentation-player-controls .ghost.is-active {
  color: #ffd166;
  border-color: rgba(255, 209, 102, 0.62);
  background: rgba(255, 209, 102, 0.14);
}
.presentation-player-controls .ghost .material-symbols-outlined {
  font-size: 24px;
}
.presentation-side-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 970;
  width: 40px;
  min-width: 40px;
  height: 80px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.36);
  background: rgba(11, 92, 158, 0.28);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.24);
}
.presentation-side-nav.left {
  left: 12px;
}
.presentation-side-nav.right {
  right: 12px;
}
.presentation-side-nav .material-symbols-outlined {
  font-size: 28px;
}
.presentation-side-nav:hover {
  background: rgba(7, 65, 112, 0.44);
  border-color: rgba(191, 219, 254, 0.68);
}
body:not(.presentation-mode-active) .presentation-side-nav {
  display: none !important;
}
body.presentation-mode-active .presentation-side-nav.hidden {
  display: inline-flex !important;
}
.system-config-sections {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.system-config-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  border-bottom: 1px solid var(--line);
}
.system-config-panels {
  display: block;
}
.system-config-card {
  border: 1px solid #d5e2f0;
  border-radius: 14px;
  background: #f9fcff;
  padding: 12px;
  display: none;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}
.system-config-card.active {
  display: flex;
}
.system-config-card h5 {
  margin: 0;
}
.domain-field-disabled {
  opacity: 0.58;
}
.domain-field-disabled input,
.domain-field-disabled select,
.domain-field-disabled textarea,
.domain-field-disabled button {
  background: #f1f5f9;
}
.rls-smart-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  justify-content: space-between;
}
.rls-smart-head h5 {
  margin: 0;
}
.rls-smart-head .tip {
  margin: 4px 0 0;
}
.rls-smart-head-actions {
  display: inline-flex;
  gap: 8px;
}
.rls-schema-panel .status {
  margin: 0;
}
.rls-schema-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.rls-schema-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid #d9e2ec;
  background: #eef6ff;
  color: #0f3c68;
  font-size: 0.86rem;
  font-weight: 600;
}
.rls-schema-filter {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rls-schema-browser {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}
.rls-schema-list-panel,
.rls-schema-detail {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  overflow: hidden;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 360px;
}
.rls-schema-panel-head {
  display: grid;
  gap: 4px;
  padding: 14px;
  border-bottom: 1px solid #eef2f6;
}
.rls-schema-panel-head strong,
.rls-schema-detail-head h6 {
  margin: 0;
  color: #0f172a;
}
.rls-schema-panel-head small,
.rls-schema-detail-head p,
.rls-schema-detail-empty p {
  color: var(--muted);
}
.rls-schema-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 360px;
  overflow: auto;
  padding: 8px 10px 10px;
}
.rls-schema-tree-item {
  display: grid;
  gap: 2px;
}
.rls-schema-tree-row,
.rls-schema-tree-column {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #334155;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 5px 10px;
  font-size: 0.83rem;
}
.rls-schema-tree-row {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 7px 10px;
}
.rls-schema-tree-row:hover,
.rls-schema-tree-column:hover {
  background: #f8fafc;
  border-color: #e5edf5;
}
.rls-schema-tree-row.active,
.rls-schema-tree-row:focus-visible,
.rls-schema-tree-column.active,
.rls-schema-tree-column:focus-visible {
  border-color: #d6e4f1;
  background: #f6fbff;
  box-shadow: inset 2px 0 0 var(--primary);
  outline: none;
}
.rls-schema-tree-chevron {
  font-size: 16px;
  color: #64748b;
}
.rls-schema-tree-node {
  display: inline-block;
  flex: 0 0 auto;
}
.rls-schema-tree-node.table {
  width: 14px;
  height: 14px;
  border: 1px solid #94a3b8;
  border-radius: 3px;
  background:
    linear-gradient(#94a3b8, #94a3b8) 50% 33% / 10px 1px no-repeat,
    linear-gradient(#94a3b8, #94a3b8) 50% 66% / 10px 1px no-repeat,
    linear-gradient(#94a3b8, #94a3b8) 33% 50% / 1px 10px no-repeat,
    linear-gradient(#94a3b8, #94a3b8) 66% 50% / 1px 10px no-repeat;
}
.rls-schema-tree-node.column {
  width: 11px;
  height: 11px;
  border: 1px solid #94a3b8;
  border-radius: 2px;
  background: #ffffff;
}
.rls-schema-tree-name,
.rls-schema-tree-column-name {
  min-width: 0;
  overflow-wrap: anywhere;
}
.rls-schema-tree-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: #0f172a;
}
.rls-schema-tree-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 700;
}
.rls-schema-tree-children {
  display: grid;
  gap: 2px;
  padding-left: 28px;
}
.rls-schema-tree-empty {
  padding: 8px 10px 8px 12px;
  color: var(--muted);
  font-size: 0.82rem;
  border-left: 1px dashed #d9e2ec;
}
.rls-schema-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eef2f6;
}
.rls-schema-detail-head h6 {
  font-size: 1rem;
}
.rls-schema-detail-head p {
  margin: 6px 0 0;
}
.rls-schema-detail-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.rls-schema-selection {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.rls-schema-selection-row {
  border: 1px solid #e8eef5;
  border-radius: 10px;
  background: #fbfdff;
  padding: 10px 12px;
  display: grid;
  gap: 4px;
}
.rls-schema-selection-label {
  color: var(--muted);
  font-size: 0.78rem;
}
.rls-schema-selection-value {
  color: #0f172a;
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}
.rls-schema-detail-note {
  border-top: 1px solid #eef2f6;
  padding-top: 12px;
  display: grid;
  gap: 4px;
}
.rls-schema-detail-note strong {
  color: #0f172a;
  font-size: 0.86rem;
}
.rls-schema-detail-note p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}
.rls-schema-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  font-size: 0.82rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.rls-schema-pill.muted {
  background: #ffffff;
  color: #64748b;
}
.rls-schema-detail-empty {
  display: grid;
  place-items: center;
  min-height: 100%;
  border: 1px dashed #d7e0ea;
  border-radius: 12px;
  background: #fbfdff;
  padding: 18px;
  text-align: center;
}
.rls-schema-detail-empty strong {
  color: #0f172a;
}
.rls-schema-detail-empty p {
  margin: 6px 0 0;
}
.rls-smart-form-groups {
  display: grid;
  gap: 14px;
}
.rls-smart-form-group {
  display: grid;
  gap: 10px;
}
.rls-smart-form-title {
  color: #0f172a;
  font-size: 0.92rem;
}
.rls-smart-actions {
  display: flex;
  justify-content: flex-end;
}
.rls-smart-add-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
  align-items: end;
}
.rls-smart-add-row > label {
  min-width: 0;
}
.rls-smart-add-row .profile-check {
  min-height: 42px;
}
.rls-smart-add-row > button {
  align-self: end;
  justify-self: start;
}
.presentation-slides-grid {
  border: 1px solid #d9e2ec;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}
.presentation-slides-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.presentation-slides-header-text {
  display: grid;
  gap: 4px;
}
.presentation-slides-header-text strong {
  color: #0f172a;
  font-size: 14px;
}
.presentation-slides-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.presentation-slides-stat {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid #d6e2f0;
  border-radius: 999px;
  background: #ffffff;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
}
.presentation-slides-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}
.presentation-slides-help {
  margin: 0;
  font-size: 12px;
  color: #64748b;
  line-height: 1.45;
}
.presentation-slides-toolbar .ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.presentation-slides-list {
  display: grid;
  gap: 12px;
  max-height: min(54dvh, 560px);
  overflow: auto;
  padding-right: 2px;
}
.presentation-slides-empty {
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  background: #ffffff;
  padding: 26px 18px;
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
  color: #64748b;
}
.presentation-slides-empty .material-symbols-outlined {
  font-size: 28px;
  color: #94a3b8;
}
.presentation-slides-empty strong {
  color: #0f172a;
  font-size: 14px;
}
.presentation-slides-empty small {
  font-size: 12px;
}
.presentation-slide-card {
  border: 1px solid #dbe5f1;
  border-radius: 14px;
  background: #ffffff;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}
.presentation-slide-card-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}
.presentation-slides-order {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 42px;
  padding: 0 10px;
  border-radius: 12px;
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
  color: #1d4ed8;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.presentation-slide-summary {
  min-width: 0;
  display: grid;
  gap: 2px;
}
.presentation-slide-summary strong {
  color: #0f172a;
  font-size: 14px;
}
.presentation-slide-summary small {
  color: #64748b;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.delivery-content-card {
  gap: 0;
  background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
}
.delivery-content-card-grid {
  grid-template-columns: auto minmax(280px, 0.95fr) minmax(360px, 1.15fr) auto;
  gap: 12px;
  align-items: center;
}
.delivery-content-card .presentation-slides-order {
  justify-self: flex-start;
}
.delivery-content-card .presentation-slide-actions-inline {
  justify-content: flex-end;
  align-self: center;
  min-height: var(--table-action-size);
  gap: 6px;
  flex-wrap: nowrap;
}
.delivery-content-card .presentation-slide-field {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.delivery-content-card .presentation-slide-field span {
  flex: 0 0 auto;
  font-size: 11px;
  white-space: nowrap;
  margin: 0;
}
.delivery-content-card .presentation-slide-field select,
.delivery-content-card .presentation-slide-field input {
  flex: 1 1 auto;
  min-width: 0;
}
.delivery-content-card .presentation-slide-actions-inline .ghost,
.delivery-content-card .presentation-slide-actions-inline .danger {
  width: var(--table-action-size);
  min-width: var(--table-action-size);
  height: var(--table-action-size);
  min-height: var(--table-action-size);
  padding: 0;
}
.delivery-content-card .presentation-slide-actions-inline .material-symbols-outlined {
  font-size: 18px;
}
.presentation-slide-card-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.presentation-slide-card-grid {
  display: grid;
  grid-template-columns: auto minmax(220px, 1.1fr) minmax(240px, 1.3fr) minmax(140px, 0.35fr) auto;
  gap: 10px 12px;
  align-items: end;
}
.presentation-slide-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.presentation-slide-field span {
  color: #475569;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.presentation-slide-field-span-2 {
  grid-column: 1 / -1;
}
.presentation-slide-field input,
.presentation-slide-field select {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  height: 36px;
  font-size: 13px;
}
.presentation-slide-actions-inline {
  justify-content: flex-end;
  align-self: end;
  min-height: 36px;
  flex-wrap: nowrap;
}
.presentation-slide-actions-inline .ghost,
.presentation-slide-actions-inline .danger {
  flex: 0 0 auto;
}
.maintenance-box {
  max-width: 600px;
  padding: 20px;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  background: #fff7ed;
  color: #9a3412;
}
.maintenance-box h4 {
  margin: 0 0 8px;
}
.maintenance-box p {
  margin: 0;
}

@media (max-width: 1100px) {
  .delivery-schedule-top-grid,
  .delivery-schedule-weekdays,
  .rls-add-row {
    grid-template-columns: 1fr;
  }
  .rls-schema-browser {
    grid-template-columns: 1fr;
  }
  .rls-schema-detail {
    min-height: 0;
  }
  .rls-schema-detail-head {
    flex-direction: column;
  }
  .rls-schema-selection {
    grid-template-columns: 1fr;
  }
  .rls-schema-detail-stats {
    justify-content: flex-start;
  }
  .rls-smart-add-row {
    grid-template-columns: 1fr;
  }
  .modal-xl {
    width: calc(100vw - 12px);
    max-height: 96dvh;
  }
  .preview-form {
    height: calc(100dvh - 142px);
  }
  .preview-host {
    min-height: clamp(360px, 68dvh, 840px);
  }
  .preview-toolbar .ghost,
  .preview-toolbar .danger {
    flex: 1 1 calc(33.33% - 8px);
  }
  .presentation-player-controls {
    right: 8px;
    bottom: 8px;
    border-radius: 999px;
  }
  .presentation-side-nav {
    width: 42px;
    min-width: 42px;
    height: 84px;
  }
  .presentation-side-nav .material-symbols-outlined {
    font-size: 30px;
  }
  .viewer-bar-right .ghost,
  .viewer-bar-left .ghost {
    flex: 0 0 auto;
    min-height: var(--btn-height);
    height: var(--btn-height);
    padding: 0 8px;
    font-size: 0.82rem;
  }
  #crud-modal[data-crud-type="menus"] .modal-card,
  #crud-modal[data-crud-type="usuarios"] .modal-card,
  #crud-modal[data-crud-type="encaminhamento"] .modal-card {
    width: calc(100vw - 12px);
    max-height: 97dvh;
  }
  #report-modal .modal-card {
    width: calc(100vw - 12px);
    max-height: 97dvh;
  }
}

@media (max-width: 720px) {
  .delivery-schedule-time-toolbar {
    align-items: stretch;
  }
  .delivery-schedule-time-toolbar input[type="time"] {
    width: 100%;
    min-width: 0;
  }
  .modal {
    padding: 6px;
  }
  .modal-xl {
    width: 100%;
    max-height: 98dvh;
    border-radius: 6px;
  }
  .preview-form {
    padding: 10px;
    gap: 8px;
    height: calc(100dvh - 120px);
  }
  .preview-host {
    min-height: clamp(320px, 62dvh, 740px);
  }
  .preview-toolbar .ghost,
  .preview-toolbar .danger {
    flex: 1 1 calc(50% - 8px);
  }
  .viewer-report-bar {
    align-items: flex-start;
  }
  .viewer-bar-right {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
  }
  .viewer-bar-right .ghost {
    flex: 1 1 calc(50% - 8px);
  }
  .viewer-updated {
    width: 100%;
    justify-content: space-between;
    min-height: var(--btn-height);
  }
  .viewer-updated-copy {
    min-width: 0;
  }
  .viewer-updated strong {
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .presentation-side-nav {
    width: 40px;
    min-width: 40px;
    height: 76px;
  }
  .presentation-side-nav.left {
    left: 6px;
  }
  .presentation-side-nav.right {
    right: 6px;
  }
  .presentation-side-nav .material-symbols-outlined {
    font-size: 28px;
  }
  .report-default-page-row {
    grid-template-columns: 1fr;
  }
  #report-host {
    height: clamp(340px, 72dvh, 860px);
    min-height: 320px;
  }
  #crud-modal[data-crud-type="menus"] #crud-modal-fields.crud-fields-grid,
  #crud-modal[data-crud-type="usuarios"] #crud-modal-fields.crud-fields-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1200px) {
  #crud-modal[data-crud-type="apresentacoes"] .modal-card {
    width: calc(100vw - 12px);
    max-height: 96dvh;
  }
  .presentation-slides-list {
    max-height: none;
  }
  .presentation-slide-card-grid {
    grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr);
  }
  .delivery-content-card-grid {
    grid-template-columns: 1fr;
  }
  .presentation-slide-actions-inline {
    grid-column: 2 / -1;
    justify-content: flex-start;
  }
  .delivery-content-card .presentation-slide-actions-inline {
    grid-column: auto;
  }
}

@media (max-width: 720px) {
  .presentation-slide-card-grid {
    grid-template-columns: 1fr;
  }
  .presentation-slides-order {
    justify-self: flex-start;
  }
  .presentation-slide-actions-inline {
    grid-column: auto;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .delivery-content-card .presentation-slide-field {
    display: grid;
    gap: 6px;
  }
  .delivery-content-card .presentation-slide-field span {
    white-space: normal;
  }
}
.modal-actions-split {
  justify-content: space-between;
  padding: 12px 18px 16px;
}

.stepper {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 18px 12px;
}
.stepper .step {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #5e6675;
  font-weight: 600;
  padding: 0;
}
.stepper .step::before {
  content: attr(data-import-indicator);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #7a7a7a;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex: 0 0 26px;
}
.stepper .step::after {
  content: "";
  height: 1px;
  background: #d6d9de;
  flex: 1;
}
.stepper .step:last-child::after {
  display: none;
}
.stepper .step.active {
  color: #111827;
}
.stepper .step.active::before {
  background: var(--primary, #0b5c9e);
}
.import-flow-status {
  margin: 0 18px 8px;
  min-height: 20px;
  white-space: pre-wrap;
}
.import-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 12px 18px;
}
.import-source-modes {
  display: flex;
  gap: 16px;
  padding: 0 18px 8px;
}
#import-source-manual-box,
#import-source-ad-box {
  display: grid;
  gap: 10px;
  padding: 0 18px 12px;
}
#import-source-ad-box.hidden,
#import-source-manual-box.hidden {
  display: none !important;
}
.import-user-list {
  display: grid;
  gap: 8px;
}
.import-user-item {
  width: 100%;
  display: grid;
  grid-template-columns: 18px 1fr 18px;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #111827;
  text-align: left;
  padding: 10px 12px;
}
.import-user-item:hover {
  border-color: var(--primary, #0b5c9e);
}
.import-user-item.active {
  border-color: var(--primary, #0b5c9e);
  box-shadow: inset 0 0 0 1px var(--primary, #0b5c9e);
}
.import-user-icon {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: #f4b400;
  display: inline-block;
}
.import-user-arrow {
  color: #111827;
  font-weight: 700;
}
.import-source-panel {
  margin: 0 18px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.import-source-group-head {
  padding: 10px 12px;
  border-bottom: 1px solid #edf1f5;
  font-weight: 600;
}
.import-source-tree {
  max-height: 320px;
  overflow: auto;
  padding: 8px 10px;
  display: grid;
  gap: 6px;
}
.import-source-item {
  display: grid;
  grid-template-columns: 20px 1fr auto auto;
  gap: 10px;
  align-items: center;
  border: 1px solid #edf1f5;
  border-radius: 8px;
  padding: 8px 10px;
}
.import-source-item.disabled {
  background: #f9fafb;
  color: #5e6675;
}
.import-source-name {
  font-weight: 600;
}
.import-source-meta {
  color: #5e6675;
  font-size: 12px;
}
.import-source-note {
  color: var(--primary, #0b5c9e);
  font-size: 12px;
  font-weight: 600;
}
.import-table-wrap { margin: 0 18px 12px; }
.dataset-tables-checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 0;
  max-height: 300px;
  overflow-y: auto;
}

.dataset-table-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.dataset-table-checkbox:hover {
  background-color: #f3f4f6;
}

.dataset-table-checkbox input[type="checkbox"] {
  cursor: pointer;
}

.dataset-table-checkbox label {
  cursor: pointer;
  margin: 0;
  flex: 1;
  font-size: 13px;
}

.import-refresh-options {
  margin: 0 18px 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
  display: grid;
  gap: 10px;
}
.cell-input {
  border: 1px solid var(--line);
  padding: 6px 8px;
  border-radius: 6px;
}

.domain-grid {
  display: grid;
  gap: 10px;
  padding: 8px 0 2px;
}
.domain-grid.two-col { grid-template-columns: 1fr 1fr; }
.admin-tab-panel[data-domain-content="database"] .domain-grid > label,
.admin-tab-panel[data-domain-content="database"] .domain-grid > .profile-check {
  background: #f5f9fd;
  border: 1px solid #d5e1ef;
  border-radius: 12px;
  padding: 7px 10px;
}
.admin-tab-panel[data-domain-content="database"] .domain-grid > label {
  display: grid;
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
  color: #26405a;
}
.admin-tab-panel[data-domain-content="database"] .profile-check {
  min-height: 40px;
  padding: 8px 10px;
}
.admin-tab-panel[data-domain-content="database"] .domain-grid input:not([type="checkbox"]):not([type="radio"]),
.admin-tab-panel[data-domain-content="database"] .domain-grid select {
  min-height: 34px;
  padding: 5px 9px;
  border-color: #c4d3e4;
  background: #ffffff;
}
.domain-db-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 0;
  flex-wrap: wrap;
  padding: 4px 0;
}
.storage-migration-card {
  border: 1px solid #d7e0eb;
  border-radius: 12px;
  background: #f3f8fd;
  padding: 8px 10px;
}
.storage-migration-card summary {
  cursor: pointer;
  font-weight: 600;
  color: #1f334a;
  list-style: none;
}
.storage-migration-card summary::-webkit-details-marker {
  display: none;
}
.storage-migration-card summary::before {
  content: "chevron_right";
  font-family: "Material Symbols Outlined";
  font-size: 18px;
  margin-right: 6px;
  vertical-align: middle;
}
.storage-migration-card[open] summary::before {
  content: "expand_more";
}
.storage-migration-card[open] .domain-grid {
  padding-top: 10px;
}
.domain-db-actions .ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.domain-db-actions .domain-db-feedback {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  color: #475569;
  font-size: 12px;
  font-weight: 600;
}
.domain-db-actions .domain-db-feedback::before {
  font-family: "Material Symbols Outlined";
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
  content: "info";
}
.domain-db-actions .domain-db-feedback.success {
  color: #0f766e;
  border-color: #99f6e4;
  background: linear-gradient(180deg, #ecfeff 0%, #f0fdfa 100%);
}
.domain-db-actions .domain-db-feedback.success::before {
  content: "check_circle";
}
.domain-db-actions .domain-db-feedback.error {
  color: #b91c1c;
  border-color: #fecaca;
  background: linear-gradient(180deg, #fff1f2 0%, #fef2f2 100%);
}
.domain-db-actions .domain-db-feedback.error::before {
  content: "error";
}
.domain-db-actions .domain-db-feedback.info {
  color: #0b5c9e;
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #eff6ff 0%, #f8fafc 100%);
}
.field-help-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-left: 6px;
  border-radius: 999px;
  background: #e2e8f0;
  color: var(--icon-accent);
  font-size: 14px;
  line-height: 1;
  cursor: help;
  vertical-align: middle;
}
.field-label-head {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 20px;
}
.field-label-caption {
  color: #334155;
  font-weight: 600;
  line-height: 1.2;
}
.field-label-head .field-help-icon {
  margin-left: 0;
}
.field-help-icon:hover {
  background: #cbd5e1;
}
.profile-check-with-hint .field-label-head {
  padding-right: 2px;
}
.domain-output-field {
  min-height: 34px;
  border: 1px solid var(--input-border);
  border-radius: 8px;
  padding: 7px 10px;
  background: #f8fafc;
  color: #0f172a;
  display: block;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
}

.admin-oauth-columns {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 12px;
}
.admin-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}
.admin-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.admin-oauth-scope-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
}
.admin-oauth-scope-grid label {
  margin: 0;
}
.admin-form-actions {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.simple-list {
  margin: 10px 0 0 18px;
  padding: 0;
}

/* Aba Admin: manutencao / status / reset */
.admin-sub-tabs {
  margin-top: 10px;
}
.admin-maintenance {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}
.admin-maintenance-card {
  border-radius: 12px;
  box-shadow: var(--card-shadow-soft);
}
.admin-maintenance-card h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 4px;
}
.admin-maintenance-card h4 .material-symbols-outlined {
  font-size: 20px;
  color: var(--primary);
}
.admin-maintenance-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.admin-status-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.admin-status-kpi {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
}
.admin-status-kpi span {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.admin-status-kpi strong {
  font-family: "Sora", sans-serif;
  font-size: 1.1rem;
  color: #0f172a;
  overflow-wrap: anywhere;
}
.admin-maintenance-danger {
  border-color: rgba(223, 60, 48, 0.4);
  background: linear-gradient(180deg, #fffafa 0%, #fff5f4 100%);
}
.admin-maintenance-danger h4 .material-symbols-outlined {
  color: var(--danger);
}
.tip.danger-tip {
  color: var(--danger);
  font-weight: 600;
}
.capacity-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.capacity-status-pill .material-symbols-outlined {
  font-size: 15px;
  line-height: 1;
}
@media (max-width: 860px) {
  .admin-maintenance { grid-template-columns: 1fr; }
  .admin-status-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Card que ocupa a linha inteira do grid de manutencao (status, banco) */
.admin-maint-wide { grid-column: 1 / -1; }
/* Secoes recolhiveis: a tela abre compacta (so o cabecalho) e expande sob demanda */
details.admin-maint-collapse > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-family: "Sora", sans-serif;
  font-weight: 600;
  font-size: 1rem;
  color: #0f172a;
  list-style: none;
  user-select: none;
}
details.admin-maint-collapse > summary::-webkit-details-marker { display: none; }
details.admin-maint-collapse > summary::after {
  content: "\25BE"; /* chevron para baixo */
  margin-left: auto;
  color: var(--muted);
  font-size: 0.9rem;
  transition: transform 0.15s ease;
}
details.admin-maint-collapse[open] > summary::after { transform: rotate(180deg); }
details.admin-maint-collapse > summary .material-symbols-outlined {
  font-size: 20px;
  color: var(--primary);
}
details.admin-maint-collapse.admin-maintenance-danger > summary .material-symbols-outlined { color: var(--danger); }
.admin-maint-hint {
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 400;
  font-size: 0.76rem;
  color: var(--muted);
}
.admin-maint-body {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.plan-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.plan-catalog-hint {
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  min-width: min(100%, 420px);
  max-width: min(100%, 520px);
  padding: 10px 12px;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: linear-gradient(180deg, #fbfdff 0%, #eef6ff 100%);
  color: #0f172a;
}
.plan-catalog-hint .material-symbols-outlined {
  margin-top: 1px;
  font-size: 18px;
  color: var(--primary);
}
.plan-catalog-hint div {
  display: grid;
  gap: 3px;
}
.plan-catalog-hint strong {
  font-size: 0.84rem;
}
.plan-catalog-hint div span {
  color: #475569;
  font-size: 0.79rem;
  line-height: 1.4;
}
.plan-selection-summary {
  display: none;
}
.plan-selection-summary.active {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding: 14px 16px;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  background: linear-gradient(180deg, #fbfdff 0%, #eef6ff 100%);
}
.plan-selection-summary-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.plan-selection-summary-eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 4px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
}
.plan-selection-summary-head strong {
  display: block;
  font-family: "Sora", sans-serif;
  font-size: 1.1rem;
}
.plan-selection-summary-head p {
  margin: 4px 0 0;
  color: var(--muted);
}
.plan-selection-summary-price {
  display: grid;
  justify-items: end;
  font-size: 1.2rem;
  font-weight: 800;
  color: #0f172a;
}
.plan-selection-summary-price small {
  font-size: 0.8rem;
  color: var(--muted);
}
.plan-selection-summary-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.plan-selection-summary-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}
.plan-selection-summary-kpi {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid #dbeafe;
}
.plan-selection-summary-kpi span {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}
.plan-selection-summary-kpi strong {
  font-size: 0.98rem;
  color: #0f172a;
}
.plan-summary-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #dbeafe;
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 700;
}
.plan-summary-chip.selected {
  background: rgba(11, 92, 158, 0.1);
}
.plan-tier {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 2px solid var(--line);
  border-radius: 16px;
  padding: 16px 14px;
  background: #ffffff;
  box-shadow: var(--shadow);
  min-width: 0;
}
.plan-tier-head {
  display: grid;
  gap: 6px;
  padding: 2px 6px 6px;
  text-align: center;
}
.plan-tier-head h5 {
  /* texto usa a variante AA do accent (>=4.5:1); o accent vibrante fica nas bordas/decoracoes */
  color: var(--plan-tier-accent-text, var(--plan-tier-accent, var(--primary)));
  font-size: 2rem;
}
.plan-tier-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}
.plan-option-card {
  position: relative;
}
.plan-option-card.selected {
  filter: saturate(1.03);
}
.plan-option-tools {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: flex;
  gap: 6px;
}
.plan-option-tools button {
  width: 32px;
  min-width: 32px;
  min-height: 32px;
  height: 32px;
  padding: 0;
  border-radius: 999px;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.12);
}
.plan-option-card.selected .plan-option-tools .ghost,
.plan-option-card.selected .plan-option-tools .danger {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.32);
  color: #ffffff;
}
.plan-option {
  width: 100%;
  min-height: 188px;
  height: auto;
  padding: 18px 18px 16px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  white-space: normal;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}
.plan-option:hover {
  border-color: var(--plan-tier-accent, var(--primary));
  background: #fcfdff;
}
.plan-option.selected {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 14px 24px rgba(11, 92, 158, 0.24);
}
.plan-option.contracted {
  border-color: var(--primary);
  box-shadow: inset 0 0 0 1px rgba(11, 92, 158, 0.18), 0 10px 20px rgba(11, 92, 158, 0.08);
}
.plan-option-kicker {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--plan-tier-accent-text, var(--plan-tier-accent, var(--primary)));
}
.plan-option.selected .plan-option-kicker {
  color: rgba(255, 255, 255, 0.82);
}
.plan-option-title {
  font-weight: 800;
  font-size: 1.14rem;
  line-height: 1.3;
}
.plan-option-price {
  display: inline-flex;
  align-items: flex-end;
  gap: 4px;
  margin-top: 2px;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}
.plan-option-price small {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--muted);
}
.plan-option.selected .plan-option-price small {
  color: rgba(255, 255, 255, 0.84);
}
.plan-option-meta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}
.plan-option-description {
  font-size: 0.85rem;
  line-height: 1.5;
  color: #475569;
  max-width: 29ch;
}
.plan-option.selected .plan-option-description {
  color: rgba(255, 255, 255, 0.92);
}
.plan-option-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  background: #e5e7eb;
  color: #334155;
  font-size: 11px;
  font-weight: 700;
}
.plan-option-pill.active {
  background: rgba(11, 92, 158, 0.12);
  color: var(--primary);
}
.plan-option-pill.pending {
  background: rgba(11, 92, 158, 0.12);
  color: var(--primary);
}
.plan-option-pill.neutral {
  background: #f8fafc;
  color: #475569;
}
.plan-option.selected .plan-option-pill {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.plan-action {
  width: 100%;
  min-height: 38px;
  height: 38px;
  margin-top: auto;
  border-radius: 12px;
  background: linear-gradient(180deg, #facc15 0%, #f7b500 100%);
  color: #111827;
  font-size: 0.95rem;
  font-weight: 800;
}
.plan-action:hover {
  background: linear-gradient(180deg, #fbbf24 0%, #f59e0b 100%);
}
.plan-action.active {
  background: var(--primary);
  color: #fff;
}
.plan-action:disabled {
  cursor: default;
  opacity: 0.65;
}
.terms-content {
  max-height: 320px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #f9fafb;
  white-space: pre-wrap;
}
.plan-hire-modal-card {
  width: min(900px, calc(100vw - 30px));
}
.plan-hire-stepper {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 0 18px 18px;
}
.plan-hire-step {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #dbe5f0;
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
}
.plan-hire-step.active {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: var(--primary);
}
.plan-hire-step.done {
  border-color: #ccebd8;
  background: #ecfdf3;
  color: #166534;
}
.plan-hire-step-index {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 1px solid currentColor;
  font-size: 0.84rem;
}
.plan-hire-body {
  padding: 0 18px 18px;
}
.plan-hire-step-panel {
  display: grid;
  gap: 14px;
}
.plan-hire-plan-hero {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid #dbeafe;
  background: #eff6ff;
}
.plan-hire-eyebrow {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
}
.plan-hire-plan-hero strong {
  font-family: "Sora", sans-serif;
  font-size: 1.15rem;
}
.plan-hire-plan-hero small {
  color: #475569;
}
.plan-hire-plan-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
}
.plan-hire-metric {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(191, 219, 254, 0.9);
}
.plan-hire-metric span {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}
.plan-hire-metric strong {
  font-size: 0.96rem;
  color: #0f172a;
}
.plan-hire-step-intro {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fbfdff;
}
.plan-hire-benefits {
  margin-top: 0;
}
.plan-hire-check {
  display: flex;
  align-items: center;
  gap: 10px;
}
.plan-hire-form-section {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fbfdff;
}
.plan-hire-form-section-head {
  display: grid;
  gap: 4px;
}
.plan-hire-form-section-head p {
  margin: 0;
  color: var(--muted);
}
.plan-hire-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.plan-hire-form-grid label span {
  font-size: 0.82rem;
  color: #475569;
}
.plan-hire-field-note {
  display: block;
  margin-top: 6px;
  font-size: 0.76rem;
  color: #64748b;
}
.plan-hire-review-head p {
  margin: 4px 0 0;
  color: var(--muted);
}
.plan-hire-review-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid #dbeafe;
  background: linear-gradient(180deg, #fbfdff 0%, #eef6ff 100%);
}
.plan-hire-review-hero strong {
  display: block;
  font-family: "Sora", sans-serif;
}
.plan-hire-review-hero small {
  color: #475569;
}
.plan-hire-review-amount {
  display: grid;
  justify-items: end;
  text-align: right;
}
.plan-hire-review-amount strong {
  font-size: 1.28rem;
  color: #0f172a;
}
.plan-hire-review-amount span {
  font-size: 0.82rem;
  color: #64748b;
}
.plan-hire-review-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.plan-hire-review-row {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdff;
}
.plan-hire-review-row span {
  font-size: 0.8rem;
  color: #64748b;
}
.plan-hire-review-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f8fafc;
  color: #334155;
}
.plan-hire-review-note .material-symbols-outlined {
  color: var(--primary);
}
.table-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 4px 0;
  font-size: var(--pagination-font-size, 0.82rem);
}
.table-pagination-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.table-pagination-left label {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--muted);
}
.table-pagination-left select {
  width: auto;
  min-width: 68px;
  height: 28px;
  font-size: 0.78rem;
  padding: 2px 6px;
}
.table-pagination-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}
.table-pagination-actions button {
  min-height: var(--pagination-btn-size, 34px);
  min-width: var(--pagination-btn-size, 34px);
  height: var(--pagination-btn-size, 34px);
  width: var(--pagination-btn-size, 34px);
  padding: 0;
}
.table-pagination-actions button .material-symbols-outlined {
  font-size: 18px;
}
.table-pagination-page {
  font-size: 0.76rem;
  color: var(--muted);
}
.signup-public-body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(11, 92, 158, 0.12), transparent 28%),
    linear-gradient(180deg, #f4f8fc 0%, #eef3f9 100%);
}
.signup-public-shell {
  width: min(1240px, calc(100vw - 32px));
  margin: 28px auto;
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.signup-hero,
.signup-form-card {
  padding: 24px;
  display: grid;
  gap: 18px;
}
.signup-hero {
  position: sticky;
  top: 18px;
}
.signup-page-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
}
.signup-hero h1,
.signup-form-card h1 {
  margin: 10px 0 8px;
  font-family: "Sora", sans-serif;
  font-size: clamp(1.9rem, 2.7vw, 2.8rem);
}
.signup-hero p,
.signup-form-card > p {
  color: #475569;
}
.signup-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}
.signup-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(11, 92, 158, 0.08);
  color: var(--primary);
  font-size: 0.84rem;
  font-weight: 700;
}
.signup-benefits {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}
.signup-benefit {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.76);
}
.signup-benefit strong {
  font-size: 0.98rem;
}
.signup-benefit p {
  margin: 0;
  font-size: 0.9rem;
}
.signup-step-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.signup-step-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fbfdff;
}
.signup-step-item span {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  font-size: 0.82rem;
  font-weight: 800;
  color: #475569;
}
.signup-step-item strong {
  font-size: 0.9rem;
  color: #0f172a;
}
.signup-step-item.active {
  border-color: #bfdbfe;
  background: #eff6ff;
}
.signup-step-item.active span {
  border-color: var(--primary);
  color: var(--primary);
}
.signup-plan-summary {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid #dbeafe;
  background: linear-gradient(180deg, #fbfdff 0%, #eef6ff 100%);
}
.signup-plan-summary strong {
  font-family: "Sora", sans-serif;
  font-size: 1.02rem;
}
.signup-plan-summary p {
  margin: 0;
  color: #475569;
}
.signup-plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  align-items: stretch;
  grid-auto-rows: 1fr;
}
.signup-plan-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  width: 100%;
  min-height: 0;
  height: auto;
  justify-content: flex-start;
  align-items: stretch;
  text-align: left;
  white-space: normal;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.signup-plan-card.trial {
  grid-column: 1 / -1;
}
.signup-plan-card:hover {
  background: #fff;
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}
.signup-plan-card.selected {
  border-color: #bfdbfe;
  box-shadow: 0 16px 30px rgba(11, 92, 158, 0.14);
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}
button.signup-plan-card:active {
  transform: translateY(0);
}
.signup-plan-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.signup-plan-card-header strong {
  font-family: "Sora", sans-serif;
  font-size: 1rem;
}
.signup-plan-card-header span {
  font-size: 0.8rem;
  color: #64748b;
}
.signup-plan-card-price {
  display: grid;
  gap: 2px;
}
.signup-plan-card-price strong {
  font-size: 1.4rem;
  color: #0f172a;
}
.signup-plan-card-price span {
  color: #64748b;
  font-size: 0.82rem;
}
.signup-plan-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.signup-plan-card-meta span {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 0.78rem;
  font-weight: 700;
  color: #475569;
}
.signup-plan-card p {
  margin: 0;
  color: #475569;
  font-size: 0.88rem;
}
.signup-form-sections {
  display: grid;
  gap: 14px;
}
.signup-form-section {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fbfdff;
}
.signup-form-section-head {
  display: grid;
  gap: 4px;
}
.signup-form-section-head p {
  margin: 0;
  color: #64748b;
}
.signup-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.signup-form-grid label {
  margin: 0;
}
.signup-form-grid .full {
  grid-column: 1 / -1;
}
.signup-form-grid small {
  display: block;
  margin-top: 6px;
  font-size: 0.78rem;
  color: #64748b;
}
.signup-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.signup-actions button {
  min-width: 220px;
}
.signup-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 700;
}
.signup-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(11, 92, 158, 0.06);
  border: 1px solid rgba(11, 92, 158, 0.12);
}
.signup-note .material-symbols-outlined {
  color: var(--primary);
}
.signup-note p {
  margin: 4px 0 0;
  color: #475569;
}
.signup-status-card {
  padding: 14px 16px;
  border-radius: 14px;
}
.signup-status-card.success {
  background: #ecfdf3;
  color: #166534;
}
.signup-status-card.error {
  background: #fef2f2;
  color: #991b1b;
}
.contract-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  align-items: start;
}
.contract-grid .table-wrap {
  background: #fff;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.contract-grid table { width: 100%; border-collapse: collapse; }
.contract-grid th { text-align: left; color: var(--menu-bg, #0b5c9e); font-size: 0.95rem; padding-bottom: 0.6rem; border-bottom: 2px solid var(--line, #e2e8f0); }
.contract-grid td { padding: 0.5rem 0.6rem; border-bottom: 1px solid #f0f2f5; font-size: 0.85rem; vertical-align: top; }
.contract-grid td:first-child { font-weight: 600; color: #334155; width: 42%; }
.key-cell { font-weight: 700; }
.signup-terms-panel {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, #fbfdff 0%, #f4f8fc 100%);
}
.signup-terms-content {
  max-height: 280px;
  overflow: auto;
  white-space: pre-line;
  font-size: 0.92rem;
  line-height: 1.55;
  color: #334155;
  padding-right: 6px;
}

body[data-nav-mode="menu_cards"] #report-list {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
/* Modo de navegacao por cards: card de relatorio com identidade do tema (cor da navegacao),
   hover com elevacao, estado ativo destacado, preview tematizado e CTA "Abrir relatorio". */
body[data-nav-mode="menu_cards"] .report-card-item {
  padding: 0;
  overflow: hidden;
  /* Sobrescreve o display:grid do .report-item (que colocava cabeçalho e botao em colunas e, com o
     height fixo herdado do button{} global, colapsava o card). Flex column empilha e cresce natural. */
  display: flex;
  flex-direction: column;
  align-self: start;
  height: auto;
  border-radius: 14px;
  border: 1px solid #e5edf5;
  background: #fff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
body[data-nav-mode="menu_cards"] .report-card-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.12);
  border-color: color-mix(in srgb, var(--menu-bg, #06653a) 40%, #e5edf5);
}
body[data-nav-mode="menu_cards"] .report-card-item.active {
  border-color: var(--menu-bg, #06653a);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--menu-bg, #06653a) 30%, transparent), 0 16px 34px rgba(15, 23, 42, 0.12);
}
body[data-nav-mode="menu_cards"] .report-card-head {
  padding: 12px 14px 10px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
body[data-nav-mode="menu_cards"] .report-card-icon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 22px;
  color: var(--menu-bg, #06653a);
  background: #eef5f1;
  background: color-mix(in srgb, var(--menu-bg, #06653a) 12%, transparent);
}
body[data-nav-mode="menu_cards"] .report-card-head-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
  flex: 1 1 auto;
}
body[data-nav-mode="menu_cards"] .report-card-head-copy small {
  color: #64748b;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
body[data-nav-mode="menu_cards"] .report-card-head-copy strong {
  font-size: 14px;
  line-height: 1.3;
  color: #0f172a;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
body[data-nav-mode="menu_cards"] .report-card-item .favorite {
  flex-shrink: 0;
  min-width: 32px;
  width: 32px;
  min-height: 32px;
  height: 32px;
  font-size: 16px;
}
body[data-nav-mode="menu_cards"] .report-card-open {
  display: grid;
  gap: 0;
  padding: 0;
  width: 100%;
  /* Reseta o height fixo herdado do button{} global, senao o preview+footer estouram e o card colapsa. */
  height: auto;
  min-height: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
body[data-nav-mode="menu_cards"] .report-card-preview {
  min-height: 120px;
  background: #eef5f1;
  background: linear-gradient(180deg, color-mix(in srgb, var(--menu-bg, #06653a) 10%, #fff) 0%, color-mix(in srgb, var(--menu-bg, #06653a) 18%, #fff) 100%);
  display: grid;
  place-items: center;
  color: var(--menu-bg, #06653a);
}
body[data-nav-mode="menu_cards"] .report-card-preview .material-symbols-outlined {
  font-size: 40px;
  opacity: 0.85;
}
body[data-nav-mode="menu_cards"] .report-card-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px;
  border-top: 1px solid #e5edf5;
  color: var(--menu-bg, #06653a);
  font-weight: 600;
  font-size: 13px;
  line-height: 1.35;
}
body[data-nav-mode="menu_cards"] .report-card-footer .material-symbols-outlined {
  font-size: 18px;
  transition: transform 0.16s ease;
}
body[data-nav-mode="menu_cards"] .report-card-item:hover .report-card-footer .material-symbols-outlined {
  transform: translateX(3px);
}

@media (max-width: 1200px) {
  .plan-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-grid { grid-template-columns: 1fr; }
  /* Em telas estreitas (grid empilhado) o conteudo fica alto: liberar rolagem
     interna do painel em vez de forcar tudo na altura do viewport. */
  .home-panel { overflow-y: auto; }
  .home-chart-card { flex: none; }
  .home-grid { flex: none; }
  .home-chart-bars { min-height: 240px; flex: none; }
  .home-chart-col { height: 240px; }
  .home-list-card { overflow: visible; }
  .home-top-reports { overflow: visible; flex: none; }
  .home-list-card .table-wrap { flex: none; max-height: 320px; }
  .primary-nav-submenu { min-width: 180px; }
  .login-config-layout { grid-template-columns: 1fr; }
  .primary-nav-item-child {
    font-size: max(11px, calc(var(--menu-item-child-font-size) - 1px));
    padding: 0 10px;
  }
}
@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; }
  .profile-layout { grid-template-columns: 1fr; }
  .appearance-editor-layout { grid-template-columns: 1fr; }
  .appearance-company-toolbar { grid-template-columns: minmax(0, 1fr) auto; }
  .appearance-controls-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .appearance-preview-card { position: static; }
  .access-preview-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .access-preview-sections { grid-template-columns: 1fr; }
  .crud-fields-grid { grid-template-columns: 1fr; }
  .crud-field-span-2 { grid-column: auto; }
  .crud-modal-body-with-preview { grid-template-columns: 1fr; }
  .crud-preview-content { max-height: 42vh; }
  .admin-oauth-columns { grid-template-columns: 1fr; }
  .admin-oauth-scope-grid { grid-template-columns: 1fr; }
  .domain-grid.two-col { grid-template-columns: 1fr; }
  .toggle-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-params-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contract-grid { grid-template-columns: 1fr; }
  .signup-public-shell { grid-template-columns: 1fr; }
  .signup-hero { position: static; }
  .signup-step-strip { grid-template-columns: 1fr; }
  .signup-form-grid,
  .plan-hire-form-grid,
  .plan-hire-review-grid { grid-template-columns: 1fr; }
  .plan-hire-plan-metrics,
  .plan-selection-summary-kpis { grid-template-columns: 1fr; }
  .plan-hire-review-hero {
    flex-direction: column;
    align-items: flex-start;
  }
  .topbar-main-row { flex-direction: column; align-items: stretch; }
  .topbar-main-left { flex-direction: column; align-items: flex-start; }
  .topbar-title { font-size: clamp(16px, 3.8vw, 18px); }
  .topbar-main-right { width: 100%; justify-content: flex-end; }
  .topbar-company-context { width: 100%; justify-content: space-between; }
  .topbar-company-context select { min-width: 0; flex: 1 1 auto; }
  .topbar-environment-context .topbar-company-context-select-wrap,
  .topbar-environment-context select { max-width: none; }
  .primary-nav { width: 100%; }
  .topbar-secondary-row { flex-direction: column; align-items: stretch; }
  .topbar-welcome { min-width: 0; }
  .topbar-search-item {
    grid-template-columns: 1fr auto;
  }
  .topbar-search-item small {
    grid-column: 1 / span 1;
  }
  .actions { width: 100%; }
  .actions button {
    flex: 1 1 calc(50% - 8px);
    min-width: 0;
  }
  .table-toolbar-right.table-toolbar-filtered {
    flex: 1 1 100%;
  }
  .table-toolbar-left,
  .table-toolbar-right {
    width: 100%;
  }
  .plan-catalog-hint {
    width: 100%;
    max-width: none;
  }
  .table-filter-pack {
    width: 100%;
    grid-template-columns: minmax(120px, 180px) minmax(0, 1fr) auto;
  }
  .table-filter-pack.no-scope {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .top-report-menu { width: 100%; }
  .home-chart-bars {
    justify-content: flex-start;
    padding-bottom: 4px;
  }
  .home-chart-insights {
    grid-template-columns: 1fr;
  }
  .home-chart-col {
    height: 210px;
    width: 100%;
  }
  .crud-report-rules-head {
    display: none;
  }
  .crud-report-rules-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .crud-checklist-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }
}
@media (max-width: 640px) {
  /* Modo cartao para tabelas de dados no celular: cada linha vira um cartao com
     "rotulo: valor" (via data-label injetado por decorateResponsiveTable). Evita rolagem
     horizontal e leitura espremida. So afeta tabelas com cabecalho (has-data-labels). */
  .table-wrap table.has-data-labels { min-width: 0; }
  .table-wrap table.has-data-labels thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .table-wrap table.has-data-labels tbody tr {
    display: block;
    border: 1px solid var(--line);
    border-radius: 10px;
    margin-bottom: 10px;
    padding: 6px 10px;
    background: #fff;
    background-image: none;
  }
  .table-wrap table.has-data-labels tbody td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    width: auto;
    padding: 7px 0;
    border: 0;
    border-bottom: 1px solid var(--table-row-divider);
    text-align: right;
  }
  .table-wrap table.has-data-labels tbody td:last-child { border-bottom: 0; }
  .table-wrap table.has-data-labels tbody td::before {
    content: attr(data-label);
    font-weight: 700;
    color: var(--muted);
    text-align: left;
    flex: 0 0 42%;
    overflow-wrap: anywhere;
  }
  .table-wrap table.has-data-labels tbody td:not([data-label])::before { content: ""; }
  .plan-cards { grid-template-columns: 1fr; }
  .shell { padding: 8px; }
  .login-signup-link { justify-content: flex-start; }
  .signup-public-shell { width: min(100vw - 12px, 100%); margin: 8px auto 14px; }
  .signup-hero,
  .signup-form-card { padding: 18px; }
  .signup-plan-grid { grid-template-columns: 1fr; }
  .signup-plan-card.trial { grid-column: auto; }
  .signup-actions { align-items: stretch; }
  .signup-actions button,
  .signup-actions a { width: 100%; }
  .toggle-card-grid { grid-template-columns: 1fr; }
  .report-params-grid { grid-template-columns: 1fr; }
  .appearance-company-toolbar { grid-template-columns: 1fr; }
  .appearance-company-toolbar #domain-appearance-apply,
  .appearance-company-toolbar #domain-blocking-apply { width: 100%; }
  .appearance-controls-grid { grid-template-columns: 1fr; }
  .access-preview-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .appearance-color-control { grid-template-columns: 1fr; }
  .favorites-grid { grid-template-columns: 1fr; }
  .appearance-preview-topbar {
    flex-direction: column;
    align-items: stretch;
  }
  .appearance-preview-content { grid-template-columns: 1fr; }
  .topbar { padding: max(8px, calc(var(--topbar-pad-y) - 1px)) max(8px, calc(var(--topbar-pad-x) - 2px)); }
  .topbar-search-overlay {
    padding: 4px 6px 6px;
  }
  .topbar-search-item {
    grid-template-columns: 1fr auto;
    gap: 6px 10px;
  }
  .topbar-search-item strong,
  .topbar-search-item small {
    grid-column: 1 / 2;
  }
  .home-kpis { grid-template-columns: 1fr; }
  #topbar-favorites-btn,
  #topbar-home-btn { display: none; }
  .table-filter-pack {
    grid-template-columns: 1fr;
    gap: 7px;
  }
  .table-filter-icon {
    justify-self: end;
  }
  .table-filter-select,
  .table-filter-input {
    width: 100%;
  }
}

/* Sidebar Navigation (menu_lateral) */
.sidebar-nav {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: var(--sidebar-width, 260px);
  /* Mesma cor da topbar (faixa de navegacao unica) — ver --topbar-bg. */
  background: var(--topbar-bg, #06653a);
  color: var(--menu-text, #fff);
  display: flex;
  flex-direction: column;
  z-index: 200;
  overflow: hidden;
  transition: width 0.25s ease;
  box-shadow: 2px 0 12px rgba(0,0,0,0.12);
}
.sidebar-nav.hidden { display: none; }
.sidebar-nav.collapsed { width: 60px; }
.sidebar-logo-wrap {
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  /* Altura igual a da topbar (mesmos tokens: logo-height + 2*pad-y + bordas) para a linha divisoria
     do cabeçalho alinhar com a base da topbar, formando uma faixa superior continua no modo lateral. */
  min-height: calc(var(--topbar-logo-height, 34px) + 2 * var(--topbar-pad-y, 8px) + 2px);
  height: calc(var(--topbar-logo-height, 34px) + 2 * var(--topbar-pad-y, 8px) + 2px);
}
/* A logo do sidebar reusa o MESMO objeto da topbar (.logo-image-wrap): uma caixa com borda sutil,
   exibindo a imagem em fundo branco (como no menu superior) ou o fallback de texto da empresa. So um
   dos dois aparece por vez (a sync em renderSidebarNav alterna), entao ambos recebem o estilo de caixa. */
.sidebar-company-logo {
  width: var(--topbar-logo-width, 84px);
  height: var(--topbar-logo-height, 34px);
  object-fit: contain;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 6px;
}
.sidebar-company-logo-fallback {
  display: grid;
  place-items: center;
  width: var(--topbar-logo-width, 84px);
  height: var(--topbar-logo-height, 34px);
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--menu-text, #fff);
}
.sidebar-nav.collapsed .sidebar-logo-wrap { padding: 0 6px; }
.sidebar-nav.collapsed .sidebar-company-logo,
.sidebar-nav.collapsed .sidebar-company-logo-fallback { width: 44px; height: 30px; font-size: 0.7rem; }
.sidebar-menu {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}
.sidebar-menu::-webkit-scrollbar { width: 4px; }
.sidebar-menu::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 2px; }
.sidebar-item {
  position: relative;
  display: flex;
  align-items: center;
  /* Reset dos defaults do <button> global (justify-content:center, border-radius, height fixo) que
     nao servem para um item de menu de largura total. */
  justify-content: flex-start;
  height: auto;
  border-radius: 0;
  gap: 11px;
  width: 100%;
  min-height: 42px;
  padding: 9px 18px;
  border: none;
  background: none;
  color: var(--menu-text, #fff);
  font-size: var(--menu-item-font-size, 0.88rem);
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-item:hover { background: rgba(255,255,255,0.12); }
.sidebar-item:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.55);
}
/* Itens de 1o nivel ganham mais peso para separar visualmente dos submenus. */
.sidebar-menu > .sidebar-group > .sidebar-item,
.sidebar-menu > .sidebar-item { font-weight: 600; }
/* Estado ativo inequivoco: realce + barra de destaque a esquerda (na cor do texto do menu,
   entao contrasta em qualquer tema claro/escuro). */
.sidebar-item.active {
  background: rgba(255,255,255,0.2);
  font-weight: 700;
  box-shadow: inset 3px 0 0 0 var(--menu-text, #fff);
}
.sidebar-item.active:focus-visible {
  box-shadow: inset 3px 0 0 0 var(--menu-text, #fff), inset 0 0 0 2px rgba(255,255,255,0.55);
}
.sidebar-item .material-symbols-outlined { font-size: var(--menu-icon-size, 18px); flex-shrink: 0; opacity: 0.92; }
.sidebar-item.active .material-symbols-outlined { opacity: 1; }
.sidebar-item-label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* Espaco reservado do icone em subgrupos sem icone proprio: mantem os rotulos alinhados na coluna. */
.sidebar-item-icon-spacer { width: var(--menu-icon-size, 18px); height: 1px; flex-shrink: 0; }
/* Estado vazio: o lateral so mostra menus liberados (paridade com a topbar). Sem menus -> aviso discreto. */
.sidebar-empty {
  margin: 14px 18px;
  font-size: 0.82rem;
  color: var(--menu-text, #fff);
  /* 0.85 mantem o ar discreto mas garante contraste WCAG AA (>=4.5:1) sobre a faixa de navegacao. */
  opacity: 0.85;
  line-height: 1.45;
}
.sidebar-nav.collapsed .sidebar-item { padding: 10px 0; justify-content: center; }
.sidebar-nav.collapsed .sidebar-item-label { display: none; }
.sidebar-nav.collapsed .sidebar-chevron { display: none; }
.sidebar-group-children {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
  background: rgba(0,0,0,0.16);
  /* Linha-guia de hierarquia: deixa claro que os itens pertencem ao grupo pai. */
  box-shadow: inset 2px 0 0 0 rgba(255,255,255,0.12);
}
.sidebar-group.is-open > .sidebar-group-children { max-height: 1200px; }
.sidebar-group-children .sidebar-item { padding-left: 46px; font-size: 0.84rem; font-weight: 500; }
.sidebar-group-children .sidebar-group-children .sidebar-item { padding-left: 62px; font-size: 0.82rem; }
.sidebar-chevron {
  margin-left: auto;
  font-size: 18px;
  transition: transform 0.2s;
  flex-shrink: 0;
}
.sidebar-group.is-open > .sidebar-item > .sidebar-chevron { transform: rotate(90deg); }
.sidebar-collapse-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border: none;
  background: rgba(0,0,0,0.15);
  color: var(--menu-text, #fff);
  cursor: pointer;
  transition: background 0.15s;
}
.sidebar-collapse-btn:hover { background: rgba(0,0,0,0.25); }
.sidebar-nav.collapsed .sidebar-collapse-btn .material-symbols-outlined { transform: rotate(180deg); }

/* Acessibilidade (WCAG 2.3.3 Animation from Interactions): respeita a preferencia do
   sistema por movimento reduzido, neutralizando transicoes/animacoes/scroll suave para
   usuarios sensiveis a movimento (enxaqueca, vertigem). Mantem a funcionalidade intacta. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* Sidebar active: push content right */
body.nav-style-menu_lateral .app-main-content {
  margin-left: var(--sidebar-width, 260px);
  transition: margin-left 0.25s ease;
}
body.nav-style-menu_lateral .sidebar-nav.collapsed ~ .app-main-content { margin-left: 60px; }
body.nav-style-menu_lateral #primary-nav { display: none; }
/* Topbar "full-bleed" no modo lateral: o sidebar e position:fixed (ancorado em 0,0 da viewport) e
   ignora o padding de `.shell` (var(--shell-padding,14px)); ja o resto do layout vive dentro desse
   padding. Isso criava um vao acima da topbar e outro entre o sidebar e a topbar. Sangrando a topbar
   pelos -var(--shell-padding) no topo/esquerda/direita, ela encosta no topo, na borda direita e rente
   ao sidebar — alinhada com a barra lateral, como no portal de referencia. */
body.nav-style-menu_lateral .topbar {
  border-radius: 0;
  margin-top: calc(-1 * var(--shell-padding, 14px));
  margin-left: calc(-1 * var(--shell-padding, 14px));
  margin-right: calc(-1 * var(--shell-padding, 14px));
}
/* No modo lateral a logo ja aparece no cabecalho da barra lateral; esconde a copia redundante da
   topbar (so no desktop, onde o sidebar fica sempre visivel). No mobile o sidebar e uma gaveta
   off-canvas (oculta por padrao), entao a logo da topbar permanece como referencia da marca. */
@media (min-width: 769px) {
  body.nav-style-menu_lateral .logo-home-button { display: none; }
}

/* Sidebar hamburger toggle in topbar */
.sidebar-toggle-btn {
  display: none;
  border: none; background: none; color: var(--menu-text, #fff);
  cursor: pointer; padding: 4px; font-size: 0;
}
.sidebar-toggle-btn .material-symbols-outlined { font-size: 24px; }
body.nav-style-menu_lateral .sidebar-toggle-btn { display: inline-flex; }

/* Mobile overlay */
@media (max-width: 768px) {
  .sidebar-nav { width: 260px; transform: translateX(-100%); transition: transform 0.25s ease; }
  .sidebar-nav.sidebar-mobile-open { transform: translateX(0); }
  .sidebar-nav.collapsed { width: 260px; }
  body.nav-style-menu_lateral .app-main-content { margin-left: 0; }
  /* No mobile o `.shell` usa 8px de padding (nao a var); ajusta o bleed da topbar para nao estourar
     a viewport (sem scroll horizontal), mantendo-a full-bleed nas bordas. */
  body.nav-style-menu_lateral .topbar { margin-top: -8px; margin-left: -8px; margin-right: -8px; }
  .sidebar-overlay {
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 199;
  }
  .sidebar-overlay.active { display: block; }
}

/* Saved Filters Dropdown Menu */
.saved-filters-menu {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 1200;
  min-width: 260px;
  max-width: 340px;
  max-height: 360px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #d0d7de;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  padding: 6px 0;
}
.saved-filters-menu.hidden { display: none; }
.sfm-header {
  padding: 8px 14px 4px;
  font-weight: 600;
  font-size: 0.82rem;
  color: #24292f;
  border-bottom: 1px solid #eee;
  margin-bottom: 2px;
}
.sfm-loading, .sfm-empty {
  padding: 12px 14px;
  font-size: 0.8rem;
  color: #666;
  text-align: center;
}
.sfm-action {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 7px 14px;
  border: none;
  background: none;
  font-size: 0.82rem;
  color: var(--menu-bg, #0b5c9e);
  cursor: pointer;
  text-align: left;
}
.sfm-action:hover { background: #f0f4fa; }
.sfm-action .material-symbols-outlined { font-size: 18px; }
.sfm-list { padding: 2px 0; }
.sfm-item {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 6px 0 0;
}
.sfm-item:hover { background: #f6f8fa; }
.sfm-apply {
  flex: 1;
  padding: 7px 10px;
  border: none;
  background: none;
  font-size: 0.82rem;
  color: #24292f;
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sfm-apply:hover { color: var(--menu-bg, #0b5c9e); }
.sfm-page { color: #888; font-size: 0.72rem; }
.sfm-delete {
  flex-shrink: 0;
  border: none;
  background: none;
  color: #aaa;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
}
.sfm-delete:hover { color: #d32f2f; background: #fef0f0; }
.sfm-delete .material-symbols-outlined { font-size: 16px; }

/* ── Mobile phone frame ── */
body.report-mobile-active #report-host {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background: #e8ecf0;
  padding: 1.5rem 0;
}
body.report-mobile-active #report-host iframe {
  width: 375px !important;
  max-width: 375px;
  height: 812px !important;
  max-height: calc(100dvh - 160px);
  border: 8px solid #1a1a1a !important;
  border-radius: 36px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.22);
}
body.report-mobile-active #report-host iframe::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 6px;
  background: #333;
  border-radius: 3px;
  z-index: 1;
}
/* Preview mobile frame */
body.preview-mobile-active .preview-host {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background: #e8ecf0;
  padding: 1.5rem 0;
}
body.preview-mobile-active .preview-host iframe {
  width: 375px !important;
  max-width: 375px;
  height: 812px !important;
  max-height: calc(100dvh - 200px);
  border: 8px solid #1a1a1a !important;
  border-radius: 36px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.22);
}

@media print {
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}

/* Campo de e-mails em etiquetas (chips) estilo Outlook — encaminhamento e tela de PDF/impressao. */
.email-chips {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  min-height: 42px;
  padding: 6px 8px;
  border: 1px solid var(--input-border, #c5d2e2);
  border-radius: var(--input-radius, 10px);
  background: #fff;
  cursor: text;
}
.email-chips:focus-within {
  border-color: var(--accent, #0b5c9e);
  box-shadow: 0 0 0 2px rgba(11, 92, 158, 0.16);
}
.email-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  padding: 3px 4px 3px 10px;
  background: #eef3f8;
  border: 1px solid #d7e0eb;
  border-radius: 999px;
  font-size: 0.82rem;
  line-height: 1.25;
  color: #1f2937;
}
.email-chip-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.email-chip.is-invalid {
  background: #fdecea;
  border-color: #f1b0ab;
  color: #b3261e;
}
.email-chip-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  opacity: 0.65;
}
.email-chip-remove:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.06);
}
.email-chip-remove .material-symbols-outlined {
  font-size: 16px;
  line-height: 1;
}
.email-chips-entry {
  flex: 1 1 140px;
  min-width: 140px;
  border: 0;
  outline: 0;
  padding: 4px;
  font: inherit;
  color: inherit;
  background: transparent;
}
.email-chips-suggest {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 60;
  max-height: 220px;
  overflow-y: auto;
  padding: 4px;
  background: #fff;
  border: 1px solid var(--line, #d7e0eb);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.14);
}
.email-chips-suggest.is-open {
  display: block;
}
.email-chips-suggest-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 2px;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 11px 12px;
  cursor: pointer;
}
.email-chips-suggest-item:not(:last-child) {
  border-bottom: 1px solid #d7e0eb;
}
.email-chips-suggest-item:hover,
.email-chips-suggest-item.is-active {
  background: #eef3f8;
}
.email-chips-suggest-name {
  width: 100%;
  text-align: left;
  font-size: 0.85rem;
  color: #1f2937;
}
.email-chips-suggest-mail {
  width: 100%;
  text-align: left;
  font-size: 0.76rem;
  color: #5e6675;
}
