/* =========================================================
   SHELL PADRAO PROLAR
   Cabeçalho único com variação por tema:
   html[data-theme="claro"]
   html[data-theme="escuro"]
   ========================================================= */

#shellHost {
  position: relative;
  z-index: 999900;
  isolation: isolate;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;

  --shell-red: #ed0033;
  --shell-red-dark: #b90027;
  --shell-red-rgb: 237, 0, 51;
  --shell-yellow: #fff200;

  --shell-brand-bg: #fff200;
  --shell-company-title: var(--shell-red);
  --shell-company-text: #2d2d2d;

  --shell-shortcuts-bg: #d0d0d0;
  --shell-shortcut-bg: #bdbdbd;
  --shell-shortcut-border-light: #eeeeee;
  --shell-shortcut-border-dark: #8f8f8f;

  --shell-dropdown-bg: #fff8dd;
  --shell-dropdown-text: #252525;
}

html[data-theme="escuro"] #shellHost {
  --shell-brand-bg: #111111;
  --shell-company-title: #fff200;
  --shell-company-text: #ffffff;

  --shell-shortcuts-bg: #242424;
  --shell-shortcut-bg: #333333;
  --shell-shortcut-border-light: #555555;
  --shell-shortcut-border-dark: #151515;

  --shell-dropdown-bg: #242424;
  --shell-dropdown-text: #ffffff;
}

#shellHost * {
  box-sizing: border-box;
}

#shellHost .shell {
  width: 100%;
  position: relative;
  z-index: 999900;
  background: var(--shell-brand-bg);
  border-top: 8px solid var(--shell-red);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

/* =========================================================
   AREA DA LOGO / EMPRESA
   ========================================================= */

#shellHost .shell-brand {
  height: 118px;
  position: relative;
  z-index: 999901;
  background: var(--shell-brand-bg);
}

#shellHost .shell-logo {
  position: absolute;
  left: 34px;
  top: 18px;
  width: 340px;
  height: 82px;
  display: flex;
  align-items: center;
}

#shellHost .shell-logo img {
  max-width: 320px;
  max-height: 80px;
  object-fit: contain;
  display: block;
  filter: none;
  opacity: 1;
}

#shellHost .shell-company {
  position: absolute;
  right: 26px;
  top: 34px;
  text-align: right;
}

#shellHost .shell-company strong {
  display: block;
  color: var(--shell-company-title);
  font-size: 14px;
  font-weight: 900;
}

#shellHost .shell-company span {
  display: block;
  margin-top: 4px;
  color: var(--shell-company-text);
  font-size: 13px;
}

/* =========================================================
   MENU PRINCIPAL
   ========================================================= */

#shellHost .shell-menu {
  min-height: 52px;
  position: relative;
  z-index: 999920;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0 32px;
  background: var(--shell-red);
  border: 0;
  box-shadow: none;
  overflow: visible;
}

#shellHost .shell-menu-group {
  position: relative;
  z-index: 999930;
  overflow: visible;
}

#shellHost .shell-menu-button {
  position: relative;
  width: auto;
  min-width: auto;
  height: 52px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 2px;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  background-image: none;
  box-shadow: none;
  color: #ffffff;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  transform-origin: center;
  transition: transform 0.14s ease;
}

#shellHost .shell-menu-button:hover {
  transform: scale(1.08);
  background: transparent;
  box-shadow: none;
}

#shellHost .shell-menu-button::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 7px;
  height: 3px;
  border-radius: 999px;
  background: #ffffff;
  opacity: 0;
  transform: scaleX(0.45);
  transition: opacity 0.14s ease, transform 0.14s ease;
}

#shellHost .shell-menu-button:hover::after {
  opacity: 1;
  transform: scaleX(1);
}

#shellHost .shell-menu-icon {
  width: 21px;
  height: 21px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  line-height: 1;
}

#shellHost .shell-menu-icon svg {
  width: 21px;
  height: 21px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.15;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#shellHost .shell-caret {
  font-size: 10px;
  margin-left: 2px;
  color: #ffffff;
}

/* =========================================================
   SUBMENUS
   ========================================================= */

#shellHost .shell-dropdown {
  display: none;
  position: absolute;
  left: 0;
  top: 52px;
  z-index: 999999;
  min-width: 230px;
  padding: 6px;
  background: var(--shell-dropdown-bg);
  border: 1px solid var(--shell-red-dark);
  border-top: 0;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.30);
}

#shellHost .shell-menu-group:hover .shell-dropdown {
  display: block;
}

#shellHost .shell-dropdown button {
  width: 100%;
  min-height: 32px;
  display: block;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--shell-dropdown-text);
  text-align: left;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 700;
  box-shadow: none;
}

#shellHost .shell-dropdown button:hover {
  background: var(--shell-red);
  color: #ffffff;
  transform: none;
}

/* =========================================================
   ATALHOS PEQUENOS
   ========================================================= */

#shellHost .shell-shortcuts {
  min-height: 60px;
  position: relative;
  z-index: 999910;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 36px;
  background: var(--shell-shortcuts-bg);
  border-bottom: 4px solid var(--shell-red);
  overflow-x: auto;
  overflow-y: visible;
}

