/* ============================================================
   admin.css — shell pós-login (sidebar + topbar + conteúdo)
   2026-08-26: o login também carrega este arquivo (mesmos tokens, mesma
   barra superior, mesmos temas); login.css só desenha o cartão do form.
   ============================================================ */

/* SPEC-11 — o interior deixou de ser "mata verde". Os neutros eram todos
   puxados para o verde (#070a09 / #0d1411 / #a3b3aa …), então mesmo com pouco
   mint na tela o app inteiro parecia musgo. Agora são carvão/slate de verdade;
   o mint continua sendo o acento (mesma família do login), só que gasto onde
   significa algo — estado ativo, ok, controle ligado. Desde 2026-08-26 o
   login lê este arquivo também — é o que o deixa igual ao interior. */
:root {
  --bg: #0b0e12;
  --surface: #12161b;
  --surface-2: #191d24;
  --border: rgba(255, 255, 255, 0.085);
  --border-strong: rgba(255, 255, 255, 0.17);
  --text: #eceef2;
  --text-2: #aab4c0;
  /* SPEC-11: 6,18:1 sobre o card (#161a20). A medida da SPEC-09 (5,95:1) valia
     contra o card verde #131b17, que não existe mais — foi remedida, não
     herdada. Sobre o fundo do app dá 6,85:1. */
  --text-3: #909ba7;
  --accent: #3ddc97;
  --accent-soft: rgba(61, 220, 151, 0.11);
  --accent-ring: rgba(61, 220, 151, 0.16);
  --accent-border: rgba(61, 220, 151, 0.45);
  /* Texto/ícone SOBRE o acento (botão primário, aba ligada). Escuro no verde;
     os temas redefinem (branco no Porcelana, cujo acento é azul escuro). */
  --on-accent: #04150e;
  --danger-text: #f7a8b8;

  /* Redesign 2026-08-18: dinheiro passou a ser VERDE (o usuário pediu
     "verde em tudo"). O antigo dourado (--gold) deixou de carregar dinheiro e
     ficou só com AVISO/ATENÇÃO/PREMIUM (aviso, suspeita, dono, favorito, "muda
     produção") — verde num aviso leria como "ok", então esses continuam âmbar.
     --money é uma menta mais clara que o --accent (ativo) para os dois não se
     confundirem: valor de dinheiro ≠ link ativo. */
  --money: #86f5c4;
  --money-soft: rgba(134, 245, 196, 0.12);
  --money-border: rgba(134, 245, 196, 0.4);
  --gold: #f5c96b;
  --gold-soft: rgba(245, 201, 107, 0.12);
  --gold-border: rgba(245, 201, 107, 0.4);
  --rose: #f4677d;
  --rose-soft: rgba(244, 103, 125, 0.1);
  --rose-border: rgba(244, 103, 125, 0.32);

  /* Cards opacos: o vidro ficou só no chrome (sidebar/topbar/modais). Ler
     tabela 8h com um gradiente translúcido atrás cansa. */
  --elev-a: #161a20;
  --elev-b: #11151a;
  /* Chrome fino do shell — translúcido, com blur; é a única superfície de
     vidro que sobrou no interior. */
  --chrome: rgba(19, 23, 29, 0.82);
  --chrome-2: rgba(15, 18, 23, 0.92);
  /* Linha de topo dos cartões: era mint em TODO painel; virou neutra e o mint
     ficou reservado para o que está ativo. */
  --hairline: rgba(255, 255, 255, 0.09);
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.028),
    0 18px 44px -30px rgba(0, 0, 0, 0.85);
  --shadow-pop: 0 32px 90px -22px rgba(0, 0, 0, 0.76);

  --radius: 12px;
  --radius-lg: 18px;
  --radius-sm: 9px;
  --sidebar-w: 268px;
  --topbar-h: 56px;
  --font: "Manrope", "InterVar", Inter, ui-sans-serif, system-ui, -apple-system,
    "Segoe UI", Roboto, sans-serif;
  --font-display: "Sora", var(--font);
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

