/* TreeAmi Fiscaliza — tema do sistema (Bootstrap 5.3 + Font Awesome Free, hospedados em /assets/vendor).
   Tokens: identidade/identity-tokens.css (Manual Visual TreeAmi V02). Marca oficial e imutável; só as variáveis
   --ui-* são extensão de interface. O dourado é código de navegação: aparece em filete e etiqueta, nunca como
   preenchimento grande nem como texto pequeno sobre fundo claro (reprova contraste AA).
   Layout de referência aprovado em 07/11/2026: _docs/14-style-preview-fiscaliza.html.
   Carregado DEPOIS do Bootstrap: aqui só se sobrepõem variáveis e se acrescentam componentes. */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/inter-400.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/inter-500.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/inter-600.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/inter-700.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/figtree-700.woff2") format("woff2"); }

:root {
  --brand-green: #006837;
  --brand-green-light: #6E9F40;
  --brand-gold: #C59A35;
  --brand-brown: #8B4513;
  --brand-sand: #E8DCC6;
  --brand-ink: #17251E;
  --brand-off-white: #F8F5ED;

  --ui-bg: #F8F5ED;
  --ui-surface: #FFFFFF;
  --ui-text: #17251E;
  --ui-text-muted: #526158;
  --ui-border-subtle: #D9DED8;
  --ui-border-control: #7C877F;
  --ui-primary: #8B4513;
  --ui-primary-hover: #70370F;
  --ui-link-focus: #006837;
  --ui-selected-bg: #EAF3ED;
  --ui-on-primary: #FFFFFF;
  --ui-success: #176B3A;
  --ui-warning: #805B00;
  --ui-danger: #B42318;
  --ui-info: #175CD3;
  --ui-success-bg: #EDF7EF;
  --ui-warning-bg: #FFF6DB;
  --ui-danger-bg: #FEF3F2;
  --ui-info-bg: #EFF6FF;

  --font-ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Figtree", var(--font-ui);

  --raio: 0.75rem;
  --largura-menu: 15rem;

  /* Bootstrap com a paleta da marca */
  --bs-body-font-family: var(--font-ui);
  --bs-body-font-size: 0.9375rem;
  --bs-body-color: var(--ui-text);
  --bs-body-color-rgb: 23, 37, 30;
  --bs-body-bg: var(--ui-bg);
  --bs-body-bg-rgb: 248, 245, 237;
  --bs-secondary-color: var(--ui-text-muted);
  --bs-border-color: var(--ui-border-subtle);
  --bs-link-color: var(--ui-link-focus);
  --bs-link-color-rgb: 0, 104, 55;
  --bs-link-hover-color: var(--brand-ink);
  --bs-link-hover-color-rgb: 23, 37, 30;
  --bs-primary: var(--ui-primary);
  --bs-primary-rgb: 139, 69, 19;
  --bs-success: var(--ui-success);
  --bs-success-rgb: 23, 107, 58;
  --bs-danger: var(--ui-danger);
  --bs-danger-rgb: 180, 35, 24;
  --bs-warning: var(--ui-warning);
  --bs-warning-rgb: 128, 91, 0;
  --bs-info: var(--ui-info);
  --bs-info-rgb: 23, 92, 211;
  --bs-border-radius: 0.5rem;
  --bs-focus-ring-color: rgba(0, 104, 55, 0.35);
}

body { min-height: 100vh; }
h1, h2, h3, h4 { color: var(--brand-brown); }
h1 { font-family: var(--font-display); font-size: 1.6rem; line-height: 1.25; margin: 0 0 1rem; }
h2 { font-family: var(--font-display); font-size: 1.15rem; margin: 1.5rem 0 0.75rem; }
h3 { font-size: 1rem; margin: 1.25rem 0 0.5rem; }

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible,
.btn:focus-visible, .form-control:focus, .form-select:focus {
  outline: 3px solid var(--ui-link-focus);
  outline-offset: 2px;
  box-shadow: none;
}

/* Botões primário e perigo com as cores da marca */
.btn-primary {
  --bs-btn-bg: var(--ui-primary); --bs-btn-border-color: var(--ui-primary); --bs-btn-color: #fff;
  --bs-btn-hover-bg: var(--ui-primary-hover); --bs-btn-hover-border-color: var(--ui-primary-hover); --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: var(--ui-primary-hover); --bs-btn-active-border-color: var(--ui-primary-hover); --bs-btn-active-color: #fff;
  --bs-btn-disabled-bg: var(--ui-primary); --bs-btn-disabled-border-color: var(--ui-primary);
}
.btn-outline-danger {
  --bs-btn-color: var(--ui-danger); --bs-btn-border-color: var(--ui-danger);
  --bs-btn-hover-bg: var(--ui-danger); --bs-btn-hover-border-color: var(--ui-danger); --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: var(--ui-danger); --bs-btn-active-border-color: var(--ui-danger);
}
.btn-outline-secondary { --bs-btn-color: var(--ui-text); --bs-btn-border-color: var(--ui-border-control); --bs-btn-hover-bg: var(--ui-bg); --bs-btn-hover-color: var(--ui-text); --bs-btn-hover-border-color: var(--ui-border-control); }

