/* Casca do app (cabeçalho, menu lateral, faixa de título, botão Suporte), 13/10/2026.
   Medidas tiradas de data/rea-reference/2026-10-13-telas/inicio.png e clientes.png (janela 1440 × 900, escala 2), em px de CSS.
   Carregado depois de styles.css para vencer as camadas antigas do menu. */

:root { --sidebar-width: 240px; }

/* Cabeçalho: 50 de altura, fundo #0f1b24; menu hambúrguer a 240 px da borda; atalhos e avatar à direita. */
.product-bar { height: 50px; background: #0f1921; }
.product-bar .product-brand { flex: 0 0 240px; }
.product-bar .identity-actions { gap: 0; padding-right: 18px; }
.product-bar .header-shortcut:first-child { margin-right: 5px; }
.product-bar .header-shortcut svg { width: 17px; height: 17px; }

/* Menu lateral: 240 de largura, fundo #f4f4f4, borda direita #dfe2e6. */
.sidebar { width: var(--sidebar-width); padding: 11px 0 14px; background: #f2f2f2; border-right: 1px solid #d9dee2; }
.sidebar .workspace-name { flex: none; width: 150px; height: 148px; margin: 0 auto 18px; padding: 0 8px; background: #efefef; }
.sidebar .workspace-name strong { font-size: 24px; }
.sidebar .workspace-name small { max-width: 130px; text-align: center; }
.nav-symbols { position: absolute; width: 0; height: 0; overflow: hidden; }

.sidebar .main-nav { display: block; }
.sidebar .main-nav .nav-link {
  position: relative; display: flex; align-items: center; gap: 10px; box-sizing: border-box; width: 100%;
  min-height: 40px; padding: 8px 28px 8px 20px; border: 0; border-radius: 0; background: transparent;
  color: #4b4b4b; font-size: 15px; font-weight: 400; line-height: 20px; text-decoration: none; cursor: pointer;
}
.sidebar .main-nav .nav-ic { flex: 0 0 18px; width: 18px; height: 18px; color: #757575; }
.sidebar .main-nav .nav-link > span { min-width: 0; }
.sidebar .main-nav summary { list-style: none; }
.sidebar .main-nav summary::-webkit-details-marker { display: none; }
.sidebar .main-nav summary::after { content: none; }
.sidebar .main-nav .nav-head-link { display: flex; align-items: center; gap: 10px; flex: 1 1 auto; min-height: 40px; margin: -8px 0 -8px -20px; padding: 8px 0 8px 20px; color: inherit; text-decoration: none; }
.sidebar .main-nav .nav-link:hover { color: #0f1921; background: #ebebeb; }

/* Seta à direita (medida em clientes.png e atributos-produtos.png, 1440 × 900): fechado aponta para a direita (5 × 8 px, centro em x 212),
   aberto aponta para baixo (8 × 5 px). A caixa de 6 px gira; a perna visível fica no lado da ponta, por isso o recuo de 2 px. */
.nav-chevron { position: absolute; right: 26px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border: solid #9c9c9c; border-width: 0 1.5px 1.5px 0; transform: rotate(-45deg); }
.nav-group[open] > summary > .nav-chevron, .nav-subgroup[open] > summary > .nav-chevron { right: 24px; margin-top: -5px; transform: rotate(45deg); }

/* Grupo aberto: título em negrito e escuro (#1e2124); filhos com 14 px, ícone em x 40, texto em x 64 (fundos de 8 a 232 px) e a
   linha-guia de 1 px em x 28 (#d9dee2) descendo por todo o bloco, inclusive o do subgrupo. */
.sidebar .main-nav .nav-group[open] > summary.nav-link, .sidebar .main-nav .nav-group:has([aria-current='page']) > summary.nav-link { color: #1e2124; font-weight: 600; }
.sidebar .main-nav .nav-group[open] > summary .nav-ic, .sidebar .main-nav .nav-group:has([aria-current='page']) > summary .nav-ic { color: #0f1921; }
.nav-children { position: relative; margin: -1px 7px 5px 8px; }
.nav-children::before { content: ''; position: absolute; left: 20px; top: 0; bottom: 0; width: 1px; background: #d9dee2; }
.sidebar .main-nav .nav-sub { gap: 10px; min-height: 33.75px; padding: 6px 12px 6px 32px; border-radius: 0; font-size: 14px; color: #6d6d6d; }
.sidebar .main-nav .nav-sub .nav-ic { width: 14px; height: 14px; flex-basis: 14px; color: #8e8e8e; }
.nav-sub > .nav-chevron { right: 18px; }
.nav-subgroup[open] > summary > .nav-chevron { right: 16px; }
.nav-children-deep { margin: 0; }
.nav-children-deep::before { content: none; }
.sidebar .main-nav .nav-children-deep .nav-sub { padding-left: 48px; }
.sidebar .main-nav .nav-sub[aria-current='page'], .sidebar .main-nav .nav-subgroup:has([aria-current='page']) > summary.nav-sub { color: #0f1921; background: #d7d8d9; font-weight: 600; }
.sidebar .main-nav .nav-sub[aria-current='page'] .nav-ic, .sidebar .main-nav .nav-subgroup:has([aria-current='page']) > summary .nav-ic { color: #0f1921; }
.sidebar .main-nav .nav-top[aria-current='page'] { color: #0f1921; background: #d7d8d9; font-weight: 600; }

/* Entrada sem tela nesta versão: aparece, mas não abre nada. */
.sidebar .main-nav [data-nav-pending] { cursor: not-allowed; }
.sidebar .main-nav [data-nav-pending]:hover { color: inherit; background: transparent; }
.sidebar .main-nav .nav-top[data-nav-pending] { color: #4b4b4b; }

.sidebar .environment-card { display: none; }

/* Faixa de título (medida em clientes.png e nas 161 capturas): 54 de altura mais 1 de borda #e7e7e7, fundo #fafafa, título #1e2124, trilha em 13 px a 16 px da borda. */
.topbar { height: 55px; min-height: 55px; padding: 17px 16px 8px 20px; background: #fafafa; border-bottom: 1px solid #e7e7e7; box-shadow: 0 2px 3px rgba(0, 0, 0, 0.05); }
/* 115 das 161 capturas têm 54 + 1 de borda; 39 (listas de clientes, produtos, compras, relatórios…) têm 57 + 1: data-shell-strip="tall" (app.js). */
body[data-shell-strip="tall"]:not(.shell-form-page) .topbar { height: 58px; min-height: 58px; padding-top: 15px; padding-bottom: 13px; }
.topbar h1 { color: #1e2124; }
.topbar .page-breadcrumb { font-size: 13px; }
.topbar .page-breadcrumb strong { color: #1e2124; }
.topbar .crumb-home { color: #777; }
.topbar .crumb-home::before { content: ''; display: inline-block; width: 13px; height: 12px; margin-right: 9px; vertical-align: -1px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 13 12'%3E%3Cpath fill='%23666' d='M6.5 0 0 5.8h1.8V12H5V8h3v4h3.2V5.8H13z'/%3E%3C/svg%3E") center / contain no-repeat; }

/* Botão flutuante Suporte: canto inferior direito, preto, 30 de altura, canto superior esquerdo arredondado. */
.support-button {
  position: fixed; right: 0; bottom: 0; z-index: 60; display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 8px 0 10px; border: 0; border-radius: 5px 0 0 0; color: #fff; background: #000;
  font: inherit; font-size: 15px; font-weight: 600; line-height: 30px; cursor: pointer;
}
.support-button svg { width: 18px; height: 18px; }
.support-button:hover { background: #222; }

/* Telas de formulário (Adicionar …): o original esconde o menu e usa a largura toda. */
.shell-form-page .app-shell { grid-template-columns: minmax(0, 1fr); }
.shell-form-page .sidebar { display: none; }

@media (max-width: 760px) {
  .sidebar { position: static; width: 100%; height: auto; padding: 0; border-right: 0; border-bottom: 1px solid #dfe2e6; }
  .sidebar .workspace-name { display: none; }
  .product-bar .product-brand { flex: 0 1 auto; }
  .product-bar .header-shortcut:first-child { margin-right: 0; }
  .topbar { height: auto; min-height: 0; padding: 14px 16px 10px; }
}

/* O resumo do Financeiro é a cabeça do grupo: só a entrada filha da visão atual recebe o realce. */
.sidebar .main-nav .nav-head-link[aria-current='page'] { background: transparent; font-weight: inherit; }

/* Cabeçalho (medido em clientes.png): hambúrguer de 22 × 14 px a 11 px do botão, avatar #ededed 1 px mais baixo, atalhos 2 px mais à esquerda. */
.menu-toggle { position: relative; font-size: 0; }
.menu-toggle::before { content: ''; position: absolute; left: 11px; top: 18px; width: 22px; height: 14px;
  background: linear-gradient(#fff, #fff) 0 0 / 100% 2px no-repeat, linear-gradient(#fff, #fff) 0 6px / 100% 2px no-repeat, linear-gradient(#fff, #fff) 0 12px / 100% 2px no-repeat; }
.product-bar .header-avatar { position: relative; top: 1px; background: #ededed; }
.product-bar .avatar-wrap { margin-left: 12px; }

/* Seletor de módulo (relatorios-financeiros.png): 28 de altura, fundo #4b555b, a 160 px da borda direita; some Aplicativos e Agenda. */
.module-chip { position: absolute; top: 12px; right: 160px; display: inline-flex; align-items: center; gap: 6px; height: 28px; box-sizing: border-box;
  padding: 0 8px 0 6px; border-radius: 3px; background: #4b555b; color: #fff; font-size: 12px; line-height: 28px; white-space: nowrap; }
.module-chip-icon { flex: 0 0 18px; width: 18px; height: 18px; border-radius: 3px; background: #34906a; }
.module-chip-caret { width: 0; height: 0; margin-left: 2px; border: 4px solid transparent; border-top-color: #fff; border-bottom-width: 0; }
body[data-shell-module] .product-bar .header-shortcut[aria-label^="Aplicativos"],
body[data-shell-module] .product-bar a.header-shortcut[aria-label="Agenda"] { display: none; }

/* Menus de módulo (Agenda e Atendimentos): substituem o menu principal só nas rotas do módulo. */
.sidebar .module-menu { display: none; }
body[data-shell-menu="agenda"] #agenda-navigation, body[data-shell-menu="tickets"] #tickets-navigation,
body[data-shell-menu="accountant"] #accountant-navigation { display: block; }
body[data-shell-menu] #main-navigation { display: none; }
@media (max-width: 760px) { .module-chip { display: none; } }