/* A fonte é servida pelo login; sem esta face o shell cai em system-ui. */
@font-face {
  font-family: "InterVar";
  src: url("../fonts/inter-var-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
/* Corpo do painel: Manrope (fintech, métricas próximas do Inter, sem quebrar layout). */
@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-var-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}
/* Display: Sora — títulos e números grandes (dashboard). */
@font-face {
  font-family: "Sora";
  src: url("../fonts/sora-var-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------- atmosfera (mesma do login, mais contida) ---------- */

/* Fixas atrás do shell: o conteúdo rola por cima sem repintar o gradiente. */
.shell::before,
.shell::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
}

/* SPEC-11: eram quatro camadas (verde no canto, ouro no outro, verde no pé).
   Sobrou profundidade neutra + um sopro de mint no alto à esquerda, atrás da
   marca — o suficiente para o interior continuar da família do login. */
.shell::before {
  background:
    radial-gradient(125% 90% at 50% 0%, #12161c 0%, #0d1116 44%, #090b0f 100%),
    radial-gradient(34% 40% at 12% 2%, rgba(61, 220, 151, 0.035), transparent 68%);
}

.shell::after {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 54px 54px;
  -webkit-mask-image: radial-gradient(ellipse 72% 62% at 62% 0%, #000 8%, transparent 72%);
  mask-image: radial-gradient(ellipse 72% 62% at 62% 0%, #000 8%, transparent 72%);
}

/* ---------- layout ---------- */

.shell { position: relative; z-index: 0; display: flex; min-height: 100vh; }

/* ---------- sidebar ---------- */

/* Chrome fino: vidro neutro + blur. Com os grupos sempre abertos (SPEC-11) ela
   passa a rolar de verdade em telas baixas — daí o scroll fino e o rodapé
   colado embaixo. */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background:
    radial-gradient(120% 30% at 0% 0%, rgba(61, 220, 151, 0.08), transparent 60%),
    linear-gradient(178deg, var(--chrome), var(--chrome-2));
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
  z-index: 40;
}

/* Grudada no topo: com os grupos abertos a nav rola dentro da sidebar, e a
   marca sumindo no scroll tirava a referência de "onde eu estou". */
.sidebar__brand {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  min-height: var(--topbar-h);
  background: linear-gradient(180deg, rgba(61, 220, 151, 0.06), rgba(20, 22, 26, 0.72));
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

/* A hairline de menta ficou só aqui, no topo da marca — nos painéis ela virou
   neutra (SPEC-11). Um lugar, não trinta. */
.sidebar__brand::after {
  position: absolute;
  right: 14px;
  bottom: -1px;
  left: 14px;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(61, 220, 151, 0.4), transparent);
}

.sidebar__brand-mark {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 9px;
  border: 1px solid rgba(61, 220, 151, 0.28);
  background: linear-gradient(160deg, rgba(61, 220, 151, 0.14), rgba(61, 220, 151, 0.03));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.08);
  color: var(--accent);
}

.sidebar__brand-mark svg { width: 18px; height: 18px; }

.sidebar__brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

/* Com a linha enxuta, os 20 itens + 7 rótulos cabem sem rolar numa janela de
   ~1000px — antes a lista era mais alta que a coluna e cortava um item pela
   metade no topo. */
.sidebar__nav {
  flex: 1;
  min-height: 0;
  padding: 6px 10px 14px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}
.sidebar__nav::-webkit-scrollbar { width: 9px; }
.sidebar__nav::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.1);
  background-clip: content-box;
}

.sidebar__user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--chrome-2);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  position: sticky;
  bottom: 0;
}

.sidebar__user-avatar {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
}

.sidebar__user-avatar svg { width: 15px; height: 15px; }

.sidebar__user-copy { min-width: 0; display: flex; flex-direction: column; flex: 1; }

.sidebar__user-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar__user-id {
  font-size: 11px;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar__sair {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 7px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
  transition: border-color 0.12s ease, color 0.12s ease;
}
.sidebar__sair:hover { border-color: var(--accent-border); color: var(--text); }
.sidebar__sair svg { width: 14px; height: 14px; }

/* Grupos COLAPSÁVEIS (crítica UI/UX 2026-08-17). A SPEC-11 tinha razão em
   rejeitar accordion ESTRITO — esconder metade do menu cobra dois cliques por
   navegação. A queixa nova do dono ("muita tabela na esquerda, poluído") pesa
   mais: 8 grupos × até 8 itens SEMPRE abertos = 27 linhas empilhadas o tempo
   todo. Meio-termo: o grupo da tela atual abre sempre; os demais colapsam por
   padrão (menos poluição), mas cada grupo que o admin abre FICA aberto e o
   estado persiste em localStorage — os grupos onde ele mora não voltam a cobrar
   dois cliques. Sem estado salvo, o default é "só o ativo aberto". */
.nav-group + .nav-group { margin-top: 4px; }

.nav-group__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 8px 10px 6px;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: 10px;
  font-weight: 680;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  cursor: pointer;
  user-select: none;
  text-align: left;
  border-radius: 8px;
  transition: color 0.12s ease, background 0.12s ease;
}
.nav-group__title:hover { color: var(--text-2); background: rgba(255, 255, 255, 0.04); }
.nav-group__title:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

/* Seção em que a tela aberta vive. Serve para as telas que NÃO têm item na
   sidebar (Lucros, Depósitos, Gates…): antes a lateral inteira ficava apagada
   nelas e não dava para saber onde se estava. */
.nav-group--on .nav-group__title { color: var(--accent); }

.nav-group__chev {
  width: 13px;
  height: 13px;
  flex: none;
  opacity: 0.7;
  transform: rotate(-90deg);
  transition: transform 0.18s ease;
}
.nav-group--open .nav-group__chev { transform: rotate(0deg); }

/* Colapso por max-height (transição suave; grupos têm ≤8 itens, 500px sobra). */
.nav-group__items {
  display: grid;
  gap: 2px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.2s ease;
}
.nav-group--open .nav-group__items { max-height: 500px; }

/* Antes do JS ligar (no-js / 1º paint): não deixar nenhum grupo preso fechado —
   a classe --open já vem no ativo pelo template; os demais o JS resolve. */

/* O item era uma CAIXA CINZA CHEIA (fundo branco 4,5% + raio 12): 20 delas
   empilhadas viravam uma parede de blocos iguais, e o item ativo tinha de
   competir com 19 caixas para aparecer. Agora a linha é só texto+ícone; o
   fundo aparece no hover e no ativo — que é o único lugar com menta. */
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.3;
  transition: background 0.12s ease, color 0.12s ease;
}