#shellHost .shell-shortcut {
  width: 48px;
  min-width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  padding: 0;
  margin: 0;
  border-radius: 0;
  border-top: 2px solid var(--shell-shortcut-border-light);
  border-left: 2px solid var(--shell-shortcut-border-light);
  border-right: 2px solid var(--shell-shortcut-border-dark);
  border-bottom: 2px solid var(--shell-shortcut-border-dark);
  background: var(--shell-shortcut-bg);
  background-image: none;
  box-shadow: none;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease, background-color 0.12s ease;
}

#shellHost .shell-shortcut:hover {
  transform: scale(1.08);
  filter: brightness(1.10);
  z-index: 3;
}

#shellHost .shell-shortcut:active {
  transform: scale(0.98);
  border-top-color: var(--shell-shortcut-border-dark);
  border-left-color: var(--shell-shortcut-border-dark);
  border-right-color: var(--shell-shortcut-border-light);
  border-bottom-color: var(--shell-shortcut-border-light);
}

#shellHost .shortcut-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  line-height: 1;
  user-select: none;
  font-weight: 900;
}

#shellHost .shortcut-icon.text {
  background: #f2f2f2;
  border: 1px solid #8f8f8f;
  color: var(--shell-red);
  font-size: 15px;
  font-style: italic;
}

#shellHost .shortcut-icon.emoji {
  font-size: 24px;
}

#shellHost .shortcut-icon.green {
  background: #3d8b45;
  color: #ffffff;
  font-style: normal;
}

#shellHost .shortcut-icon.yellow {
  border-radius: 50%;
  background: #ffe64d;
  color: var(--shell-red);
  font-style: normal;
  font-size: 19px;
}

#shellHost .shortcut-icon.dark {
  background: #344538;
  color: #ffffff;
  font-size: 10px;
  font-style: normal;
}

/* =========================================================
   GARANTIA DE CAMADAS
   Módulos ficam abaixo do shell
   ========================================================= */

.pagina,
.tela-resultado,
.cabecalho-relatorio-compras,
.botoes-relatorio-compras,
.totalizador-filiais,
.janela-tabela,
.tabela-wrap,
table,
thead,
tbody,
tr,
th,
td {
  position: relative;
  z-index: 1;
}

.janela-tabela thead th,
.tabela-wrap thead th {
  z-index: 10 !important;
}

/* =========================================================
   RESPONSIVO
   ========================================================= */

@media (max-width: 980px) {
  #shellHost .shell-brand {
    height: 92px;
  }

  #shellHost .shell-logo {
    left: 14px;
    top: 12px;
    width: 230px;
    height: 68px;
  }

  #shellHost .shell-logo img {
    max-width: 220px;
    max-height: 66px;
  }

  #shellHost .shell-company {
    top: 24px;
    right: 12px;
  }

  #shellHost .shell-menu,
  #shellHost .shell-shortcuts {
    padding-left: 14px;
    padding-right: 14px;
    overflow-x: auto;
  }
}

/* ===== ÍCONES 3D GLOBAIS DO HEADER PROLAR - INÍCIO ===== */

.shell .shell-shortcuts {
  overflow-x: auto !important;
  overflow-y: visible !important;
}

.shell .shell-shortcut {
  display: grid !important;
  place-items: center !important;
  overflow: visible !important;
}

.shell .shell-shortcut-img {
  width: 36px !important;
  height: 36px !important;
  max-width: 36px !important;
  max-height: 36px !important;
  object-fit: contain !important;
  display: block !important;
  pointer-events: none !important;
  filter: none !important;
  opacity: 1 !important;
  transform: scale(1) !important;
  transition: transform 0.14s ease, filter 0.14s ease !important;
}

.shell .shell-shortcut:hover .shell-shortcut-img {
  transform: scale(1.06) !important;
  filter: brightness(1.04) !important;
}

html[data-theme="escuro"] .shell .shell-shortcut-img {
  filter: none !important;
  opacity: 1 !important;
}

html[data-theme="escuro"] .shell .shell-shortcut:hover .shell-shortcut-img {
  filter: brightness(1.08) !important;
}

@media (max-width: 760px) {
  .shell .shell-shortcut-img {
    width: 32px !important;
    height: 32px !important;
    max-width: 32px !important;
    max-height: 32px !important;
  }
}

/* ===== ÍCONES 3D GLOBAIS DO HEADER PROLAR - FIM ===== */

/* ===== VISUAL GLOBAL DOS ÍCONES 3D PROLAR - INÍCIO ===== */

/* Barra global dos atalhos: sem cinza antigo, seguindo o visual do sistema */
.shell .shell-shortcuts {
  min-height: 76px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 10px !important;
  padding: 10px 22px !important;
  overflow-x: auto !important;
  overflow-y: visible !important;

  background:
    linear-gradient(180deg, #fffef7 0%, #fff6df 100%) !important;
  border-top: 1px solid rgba(var(--shell-red-rgb), 0.10) !important;
  border-bottom: 3px solid var(--shell-red) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.85),
    0 2px 8px rgba(120, 40, 20, .08) !important;
}