.pular { position: fixed; top: -100px; left: 0.5rem; z-index: 2000; padding: 0.75rem 1rem; background: #fff; border-radius: 0.5rem; }
.pular:focus { top: 0.5rem; }

.eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.75rem; font-weight: 700; color: var(--ui-text-muted); }

.etiqueta {
  background: var(--brand-ink); color: var(--brand-gold); border-radius: 999px;
  padding: 0.25rem 0.75rem; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.02em; white-space: nowrap;
}

/* ---------- Estrutura do sistema: menu lateral + área de trabalho ---------- */
.app { display: grid; grid-template-columns: 1fr; min-height: 100vh; }
@media (min-width: 992px) { .app { grid-template-columns: var(--largura-menu) minmax(0, 1fr); } }

.menu-lateral { background: #fff; border-right: 1px solid var(--ui-border-subtle); --bs-offcanvas-width: 17rem; }
@media (min-width: 992px) {
  .menu-lateral { position: sticky; top: 0; height: 100vh; overflow-y: auto; }
}
.menu-lateral .offcanvas-body { display: flex; padding-bottom: 1rem; }
.menu-marca { display: block; padding: 1.5rem 1.25rem 0.5rem; }
.menu-marca img { display: block; width: 10rem; height: auto; }
.produto { padding: 1rem 1.25rem; border-bottom: 1px solid var(--ui-border-subtle); }
.produto strong { display: block; margin-top: 0.25rem; font-size: 1rem; }
.filete-dourado { display: inline-block; width: 1.4rem; height: 3px; margin-right: 0.45rem; vertical-align: middle; background: var(--brand-gold); }

.menu-nav { padding: 0.75rem 0.75rem 0; display: flex; flex-direction: column; gap: 0.15rem; }
.menu-grupo { margin: 0.9rem 0.75rem 0.25rem; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ui-text-muted); }
.menu-item {
  position: relative; display: flex; align-items: center; gap: 0.75rem; width: 100%;
  padding: 0.55rem 0.75rem; border: 0; border-radius: 0.5rem; background: transparent;
  color: var(--ui-text); font-weight: 500; font-size: 0.9375rem; text-align: left; text-decoration: none; cursor: pointer;
}
.menu-item:hover { background: var(--ui-bg); color: var(--ui-text); }
.menu-item[aria-current="page"] { background: var(--ui-bg); font-weight: 700; }
.menu-item[aria-current="page"]::before { content: ""; position: absolute; left: 0; top: 0.5rem; bottom: 0.5rem; width: 3px; background: var(--brand-gold); border-radius: 2px; }
.menu-item i { color: var(--ui-text-muted); }
.menu-item[aria-current="page"] i { color: var(--brand-brown); }
.menu-sair:hover { background: var(--ui-danger-bg); color: var(--ui-danger); }
.menu-sair:hover i { color: var(--ui-danger); }
.menu-rodape { margin-top: auto; padding: 1rem 0.75rem 0; border-top: 1px solid var(--ui-border-subtle); }
.menu-rodape .rodape { margin: 0.75rem 0.75rem 0; text-align: left; }

.area { min-width: 0; display: flex; flex-direction: column; }
.topo {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  min-height: 3.75rem; padding: 0.6rem 1rem; background: #fff; border-bottom: 1px solid var(--ui-border-subtle);
}
.topo-caminho { color: var(--ui-text-muted); font-size: 0.8125rem; margin-right: auto; }
@media (min-width: 992px) { .topo { padding: 0.75rem 2rem; } }
.conteudo { width: 100%; max-width: 90rem; padding: 1.25rem 1rem 2.5rem; }
@media (min-width: 992px) { .conteudo { padding: 2rem 2rem 3rem; } }

/* ---------- Cartão, tabela e compatibilidade com as telas existentes ---------- */
.cartao {
  background: var(--ui-surface); border: 1px solid var(--ui-border-subtle);
  border-top: 4px solid var(--brand-gold); border-radius: var(--raio); padding: 1.25rem; margin-bottom: 1.25rem;
}
@media (min-width: 768px) { .cartao { padding: 1.5rem; } }
.cartao p { margin: 0 0 1rem; }

/* Tabela: nunca passa da borda do cartão. O app.js embrulha cada <table> em .tabela-rolavel; sem JS, rola o próprio bloco. */
.tabela-rolavel { width: 100%; overflow-x: auto; margin: 0 0 1rem; -webkit-overflow-scrolling: touch; }
.cartao table { width: 100%; border-collapse: collapse; margin: 0 0 1rem; font-size: 0.875rem; }
.tabela-rolavel > table { margin-bottom: 0; }
.cartao > table { display: block; max-width: 100%; overflow-x: auto; }
.tabela-rolavel > table { display: table; }
.cartao th, .cartao td { text-align: left; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--ui-border-subtle); vertical-align: middle; }
.cartao thead th { font-size: 0.75rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ui-text-muted); background: var(--ui-bg); font-weight: 600; white-space: nowrap; }
.cartao tbody tr:hover { background: var(--ui-selected-bg); }
.cartao table form { margin: 0; display: inline-block; }
.cartao td form + form { margin-left: 0.35rem; }