.nav-item:hover { background: rgba(255, 255, 255, 0.055); color: var(--text); }
.nav-item:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

/* Ativo: fundo de menta + trilho de 3px na canaleta da esquerda (o
   `inset box-shadow` antigo desenhava a barra por dentro do raio e ficava
   torta no canto). */
.nav-item--active {
  background: linear-gradient(100deg, var(--accent-soft), rgba(61, 220, 151, 0.045));
  box-shadow:
    inset 0 0 0 1px rgba(61, 220, 151, 0.16),
    0 6px 18px -12px rgba(61, 220, 151, 0.55);
  color: var(--accent);
  font-weight: 600;
}

.nav-item--active::before {
  position: absolute;
  top: 50%;
  left: -6px;
  width: 3px;
  height: 16px;
  content: "";
  border-radius: 0 3px 3px 0;
  background: var(--accent);
  box-shadow: 0 0 10px 0 rgba(61, 220, 151, 0.6);
  transform: translateY(-50%);
}

.nav-item--active:hover { background: var(--accent-ring); color: var(--accent); }

/* Ícone um degrau atrás do rótulo: opacidade uniforme deixava os 20 ícones
   com o mesmo peso do texto. */
.nav-item__ico {
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--text-3);
  opacity: 1;
  transition: color 0.12s ease;
}
.nav-item:hover .nav-item__ico { color: var(--text-2); }
.nav-item--active .nav-item__ico { color: var(--accent); }

/* Sombra de rolagem para tabelas no mobile (crítica UI/UX 2026-08-17). Mora aqui
   (admin.css é global e cacheado por ?v=) e não no loja.css, que 61 templates
   linkam sem versão. Tabelas de dinheiro (Saques, Lucros, Dinheiro) cortavam a
   coluna de valor no celular SEM pista de que havia mais à direita. Truque
   clássico só-CSS: camadas `local` (cor do card) tapam a sombra nas pontas; as
   camadas `scroll` (sombra) só aparecem enquanto há conteúdo para rolar. Só no
   mobile — o desktop fica intocado. */
@media (max-width: 719px) {
  .tbl-wrap {
    background:
      linear-gradient(to right, var(--elev-a) 30%, rgba(22, 26, 32, 0)) left center,
      linear-gradient(to left, var(--elev-a) 30%, rgba(22, 26, 32, 0)) right center,
      radial-gradient(farthest-side at 0 50%, rgba(0, 0, 0, 0.5), transparent) left center,
      radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, 0.5), transparent) right center;
    background-repeat: no-repeat;
    background-size: 30px 100%, 30px 100%, 18px 100%, 18px 100%;
    background-attachment: local, local, scroll, scroll;
  }
}

/* ---------- topbar ---------- */

.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 0;
}
/* Brilho verde ambiente atrás de TODAS as telas (redesign 2026-08-18): dá o
   "algo atrás" premium sem tocar cada template. Fixo e sutil; o dashboard tem
   o próprio mesh local por cima (.ic::before), então os dois convivem. */
.main::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: 40vh;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60% 100% at 18% 0%, rgba(61, 220, 151, 0.06), transparent 62%),
    radial-gradient(50% 90% at 95% 0%, rgba(20, 184, 128, 0.05), transparent 60%);
}

/* Translúcida: o conteúdo passa por baixo com blur, como o vidro do login. */
.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--topbar-h);
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
  background: var(--chrome);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  /* 50: acima da trilha (.secnav 36) e dos menus "Mais ▾" (37–40). Sem isto,
     recolher as abas deixa os botões do menu pintados na hotbar
     (Início · Broadcast · …). Modais/gavetas continuam em 70–80. */
  z-index: 50;
}

.topbar__burger {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  place-items: center;
  color: var(--text-2);
}

.topbar__burger:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); }
.topbar__burger svg { width: 20px; height: 20px; }

.topbar__title {
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar__spacer { flex: 1; }

.search-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--text-3);
  font-size: 13px;
  min-width: 180px;
  transition: border-color 0.12s ease, color 0.12s ease;
}

.search-trigger:hover { border-color: var(--accent-border); color: var(--text-2); }
.search-trigger svg { width: 14px; height: 14px; flex-shrink: 0; }
.search-trigger__label { flex: 1; text-align: left; }

.search-trigger__kbd {
  font-family: var(--font);
  font-size: 10.5px;
  color: var(--text-3);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 5px;
  background: rgba(255, 255, 255, 0.03);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: 12px;
  color: var(--text-2);
  background: var(--surface-2);
  white-space: nowrap;
}

.chip__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.chip strong { color: var(--text); font-weight: 600; }

.chip__dot--off { background: var(--rose); }
.chip__dot--on { background: var(--accent); }
.chip__dot--unknown { background: var(--text-3); }

/* ---------- saúde ---------- */

.health-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(160deg, var(--elev-a), var(--elev-b));
  box-shadow: var(--shadow-card);
  margin-bottom: 18px;
}

.health-hero--on { border-color: var(--accent-border); }
.health-hero--off { border-color: rgba(244, 103, 125, 0.45); }

.health-hero__dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
}

.health-hero--on .health-hero__dot {
  background: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-ring);
}

.health-hero--off .health-hero__dot {
  background: var(--rose);
  box-shadow: 0 0 0 5px rgba(244, 103, 125, 0.14);
}