/* Botão do ícone: limpo, moderno, sem relevo cinza feio */
.shell .shell-shortcut {
  width: 62px !important;
  min-width: 62px !important;
  height: 56px !important;
  display: grid !important;
  place-items: center !important;
  padding: 0 !important;

  border: 1px solid rgba(var(--shell-red-rgb), 0.13) !important;
  border-radius: 14px !important;
  background:
    linear-gradient(180deg, #ffffff 0%, #fff9ea 100%) !important;

  box-shadow:
    0 4px 12px rgba(90, 35, 20, .10),
    inset 0 1px 0 rgba(255,255,255,.90) !important;

  cursor: pointer !important;
  overflow: visible !important;
  transition:
    transform 0.14s ease,
    box-shadow 0.14s ease,
    border-color 0.14s ease,
    background-color 0.14s ease !important;
}

/* Hover no padrão bonito que estamos usando */
.shell .shell-shortcut:hover {
  transform: translateY(-2px) scale(1.06) !important;
  border-color: rgba(var(--shell-red-rgb), 0.35) !important;
  background:
    linear-gradient(180deg, #ffffff 0%, #fff1cf 100%) !important;
  box-shadow:
    0 8px 18px rgba(120, 40, 20, .16),
    inset 0 1px 0 rgba(255,255,255,.95) !important;
}

/* Ícone grande */
.shell .shell-shortcut-img {
  width: 50px !important;
  height: 50px !important;
  max-width: 50px !important;
  max-height: 50px !important;
  object-fit: contain !important;
  display: block !important;
  pointer-events: none !important;
  filter: none !important;
  opacity: 1 !important;
  transform: scale(1) !important;
  transition:
    transform 0.14s ease,
    filter 0.14s ease !important;
}

.shell .shell-shortcut:hover .shell-shortcut-img {
  transform: scale(1.08) !important;
  filter: brightness(1.04) contrast(1.03) !important;
}

/* Se algum ícone não carregar, evita quebrar layout */
.shell .shell-shortcut-img:not([src]),
.shell .shell-shortcut-img[src=""] {
  display: none !important;
}

/* Modo escuro preservado */
html[data-theme="escuro"] .shell .shell-shortcuts {
  background:
    linear-gradient(180deg, #171717 0%, #111111 100%) !important;
  border-top-color: rgba(255, 255, 255, 0.06) !important;
  border-bottom-color: var(--shell-red) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.04),
    0 2px 10px rgba(0,0,0,.32) !important;
}

html[data-theme="escuro"] .shell .shell-shortcut {
  border-color: rgba(255, 255, 255, 0.10) !important;
  background:
    linear-gradient(180deg, #262626 0%, #1d1d1d 100%) !important;
  box-shadow:
    0 4px 12px rgba(0,0,0,.28),
    inset 0 1px 0 rgba(255,255,255,.05) !important;
}

html[data-theme="escuro"] .shell .shell-shortcut:hover {
  border-color: rgba(var(--shell-red-rgb), 0.55) !important;
  background:
    linear-gradient(180deg, #303030 0%, #222222 100%) !important;
  box-shadow:
    0 8px 18px rgba(0,0,0,.38),
    0 0 0 1px rgba(var(--shell-red-rgb),.12) !important;
}

html[data-theme="escuro"] .shell .shell-shortcut-img {
  filter: none !important;
  opacity: 1 !important;
}

html[data-theme="escuro"] .shell .shell-shortcut:hover .shell-shortcut-img {
  filter: brightness(1.08) contrast(1.04) !important;
}

@media (max-width: 760px) {
  .shell .shell-shortcuts {
    min-height: 68px !important;
    gap: 8px !important;
    padding: 8px 12px !important;
  }

  .shell .shell-shortcut {
    width: 56px !important;
    min-width: 56px !important;
    height: 52px !important;
    border-radius: 12px !important;
  }

  .shell .shell-shortcut-img {
    width: 44px !important;
    height: 44px !important;
    max-width: 44px !important;
    max-height: 44px !important;
  }
}

/* ===== VISUAL GLOBAL DOS ÍCONES 3D PROLAR - FIM ===== */

/* ===== CORREÇÃO FINAL HOVER ÍCONES HEADER - INÍCIO ===== */

/* Barra dos ícones: remove visual cinza antigo e força faixa vermelha inferior */
.shell .shell-shortcuts {
  min-height: 78px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 10px !important;
  padding: 10px 22px 13px 22px !important;

  overflow-x: auto !important;
  overflow-y: hidden !important;

  background: linear-gradient(180deg, #fffef8 0%, #fff5dc 100%) !important;
  border-top: 1px solid rgba(var(--shell-red-rgb), 0.10) !important;
  border-bottom: 4px solid var(--shell-red) !important;
  box-shadow:
    inset 0 -4px 0 var(--shell-red),
    inset 0 1px 0 rgba(255,255,255,.85),
    0 2px 8px rgba(120, 40, 20, .08) !important;
}

/* O botão NÃO aumenta mais. Isso evita quebrar a caixa */
.shell .shell-shortcut {
  width: 66px !important;
  min-width: 66px !important;
  height: 58px !important;

  display: grid !important;
  place-items: center !important;

  padding: 0 !important;
  margin: 0 !important;

  border: 1px solid rgba(var(--shell-red-rgb), 0.14) !important;
  border-radius: 14px !important;

  background: linear-gradient(180deg, #ffffff 0%, #fff9ec 100%) !important;

  box-shadow:
    0 3px 10px rgba(90, 35, 20, .10),
    inset 0 1px 0 rgba(255,255,255,.92) !important;

  cursor: pointer !important;
  overflow: hidden !important;
  transform: none !important;

  transition:
    background 0.14s ease,
    border-color 0.14s ease,
    box-shadow 0.14s ease,
    filter 0.14s ease !important;
}

/* Hover bonito, sem quebrar caixa */
.shell .shell-shortcut:hover {
  transform: none !important;
  border-color: rgba(var(--shell-red-rgb), 0.38) !important;
  background: linear-gradient(180deg, #ffffff 0%, #fff0ca 100%) !important;
  box-shadow:
    0 5px 14px rgba(120, 40, 20, .15),
    inset 0 1px 0 rgba(255,255,255,.95) !important;
  filter: brightness(1.02) !important;
}

/* Ícones maiores, mas dentro da caixa */
.shell .shell-shortcut-img {
  width: 54px !important;
  height: 54px !important;
  max-width: 54px !important;
  max-height: 54px !important;

  object-fit: contain !important;
  display: block !important;
  pointer-events: none !important;

  filter: none !important;
  opacity: 1 !important;
  transform: scale(1) !important;

  transition:
    transform 0.14s ease,
    filter 0.14s ease !important;
}

/* Só o ícone respira um pouco, sem estourar o botão */
.shell .shell-shortcut:hover .shell-shortcut-img {
  transform: scale(1.04) !important;
  filter: brightness(1.04) contrast(1.03) !important;
}

/* Garante que nenhuma regra antiga de ícone textual apareça por cima */
.shell .shell-shortcut .shortcut-icon {
  display: none !important;
}

/* Modo escuro preservado */
html[data-theme="escuro"] .shell .shell-shortcuts {
  background: linear-gradient(180deg, #171717 0%, #101010 100%) !important;
  border-top-color: rgba(255, 255, 255, 0.06) !important;
  border-bottom: 4px solid var(--shell-red) !important;
  box-shadow:
    inset 0 -4px 0 var(--shell-red),
    inset 0 1px 0 rgba(255,255,255,.04),
    0 2px 10px rgba(0,0,0,.32) !important;
}

html[data-theme="escuro"] .shell .shell-shortcut {
  border-color: rgba(255,255,255,.10) !important;
  background: linear-gradient(180deg, #292929 0%, #1d1d1d 100%) !important;
  box-shadow:
    0 3px 10px rgba(0,0,0,.28),
    inset 0 1px 0 rgba(255,255,255,.05) !important;
}

html[data-theme="escuro"] .shell .shell-shortcut:hover {
  border-color: rgba(var(--shell-red-rgb), .55) !important;
  background: linear-gradient(180deg, #323232 0%, #242424 100%) !important;
  box-shadow:
    0 5px 14px rgba(0,0,0,.38),
    0 0 0 1px rgba(var(--shell-red-rgb),.12) !important;
}

html[data-theme="escuro"] .shell .shell-shortcut-img {
  filter: none !important;
  opacity: 1 !important;
}

html[data-theme="escuro"] .shell .shell-shortcut:hover .shell-shortcut-img {
  filter: brightness(1.08) contrast(1.04) !important;
}

@media (max-width: 760px) {
  .shell .shell-shortcuts {
    min-height: 70px !important;
    gap: 8px !important;
    padding: 8px 12px 12px 12px !important;
  }

  .shell .shell-shortcut {
    width: 58px !important;
    min-width: 58px !important;
    height: 54px !important;
    border-radius: 12px !important;
  }

  .shell .shell-shortcut-img {
    width: 48px !important;
    height: 48px !important;
    max-width: 48px !important;
    max-height: 48px !important;
  }
}

/* ===== CORREÇÃO FINAL HOVER ÍCONES HEADER - FIM ===== */

/* ===== MENU MOBILE POR TOQUE - INÍCIO ===== */

.shell .shell-menu-group.menu-aberto .shell-dropdown {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  z-index: 99999 !important;
}

.shell .shell-menu-button {
  touch-action: manipulation !important;
  -webkit-tap-highlight-color: transparent !important;
}

.shell .shell-menu-group.menu-aberto .shell-menu-button {
  background: rgba(0, 0, 0, 0.16) !important;
}

@media (hover: none), (pointer: coarse) {
  .shell .shell-menu {
    overflow-x: auto !important;
    overflow-y: visible !important;
  }

  .shell .shell-menu-group {
    position: relative !important;
  }

  .shell .shell-dropdown {
    top: 100% !important;
    left: 0 !important;
    min-width: 230px !important;
    max-width: calc(100vw - 24px) !important;
  }

  .shell .shell-dropdown button {
    min-height: 38px !important;
    font-size: 13px !important;
  }
}

/* ===== MENU MOBILE POR TOQUE - FIM ===== */

/* ===== MENU MOBILE FIXO - INÍCIO ===== */

.shell .shell-menu-button {
  touch-action: manipulation !important;
  -webkit-tap-highlight-color: transparent !important;
}

.shell .shell-menu-group.menu-aberto .shell-menu-button {
  background: rgba(0, 0, 0, 0.18) !important;
}

.shell .shell-menu-group.menu-aberto .shell-dropdown {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  z-index: 999999 !important;
}

/* No celular o dropdown vira flutuante, para não ser cortado pela barra */
@media (hover: none), (pointer: coarse) {
  .shell .shell-menu {
    overflow-x: auto !important;
    overflow-y: visible !important;
  }

  .shell .shell-dropdown {
    border-radius: 10px !important;
    border: 1px solid var(--shell-red) !important;
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.28) !important;
  }

  .shell .shell-dropdown button {
    min-height: 42px !important;
    font-size: 14px !important;
    padding: 9px 12px !important;
  }
}

html[data-theme="escuro"] .shell .shell-dropdown {
  background: #242424 !important;
  border-color: var(--shell-red) !important;
}

html[data-theme="escuro"] .shell .shell-dropdown button {
  color: #ffffff !important;
}

/* ===== MENU MOBILE FIXO - FIM ===== */

/* ===== MENU MOBILE FLUTUANTE DEFINITIVO - INÍCIO ===== */

.shell .shell-menu-button {
  touch-action: manipulation !important;
  -webkit-tap-highlight-color: transparent !important;
}

.shell .shell-menu-group.menu-aberto .shell-menu-button {
  background: rgba(0, 0, 0, 0.18) !important;
}

/* No celular, não usamos mais o dropdown interno para evitar corte pela barra */
@media (hover: none), (pointer: coarse), (max-width: 980px) {
  .shell .shell-menu-group.menu-aberto .shell-dropdown {
    display: none !important;
  }
}

.shell-mobile-backdrop {
  position: fixed !important;
  inset: 0 !important;
  z-index: 999990 !important;
  background: transparent !important;
}

.shell-mobile-dropdown {
  position: fixed !important;
  z-index: 999999 !important;
  max-width: calc(100vw - 18px) !important;
  max-height: 70vh !important;
  overflow-y: auto !important;

  padding: 8px !important;
  border-radius: 12px !important;
  border: 1px solid var(--shell-red) !important;
  background: #fff8dd !important;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.30) !important;
}

.shell-mobile-dropdown-item {
  width: 100% !important;
  min-height: 44px !important;
  display: block !important;

  border: 0 !important;
  border-radius: 8px !important;
  background: transparent !important;

  color: #2d2d2d !important;
  font-family: "Segoe UI", Tahoma, Arial, sans-serif !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  text-align: left !important;

  padding: 10px 12px !important;
  cursor: pointer !important;
}

.shell-mobile-dropdown-item:hover,
.shell-mobile-dropdown-item:active {
  background: var(--shell-red) !important;
  color: #ffffff !important;
}

html[data-theme="escuro"] .shell-mobile-dropdown {
  background: #242424 !important;
  border-color: var(--shell-red) !important;
}

html[data-theme="escuro"] .shell-mobile-dropdown-item {
  color: #ffffff !important;
}

html[data-theme="escuro"] .shell-mobile-dropdown-item:hover,
html[data-theme="escuro"] .shell-mobile-dropdown-item:active {
  background: var(--shell-red) !important;
  color: #ffffff !important;
}

/* ===== MENU MOBILE FLUTUANTE DEFINITIVO - FIM ===== */

/* ===== TEMA GRAFITE MODELO 2 - SHELL - INÍCIO ===== */

html[data-theme="grafite"] {
  --grafite-bg: var(--modelo2-page, #eef1ef);
  --grafite-topo: var(--modelo2-primary, #007f6a);
  --grafite-topo-escuro: var(--modelo2-secondary, #353839);
  --grafite-azul: var(--modelo2-primary, #007f6a);
  --grafite-azul-hover: var(--modelo2-primary-hover, #14523d);
  --grafite-card: var(--modelo2-panel, #ffffff);
  --grafite-card-soft: var(--modelo2-panel-soft, #f7f9f8);
  --grafite-borda: var(--modelo2-border, #d5ddda);
  --grafite-texto: var(--modelo2-text, #202829);
  --grafite-muted: var(--modelo2-muted, #66706d);
  --grafite-logo-fundo: #fff3ad;
}

html[data-theme="grafite"] #shellHost {
  --shell-red: var(--modelo2-primary, #007f6a);
  --shell-red-dark: var(--modelo2-primary-dark, #0a2b20);
  --shell-red-rgb: var(--modelo2-primary-rgb, 15, 60, 45);
  --shell-brand-bg: var(--modelo2-primary, #007f6a);
  --shell-company-title: #ffffff;
  --shell-company-text: #dce8e2;
  --shell-shortcuts-bg: var(--modelo2-secondary-soft, #eef0ef);
  --shell-shortcut-bg: #ffffff;
  --shell-shortcut-border-light: #ffffff;
  --shell-shortcut-border-dark: var(--modelo2-border, #d5ddda);
  --shell-dropdown-bg: var(--modelo2-panel-soft, #f7f9f8);
  --shell-dropdown-text: var(--modelo2-text, #202829);
}

html[data-theme="grafite"] body {
  background: var(--grafite-bg) !important;
  color: var(--grafite-texto) !important;
}

html[data-theme="grafite"] .shell {
  background: var(--grafite-topo) !important;
}

html[data-theme="grafite"] .shell-brand {
  background: linear-gradient(180deg, var(--grafite-topo) 0%, var(--modelo2-primary-dark, #006655) 100%) !important;
  border-bottom: 0 !important;
}

html[data-theme="grafite"] .shell-logo {
  background: var(--grafite-logo-fundo) !important;
  border-radius: 14px !important;
  padding: 8px 12px !important;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.55),
    0 4px 12px rgba(0,0,0,.10) !important;
}

html[data-theme="grafite"] .shell-company strong {
  color: var(--modelo2-on-primary, #ffffff) !important;
}

html[data-theme="grafite"] .shell-company span {
  color: var(--modelo2-primary-soft, #e3f1ef) !important;
}

html[data-theme="grafite"] .shell-menu {
  background: var(--grafite-azul) !important;
  border-top: 1px solid rgba(255,255,255,.12) !important;
  border-bottom: 1px solid var(--grafite-topo-escuro) !important;
}

html[data-theme="grafite"] .shell-menu-button,
html[data-theme="grafite"] .shell-menu-button.menu-active {
  color: var(--modelo2-on-primary, #ffffff) !important;
}

html[data-theme="grafite"] .shell-menu-button:hover,
html[data-theme="grafite"] .shell-menu-group.menu-aberto .shell-menu-button {
  background: rgba(0,0,0,.18) !important;
}

html[data-theme="grafite"] .shell-dropdown {
  background: var(--grafite-card-soft) !important;
  border-color: var(--grafite-azul) !important;
  box-shadow: 0 12px 26px rgba(var(--modelo2-secondary-rgb, 53, 56, 57), .18) !important;
}

html[data-theme="grafite"] .shell-dropdown button {
  color: var(--grafite-texto) !important;
}

html[data-theme="grafite"] .shell-dropdown button:hover {
  background: var(--grafite-azul) !important;
  color: var(--modelo2-on-primary, #ffffff) !important;
}

html[data-theme="grafite"] .shell .shell-shortcuts {
  background: linear-gradient(180deg, #f8faf9 0%, var(--grafite-bg) 100%) !important;
  border-top: 1px solid rgba(255,255,255,.65) !important;
  border-bottom: 4px solid var(--grafite-azul) !important;
  box-shadow:
    inset 0 -4px 0 var(--grafite-azul),
    inset 0 1px 0 rgba(255,255,255,.85),
    0 2px 8px rgba(var(--modelo2-secondary-rgb, 53, 56, 57), .10) !important;
}

html[data-theme="grafite"] .shell .shell-shortcut {
  background: linear-gradient(180deg, var(--grafite-card) 0%, var(--grafite-card-soft) 100%) !important;
  border-color: var(--grafite-borda) !important;
}

html[data-theme="grafite"] .login-page {
  background:
    radial-gradient(circle at center, rgba(var(--modelo2-primary-rgb, 15, 60, 45), .06), transparent 32%),
    var(--grafite-bg) !important;
}

html[data-theme="grafite"] .login-brand-strip,
html[data-theme="grafite"] .login-top {
  background: var(--grafite-topo) !important;
  border-top-color: var(--grafite-azul) !important;
  border-bottom-color: var(--grafite-azul) !important;
}

html[data-theme="grafite"] .login-box,
html[data-theme="grafite"] .legacy-login-box {
  background: var(--grafite-card-soft) !important;
  border-color: var(--grafite-azul) !important;
  box-shadow: 0 14px 34px rgba(var(--modelo2-secondary-rgb, 53, 56, 57), .18) !important;
}

html[data-theme="grafite"] .login-box-title,
html[data-theme="grafite"] .legacy-login-title {
  background: var(--grafite-azul) !important;
  color: var(--modelo2-on-primary, #ffffff) !important;
}

html[data-theme="grafite"] .login-row input,
html[data-theme="grafite"] .legacy-login-row input {
  background: #ffffff !important;
  border-color: var(--grafite-topo) !important;
  color: var(--grafite-texto) !important;
}

html[data-theme="grafite"] .login-submit,
html[data-theme="grafite"] .legacy-login-submit {
  background: var(--grafite-azul) !important;
  color: var(--modelo2-on-primary, #ffffff) !important;
}

html[data-theme="grafite"] .login-submit:hover,
html[data-theme="grafite"] .legacy-login-submit:hover {
  background: var(--grafite-azul-hover) !important;
}

html[data-theme="grafite"] .theme-switch label {
  color: var(--grafite-azul) !important;
}

html[data-theme="grafite"] .shell-mobile-dropdown {
  background: var(--grafite-card-soft) !important;
  border-color: var(--grafite-azul) !important;
}

html[data-theme="grafite"] .shell-mobile-dropdown-item {
  color: var(--grafite-texto) !important;
}

html[data-theme="grafite"] .shell-mobile-dropdown-item:hover,
html[data-theme="grafite"] .shell-mobile-dropdown-item:active {
  background: var(--grafite-azul) !important;
  color: var(--modelo2-on-primary, #ffffff) !important;
}

/* ===== TEMA GRAFITE MODELO 2 - SHELL - FIM ===== */

/* ===== LOGO GRAFITE SEM FUNDO - INÍCIO ===== */

html[data-theme="grafite"] .shell-logo {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
}

html[data-theme="grafite"] .shell-logo img,
html[data-theme="grafite"] .shell-logo svg {
  display: block !important;
  height: 76px !important;
  width: auto !important;
  max-width: none !important;
  filter: none !important;
  opacity: 1 !important;
}

@media (max-width: 980px) {
  html[data-theme="grafite"] .shell-logo img,
  html[data-theme="grafite"] .shell-logo svg {
    height: 68px !important;
  }
}

/* ===== SHELL COMPACTO VERDE - INICIO ===== */

html {
  color-scheme: light;
}

html[data-theme="claro"],
html[data-theme="escuro"] {
  color-scheme: light;
}

.shell {
  --shell-compact-brand-height: 62px;
  --shell-compact-logo-height: 44px;
  --shell-compact-menu-height: 38px;
  --shell-compact-menu-font: 13px;
  --shell-compact-menu-icon: 17px;
  --shell-compact-shortcuts-height: 58px;
  --shell-compact-shortcut-size: 50px;
  --shell-compact-shortcut-img: 44px;
}

#shellHost .shell {
  border-top: 3px solid var(--modelo2-secondary, #353839) !important;
}

#shellHost .shell-brand,
html[data-theme="grafite"] .shell-brand {
  height: var(--shell-compact-brand-height) !important;
  min-height: var(--shell-compact-brand-height) !important;
  background: var(--modelo2-primary, #007f6a) !important;
}

#shellHost .shell-logo,
html[data-theme="grafite"] .shell-logo {
  left: 22px !important;
  top: 9px !important;
  width: auto !important;
  height: var(--shell-compact-logo-height) !important;
  min-width: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

#shellHost .shell-logo img,
#shellHost .shell-logo svg,
html[data-theme="grafite"] .shell-logo img,
html[data-theme="grafite"] .shell-logo svg {
  height: var(--shell-compact-logo-height) !important;
  width: auto !important;
  max-width: none !important;
  max-height: var(--shell-compact-logo-height) !important;
}

#shellHost .shell-company {
  top: 0 !important;
  right: 24px !important;
  height: var(--shell-compact-brand-height) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
  justify-content: flex-end !important;
  text-align: right !important;
  gap: 4px !important;
  padding: 0 0 11px !important;
}

#shellHost .shell-company strong {
  display: block !important;
  color: var(--modelo2-on-primary, #ffffff) !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  max-width: 360px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

#shellHost .shell-company span,
html[data-theme="grafite"] .shell-company span {
  margin: 0 !important;
  color: var(--modelo2-primary-soft, #e3f1ef) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

#shellHost .shell-menu,
html[data-theme="grafite"] .shell-menu {
  min-height: var(--shell-compact-menu-height) !important;
  height: var(--shell-compact-menu-height) !important;
  gap: 16px !important;
  padding: 0 24px !important;
  background: var(--modelo2-primary, #007f6a) !important;
  border-top: 1px solid rgba(255,255,255,.10) !important;
  border-bottom: 1px solid var(--modelo2-primary-dark, #0a2b20) !important;
}

#shellHost .shell-menu-button,
html[data-theme="grafite"] .shell-menu-button {
  height: var(--shell-compact-menu-height) !important;
  gap: 6px !important;
  padding: 0 1px !important;
  font-size: var(--shell-compact-menu-font) !important;
  line-height: 1 !important;
}

#shellHost .shell-menu-button::after {
  bottom: 3px !important;
  height: 2px !important;
}

#shellHost .shell-menu-icon {
  width: var(--shell-compact-menu-icon) !important;
  height: var(--shell-compact-menu-icon) !important;
}

#shellHost .shell-menu-icon svg {
  width: var(--shell-compact-menu-icon) !important;
  height: var(--shell-compact-menu-icon) !important;
}

#shellHost .shell-caret {
  font-size: 10px !important;
}

#shellHost .shell-dropdown {
  top: var(--shell-compact-menu-height) !important;
}

#shellHost .shell-shortcuts {
  min-height: var(--shell-compact-shortcuts-height) !important;
  height: var(--shell-compact-shortcuts-height) !important;
  gap: 6px !important;
  padding: 4px 24px !important;
  border-bottom: 3px solid var(--modelo2-primary, #007f6a) !important;
  overflow-y: hidden !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

#shellHost .shell-shortcuts::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
}

#shellHost .shell-shortcut {
  width: var(--shell-compact-shortcut-size) !important;
  min-width: var(--shell-compact-shortcut-size) !important;
  height: var(--shell-compact-shortcut-size) !important;
  border-radius: 10px !important;
  overflow: visible !important;
  transform: none !important;
  margin: 0 !important;
}

#shellHost .shell-shortcut:hover,
#shellHost .shell-shortcut:active {
  transform: none !important;
}

#shellHost .shell-shortcut-img {
  width: var(--shell-compact-shortcut-img) !important;
  height: var(--shell-compact-shortcut-img) !important;
  max-width: var(--shell-compact-shortcut-img) !important;
  max-height: var(--shell-compact-shortcut-img) !important;
  object-fit: contain !important;
  transform: none !important;
}

#shellHost .shell-shortcut:hover .shell-shortcut-img {
  transform: none !important;
}

@media (max-width: 760px) {
  .shell {
    --shell-compact-brand-height: 58px;
    --shell-compact-logo-height: 40px;
    --shell-compact-menu-height: 36px;
    --shell-compact-shortcuts-height: 54px;
    --shell-compact-shortcut-size: 46px;
    --shell-compact-shortcut-img: 40px;
  }

  #shellHost .shell-logo,
  html[data-theme="grafite"] .shell-logo {
    left: 12px !important;
  }

  #shellHost .shell-company {
    right: 12px !important;
  }

  #shellHost .shell-menu,
  html[data-theme="grafite"] .shell-menu {
    gap: 12px !important;
    padding: 0 12px !important;
  }

  #shellHost .shell-shortcuts {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
}

/* ===== SHELL COMPACTO VERDE - FIM ===== */

/* ===== LOGO GRAFITE SEM FUNDO - FIM ===== */

/* ===== BARRA DE ATALHOS PEQUENA E ESTAVEL - INICIO ===== */

#shellHost .shell-shortcuts,
html[data-theme="grafite"] .shell .shell-shortcuts {
  --shell-toolbar-height: 56px;
  --shell-toolbar-button-size: 42px;
  --shell-toolbar-image-size: 34px;
  --shell-toolbar-gap: 5px;
  box-sizing: border-box !important;
  min-height: var(--shell-toolbar-height) !important;
  height: var(--shell-toolbar-height) !important;
  max-height: var(--shell-toolbar-height) !important;
  display: flex !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  flex-wrap: nowrap !important;
  gap: var(--shell-toolbar-gap) !important;
  padding: 4px 14px 7px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  background: #f8faf9 !important;
  border-top: 0 !important;
  border-bottom: 3px solid var(--modelo2-primary, #007f6a) !important;
  box-shadow: none !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(15, 60, 45, .70) transparent !important;
  -ms-overflow-style: auto !important;
}

#shellHost .shell-shortcuts::-webkit-scrollbar {
  width: 6px !important;
  height: 6px !important;
}

#shellHost .shell-shortcuts::-webkit-scrollbar-track {
  background: transparent !important;
}

#shellHost .shell-shortcuts::-webkit-scrollbar-thumb {
  background: rgba(var(--modelo2-primary-rgb, 1, 63, 66), .70) !important;
  border-radius: 999px !important;
}

#shellHost .shell-shortcut,
html[data-theme="grafite"] .shell .shell-shortcut {
  box-sizing: border-box !important;
  width: var(--shell-toolbar-button-size) !important;
  min-width: var(--shell-toolbar-button-size) !important;
  max-width: var(--shell-toolbar-button-size) !important;
  height: var(--shell-toolbar-button-size) !important;
  min-height: var(--shell-toolbar-button-size) !important;
  max-height: var(--shell-toolbar-button-size) !important;
  display: grid !important;
  place-items: center !important;
  flex: 0 0 var(--shell-toolbar-button-size) !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 1px solid var(--modelo2-border, #d5ddda) !important;
  border-radius: 7px !important;
  background: #ffffff !important;
  box-shadow: 0 1px 4px rgba(15, 60, 45, .10) !important;
  overflow: hidden !important;
  transform: none !important;
  filter: none !important;
}

#shellHost .shell-shortcut:hover,
#shellHost .shell-shortcut:active,
html[data-theme="grafite"] .shell .shell-shortcut:hover,
html[data-theme="grafite"] .shell .shell-shortcut:active {
  width: var(--shell-toolbar-button-size) !important;
  min-width: var(--shell-toolbar-button-size) !important;
  max-width: var(--shell-toolbar-button-size) !important;
  height: var(--shell-toolbar-button-size) !important;
  min-height: var(--shell-toolbar-button-size) !important;
  max-height: var(--shell-toolbar-button-size) !important;
  border-color: var(--modelo2-primary, #007f6a) !important;
  background: #ffffff !important;
  box-shadow: 0 1px 5px rgba(15, 60, 45, .16) !important;
  transform: none !important;
  filter: none !important;
}

#shellHost .shell-shortcut-img,
html[data-theme="grafite"] .shell .shell-shortcut-img {
  width: var(--shell-toolbar-image-size) !important;
  min-width: var(--shell-toolbar-image-size) !important;
  max-width: var(--shell-toolbar-image-size) !important;
  height: var(--shell-toolbar-image-size) !important;
  min-height: var(--shell-toolbar-image-size) !important;
  max-height: var(--shell-toolbar-image-size) !important;
  display: block !important;
  object-fit: contain !important;
  pointer-events: none !important;
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
}

#shellHost .shell-shortcut:hover .shell-shortcut-img,
#shellHost .shell-shortcut:active .shell-shortcut-img,
html[data-theme="grafite"] .shell .shell-shortcut:hover .shell-shortcut-img,
html[data-theme="grafite"] .shell .shell-shortcut:active .shell-shortcut-img {
  width: var(--shell-toolbar-image-size) !important;
  height: var(--shell-toolbar-image-size) !important;
  max-width: var(--shell-toolbar-image-size) !important;
  max-height: var(--shell-toolbar-image-size) !important;
  transform: none !important;
  filter: none !important;
}

@media (max-width: 760px) {
  #shellHost .shell-shortcuts,
  html[data-theme="grafite"] .shell .shell-shortcuts {
    --shell-toolbar-height: 52px;
    --shell-toolbar-button-size: 38px;
    --shell-toolbar-image-size: 31px;
    --shell-toolbar-gap: 4px;
    min-height: var(--shell-toolbar-height) !important;
    height: var(--shell-toolbar-height) !important;
    max-height: var(--shell-toolbar-height) !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  #shellHost .shell-shortcut,
  html[data-theme="grafite"] .shell .shell-shortcut {
    width: var(--shell-toolbar-button-size) !important;
    min-width: var(--shell-toolbar-button-size) !important;
    max-width: var(--shell-toolbar-button-size) !important;
    height: var(--shell-toolbar-button-size) !important;
    min-height: var(--shell-toolbar-button-size) !important;
    max-height: var(--shell-toolbar-button-size) !important;
    flex-basis: var(--shell-toolbar-button-size) !important;
  }

  #shellHost .shell-shortcut-img,
  html[data-theme="grafite"] .shell .shell-shortcut-img {
    width: var(--shell-toolbar-image-size) !important;
    height: var(--shell-toolbar-image-size) !important;
    max-width: var(--shell-toolbar-image-size) !important;
    max-height: var(--shell-toolbar-image-size) !important;
  }
}

/* ===== BARRA DE ATALHOS PEQUENA E ESTAVEL - FIM ===== */