/* Formulários antigos (sem classes Bootstrap) com o mesmo aspecto de .form-control */
.cartao label { display: block; margin: 1rem 0 0.25rem; font-weight: 600; font-size: 0.875rem; }
.cartao input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]):not([type="submit"]),
.cartao select, .cartao textarea {
  display: block; width: 100%; max-width: 40rem; min-height: 2.5rem; padding: 0.5rem 0.75rem;
  border: 1px solid var(--ui-border-control); border-radius: 0.5rem; background: #fff; color: var(--ui-text); font: inherit;
}
.cartao textarea { max-width: 100%; }
.cartao input[type="checkbox"], .cartao input[type="radio"] { width: 1.1rem; height: 1.1rem; accent-color: var(--brand-green); vertical-align: middle; margin-right: 0.4rem; }
.cartao input[type="file"] { max-width: 100%; }
.cartao td input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), .cartao td select { max-width: 100%; }

/* Botões antigos (<button> sem classe): primário da marca */
.cartao button:not(.btn):not(.link):not(.btn-close) {
  display: inline-block; min-height: 2.5rem; margin-top: 0.75rem; padding: 0.4rem 1.1rem; border: 1px solid var(--ui-primary);
  border-radius: 0.5rem; background: var(--ui-primary); color: var(--ui-on-primary); font: inherit; font-weight: 600; cursor: pointer;
}
.cartao button:not(.btn):not(.link):not(.btn-close):hover { background: var(--ui-primary-hover); border-color: var(--ui-primary-hover); }
.cartao td button:not(.btn):not(.link) { margin-top: 0; min-height: 2.1rem; padding: 0.2rem 0.75rem; font-size: 0.8125rem; }
/* Ação de menor peso e ação perigosa: o texto do botão ainda é o mesmo, mas o peso visual muda (classe ganha nas telas migradas) */
.cartao button.btn { margin-top: 0; }

button.link { min-height: 0; margin: 0.5rem 0 0; padding: 0; border: 0; background: none; color: var(--ui-link-focus); font: inherit; text-decoration: underline; cursor: pointer; }
button.link:hover { color: var(--brand-ink); }
form.secundario { margin-top: 0.5rem; }
.em-linha { display: inline-block; margin: 0 0.25rem 0.25rem 0; }

.erro, .aviso { padding: 0.75rem 1rem; border-radius: 0.5rem; font-weight: 600; }
.erro { background: var(--ui-danger-bg); color: var(--ui-danger); border: 1px solid var(--ui-danger); }
.aviso { background: var(--ui-success-bg); color: var(--ui-success); border: 1px solid var(--ui-success); }
.dica { color: var(--ui-text-muted); font-size: 0.8125rem; }
span.erro, span.aviso { padding: 0; border: 0; background: none; font-weight: 600; }