.health-hero__copy h2 { font-size: 16px; font-weight: 650; }
.health-hero__copy p { font-size: 13px; color: var(--text-2); margin-top: 2px; }

.health-hero__tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-left: 6px;
}

.health-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 999px;
}

.health-badge__dot { width: 7px; height: 7px; border-radius: 50%; }

.health-badge--on { color: var(--accent); background: var(--accent-soft); }
.health-badge--on .health-badge__dot { background: var(--accent); }

.health-badge--off { color: #f7a8b8; background: rgba(244, 103, 125, 0.1); }
.health-badge--off .health-badge__dot { background: var(--rose); }

.chip--picker { cursor: pointer; padding-right: 6px; }

.chip--picker select {
  background: transparent;
  border: 0;
  outline: none;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  max-width: 160px;
}

.chip--picker select:disabled { cursor: default; opacity: 1; }

.chip--picker select option {
  background: var(--surface-2);
  color: var(--text);
}

.bot-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.bot-card--active { border-color: var(--accent-border); }

.bot-card__link { color: var(--text-2); }
.bot-card__link:hover { color: var(--accent); text-decoration: underline; }

.bot-card__use {
  margin-top: 10px;
  align-self: flex-start;
  padding: 6px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  font-size: 12.5px;
  color: var(--text-2);
  transition: border-color 0.12s ease, color 0.12s ease;
}

.bot-card__use:hover { border-color: var(--accent-border); color: var(--accent); }
.bot-card__use:disabled { opacity: 0.6; cursor: wait; }

.topbar__logout {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  font-size: 13px;
  color: var(--text-2);
  transition: border-color 0.12s ease, color 0.12s ease;
}

.topbar__logout:hover { border-color: var(--accent-border); color: var(--text); }
.topbar__logout svg { width: 15px; height: 15px; }

/* ---------- conteúdo ---------- */

.content {
  flex: 1;
  padding: 24px 20px 48px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.page-head { margin-bottom: 20px; }

.page-head h1 { font-family: var(--font-display); font-size: 20px; font-weight: 680; letter-spacing: -0.02em; }

.page-head p { color: var(--text-3); font-size: 13px; margin-top: 3px; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}

/* Cartões (dashboard, saúde, meus bots) no mesmo vidro dos painéis de dados. */
.panel-card {
  position: relative;
  background: linear-gradient(160deg, var(--elev-a), var(--elev-b));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 16px;
  min-height: 110px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: hidden;
}

.panel-card::before {
  position: absolute;
  top: 0;
  left: 16px;
  width: 26px;
  height: 2px;
  content: "";
  border-radius: 0 0 2px 2px;
  background: var(--text-3);
  opacity: 0.55;
}

.bot-card--active::before { background: var(--accent); opacity: 1; }

.panel-card h2 { font-size: 14px; font-weight: 600; }

.panel-card__value {
  font-size: 22px;
  font-weight: 650;
  color: var(--text-3);
  letter-spacing: -0.01em;
}

.panel-card__hint { font-size: 12px; color: var(--text-3); margin-top: auto; }

.badge-soon {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 2px 9px;
}

/* Módulo ainda não habilitado: tracejado (sinaliza "não existe"), mas no
   vidro da família — nada de cinza-Bootstrap ao lado do login premium. */
.stub-panel {
  background: linear-gradient(160deg, var(--elev-a), var(--elev-b));
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 52px 24px;
  text-align: center;
  color: var(--text-3);
}

.stub-panel h2 { color: var(--text-2); font-size: 16px; margin-bottom: 6px; }
.stub-panel p { max-width: 46ch; margin: 0 auto; line-height: 1.6; font-size: 13px; }

/* ---------- busca (modal Ctrl/Cmd+K) ---------- */

.search {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(0, 0, 0, 0.62);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 12vh 16px 16px;
}

.search[hidden] { display: none; }

.search__box {
  position: relative;
  width: 100%;
  max-width: 520px;
  background: linear-gradient(160deg, var(--elev-a), var(--elev-b));
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  box-shadow: var(--shadow-pop);
  overflow: hidden;
  animation: shell-pop 0.18s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* a mesma hairline que corta o topo do cartão de login */
.search__box::before {
  position: absolute;
  top: 0;
  right: 20px;
  left: 20px;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, var(--hairline), transparent);
}

@keyframes shell-pop {
  from { opacity: 0; transform: translateY(8px) scale(0.99); }
  to { opacity: 1; transform: none; }
}

.search__field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

.search__field svg { width: 16px; height: 16px; color: var(--text-3); flex-shrink: 0; }

.search__field input {
  flex: 1;
  min-width: 0;
  background: none;
  border: 0;
  outline: none;
  font: inherit;
  font-size: 15px;
  color: var(--text);
}

.search__field input::placeholder { color: var(--text-3); }

.search__field kbd {
  font-family: var(--font);
  font-size: 10.5px;
  color: var(--text-3);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 6px;
  flex-shrink: 0;
}

.search__results {
  list-style: none;
  max-height: 320px;
  overflow-y: auto;
  padding: 6px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}

.search__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-2);
  font-size: 13.5px;
}

.search__item:hover { background: rgba(255, 255, 255, 0.04); color: var(--text); }

.search__item--selected,
.search__item--selected:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.search__item-group {
  font-size: 11.5px;
  color: var(--text-3);
  white-space: nowrap;
  flex-shrink: 0;
}

