/* ESMERO FINANÇAS — V38.5.6 — Temas BLACK MOUVE VERTICAL e WHITE MOUVE VERTICAL (opcionais; nenhum outro tema é alterado).
 * Base idêntica ao BLACK MOUVE / WHITE MOUVE (css/tema-mouve.css). A ÚNICA diferença: a barra de menus passa para a vertical, no lado esquerdo.
 * A barra principal (logo, título, busca, usuário, módulos) continua fixa na horizontal, no topo.
 * Classe extra no <body>: esmero-tema-vertical (colocada por js/75-tema-black-finance.js, que também mede a altura da barra do topo em --esm-topo).
 * Telas largas (≥ 1024 px): lateral com ícone + nome; os submenus viram "sanfona" dentro dela.
 * Telas estreitas (iPhone/celular, < 1024 px): lateral enxuta, SÓ COM OS ÍCONES (o nome aparece ao tocar e segurar); os submenus abrem como janelinha ao lado da lateral. */
@media (min-width: 1024px) {
  html body.esmero-tema-vertical { --esm-lat: 236px; }
  /* o cabeçalho não pode ter filtro/desfoque: isso faria a lateral "fixa" se ancorar nele em vez de na janela */
  html body.esmero-tema-vertical > header:not(#_x) { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; transform: none !important; filter: none !important; }
  /* a barra de menus vira a lateral */
  html body.esmero-tema-vertical > header nav:not(#_x) { position: fixed !important; left: 0 !important; top: var(--esm-topo, 64px) !important; bottom: 0 !important; width: var(--esm-lat) !important; z-index: 35 !important; overflow-x: hidden !important; overflow-y: auto !important; padding: 14px 10px 40px !important; border-top: 0 !important; scrollbar-width: thin !important; }
  html body.esmero-tema-vertical > header nav::-webkit-scrollbar { display: block !important; width: 4px !important; }
  html body.esmero-tema-vertical > header nav > div:not(#_x) { display: flex !important; flex-direction: column !important; align-items: stretch !important; gap: 4px !important; min-width: 0 !important; max-width: none !important; width: 100% !important; margin: 0 !important; padding: 0 !important; }
  html body.esmero-tema-vertical > header nav .menu-group-wrap { width: 100% !important; flex: 0 0 auto !important; }
  html body.esmero-tema-vertical > header nav :is(.nav-btn):not(#_x) { width: 100% !important; justify-content: flex-start !important; text-align: left !important; white-space: normal !important; padding: .62rem .8rem !important; border-radius: 10px !important; }
  html body.esmero-tema-vertical > header nav :is(.nav-btn) svg:last-child:not(:first-child) { margin-left: auto !important; }
  /* submenus: sanfona dentro da lateral (em vez de janelinha flutuante, que a rolagem da lateral cortaria) */
  html body.esmero-tema-vertical > header nav .nav-dropdown:not(#_x) { position: static !important; left: auto !important; right: auto !important; top: auto !important; bottom: auto !important; z-index: auto !important; width: 100% !important; min-width: 0 !important; max-width: none !important; margin: 4px 0 8px !important; padding: 6px !important; box-shadow: none !important; border-radius: 12px !important; }
  html body.esmero-tema-vertical > header nav .nav-dropdown.hidden { display: none !important; }
  html body.esmero-tema-vertical > header nav .nav-dropdown-item:not(#_x) { padding: .5rem .65rem !important; font-size: 12px !important; }
  /* o conteúdo e o rodapé passam a começar depois da lateral */
  html body.esmero-tema-vertical > main:not(#_x) { margin-left: var(--esm-lat) !important; margin-right: 0 !important; width: calc(100% - var(--esm-lat)) !important; max-width: none !important; }
  html body.esmero-tema-vertical > #esmFooter:not(#_x) { margin-left: var(--esm-lat) !important; }
}
/* ---- aparência da lateral: BLACK MOUVE VERTICAL ---- */
@media all {
  html body.esmero-tema-blackmouve.esmero-tema-vertical > header nav:not(#_x) { background: linear-gradient(180deg, rgba(255,255,255,.055) 0%, rgba(255,255,255,.015) 100%), #040404 !important; box-shadow: 14px 0 34px -20px rgba(0,0,0,1), inset -1px 0 0 rgba(255,255,255,.05) !important; border-right: 0 !important; }
  html body.esmero-tema-blackmouve.esmero-tema-vertical > header nav :is(.nav-btn):not(#_x) { transition: background .2s ease, transform .2s cubic-bezier(.2,.8,.2,1), box-shadow .2s ease !important; }
  html body.esmero-tema-blackmouve.esmero-tema-vertical > header nav .nav-btn.text-amber-500:not(#_x) { background: linear-gradient(90deg, rgba(224,130,5,.16), rgba(224,130,5,.03)) !important; box-shadow: inset 3px 0 0 var(--bf-acento), 0 6px 16px -8px rgba(0,0,0,.9) !important; }
  html body.esmero-tema-blackmouve.esmero-tema-vertical > header nav .nav-dropdown:not(#_x) { background: rgba(255,255,255,.03) !important; box-shadow: inset 0 0 0 1px rgba(255,255,255,.04) !important; backdrop-filter: none !important; }
}
@media (hover: hover) {
  html body.esmero-tema-blackmouve.esmero-tema-vertical > header nav :is(.nav-btn):not(.text-amber-500):not(#_x):hover { transform: translateX(3px); }
}
/* ---- aparência da lateral: WHITE MOUVE VERTICAL ---- */
@media all {
  html body.esmero-tema-whitemouve.esmero-tema-vertical > header nav:not(#_x) { background: linear-gradient(180deg, #ffffff 0%, #f4f4f6 100%) !important; box-shadow: 14px 0 30px -22px rgba(0,0,0,.5) !important; border-right: 1px solid #000 !important; }
  html body.esmero-tema-whitemouve.esmero-tema-vertical > header nav :is(.nav-btn):not(#_x) { transition: background .2s ease, transform .2s cubic-bezier(.2,.8,.2,1), box-shadow .2s ease !important; }
  html body.esmero-tema-whitemouve.esmero-tema-vertical > header nav .nav-btn.text-amber-500:not(#_x) { background: linear-gradient(90deg, rgba(180,83,9,.14), rgba(180,83,9,.02)) !important; box-shadow: inset 3px 0 0 var(--bf-acento), 0 6px 14px -8px rgba(0,0,0,.4) !important; }
  html body.esmero-tema-whitemouve.esmero-tema-vertical > header nav .nav-dropdown:not(#_x) { background: rgba(0,0,0,.03) !important; box-shadow: inset 0 0 0 1px rgba(0,0,0,.1) !important; backdrop-filter: none !important; }
}
@media (hover: hover) {
  html body.esmero-tema-whitemouve.esmero-tema-vertical > header nav :is(.nav-btn):not(.text-amber-500):not(#_x):hover { transform: translateX(3px); }
}
@media (prefers-reduced-motion: reduce) { html body.esmero-tema-vertical > header nav * { transition: none !important; transform: none !important; } }

/* ---- iPhone / celular / tablet estreito: lateral enxuta, só ícones ---- */
@media (max-width: 1023.98px) {
  html body.esmero-tema-vertical { --esm-lat: calc(56px + env(safe-area-inset-left, 0px)); }
  html body.esmero-tema-vertical > header:not(#_x) { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; transform: none !important; filter: none !important; }
  html body.esmero-tema-vertical > header nav:not(#_x) { position: fixed !important; left: 0 !important; top: var(--esm-topo, 64px) !important; bottom: 0 !important; width: var(--esm-lat) !important; z-index: 35 !important; overflow-x: hidden !important; overflow-y: auto !important; -webkit-overflow-scrolling: touch; padding: 10px 6px calc(24px + env(safe-area-inset-bottom, 0px)) calc(6px + env(safe-area-inset-left, 0px)) !important; border-top: 0 !important; }
  html body.esmero-tema-vertical > header nav > div:not(#_x) { display: flex !important; flex-direction: column !important; align-items: stretch !important; gap: 6px !important; min-width: 0 !important; max-width: none !important; width: 100% !important; margin: 0 !important; padding: 0 !important; }
  html body.esmero-tema-vertical > header nav .menu-group-wrap { width: 100% !important; flex: 0 0 auto !important; }
  /* só o ícone: o texto some (font-size 0) e o ícone cresce; a seta do submenu também some */
  html body.esmero-tema-vertical > header nav :is(.nav-btn):not(#_x) { width: 100% !important; height: 44px !important; min-height: 44px !important; padding: 0 !important; gap: 0 !important; justify-content: center !important; font-size: 0 !important; line-height: 0 !important; border-radius: 12px !important; -webkit-touch-callout: none; }
  html body.esmero-tema-vertical > header nav .nav-btn svg { width: 21px !important; height: 21px !important; margin: 0 !important; flex: 0 0 auto; }
  html body.esmero-tema-vertical > header nav .nav-btn svg:last-child:not(:first-child) { display: none !important; }
  /* submenus: janelinha ao lado da lateral (o nome das telas continua visível dentro dela) */
  html body.esmero-tema-vertical > header nav .nav-dropdown:not(#_x) { left: calc(var(--esm-lat) + 6px) !important; right: auto !important; width: min(290px, calc(100vw - var(--esm-lat) - 14px)) !important; min-width: 0 !important; max-width: none !important; max-height: calc(100vh - var(--esm-topo, 64px) - 24px); overflow-y: auto; }
  html body.esmero-tema-vertical > header nav .nav-dropdown-item:not(#_x), html body.esmero-tema-vertical > header nav .nav-dropdown-label { font-size: 12px !important; line-height: 1.3 !important; }
  /* conteúdo e rodapé começam depois da lateral */
  html body.esmero-tema-vertical > main:not(#_x) { margin-left: var(--esm-lat) !important; margin-right: 0 !important; width: calc(100% - var(--esm-lat)) !important; max-width: none !important; padding-left: 12px !important; padding-right: 12px !important; }
  html body.esmero-tema-vertical > #esmFooter:not(#_x) { margin-left: var(--esm-lat) !important; }
}