.segredo {
  padding: 0.75rem 1rem; background: var(--brand-sand); border-radius: 0.5rem; color: var(--brand-ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.125rem; font-weight: 700; letter-spacing: 0.08em; word-break: break-all;
}
ol { margin: 0 0 1rem; padding-left: 1.25rem; }
li { margin-bottom: 0.5rem; }
.lista-marcas { list-style: none; padding: 0; margin: 0 0 1rem; columns: 1; }
@media (min-width: 768px) { .lista-marcas { columns: 2; } }
.lista-marcas label { display: block; margin: 0 0 0.35rem; font-weight: 400; }

/* ---------- Telas de acesso (sem menu) ---------- */
.tela { width: 100%; max-width: 28rem; margin: 0 auto; padding: 2rem 1rem 3rem; }
.tela .cartao input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]) { max-width: 100%; }
.marca { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.marca img { display: block; max-width: 55%; height: auto; }

/* Rodapé com a versão do sistema (login e telas logadas) */
.rodape { margin-top: 1.5rem; text-align: center; font-size: 0.8125rem; color: var(--ui-text-muted); }
.rodape .versao { font-weight: 600; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
@media print { .menu-lateral, .topo, .pular { display: none !important; } .app { display: block; } .conteudo { padding: 0; max-width: none; } }

/* ---------- Imagens do Bootstrap sem URI de dados ----------
   O Bootstrap embute SVG como URI de dados (botão de fechar, seta do select, visto e ponto das caixas). A CSP não libera
   esse tipo de URI em img-src de propósito; estes arquivos do próprio domínio tomam o lugar (teste: InterfaceSemInlineTest). */
.btn-close { --bs-btn-close-bg: url("/assets/img/fechar.svg"); --bs-btn-close-focus-shadow: 0 0 0 0.2rem rgba(0, 104, 55, 0.35); }
.form-select { --bs-form-select-bg-img: url("/assets/img/seta.svg"); }
.form-check-input { accent-color: var(--brand-green); }
.form-check-input:checked { background-color: var(--brand-green); border-color: var(--brand-green); }
.form-check-input:checked[type="checkbox"] { --bs-form-check-bg-image: url("/assets/img/visto.svg"); }
.form-check-input:checked[type="radio"] { --bs-form-check-bg-image: url("/assets/img/ponto.svg"); }

/* ================= Telas de acesso (entrar, MFA, senha): painel da marca + formulário =================
   Duas colunas no computador, faixa de marca no topo no celular. Só CSS (nada inline). As animações são sutis e
   desligam sozinhas com "reduzir movimento" (regra global acima). */
body.tela-simples { background: var(--ui-bg); }
.acesso { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 992px) { .acesso { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); } }

.acesso-painel {
  position: relative; overflow: hidden; color: #fff; padding: 1.75rem 1.5rem; isolation: isolate;
  background: linear-gradient(135deg, #003F22 0%, #006837 50%, #1B7A44 100%); background-size: 220% 220%;
  animation: acesso-gradiente 20s ease-in-out infinite;
  display: flex; flex-direction: column; justify-content: center;
}
@media (min-width: 992px) { .acesso-painel { padding: 4rem 4rem; min-height: 100vh; } }
.acesso-painel::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0.5;
  background-image: linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 2.5rem 2.5rem;
  -webkit-mask-image: radial-gradient(circle at 30% 40%, #000 0%, transparent 75%); mask-image: radial-gradient(circle at 30% 40%, #000 0%, transparent 75%);
}
.acesso-orbes span { position: absolute; z-index: -1; border-radius: 50%; filter: blur(2px); animation: acesso-flutuar 14s ease-in-out infinite; }
.acesso-orbes span:nth-child(1) { width: 22rem; height: 22rem; right: -7rem; top: -6rem; background: radial-gradient(circle at 30% 30%, rgba(110, 159, 64, 0.55), rgba(110, 159, 64, 0) 70%); }
.acesso-orbes span:nth-child(2) { width: 16rem; height: 16rem; left: -5rem; bottom: -5rem; background: radial-gradient(circle at 60% 40%, rgba(197, 154, 53, 0.35), rgba(197, 154, 53, 0) 70%); animation-delay: -5s; animation-duration: 18s; }
.acesso-orbes span:nth-child(3) { width: 9rem; height: 9rem; right: 18%; bottom: 14%; background: radial-gradient(circle, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0) 70%); animation-delay: -9s; animation-duration: 11s; }

.eyebrow-claro { display: inline-block; text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.75rem; font-weight: 700; color: var(--brand-sand); }
.acesso-titulo { color: #fff; font-family: var(--font-display); font-size: clamp(1.35rem, 2.6vw, 2.4rem); line-height: 1.2; margin: 0.6rem 0 0; max-width: 30rem; animation: acesso-subir 0.8s 0.15s cubic-bezier(0.22, 0.8, 0.3, 1) both; }
.acesso-filete { display: block; width: 4rem; height: 4px; margin: 1.25rem 0 0; border-radius: 2px; background: var(--brand-gold); transform-origin: left; animation: acesso-filete 1s 0.5s cubic-bezier(0.22, 0.8, 0.3, 1) both; }
.acesso-pontos { display: none; list-style: none; padding: 0; margin: 2rem 0 0; max-width: 30rem; }
@media (min-width: 992px) { .acesso-pontos { display: block; } }
.acesso-pontos li { display: flex; gap: 0.9rem; align-items: flex-start; margin: 0 0 1.1rem; color: rgba(255, 255, 255, 0.92); line-height: 1.45; animation: acesso-subir 0.8s cubic-bezier(0.22, 0.8, 0.3, 1) both; }
.acesso-pontos li:nth-child(1) { animation-delay: 0.45s; }
.acesso-pontos li:nth-child(2) { animation-delay: 0.6s; }
.acesso-pontos li:nth-child(3) { animation-delay: 0.75s; }
.acesso-pontos i { flex: 0 0 2.25rem; height: 2.25rem; display: grid; place-items: center; border-radius: 0.65rem; background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.2); color: #fff; }

.tela-simples .tela { align-self: center; max-width: 30rem; padding: 2rem 1.25rem 3rem; }
@media (min-width: 992px) { .tela-simples .tela { padding: 3rem 2rem; } }
.tela-simples .marca { animation: acesso-subir 0.7s cubic-bezier(0.22, 0.8, 0.3, 1) both; }
.tela-simples .marca img { max-width: 11rem; }
.tela-simples .cartao {
  border-radius: 1rem; border: 1px solid var(--ui-border-subtle); border-top: 4px solid var(--brand-gold);
  box-shadow: 0 18px 40px -18px rgba(23, 37, 30, 0.35); padding: 1.75rem 1.5rem;
  animation: acesso-subir 0.8s 0.1s cubic-bezier(0.22, 0.8, 0.3, 1) both;
}
.tela-simples .cartao h1 { font-size: 1.5rem; margin-bottom: 0.25rem; }
.tela-simples .cartao .acesso-sub { color: var(--ui-text-muted); margin: 0 0 1.25rem; }
.tela-simples .cartao button[type="submit"]:not(.btn) { width: 100%; min-height: 2.9rem; margin-top: 1.25rem; border-radius: 0.65rem; font-size: 1rem; transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease; }
.tela-simples .cartao button[type="submit"]:not(.btn):hover { transform: translateY(-1px); box-shadow: 0 8px 18px -8px rgba(139, 69, 19, 0.6); }
.tela-simples .cartao input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]) { min-height: 2.9rem; border-radius: 0.65rem; transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.tela-simples .cartao input:focus { border-color: var(--brand-green); box-shadow: 0 0 0 4px rgba(0, 104, 55, 0.15); }

.campo-icone { position: relative; }
.campo-icone > i { position: absolute; left: 0.9rem; top: 50%; transform: translateY(-50%); color: var(--ui-text-muted); pointer-events: none; }
/* Mesma especificidade da regra geral dos campos (".cartao input:not(...)"), senão o recuo para o ícone perde e o texto passa por cima dele. */
.tela-simples .cartao .campo-icone input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]):not([type="submit"]) { padding-left: 2.6rem; }
.tela-simples .cartao .campo-icone input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]):not([type="submit"])[data-senha] { padding-right: 3rem; }
.campo-icone .olho { position: absolute; right: 0.35rem; top: 50%; transform: translateY(-50%); width: 2.4rem; height: 2.4rem; padding: 0; border: 0; background: none; color: var(--ui-text-muted); border-radius: 0.5rem; }
.campo-icone .olho:hover { color: var(--brand-green); background: var(--ui-selected-bg); }
.tela-simples .rodape { margin-top: 1.5rem; }