.search__empty {
  padding: 20px 12px;
  text-align: center;
  color: var(--text-3);
  font-size: 13px;
  list-style: none;
}

/* ---------- mobile ---------- */

.backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 39;
}

@media (min-width: 861px) {
  .topbar__logout { display: none; }
}

/* --- SPEC-25: botão do Painel admin na topbar ---
   Vive aqui, não no painel-admin.css: o botão aparece em TODA tela, e o CSS
   das telas do cadastro só carrega dentro delas. */

.topbar__admin {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
  padding: 7px 13px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  font-size: 13px;
  font-weight: 560;
  color: var(--text-2);
  transition: border-color 0.12s ease, color 0.12s ease, background 0.12s ease;
}

.topbar__admin svg { width: 15px; height: 15px; flex-shrink: 0; }

.topbar__admin:hover {
  color: var(--text);
  border-color: var(--accent-border);
  background: var(--accent-soft);
}

/* Na própria seção o botão acende — é o mesmo "você está aqui" da sidebar. */
.topbar__admin--on {
  color: var(--accent);
  border-color: var(--accent-border);
  background: var(--accent-soft);
}

@media (max-width: 720px) {
  .topbar__admin span { display: none; }
  .topbar__admin { padding: 7px 9px; }
}

/* SPEC-50 — botão Revenda, irmão do Painel admin (mesmo tamanho; outline). */
.topbar__revenda {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
  padding: 7px 13px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  font-size: 13px;
  font-weight: 560;
  color: var(--text-2);
  transition: border-color 0.12s ease, color 0.12s ease, background 0.12s ease;
}
.topbar__revenda svg { width: 15px; height: 15px; flex-shrink: 0; }
.topbar__revenda:hover {
  color: var(--text);
  border-color: var(--accent-border);
  background: var(--accent-soft);
}
.topbar__revenda--on {
  color: var(--accent);
  border-color: var(--accent-border);
  background: var(--accent-soft);
}
@media (max-width: 720px) {
  .topbar__revenda span { display: none; }
  .topbar__revenda { padding: 7px 9px; }
}
@media (pointer: coarse) {
  .topbar__revenda { min-height: 44px; min-width: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .topbar__revenda { transition: none; }
}

@media (max-width: 860px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(84vw, 300px);
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.45);
  }

  body.sidebar-open .sidebar { transform: translateX(0); }
  body.sidebar-open .backdrop { display: block; }
  body.sidebar-open { overflow: hidden; }

  .topbar__burger { display: grid; }
  .topbar { padding: 0 12px; }

  .chip--bot span.chip__label { display: none; }

  .search-trigger { min-width: 0; padding: 7px 9px; }
  .search-trigger__label,
  .search-trigger__kbd { display: none; }
  .search-trigger svg { width: 17px; height: 17px; }

  .search { padding: 8vh 10px 10px; }

  .content { padding: 18px 14px 40px; }
}

/* Telefone estreito (≈390px): o topbar guarda burger + título + 3 controles;
   texto do Sair vira só ícone e o picker encolhe sem sumir. */
@media (max-width: 560px) {
  .topbar { gap: 8px; }
  .topbar__title { font-size: 14px; }
  .topbar__logout { padding: 7px 9px; }
  .topbar__logout span { display: none; }
  .chip--picker select { max-width: 110px; }
  .content { padding: 16px 10px 40px; }
  .card-grid { grid-template-columns: 1fr; }
}

/* touch: alvo mínimo confortável nos itens de navegação do drawer */
@media (pointer: coarse) {
  .nav-item { padding-top: 10px; padding-bottom: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar { transition: none; }
  .search__box { animation: none; }
  .nav-item,
  .search-trigger,
  .topbar__logout,
  .bot-card__use { transition: none; }
}

/* --- SPEC-09: bot ativo como herói da topbar --- */

.bot-hero {
  padding: 5px 12px 5px 10px;
  border-color: var(--accent-border);
  background: linear-gradient(160deg, rgba(61, 220, 151, 0.09), rgba(61, 220, 151, 0.02));
  border-radius: 11px;
}

.bot-hero .chip__dot { width: 9px; height: 9px; }

.bot-hero__copy { display: grid; line-height: 1.25; min-width: 0; }

.bot-hero select {
  font-size: 13.5px;
  font-weight: 650;
  max-width: 240px;
  letter-spacing: -0.005em;
}

.bot-hero__meta {
  color: var(--text-3);
  font-size: 10.5px;
  font-weight: 560;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 560px) {
  .bot-hero select { max-width: 130px; font-size: 12.5px; }
  .bot-hero__meta { max-width: 130px; }
}

/* SPEC-12 flat nav — não usado nesta fatia (grupos voltaram). Mantido
   para não quebrar se alguma tela ainda aplicar a classe. */
.sidebar__nav--flat {
  display: grid;
  gap: 2px;
  align-content: start;
  padding: 14px 10px;
}
.sidebar__nav--flat .nav-item {
  padding: 9px 12px;
  font-size: 13.5px;
  border-radius: 9px;
}
/* (o bloco `.nav-item__ico` que existia aqui era cópia do de cima com
   `opacity: .8` e vencia por ordem no arquivo — a cor do ícone agora é
   definida uma vez só, junto do item.) */

/* A home respira: menos largura útil que as telas densas de tabela. */
body.page--center .content { max-width: 1120px; }

/* ---------- Painel V3 (2026-08-25): lateral de 7 linhas + trilha de sub-abas ---------- */
.sidebar__nav--v3 { padding-top: 6px; display: flex; flex-direction: column; gap: 2px; }
.nav-v3__item { padding: 9px 12px; font-size: 13.5px; font-weight: 600; }
.nav-v3__item .nav-item__ico { width: 17px; height: 17px; }

.secnav { position: relative; z-index: 36; display: flex; align-items: center; gap: 2px; flex-wrap: wrap; margin: -6px 0 16px; padding: 3px; border: 1px solid var(--border); border-radius: 12px; background: var(--chrome); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); width: fit-content; max-width: 100%; }
/* Recolher <details> de verdade. O menu "Mais ▾" (trilha e cabeça das telas)
   usa `display: flex` no painel — isso ganha da folha do browser
   (`details:not([open]) > * { display: none }`) e os botões ficam no ar,
   por cima da barra Início · Broadcast, depois de fechar a aba. */
details:not([open]) > :not(summary) {
  display: none !important;
}
.secnav__item { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--text-2); white-space: nowrap; transition: background .12s ease, color .12s ease; cursor: pointer; }
.secnav__item:hover { color: var(--text); background: var(--surface-2); }
.secnav__item.is-on { color: var(--text); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-border); }
.secnav__mais { position: relative; }
.secnav__mais summary { list-style: none; }
.secnav__mais summary::-webkit-details-marker { display: none; }
.secnav__item--mais svg { width: 14px; height: 14px; transition: transform .15s ease; }
.secnav__mais[open] .secnav__item--mais svg { transform: rotate(180deg); }
.secnav__mais.is-on .secnav__item--mais { color: var(--text); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-border); }
.secnav__menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 40; min-width: 220px; padding: 6px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface); background-color: var(--surface); box-shadow: var(--shadow-pop); display: flex; flex-direction: column; gap: 2px; }
.secnav__mais:not([open]) { overflow: hidden; }
.secnav__mais:not([open]) .secnav__menu { display: none !important; }
details[class*="-mais"]:not([open]) { overflow: hidden; }
.secnav__mitem { display: block; padding: 8px 11px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.secnav__mitem:hover { color: var(--text); background: var(--surface-2); }
.secnav__mitem.is-on { color: var(--text); background: var(--accent-soft); }
@media (max-width: 719px) {
  .secnav { width: 100%; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .secnav::-webkit-scrollbar { display: none; }
  .secnav__mais { position: static; }
  .secnav__menu { left: 12px; right: 12px; }
}

/* ---------- Fonte consistente (2026-08-25): títulos e números grandes na fonte display de TODO
   tema; corpo na fonte de texto; mono só em código/ID. Cada tela tinha a sua escolha. ---------- */
h1, .loja-head h1, .page-head h1, .panel__title,
.kpi__value, .gf-kpi__val, .mc-kpi__val, .tx-kpi__row, .rec-kpi__val, .cc-kpi__val, .es-kpi__val,
.af-kpi__val, .ci-base strong, .ci-base__n, .ri-kpi__val, .ad-kpi__val, .cn-kpi__val, .pa-kpi__val,
.mc-kpi__val strong, .tx-kpi__val, .rf-kpi__val { font-family: var(--font-display); }

/* SPEC-41: resultado de cliente na busca Ctrl K */
.search__item--cliente .search__item-label::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 8px; vertical-align: middle; }
.search__item--cliente .search__item-group { color: var(--accent); }

/* ===== Shell V3: barra superior (modelo 01 "Obsidiana", 2026-08-25) =====
   O dono pediu a Início "igual ao mock: as posições, as abas". No mock a
   navegação é uma barra no topo (marca · 7 abas · ⌕ · bot ▾ · Painel admin ·
   avatar). A lateral fica como gaveta só no celular. Um breakpoint só (980px)
   liga as duas coisas: abaixo dele as abas somem E o burger abre a gaveta. */
.sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (min-width: 981px) {
  body.shell-top .sidebar { display: none; }
  body.shell-top .topbar__logout { display: inline-flex; }
}
.topbar--nav { gap: 8px; min-height: 54px; padding: 0 18px; }
.topnav__brand { display: inline-flex; align-items: center; gap: 8px; margin-right: 10px; font-family: var(--font-display); font-weight: 700; font-size: 13px; color: var(--text); white-space: nowrap; flex-shrink: 0; }
.topnav__brand i { width: 20px; height: 20px; border-radius: 6px; background: var(--accent); opacity: .9; display: inline-block; }
.topnav { display: flex; gap: 2px; min-width: 0; overflow: hidden; }
.topnav__item { padding: 6px 10px; border-radius: 8px; color: var(--text-2); font-weight: 600; font-size: 12.5px; white-space: nowrap; transition: background .12s ease, color .12s ease; }
.topnav__item:hover { color: var(--text); background: var(--surface-2); }
.topnav__item.is-on { color: var(--text); background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); }
.topbar--nav .search-trigger { width: 30px; height: 30px; min-width: 0; padding: 0; justify-content: center; border-radius: 8px; flex-shrink: 0; }
.topbar--nav .search-trigger__label, .topbar--nav .search-trigger__kbd { display: none; }
.topbar--nav .search-trigger svg { width: 16px; height: 16px; }
.topbar--nav .bot-hero { height: 30px; padding: 0 10px 0 9px; border-radius: 999px; background: transparent; border-color: var(--border-strong); }
.topbar--nav .bot-hero__meta { display: none; }
.topbar--nav .bot-hero select { font-size: 12px; font-weight: 600; max-width: 200px; }
.topbar--nav .bot-hero .chip__dot { width: 7px; height: 7px; }
.topbar--nav .topbar__tema { width: 30px; height: 30px; padding: 0; justify-content: center; border-radius: 8px; }
.topbar--nav .topbar__tema span { display: none; }
.topbar--nav .topbar__revenda { height: 30px; padding: 0 10px; border-radius: 8px; font-weight: 700; font-size: 12px; }
.topbar--nav .topbar__admin { height: 30px; padding: 0 10px; border-radius: 8px; border-color: transparent; background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 12px; }
.topbar--nav .topbar__admin:hover { filter: brightness(1.06); background: var(--accent); color: var(--on-accent); }
.topbar--nav .topbar__admin--on { box-shadow: 0 0 0 2px var(--accent-ring); }
.topnav__av { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 12px; background: var(--surface); border: 1px solid var(--border); color: var(--text); cursor: pointer; flex-shrink: 0; }
.topnav__av:hover { border-color: var(--accent-border); }
.topbar--nav .topbar__logout { width: 30px; height: 30px; padding: 0; justify-content: center; border-radius: 8px; }
.topbar--nav .topbar__logout span { display: none; }
@media (max-width: 1180px) {
  .topnav__item { padding: 6px 8px; font-size: 12px; }
  .topnav__brand span { display: none; }
}
@media (max-width: 980px) {
  body.shell-top .topnav { display: none; }
  body.shell-top .topbar__burger { display: grid; }
  body.shell-top .topnav__brand { margin-right: 0; }
  body.shell-top .sidebar { display: flex; position: fixed; left: 0; top: 0; bottom: 0; width: min(84vw, 300px); transform: translateX(-100%); transition: transform .2s ease; box-shadow: 8px 0 32px rgba(0, 0, 0, .45); }
  body.shell-top.sidebar-open .sidebar { transform: translateX(0); }
  body.shell-top.sidebar-open .backdrop { display: block; }
  body.shell-top .topbar__logout { display: none; }
}
@media (max-width: 560px) {
  body.shell-top .topnav__av { display: none; }
  .topbar--nav { gap: 6px; padding: 0 10px; }
  .topbar--nav .topbar__revenda { width: 30px; padding: 0; justify-content: center; }
  .topbar--nav .topbar__admin { width: 30px; padding: 0; justify-content: center; }
  .topbar--nav .bot-hero select { max-width: 120px; }
}