@keyframes acesso-gradiente { 0%, 100% { background-position: 0% 40%; } 50% { background-position: 100% 60%; } }
@keyframes acesso-flutuar { 0%, 100% { transform: translate3d(0, 0, 0) scale(1); } 50% { transform: translate3d(1.5rem, -1.25rem, 0) scale(1.08); } }
@keyframes acesso-subir { from { opacity: 0; transform: translate3d(0, 14px, 0); } to { opacity: 1; transform: translate3d(0, 0, 0); } }
@keyframes acesso-filete { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ================= Acompanhamento do projeto (Controle) ================= */
.acomp-hero {
  position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; align-items: center;
  padding: 1.75rem 1.5rem; margin-bottom: 1.25rem; border-radius: 1.25rem; color: #fff; isolation: isolate;
  background: linear-gradient(135deg, #003F22 0%, #006837 55%, #1B7A44 100%); background-size: 220% 220%;
  animation: acesso-gradiente 22s ease-in-out infinite, acesso-subir 0.7s cubic-bezier(0.22, 0.8, 0.3, 1) both;
  box-shadow: 0 24px 50px -28px rgba(0, 63, 34, 0.7);
}
@media (min-width: 768px) { .acomp-hero { grid-template-columns: minmax(0, 1fr) auto; padding: 2.25rem 2.5rem; } }
.acomp-hero::after { content: ""; position: absolute; z-index: -1; width: 24rem; height: 24rem; right: -8rem; top: -9rem; border-radius: 50%; background: radial-gradient(circle, rgba(197, 154, 53, 0.35), rgba(197, 154, 53, 0) 70%); animation: acesso-flutuar 16s ease-in-out infinite; }
.acomp-hero h1 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.4rem); margin: 0.35rem 0 0.5rem; }
.acomp-lead { max-width: 38rem; margin: 0 0 1.25rem; color: rgba(255, 255, 255, 0.92); }
.acomp-fatos { display: flex; flex-wrap: wrap; gap: 0.75rem 2rem; margin: 0; }
.acomp-fatos dt { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--brand-sand); font-weight: 600; }
.acomp-fatos dd { margin: 0.1rem 0 0; font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; }
.acomp-hero-anel { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.acomp-hero-legenda { font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--brand-sand); font-weight: 600; }