/* Pílulas de uma aba agrupada (Dinheiro: Visão · Sacar · Saques). */
.secpills { display: flex; flex-wrap: wrap; gap: 6px; margin: -8px 0 16px; }
.secpills__item { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px 0 9px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-size: 12.5px; font-weight: 600; white-space: nowrap; transition: border-color .12s ease, color .12s ease, background .12s ease; }
.secpills__item svg { width: 14px; height: 14px; color: var(--text-3); }
.secpills__item:hover { color: var(--text); border-color: var(--border-strong); }
.secpills__item.is-on { color: var(--text); background: var(--accent-soft); border-color: var(--accent-border); }
.secpills__item.is-on svg { color: var(--accent); }

/* 2026-08-25 (dono): selo de fonte e nota técnica não aparecem em tela nenhuma. */
.badge-fonte, .fonte-nota { display: none !important; }

/* ---------------------------------------------------------------------------
   SPEC-44 — "Vendo como": o dono está vendo o painel como outra pessoa.
   Âmbar (aviso), colado no topo de toda tela, acima da topbar; a topbar desce
   a altura dele para as duas continuarem fixas ao rolar.
   --------------------------------------------------------------------------- */
:root { --vercomo-h: 40px; }
.vercomo {
  position: sticky;
  top: 0;
  z-index: 52;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--vercomo-h);
  padding: 6px 18px;
  background: linear-gradient(var(--gold-soft), var(--gold-soft)), var(--chrome);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gold-border);
  color: var(--text);
  font-size: 13px;
  line-height: 1.3;
}
.vercomo > svg { width: 18px; height: 18px; color: var(--gold); flex-shrink: 0; }
/* Uma linha só: nome longo corta com reticências em vez de empurrar a topbar. */
.vercomo__txt { display: flex; align-items: baseline; gap: 8px; flex-wrap: nowrap; min-width: 0; white-space: nowrap; overflow: hidden; }
.vercomo__txt strong { font-weight: 700; overflow: hidden; text-overflow: ellipsis; max-width: 40vw; }
.vercomo__txt small { color: var(--text-2); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.vercomo__form { margin-left: auto; flex-shrink: 0; }
/* Fantasma âmbar: o texto na cor do tema (--gold) contrasta nos 16 temas —
   claro no escuro, escuro no Porcelana — sem um preto fixo por cima. */
.vercomo__sair {
  height: 28px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--gold);
  background: var(--gold-soft);
  color: var(--gold);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.vercomo__sair:hover { background: var(--gold); color: var(--bg, #0b0e12); }
/* A topbar desce a altura da faixa, e tudo que gruda "abaixo da topbar"
   (painéis sticky do Studio/Loja, popover de tema) desce junto: --topbar-h
   passa a incluir a faixa. Os min-height que a usavam voltam ao tamanho. */
body.ver-como { --topbar-h: calc(56px + var(--vercomo-h)); }
body.ver-como .topbar { top: var(--vercomo-h); min-height: 56px; }
body.ver-como .topbar--nav { min-height: 54px; }
body.ver-como .sidebar__brand { min-height: 56px; }
@media (max-width: 719px) {
  .vercomo { padding: 6px 12px; }
  .vercomo__txt small { display: none; }
}

/* ===========================================================================
   SPEC-46 — responsivo em TODO tipo de tela (2026-08-26)
   Celular em pé, celular deitado, tablet, notebook e monitor. O que está neste
   bloco mora no shell, então vale para as 66 telas de uma vez. Nenhuma cor
   muda aqui: só tamanho, alcance e o que pode ou não ser recortado.
   =========================================================================== */

/* O Safari do iPhone infla o texto sozinho quando o telefone gira para
   paisagem. Cinco CSS de tela já pediam isso cada um por conta; agora é uma
   vez só, para todas. */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* A gaveta e o casco mediam 100vh. No iPhone a barra do navegador entra POR
   CIMA dos últimos pixels dessa conta, e o rodapé da gaveta (Minha conta ·
   Sair) ficava embaixo dela — inalcançável. `dvh` é a altura que sobra de
   verdade; quem não conhece a unidade continua com o 100vh de cima. */
@supports (height: 100dvh) {
  .shell { min-height: 100dvh; }
  .sidebar { height: 100dvh; }
}

/* --- nenhuma aba da barra superior some ---
   `.topnav` recorta (overflow: hidden). Entre 981px e ~1010px o burger já não
   existe (ele só volta em 980) e a última aba era comida pelo recorte: a seção
   inteira ficava inalcançável nessa faixa, em TODAS as telas. Duas defesas:
   (1) o nome do bot cede largura nessa faixa, que é o bastante para as abas de
   hoje caberem inteiras; (2) se um dia entrarem mais abas do que a barra
   aguenta, ela ROLA em vez de esconder o fim — o dono passa o dedo/scroll e
   chega lá. O `flex-shrink` continua o padrão de propósito: com a barra
   travada, uma aba a mais empurraria a página inteira para o lado. */
body.shell-top .topnav {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}

body.shell-top .topnav::-webkit-scrollbar { display: none; }

@media (min-width: 981px) and (max-width: 1200px) {
  .topbar--nav .bot-hero select { max-width: 116px; }
}

/* Na faixa mais apertada (o burger ainda não voltou e as abas já não cabem) o
   Painel admin fica só com o escudo — o rótulo volta assim que há espaço. É a
   mesma degradação que ele já fazia no celular, um degrau antes. Navegar vale
   mais que rotular um atalho. */
@media (min-width: 981px) and (max-width: 1120px) {
  .topbar--nav .topbar__admin,
  .topbar--nav .topbar__revenda {
    width: 30px;
    padding: 0;
    justify-content: center;
  }

  .topbar--nav .topbar__admin span,
  .topbar--nav .topbar__revenda span { display: none; }
}

/* O seletor de bot media 19px de altura no telefone (o dedo erra) e a fonte
   12px fazia o iOS dar zoom ao focar. Cresce sem sair do lugar; o nome longo
   já truncava antes. A marca vira alvo de toque decente pelo mesmo motivo. */
@media (max-width: 719px) {
  .topbar--nav .bot-hero { height: 34px; }
  .topbar--nav .bot-hero select { height: 32px; font-size: 16px; }
  .topnav__brand { min-height: 32px; min-width: 32px; align-items: center; justify-content: center; }
}

/* SPEC-68 fechamento (rodada 2, DONO-1): o "efeito" do modal de confirmação é
   prosa com <strong> — `.note{display:flex}` do loja.css fatiava cada filho em
   coluna e a lista longa vazava pela direita. Vale na casa toda (a casca). */
#modal-confirmar #confirmar-efeito { display: block; overflow-wrap: anywhere; }
#modal-confirmar .confirmar__linhas li { overflow-wrap: anywhere; white-space: normal; }
#modal-confirmar .modal__body { overflow-x: hidden; }

/* SPEC-68 fechamento (RESP-6): alvos de toque da casca ≥ 44 px */
@media (pointer: coarse) {
  .topbar--nav .search-trigger, .topbar--nav .topbar__tema, .topbar__burger, .ac-ibtn { min-width: 44px; min-height: 44px; }
  .topbar--nav .bot-hero, .topbar--nav .bot-hero select, #usr-ordem { min-height: 44px; }
}
/* SPEC-68 fechamento (RESP-7): com o seletor de bot, a barra superior escondia
   "Configurações" entre 981 e 1366 px sem afordância de rolagem — o seletor
   fica curto e a marca perde o texto nessa faixa; o fim da barra some em
   degradê (dá para ver que rola). */
@media (min-width: 981px) and (max-width: 1439px) {
  .topbar--nav .bot-hero select { max-width: 116px; }
  .topnav__brand span { display: none; }
  .topnav__item { padding-inline: 7px; }
}
body.shell-top .topnav {
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
  mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
}