.anel { display: block; height: auto; }
.anel-grande { width: 10.5rem; }
.anel-medio { width: 4.75rem; flex: 0 0 auto; margin-left: auto; }
.anel-fundo { stroke: rgba(0, 104, 55, 0.13); }
.anel-valor { stroke: var(--brand-green); animation: anel-encher 1.5s 0.2s cubic-bezier(0.22, 0.8, 0.3, 1) both; }
.anel-texto { font-family: var(--font-display); font-weight: 700; font-size: 8px; fill: var(--brand-ink); }
.acomp-hero .anel-fundo { stroke: rgba(255, 255, 255, 0.2); }
.acomp-hero .anel-valor { stroke: #fff; }
.acomp-hero .anel-texto { fill: #fff; font-size: 9px; }
@keyframes anel-encher { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }

.acomp-numeros { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.85rem; margin-bottom: 0.5rem; }
@media (min-width: 992px) { .acomp-numeros { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; } }
.acomp-num { position: relative; display: flex; flex-direction: column; gap: 0.15rem; padding: 1.1rem 1.15rem; background: var(--ui-surface); border: 1px solid var(--ui-border-subtle); border-radius: 1rem; animation: acesso-subir 0.7s both cubic-bezier(0.22, 0.8, 0.3, 1); transition: transform 0.2s ease, box-shadow 0.2s ease; }
.acomp-num:hover { transform: translateY(-3px); box-shadow: 0 14px 28px -18px rgba(23, 37, 30, 0.45); }
.acomp-num:nth-child(1) { animation-delay: 0.1s; } .acomp-num:nth-child(2) { animation-delay: 0.18s; } .acomp-num:nth-child(3) { animation-delay: 0.26s; } .acomp-num:nth-child(4) { animation-delay: 0.34s; }
.acomp-num i { font-size: 1.25rem; margin-bottom: 0.4rem; }
.acomp-num strong { font-family: var(--font-display); font-size: 2.1rem; line-height: 1; color: var(--brand-ink); }
.acomp-num span { color: var(--ui-text-muted); font-size: 0.875rem; }
.acomp-feito i { color: var(--ui-success); }
.acomp-parcial i { color: #A37A12; }
.acomp-pendente i { color: var(--ui-text-muted); }
.acomp-total i { color: var(--brand-brown); }

.acomp-titulo { display: flex; align-items: center; gap: 0.75rem; margin: 2rem 0 0.9rem; font-size: 1.2rem; }
.acomp-titulo::before { content: ""; width: 1.4rem; height: 3px; background: var(--brand-gold); }
.acomp-areas { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
@media (min-width: 768px) { .acomp-areas { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .acomp-areas { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.acomp-area { padding: 1.15rem; background: var(--ui-surface); border: 1px solid var(--ui-border-subtle); border-radius: 1rem; animation: acesso-subir 0.7s both cubic-bezier(0.22, 0.8, 0.3, 1); transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease; }
.acomp-area:hover { transform: translateY(-3px); border-color: var(--brand-green-light); box-shadow: 0 16px 30px -20px rgba(0, 104, 55, 0.6); }
.acomp-area:nth-child(2) { animation-delay: 0.08s; } .acomp-area:nth-child(3) { animation-delay: 0.16s; } .acomp-area:nth-child(4) { animation-delay: 0.24s; } .acomp-area:nth-child(5) { animation-delay: 0.32s; }
.acomp-area-topo { display: flex; align-items: center; gap: 0.85rem; }
.acomp-area h3 { margin: 0; font-size: 1.05rem; color: var(--brand-ink); }
.acomp-area p { margin: 0.1rem 0 0; font-size: 0.8125rem; color: var(--ui-text-muted); }
.acomp-icone { flex: 0 0 2.75rem; height: 2.75rem; display: grid; place-items: center; border-radius: 0.8rem; background: var(--ui-selected-bg); color: var(--brand-green); font-size: 1.2rem; }
.acomp-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0; margin: 1rem 0 0; }
.chip { padding: 0.2rem 0.65rem; border-radius: 999px; font-size: 0.8125rem; margin: 0; }
.chip-feito { background: var(--ui-success-bg); color: var(--ui-success); }
.chip-parcial { background: var(--ui-warning-bg); color: var(--ui-warning); }
.chip-pendente { background: #EEF0EE; color: var(--ui-text-muted); }

.acomp-fases { padding: 0.5rem 1.25rem; }
.acomp-fase { display: grid; grid-template-columns: minmax(0, 1fr) 3rem; grid-template-areas: "nome pct" "barra barra"; gap: 0.35rem 0.75rem; align-items: center; padding: 0.8rem 0; border-bottom: 1px solid var(--ui-border-subtle); }
.acomp-fase:last-child { border-bottom: 0; }
@media (min-width: 768px) { .acomp-fase { grid-template-columns: 16rem minmax(0, 1fr) 3rem; grid-template-areas: "nome barra pct"; gap: 1rem; } }
.acomp-fase-nome { grid-area: nome; font-weight: 600; }
.acomp-barra { grid-area: barra; }
.acomp-fase-pct { grid-area: pct; text-align: right; font-weight: 700; font-family: var(--font-display); }
.acomp-barra { -webkit-appearance: none; appearance: none; width: 100%; height: 0.65rem; border: 0; border-radius: 999px; overflow: hidden; background: #E4EBE6; color: var(--brand-green); }
.acomp-barra::-webkit-progress-bar { background: #E4EBE6; border-radius: 999px; }
.acomp-barra::-webkit-progress-value { background: linear-gradient(90deg, var(--brand-green), var(--brand-green-light)); border-radius: 999px; }
.acomp-barra::-moz-progress-bar { background: linear-gradient(90deg, var(--brand-green), var(--brand-green-light)); border-radius: 999px; }

.acomp-detalhe summary { cursor: pointer; display: flex; align-items: baseline; gap: 0.75rem; }
.acomp-itens { list-style: none; padding: 0; margin: 0.75rem 0 0; }
.acomp-item { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 0.75rem; padding: 0.75rem 0; border-top: 1px solid var(--ui-border-subtle); margin: 0; }
@media (max-width: 575px) { .acomp-item { grid-template-columns: minmax(0, 1fr); } }
.acomp-item p { margin: 0.25rem 0 0; }
.acomp-falta { color: var(--ui-warning); font-size: 0.875rem; }
.selo { align-self: start; justify-self: start; padding: 0.2rem 0.6rem; border-radius: 999px; font-size: 0.75rem; font-weight: 700; white-space: nowrap; }
.selo-feito { background: var(--ui-success-bg); color: var(--ui-success); }
.selo-parcial { background: var(--ui-warning-bg); color: var(--ui-warning); }
.selo-pendente { background: #EEF0EE; color: var(--ui-text-muted); }
.selo-decisao { background: var(--ui-info-bg); color: var(--ui-info); }
.selo-futuro { background: var(--brand-sand); color: var(--brand-ink); }

/* Faixa de manutenção (aviso programado ou em andamento) no topo de todas as telas da instância. */
.faixa-manutencao {
  background: var(--brand-gold);
  color: var(--brand-ink);
  font-weight: 600;
  padding: 0.6rem 1rem;
  text-align: center;
  border-bottom: 2px solid var(--ui-primary);
}

/* Logo da entidade sindical da instância (fica num chip claro para ler bem nos dois temas) */
.logo-entidade { background: #fff; border-radius: 0.75rem; box-shadow: 0 1px 3px rgba(15, 30, 60, 0.12); }
.logo-entidade img { display: block; height: auto; max-width: 100%; }
.logo-entidade-acesso { margin: 0 auto 1.25rem; padding: 0.5rem 1rem; max-width: 17rem; }
.logo-entidade-menu { margin: 0.5rem 1.25rem 0.75rem; padding: 0.35rem 0.6rem; }

/* QR code do autenticador (fundo branco fixo para o leitor do celular, em qualquer tema) */
.qr-mfa { background: #fff; padding: 0.75rem; border-radius: 0.75rem; width: max-content; max-width: 100%; margin: 0.5rem auto 1rem; }
.qr-mfa svg { display: block; width: 15rem; height: 15rem; max-width: 100%; }

/* ===== Painel inicial da instância (gráficos em SVG, sem script) ===== */
:root { --g1: #1F6F4A; --g2: #8B4513; --g3: #2F6DB5; --g4: #C98A12; --g5: #7A5C99; --g6: #6B7A72; }
.painel-topo { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.painel-topo h1 { margin: 0 0 0.25rem; }
.painel-topo .dica { margin: 0; }
.painel-alerta { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.6rem 1rem; border-radius: 999px; background: var(--ui-warning-bg); color: var(--ui-warning); border: 1px solid var(--ui-warning); text-decoration: none; font-size: 0.875rem; }
.painel-alerta:hover { background: var(--ui-warning); color: #fff; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr)); gap: 0.85rem; margin-bottom: 1.25rem; }
.kpi { position: relative; display: flex; flex-direction: column; gap: 0.15rem; padding: 1rem 1rem 0.9rem; background: var(--ui-surface); border: 1px solid var(--ui-border-subtle); border-radius: 0.9rem; text-decoration: none; color: var(--ui-text); box-shadow: 0 1px 2px rgba(15, 30, 20, 0.05); transition: transform 0.15s ease, box-shadow 0.15s ease; overflow: hidden; }
.kpi::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--kpi-cor, var(--g1)); }
.kpi:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(15, 30, 20, 0.1); }
.kpi-icone { color: var(--kpi-cor, var(--g1)); font-size: 1.1rem; }
.kpi-valor { font-size: 2rem; font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; }
.kpi-rotulo { font-size: 0.8rem; color: var(--ui-text-muted); }
.k-verde { --kpi-cor: var(--g1); } .k-azul { --kpi-cor: var(--g3); } .k-marrom { --kpi-cor: var(--g2); } .k-ambar { --kpi-cor: var(--g4); } .k-neutro { --kpi-cor: var(--g6); }
.painel-grade { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-bottom: 1.25rem; }
@media (min-width: 992px) { .painel-grade { grid-template-columns: repeat(3, 1fr); } .graf-largo { grid-column: span 2; } }
.graf { margin: 0; }
.graf h2 { font-size: 1rem; margin: 0 0 0.25rem; }
.graf .dica { font-size: 0.8rem; margin-bottom: 0.5rem; }
.graf .vazio { color: var(--ui-text-muted); font-size: 0.875rem; padding: 1.5rem 0; text-align: center; margin: 0; }
.graf-svg { width: 100%; height: auto; display: block; }
.eixo-grade { stroke: var(--ui-border-subtle); stroke-width: 1; stroke-dasharray: 3 4; }
.eixo-base { stroke: var(--ui-border-control); stroke-width: 1; }
.barra { fill: var(--g1); } .barra-alerta { fill: var(--g4); } .barra:hover { opacity: 0.8; }
.graf-valor { fill: var(--ui-text); font-size: 11px; font-weight: 700; }
.graf-eixo { fill: var(--ui-text-muted); font-size: 10px; }
.rosca { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.rosca-svg { width: 9.5rem; height: 9.5rem; flex: none; }
.rosca-fundo { stroke: var(--ui-selected-bg); }
.rosca-fatia.g1 { stroke: var(--g1); } .rosca-fatia.g2 { stroke: var(--g3); } .rosca-fatia.g3 { stroke: var(--g4); }
.rosca-total { fill: var(--ui-text); font-size: 7px; font-weight: 700; } .rosca-sub { fill: var(--ui-text-muted); font-size: 2.6px; }
.legenda { list-style: none; margin: 0; padding: 0; font-size: 0.85rem; display: grid; gap: 0.4rem; }
.ponto { display: inline-block; width: 0.7rem; height: 0.7rem; border-radius: 3px; margin-right: 0.5rem; }
.ponto.g1 { background: var(--g1); } .ponto.g2 { background: var(--g3); } .ponto.g3 { background: var(--g4); }
.hbarras { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.hbarras li { display: grid; grid-template-columns: 6.5rem 1fr 2.5rem; align-items: center; gap: 0.6rem; font-size: 0.85rem; }
.graf-largo .hbarras li { grid-template-columns: minmax(8rem, 17rem) 1fr 2rem; }
.hb-rotulo { color: var(--ui-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-trilho { width: 100%; height: 0.55rem; display: block; }
.hb-fundo { fill: var(--ui-selected-bg); } .hb-valor.g1 { fill: var(--g1); } .hb-valor.g2 { fill: var(--g2); } .hb-valor.g3 { fill: var(--g3); } .hb-valor.g4 { fill: var(--g4); } .hb-valor.g5 { fill: var(--g5); } .hb-valor.g6 { fill: var(--g6); }
.hb-num { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.vencimentos { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.7rem; }
.vencimentos li { display: flex; gap: 0.75rem; align-items: center; }
.venc-dias { flex: none; min-width: 4.2rem; text-align: center; padding: 0.35rem 0.4rem; border-radius: 0.6rem; background: var(--ui-selected-bg); font-size: 0.7rem; color: var(--ui-text-muted); line-height: 1.2; }
.venc-dias strong { display: block; font-size: 1.15rem; color: var(--ui-text); }
.venc-alerta { background: var(--ui-warning-bg); } .venc-alerta strong { color: var(--ui-warning); }
.venc-corpo { display: flex; flex-direction: column; font-size: 0.85rem; min-width: 0; } .venc-corpo .dica { margin: 0; }
.cruz-num { font-size: 1.1rem; margin-bottom: 0.25rem; } .cruz-num strong { font-size: 2rem; letter-spacing: -0.02em; }
.atalhos { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.atalhos a { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.45rem 0.85rem; border: 1px solid var(--ui-border-subtle); border-radius: 999px; background: var(--ui-surface); color: var(--ui-text); text-decoration: none; font-size: 0.85rem; }
.atalhos a:hover { background: var(--ui-selected-bg); border-color: var(--ui-link-focus); }
@media (prefers-reduced-motion: reduce) { .kpi { transition: none; } .kpi:hover { transform: none; } }

/* Selo da edição Lite */
.selo-lite { display: inline-block; margin-left: 0.25rem; padding: 0.05rem 0.5rem; border-radius: 999px; background: var(--ui-warning-bg); color: var(--ui-warning); border: 1px solid var(--ui-warning); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; vertical-align: middle; }

.busca-linha { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.5rem; margin-bottom: 1rem; }
.busca-linha label { flex-basis: 100%; margin: 0; }
.busca-linha input { flex: 1 1 16rem; max-width: 26rem; }

/* ===== Meu perfil e avatar ===== */
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; border-radius: 50%; background: var(--ui-primary); color: #fff; font-weight: 700; font-size: 0.85rem; letter-spacing: 0.02em; flex: none; }
.avatar-grande { width: 4.25rem; height: 4.25rem; font-size: 1.5rem; }
.menu-perfil { display: flex; align-items: center; gap: 0.65rem; margin: 0.25rem 0.75rem 0.5rem; padding: 0.5rem 0.65rem; border-radius: 0.75rem; text-decoration: none; color: var(--ui-text); border: 1px solid var(--ui-border-subtle); background: var(--ui-surface); }
.menu-perfil:hover { background: var(--ui-selected-bg); }
.menu-perfil-texto { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.menu-perfil-texto strong { font-size: 0.85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-perfil-texto small { color: var(--ui-text-muted); font-size: 0.72rem; }
.perfil-topo { display: flex; align-items: center; gap: 1rem; }
.perfil-topo h1 { margin: 0 0 0.15rem; } .perfil-topo .dica { margin: 0; }
.perfil-grade { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 992px) { .perfil-grade { grid-template-columns: 1fr 1fr; } }
.perfil-grade h2 { font-size: 1rem; margin: 0 0 0.5rem; }
.lista-links { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: 0.5rem; }
.lista-links a { text-decoration: none; }
.botao-link { display: inline-flex; align-items: center; gap: 0.4rem; }

/* Topo: ações à direita (feedback, alertas, perfil, sair). */
.topo { justify-content: flex-end; }
.topo-acoes { display: flex; align-items: center; gap: 0.35rem; margin-left: auto; }
.topo-icone { display: inline-flex; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; border-radius: 50%; border: 0; background: transparent; color: var(--ui-text-muted); text-decoration: none; font-size: 1rem; cursor: pointer; }
.topo-icone:hover, .topo-icone:focus-visible { background: var(--ui-selected-bg); color: var(--ui-primary); }
.topo-sair:hover, .topo-sair:focus-visible { background: var(--ui-danger-bg); color: var(--ui-danger); }
.topo-perfil { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.2rem 0.65rem 0.2rem 0.25rem; border-radius: 2rem; border: 1px solid var(--ui-border-subtle); text-decoration: none; color: var(--ui-text); margin: 0 0.25rem; }
.topo-perfil:hover { background: var(--ui-selected-bg); }
.topo-perfil .avatar { width: 1.9rem; height: 1.9rem; font-size: 0.72rem; }
.topo-perfil-nome { font-size: 0.85rem; font-weight: 600; max-width: 11rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 575.98px) { .topo-perfil-nome { display: none; } .topo { justify-content: space-between; } }
