.portal-body { min-height: 100vh; color: var(--white); background: radial-gradient(circle at 78% 5%, rgba(42,58,99,.5), transparent 28%), var(--navy-900); }.portal-shell { width: min(1180px, calc(100% - 64px)); margin-inline: auto; }.portal-header .brand-logo, .document-header .brand-logo { height: calc(var(--bar) / var(--phi)); }.portal-header { --bar: 84px; display: flex; align-items: center; justify-content: space-between; height: 84px; border-bottom: 1px solid rgba(194,202,219,.16); }.portal-user { display: flex; gap: 10px; align-items: center; color: var(--slate-300); font: 11px var(--mono); }.session-indicator { width: 7px; height: 7px; background: var(--green); border-radius: 50%; box-shadow: 0 0 10px var(--green); }.portal-user button { padding: 7px 10px; color: var(--gold-light); background: transparent; border: 1px solid rgba(222,163,49,.4); font-size: 10px; }.portal-hero { padding: 114px 0 58px; }.portal-hero h1 { margin: 0 0 20px; font-size: clamp(46px, 7vw, 84px); font-weight: 500; letter-spacing: -.07em; }.portal-hero p:not(.eyebrow) { max-width: 590px; color: var(--slate-300); font-size: 16px; line-height: 1.7; }.portal-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgba(194,202,219,.2); border-left: 1px solid rgba(194,202,219,.2); }.portal-grid article { display: flex; flex-direction: column; min-height: 250px; padding: 27px; border-right: 1px solid rgba(194,202,219,.2); border-bottom: 1px solid rgba(194,202,219,.2); }.portal-grid span { color: var(--gold-light); font: 10px var(--mono); }.portal-grid h2 { margin: 49px 0 9px; font-size: 25px; font-weight: 500; letter-spacing: -.05em; }.portal-grid p { color: var(--slate-300); font-size: 13px; line-height: 1.6; }.portal-grid small { margin-top: auto; color: var(--gold); font: 9px var(--mono); letter-spacing: .1em; }.portal-note { margin: 24px 0 50px; color: var(--slate-400); font-size: 11px; }.document-body { min-height: 100vh; color: var(--navy); background: var(--white); }.document-header { display: flex; align-items: center; justify-content: space-between; --bar: 86px; width: min(1060px, calc(100% - 64px)); height: 86px; margin: auto; border-bottom: 1px solid var(--slate-300); }.document-header .brand { color: var(--navy); }.document-header > a:last-child { color: var(--gold-deep); font-size: 12px; font-weight: 600; }.document-main { width: min(790px, calc(100% - 64px)); margin: auto; padding: 100px 0; }.document-main h1 { max-width: 650px; margin: 0 0 19px; font-size: clamp(44px, 6vw, 76px); font-weight: 500; letter-spacing: -.07em; line-height: 1.08; }.document-main h1 em { color: var(--gold-deep); font-style: normal; }.document-lede { color: #657188; font-size: 16px; line-height: 1.7; }.document-main hr { margin: 62px 0 40px; border: 0; border-top: 1px solid var(--slate-300); }.document-main section { margin: 0 0 37px; }.document-main h2 { margin-bottom: 10px; font-size: 24px; font-weight: 500; letter-spacing: -.05em; }.document-main section p { color: #526078; font-size: 15px; line-height: 1.8; }.document-footer { width: min(1060px, calc(100% - 64px)); margin: auto; padding: 25px 0; color: var(--slate-400); border-top: 1px solid var(--slate-300); font: 11px var(--mono); }
@media (max-width: 680px) { .portal-shell { width: calc(100% - 40px); }.portal-header { height: 73px; --bar: 73px; }.portal-header .brand-logo, .document-header .brand-logo { height: calc(var(--bar) / var(--phi) / var(--phi)); }.portal-user { gap: 6px; font-size: 9px; }.portal-hero { padding: 73px 0 40px; }.portal-grid { grid-template-columns: 1fr; }.portal-grid article { min-height: 185px; }.portal-grid h2 { margin-top: 26px; }.document-header { width: calc(100% - 40px); height: 74px; --bar: 74px; }.document-main { width: calc(100% - 40px); padding: 69px 0; }.document-main h1 { font-size: 45px; }.document-footer { width: calc(100% - 40px); } }

/* ===== Painel de acesso ao ecossistema (portal.html) =====
   Tokens primeiro; os componentes abaixo só usam tokens (nenhuma cor escrita direto neles).
   Cada cartão recebe a cor do módulo em --c, que governa ícone, nome, borda e halo.
   Movimento: só transform e opacity, 200ms, e tudo desligado com "reduzir movimento" (bloco no fim). */
.portal-body {
  --m-core: #f2605a; --m-force: #a48bff; --m-decision: #5b93ff; --m-insights: #93d657; --m-hunter: #ff9147; --m-talk: #45d3d6; --m-call: #acdc55; --m-flow: #4fcbea; --m-id: #3fcadb; --m-pay: #ad94fb; --m-pilot: #5b93ff; --m-ledger: #64a8ff; --m-lex: #ebae42; --m-finance: #83db5e; --m-shield: #45cbe3;
  --alert: #f2605a;
  --line: color-mix(in srgb, var(--slate-300) 18%, transparent);
  --line-strong: color-mix(in srgb, var(--slate-300) 32%, transparent);
  --surface: color-mix(in srgb, var(--navy-700) 72%, transparent);
  --surface-soft: color-mix(in srgb, var(--white) 5%, transparent);
  --amber-wash: color-mix(in srgb, var(--gold) 10%, transparent);
  --amber-line: color-mix(in srgb, var(--gold) 42%, transparent);
  --m-dur: 240ms;
  --m-ease: cubic-bezier(.22, .61, .36, 1);
  --wave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 120' fill='none' stroke='black' stroke-width='1.2'%3E%3Cpath d='M0 40c40-36 80 36 120 0s80-36 120 0 80 36 120 0'/%3E%3Cpath d='M0 60c40-36 80 36 120 0s80-36 120 0 80 36 120 0'/%3E%3Cpath d='M0 80c40-36 80 36 120 0s80-36 120 0 80 36 120 0'/%3E%3C/svg%3E");
  --mask-solid: #000;
  /* dourado da árvore (Golden Motion) e tempos de movimento reutilizáveis */
  --tree-night: #050a1b;
  --tree-surface: #0d152b;
  --tree-gold: #f2b83f;
  --tree-gold-light: #ffd76a;
  --tree-gold-deep: #a86a12;
  --m-micro: 180ms;
  --m-panel: 320ms;
  --m-section: 560ms;
  --m-stagger: 60ms;
  --radius: 8px;
  --radius-s: 5px;
}
.module-card[data-module="core"] { --c: var(--m-core); }
.module-card[data-module="force"] { --c: var(--m-force); }
.module-card[data-module="decision"] { --c: var(--m-decision); }
.module-card[data-module="insights"] { --c: var(--m-insights); }
.module-card[data-module="hunter"] { --c: var(--m-hunter); }
.module-card[data-module="talk"] { --c: var(--m-talk); }
.module-card[data-module="call"] { --c: var(--m-call); }
.module-card[data-module="flow"] { --c: var(--m-flow); }
.module-card[data-module="id"] { --c: var(--m-id); }
.module-card[data-module="pay"] { --c: var(--m-pay); }
.module-card[data-module="pilot"] { --c: var(--m-pilot); }
.module-card[data-module="ledger"] { --c: var(--m-ledger); }
.module-card[data-module="lex"] { --c: var(--m-lex); }
.module-card[data-module="finance"] { --c: var(--m-finance); }
.module-card[data-module="shield"] { --c: var(--m-shield); }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.portal-body :focus-visible { outline: 2px solid var(--gold-light); outline-offset: 2px; }

/* nota de atualização: altura mínima fixa; se já foi dispensada, portal-boot.js marca o <html> antes do primeiro desenho */
.release-note { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; min-height: 44px; margin-top: 12px; padding: 6px 6px 6px 14px; color: var(--slate-300); background: linear-gradient(90deg, var(--amber-wash), transparent); border: 1px solid var(--amber-line); border-radius: var(--radius); font-size: 12px; }
.vh-note-off .release-note { display: none; }
.release-tag { padding: 3px 7px; color: var(--navy); background: var(--gold-light); border-radius: var(--radius-s); font: 500 10px var(--mono); letter-spacing: .08em; }
.release-note time { color: var(--gold-light); font: 10px var(--mono); letter-spacing: .08em; }
.release-note p { flex: 1 1 200px; margin: 0; color: var(--white); line-height: 1.5; }
.release-note button { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; margin-left: auto; color: var(--gold-light); background: transparent; border: 0; border-radius: var(--radius-s); }
.release-note button:hover { background: var(--amber-wash); }
.release-note .icon { width: 14px; height: 14px; }

.portal-hero { padding: 84px 0 34px; }

.account-bar { height: 3px; margin-top: 16px; overflow: hidden; background: var(--line); border-radius: 3px; }
.account-bar span { display: block; height: 100%; background: var(--gold); transform: scaleX(0); transform-origin: left center; transition: transform var(--m-dur) var(--m-ease); }

/* cabeçalho da seção, alternador, filtro e busca */
.module-section { padding-bottom: 26px; }
.module-head { display: flex; gap: 8px 20px; align-items: center; justify-content: space-between; min-height: 40px; margin-bottom: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.module-head h2, .admin-section h2 { margin: 0; font: 500 22px var(--title); letter-spacing: -.04em; }
.view-toggle { display: flex; flex: none; height: 40px; border: 1px solid var(--line-strong); border-radius: var(--radius-s); overflow: hidden; }
.view-toggle button { display: inline-flex; align-items: center; justify-content: center; width: 44px; color: var(--slate-300); background: transparent; border: 0; }
.view-toggle button + button { border-left: 1px solid var(--line-strong); }
/* o destaque segue a classe do <html> (posta antes do primeiro desenho), não o aria-pressed, que o script acerta depois */
html:not(.vh-view-grid) .view-toggle [data-view="list"], .vh-view-grid .view-toggle [data-view="grid"] { color: var(--navy); background: var(--gold-light); }
.view-toggle button:focus-visible { outline-offset: -3px; }
.view-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.module-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.module-filters button { min-height: 36px; padding: 0 14px; color: var(--slate-300); background: transparent; border: 1px solid var(--line-strong); border-radius: 999px; font: 11px var(--mono); letter-spacing: .06em; }
.module-filters button:hover { color: var(--white); border-color: var(--gold); }
.module-filters [data-count] { display: inline-block; min-width: 4ch; text-align: left; }
.module-filters button[aria-pressed="true"] { color: var(--navy); background: var(--gold-light); border-color: var(--gold-light); }
#module-search { flex: 0 1 260px; min-width: 0; min-height: 36px; padding: 0 12px; color: var(--white); background: var(--surface-soft); border: 1px solid var(--line-strong); border-radius: var(--radius-s); font-size: 13px; }
#module-search::placeholder { color: var(--slate-400); }
.module-count { min-height: 16px; margin: 0 0 14px; color: var(--slate-300); font: 11px var(--mono); }
.module-notice { margin: 0 0 18px; padding: 14px 16px; color: var(--slate-300); background: var(--surface-soft); border: 1px solid var(--line); border-radius: var(--radius-s); font-size: 13px; line-height: 1.6; }
.module-notice[hidden] { display: none; }
.module-error { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; border-color: color-mix(in srgb, var(--alert) 50%, transparent); }
.module-error p { margin: 0; }
.module-error button, .contractor-form button, .contractor-modules button { min-height: 44px; padding: 0 16px; color: var(--navy); background: var(--gold-light); border: 0; border-radius: var(--radius-s); font-size: 12px; font-weight: 600; }
.module-error button:hover, .contractor-form button:hover, .contractor-modules button:hover { background: var(--gold); }

/* ---- módulos: lista (padrão) ----
   Uma linha por módulo: ícone 96 × 96 à esquerda, barra de 3px na cor do módulo, texto, dois botões e a onda à direita.
   --row é a altura mínima de cada linha; o esqueleto de carregamento usa a mesma, então a lista não salta ao chegar. */
.module-grid { --row: 148px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: start; margin: 0; padding: 0; list-style: none; }
.module-card { --c: var(--gold); position: relative; min-height: var(--row); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: transform var(--m-dur) var(--m-ease), opacity var(--m-dur) var(--m-ease); }
.module-card[hidden] { display: none; }
/* a linha sobe 2px no hover; esta faixa invisível estende a área 2px para baixo, para o ponteiro na beirada não ficar
   entrando e saindo (tremor) */
.module-card::after { content: ''; position: absolute; inset: 0 0 -5px; z-index: -1; }
.module-card:hover, .module-card:focus-within { transform: translateY(-2px); }
.vh-view-grid .module-card:hover, .vh-view-grid .module-card:focus-within { transform: translateY(-5px); }
.module-inner { position: relative; display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 0 22px; align-items: center; min-height: calc(var(--row) - 2px); padding: 20px 24px; overflow: hidden; border-radius: inherit; }
.module-icon { display: flex; align-items: center; justify-content: center; width: 96px; height: 96px; color: var(--c); background: radial-gradient(circle, color-mix(in srgb, var(--c) 16%, transparent), transparent 68%); border-radius: 50%; }
.module-icon svg { width: 52px; height: 52px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.module-text { position: relative; z-index: 1; display: grid; gap: 8px; padding-left: 18px; border-left: 3px solid var(--c); }
.module-title { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: flex-end; }
.module-name { display: flex; flex-direction: column; line-height: 1.25; }
.module-name small { font: 500 10px var(--mono); letter-spacing: .22em; }
.module-name b { color: var(--c); font: 500 19px var(--title); letter-spacing: .16em; text-transform: uppercase; }
.module-badge { padding: 3px 9px; color: var(--white); border: 1px solid var(--line-strong); border-radius: 999px; font: 10px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.module-desc { max-width: 72ch; margin: 0; color: var(--slate-300); font-size: 13px; line-height: 1.55; }
.module-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.module-cta, .module-more { display: inline-flex; gap: 8px; align-items: center; justify-content: center; min-height: 40px; padding: 0 16px; color: var(--white); background: transparent; border: 1px solid var(--line-strong); border-radius: var(--radius-s); font: 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.module-cta:hover, .module-more:hover { border-color: var(--white); }
.module-cta.is-primary { color: var(--navy); background: var(--c); border-color: var(--c); font-weight: 500; }
.module-cta.is-primary:hover { background: color-mix(in srgb, var(--c) 86%, var(--white)); }
.module-more { border-color: transparent; padding: 0 8px; }
.module-more .chev { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; transition: transform var(--m-dur) var(--m-ease); }
.module-more[aria-expanded="true"] .chev { transform: rotate(180deg); }
/* onda decorativa: um único desenho (--wave) usado como máscara, tingido pela cor do módulo e esmaecido para a esquerda */
.module-wave { position: absolute; top: 0; right: 0; bottom: 0; width: min(38%, 420px); background: var(--c); opacity: .5; pointer-events: none; -webkit-mask-image: var(--wave), linear-gradient(90deg, transparent, var(--mask-solid)); mask-image: var(--wave), linear-gradient(90deg, transparent, var(--mask-solid)); -webkit-mask-size: 320px 100%, 100% 100%; mask-size: 320px 100%, 100% 100%; -webkit-mask-repeat: repeat-x, no-repeat; mask-repeat: repeat-x, no-repeat; -webkit-mask-position: center; mask-position: center; -webkit-mask-composite: source-in; mask-composite: intersect; }

/* estados: borda + preenchimento do botão + selo escrito. A cor é só reforço. */
/* liberado: borda e halo na cor do módulo, ícone com brilho */
.module-card[data-state="open"], .module-card[data-state="pending"] { border-color: color-mix(in srgb, var(--c) 55%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 12%, transparent), 0 16px 38px -24px var(--c); }
.module-card[data-state="open"]:hover, .module-card[data-state="open"]:focus-within, .module-card[data-state="pending"]:hover, .module-card[data-state="pending"]:focus-within { border-color: var(--c); }
.module-card[data-state="open"] .module-icon, .module-card[data-state="pending"] .module-icon { filter: drop-shadow(0 0 10px color-mix(in srgb, var(--c) 70%, transparent)); }
.module-card[data-state="open"] .module-badge, .module-card[data-state="pending"] .module-badge { color: var(--navy); background: var(--c); border-color: var(--c); }
/* em contratação: borda tracejada âmbar, ícone cheio e sem brilho, botão vazado */
.module-card[data-state="contracting"] { border: 1px dashed var(--gold); }
.module-card[data-state="contracting"] .module-icon { background: none; }
.module-card[data-state="contracting"] .module-badge { color: var(--gold-light); border: 1px dashed var(--gold); }
/* indisponível: borda neutra, conteúdo esmaecido, ícone sem cor. O texto fica em branco para manter o contraste AA
   mesmo esmaecido; no hover sobe um pouco, mas não finge estar ativo. */
.module-card[data-state="locked"] .module-inner { opacity: .52; }
.module-card[data-state="locked"]:hover .module-inner, .module-card[data-state="locked"]:focus-within .module-inner { opacity: .72; }
.module-card[data-state="locked"] .module-icon { background: none; filter: grayscale(1); }
.module-card[data-state="locked"] .module-wave { display: none; }
.module-card[data-state="locked"] .module-name b, .module-card[data-state="locked"] .module-desc, .module-card[data-state="locked"] .module-security, .module-card[data-state="locked"] .security-pending b, .module-card[data-state="locked"] .security-chips .is-pending { color: var(--white); }

/* resumo de segurança: abre dentro da própria linha */
.module-security { position: relative; z-index: 1; grid-column: 1 / -1; display: grid; gap: 10px; margin-top: 18px; padding-top: 16px; color: var(--slate-300); border-top: 1px solid var(--line); font-size: 13px; line-height: 1.55; animation: vh-security-in var(--m-dur) var(--m-ease) both; }
.module-security[hidden] { display: none; }
.module-security p { max-width: 72ch; margin: 0; }
.security-title { color: var(--white); font: 10px var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.security-pending { padding-left: 10px; border-left: 2px solid var(--gold); }
.security-pending b { display: block; color: var(--gold-light); font-weight: 600; }
.security-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.security-chips li { padding: 3px 8px; border: 1px solid var(--line-strong); border-radius: 999px; font: 10px var(--mono); letter-spacing: .04em; }
.security-chips .is-pending { border-style: dashed; border-color: var(--amber-line); color: var(--gold-light); }
@keyframes vh-security-in { from { opacity: 0; transform: translateY(3px); } }

/* ---- módulos: grade (classe vh-view-grid no <html>, posta pelo portal-boot.js antes do primeiro desenho) ---- */
.vh-view-grid .module-grid { --row: 268px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.vh-view-grid .module-inner { grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; padding: 18px; }
.vh-view-grid .module-icon { width: 56px; height: 56px; }
.vh-view-grid .module-icon svg { width: 32px; height: 32px; }
.vh-view-grid .module-text { padding-left: 14px; }
.vh-view-grid .module-name b { font-size: 16px; }
.vh-view-grid .module-wave { display: none; }
.vh-view-grid .module-security { margin-top: 2px; }

/* carregando */
.module-skeleton { background: var(--surface); }

/* equipe interna */
.admin-section { margin-top: 30px; padding: 34px 0 10px; border-top: 1px solid var(--line); }
.admin-section[hidden], .contractor-form[hidden] { display: none; }
.admin-intro { max-width: 590px; margin: 10px 0 22px; color: var(--slate-300); font-size: 13px; line-height: 1.65; }
.contractor-form { display: grid; gap: 8px; max-width: 520px; color: var(--slate-300); font-size: 11px; font-weight: 500; }
.contractor-form div { display: flex; flex-wrap: wrap; gap: 10px; }
.contractor-form input { flex: 1 1 220px; min-height: 44px; padding: 0 12px; color: var(--white); background: var(--surface-soft); border: 1px solid var(--line-strong); border-radius: var(--radius-s); font-size: 14px; }
.admin-status, .contractor-status { min-height: 18px; margin: 12px 0; color: var(--gold-light); font-size: 12px; }
.contractor-empty { color: var(--slate-300); font-size: 13px; }
.contractor { border: 1px solid var(--line); }
.contractor + .contractor { border-top: 0; }
.contractor summary { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; justify-content: space-between; min-height: 48px; padding: 13px 16px; cursor: pointer; font-size: 14px; }
.contractor summary b { font-weight: 600; }
.contractor summary span { color: var(--slate-300); font: 11px var(--mono); }
.contractor-modules { padding: 4px 16px 6px; }
.contractor-modules fieldset { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 2px 14px; margin: 0 0 14px; padding: 0; border: 0; min-width: 0; }
.contractor-modules legend { margin-bottom: 6px; padding: 0; color: var(--slate-300); font: 10px var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.contractor-modules label { display: grid; gap: 4px; padding: 6px 0; font-size: 12px; }
.contractor-modules select { min-height: 40px; padding: 0 8px; color: var(--white); background: var(--navy-700); border: 1px solid var(--line-strong); border-radius: var(--radius-s); font-size: 13px; }

/* movimento: entrada em cascata (uma vez só) e troca de filtro com View Transition. portal.js põe a classe vh-motion
   no <html> só quando o sistema permite movimento; sem ela os cartões já nascem visíveis. */
.vh-motion .module-card.is-waiting { opacity: 0; transform: translateY(8px); }
.vh-motion .module-card.is-in { transition-delay: var(--stagger, 0ms); }
.module-skeleton { animation: vh-skeleton 1.2s var(--m-ease) infinite alternate; }
@keyframes vh-skeleton { to { opacity: .5; } }
/* durante o filtro só os cartões se movem: a página em si (root) não refaz o fade de troca de tela */
.vh-filtering::view-transition-old(root), .vh-filtering::view-transition-new(root) { animation: none; }
.vh-filtering::view-transition-group(*) { animation-duration: var(--m-dur); animation-timing-function: var(--m-ease); }
.vh-filtering::view-transition-old(*), .vh-filtering::view-transition-new(*) { animation-duration: var(--m-dur); animation-timing-function: var(--m-ease); }
/* ao migrar entre lista e grade o cartão muda de tamanho: as duas imagens ficam no tamanho natural, sem esticar */
.vh-filtering::view-transition-old(*), .vh-filtering::view-transition-new(*) { height: auto; object-fit: none; object-position: left top; }

@media (prefers-reduced-motion: reduce) {
  .module-card, .module-inner, .account-bar span, .module-more .chev { transition: none; }
  .module-card:hover, .module-card:focus-within { transform: none; }
  .module-skeleton, .module-security { animation: none; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
@media (max-width: 900px) { .module-wave { display: none; } }
@media (max-width: 680px) { .portal-hero { padding: 56px 0 26px; } .portal-user #session-email { display: none; } #module-search { flex-basis: 100%; } .module-grid { --row: 190px; } .module-inner { grid-template-columns: 56px minmax(0, 1fr); gap: 0 14px; align-items: start; padding: 16px; } .module-icon { width: 56px; height: 56px; } .module-icon svg { width: 32px; height: 32px; } .module-text { padding-left: 12px; } .vh-view-grid .module-grid { grid-template-columns: minmax(0, 1fr); } }

/* ===== Hub 2.0: estrutura do painel =====
   Cabeçalho em cima, navegação à esquerda, conteúdo no meio e o painel da conta à direita. No tablet o painel da conta
   desce para baixo do conteúdo; no celular a navegação vira uma barra fixa embaixo. */
.portal-shell.hub { display: grid; grid-template-columns: 150px minmax(0, 1fr) 388px; grid-template-areas: "head head head" "nav main side" "tree tree tree"; gap: 0 26px; align-items: start; width: auto; max-width: 1720px; margin-inline: auto; padding: 0 24px 40px; }
.hub .portal-header { grid-area: head; height: 64px; --bar: 64px; }
.hub-main { grid-area: main; min-width: 0; padding-top: 4px; }
.hub-side { grid-area: side; display: grid; gap: 16px; padding-top: 24px; scroll-margin-top: 16px; }
.hub section[id], .hub-side { scroll-margin-top: 16px; }

/* navegação lateral: a marca dourada (hub-nav-pill) desliza até o item ativo */
.hub-nav { grid-area: nav; position: sticky; top: 16px; display: grid; gap: 4px; padding-top: 24px; }
.hub-nav a { position: relative; z-index: 1; display: flex; gap: 12px; align-items: center; min-height: 44px; padding: 0 14px; color: var(--slate-300); border-radius: var(--radius); font-size: 14px; }
.hub-nav a[hidden] { display: none; }
.hub-nav a:hover, .hub-nav a[aria-current] { color: var(--white); }
.hub-nav svg { flex: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.hub-nav a[aria-current] svg { color: var(--gold-light); }
.hub-nav-pill { position: absolute; top: 0; left: 0; width: 0; height: 44px; background: linear-gradient(90deg, var(--amber-wash), transparent); border: 1px solid var(--amber-line); border-left: 2px solid var(--gold); border-radius: var(--radius); pointer-events: none; transition: transform var(--m-dur) var(--m-ease); }

/* hero: ondas douradas em movimento lento e alguns pontos de luz; o texto fica por cima, à esquerda */
.hub .portal-hero { position: relative; isolation: isolate; min-height: 230px; margin-top: 12px; padding: 34px 0 30px; overflow: hidden; border-radius: 12px; }
.hero-text { position: relative; z-index: 1; max-width: 680px; }
.hub .portal-hero > .hero-art { animation: none; }
.hub .portal-hero h1 { margin-bottom: 14px; font-size: clamp(34px, 3.5vw, 54px); line-height: 1.08; }
.hub .portal-hero h1 em { color: var(--gold-light); font-style: normal; }
.hub .portal-hero p:not(.eyebrow) { max-width: 500px; font-size: 15px; line-height: 1.6; }
.hub-cta, .expand button { display: inline-flex; gap: 10px; align-items: center; min-height: 46px; padding: 0 24px; color: var(--navy); background: linear-gradient(180deg, var(--gold-light), var(--gold)); border: 0; border-radius: 999px; font-size: 14px; font-weight: 600; transition: transform var(--m-dur) var(--m-ease); }
.hub-cta { margin-top: 22px; }
.hub-cta:hover, .expand button:hover { transform: translateY(-2px); }
.hub-cta .icon, .expand .icon { width: 14px; height: 14px; }
.hero-art { position: absolute; inset: 0; z-index: 0; pointer-events: none; background: radial-gradient(ellipse at 82% 55%, color-mix(in srgb, var(--gold) 16%, transparent), transparent 60%); -webkit-mask-image: linear-gradient(90deg, transparent 38%, var(--mask-solid) 78%); mask-image: linear-gradient(90deg, transparent 38%, var(--mask-solid) 78%); }
.hero-waves { position: absolute; top: 0; left: 0; width: 200%; height: 100%; fill: none; stroke: var(--gold); animation: vh-wave 36s linear infinite; }
.hero-waves path { stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.hero-waves .w1 { stroke: var(--gold-light); stroke-width: 1.6; }
.hero-waves .w2 { opacity: .6; }
.hero-waves .w3 { opacity: .38; }
.hero-waves .w4 { opacity: .24; }
.hero-spark { position: absolute; width: 3px; height: 3px; background: var(--gold-light); border-radius: 50%; opacity: .2; animation: vh-spark 5s var(--m-ease) infinite alternate; }
.hero-spark.s1 { top: 22%; left: 62%; }
.hero-spark.s2 { top: 38%; left: 78%; animation-delay: -1.2s; }
.hero-spark.s3 { top: 64%; left: 70%; animation-delay: -2.4s; }
.hero-spark.s4 { top: 18%; left: 90%; animation-delay: -3.1s; }
.hero-spark.s5 { top: 74%; left: 86%; animation-delay: -4s; }
@keyframes vh-wave { to { transform: translateX(-50%); } }
@keyframes vh-spark { to { opacity: .9; transform: translateY(-10px); } }

/* cabeçalho dos módulos, busca, alternador e filtros */
.hub .module-head { flex-wrap: wrap; margin: 26px 0 16px; padding-top: 0; border-top: 0; }
.module-heading p { margin: 4px 0 0; color: var(--slate-300); font-size: 13px; }
.module-head-tools { display: flex; flex: 1 1 320px; gap: 12px; align-items: center; justify-content: flex-end; }
.hub #module-search { flex: 0 1 280px; min-height: 40px; }
.hub .module-filters { margin-bottom: 10px; }
.hub .module-filters button { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; font: 500 13px var(--sans); letter-spacing: 0; }
.hub .module-filters [data-count] { margin-left: 6px; min-width: 3.4ch; }
.dot { display: inline-block; flex: none; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; }
.dot-enabled { background: var(--green); }
.dot-contracting { background: var(--gold); }
.dot-unavailable { background: var(--slate-400); }

/* seções por estado: liberados em cima; em contratação e indisponíveis lado a lado */
.module-groups { display: grid; gap: 22px; min-height: 520px; align-content: start; }
.module-group[hidden] { display: none; }
.module-group h3 { display: flex; align-items: center; margin: 0 0 12px; font: 500 14px var(--sans); }
.module-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; align-items: start; }
.module-pair:has(> [hidden]) { grid-template-columns: minmax(0, 1fr); }

/* cartão em grade (padrão): ícone em cima, nome, descrição e o botão ocupando a largura */
.vh-view-grid .module-grid { --row: 246px; grid-template-columns: repeat(auto-fill, minmax(152px, 1fr)); align-items: stretch; }
.vh-view-grid .module-title { flex-direction: column; gap: 6px; align-items: flex-start; }
.vh-view-grid .module-pair .module-grid { grid-template-columns: repeat(auto-fill, minmax(146px, 1fr)); }
.vh-view-grid .module-card { display: flex; }
.vh-view-grid .module-card[hidden], .module-pair[hidden] { display: none; }
.vh-view-grid .module-inner { flex: 1; grid-template-rows: auto 1fr; gap: 12px; padding: 16px 14px 14px; }
.vh-view-grid .module-icon { width: 40px; height: 40px; background: none; }
.vh-view-grid .module-icon svg { width: 30px; height: 30px; }
.vh-view-grid .module-text { grid-template-rows: auto 1fr auto; align-content: start; padding-left: 10px; }
.vh-view-grid .module-name b { font-size: 15px; }
.vh-view-grid .module-badge { padding: 2px 7px; font-size: 9px; }
.vh-view-grid .module-desc { font-size: 12px; }
.vh-view-grid .module-actions { display: grid; gap: 4px; }
.vh-view-grid .module-cta { width: 100%; min-height: 36px; padding: 0 8px; font-size: 10px; letter-spacing: .06em; }
.vh-view-grid .module-more { min-height: 32px; font-size: 10px; }
.module-card[data-state="open"] .module-inner, .module-card[data-state="pending"] .module-inner { background: linear-gradient(180deg, transparent 55%, color-mix(in srgb, var(--c) 13%, transparent)); }
/* brilho na cor do módulo ao passar o mouse (aparece por opacidade) e ícone que cresce um pouco */
.module-card::before { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 0 30px -4px var(--c); opacity: 0; pointer-events: none; transition: opacity var(--m-dur) var(--m-ease); }
.module-card[data-state="open"]:hover::before, .module-card[data-state="open"]:focus-within::before { opacity: .55; }
.module-icon svg { transition: transform var(--m-dur) var(--m-ease); }
.module-card:hover .module-icon svg, .module-card:focus-within .module-icon svg { transform: scale(1.1); }

/* painel lateral: conta, visão do ecossistema e convite para ampliar */
.side-card { padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.side-card.account { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px; align-items: center; }
.side-icon { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--line-strong); border-radius: var(--radius); }
.side-icon svg, .side-title svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.side-label { margin: 0; color: var(--slate-300); font: 400 12px var(--sans); }
.account-company { margin: 2px 0 0; font: 500 18px var(--title); letter-spacing: -.02em; overflow-wrap: anywhere; }
.account-plan { grid-column: 1 / -1; justify-self: start; margin: 6px 0 0; padding: 4px 10px; color: var(--gold-light); border: 1px solid var(--amber-line); border-radius: 999px; font-size: 11px; }
.side-title { display: flex; gap: 10px; align-items: center; margin: 0 0 16px; font: 500 15px var(--sans); }
.side-title svg { color: var(--gold-light); }
.overview-main { display: flex; gap: 16px; align-items: center; justify-content: space-between; }
.overview-number { margin: 0; font: 500 28px var(--title); letter-spacing: -.02em; }
.overview-caption { margin: 2px 0 0; color: var(--slate-300); font-size: 14px; }
.overview-ring { position: relative; flex: none; width: 92px; height: 92px; }
.overview-ring svg { width: 100%; height: 100%; fill: none; transform: rotate(-90deg); }
.ring-track { stroke: var(--line-strong); stroke-width: 8; }
.ring-value { stroke: var(--gold); stroke-width: 8; stroke-linecap: round; }
.overview-ring span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font: 600 16px var(--sans); }
.overview .account-bar { height: 6px; margin: 16px 0; }
.overview-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; }
.overview-stats div { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 2px; padding: 10px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: var(--radius); }
.overview-stats dt { color: var(--slate-300); font-size: 11px; }
.overview-stats dd { margin: 0; font: 500 19px var(--title); }
.overview-stats [data-tile="enabled"] dd { color: var(--green); }
.overview-stats [data-tile="contracting"] dd { color: var(--gold-light); }
.side-card.expand { background: linear-gradient(135deg, var(--amber-wash), transparent 70%), var(--surface); border-color: var(--amber-line); }
.side-card.expand[hidden] { display: none; }
.expand h2 { margin: 0 0 8px; font: 500 20px var(--title); letter-spacing: -.03em; }
.expand p { margin: 0 0 16px; color: var(--slate-300); font-size: 13px; line-height: 1.55; }

@media (prefers-reduced-motion: reduce) {
  .hero-waves, .hero-spark { animation: none; }
  .hub-nav-pill, .hub-cta, .expand button, .module-card::before, .module-icon svg { transition: none; }
  .hub-cta:hover, .expand button:hover, .module-card:hover .module-icon svg, .module-card:focus-within .module-icon svg { transform: none; }
}
/* tablet: o painel da conta desce para baixo do conteúdo, em duas colunas */
@media (max-width: 1280px) {
  .portal-shell.hub { grid-template-columns: 172px minmax(0, 1fr); grid-template-areas: "head head" "nav main" "nav side" "tree tree"; }
  .hub-side { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}
/* celular: uma coluna e navegação em barra fixa embaixo, com áreas de toque de 56px */
@media (max-width: 860px) {
  .portal-shell.hub { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "main" "side" "tree"; padding: 0 16px 96px; }
  .hub-nav { position: fixed; top: auto; right: 0; bottom: 0; left: 0; z-index: 20; display: flex; justify-content: space-around; gap: 0; padding: 4px 6px; background: var(--navy-900); border-top: 1px solid var(--line-strong); }
  .hub-nav a { flex: 1 1 0; flex-direction: column; gap: 3px; justify-content: center; min-height: 56px; padding: 0 4px; font-size: 11px; }
  .hub-nav-pill { display: none; }
  /* a barra fixa não pode cobrir o que recebe foco ou o destino de uma âncora */
  html { scroll-padding-bottom: 84px; }
  .hub .portal-header { flex-wrap: wrap; gap: 8px; height: auto; min-height: 64px; padding: 10px 0; }
  .hub-nav a[aria-current] { color: var(--gold-light); }
  .hub-side, .module-pair { grid-template-columns: minmax(0, 1fr); }
  .module-head-tools { flex-basis: 100%; }
  .hub #module-search { flex: 1 1 auto; }
  .hub .portal-hero { min-height: 0; padding: 26px 0 22px; }
  .hero-art { opacity: .5; }
  .module-groups { min-height: 0; }
  .vh-view-grid .module-grid, .vh-view-grid .module-pair .module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ===== Hub: ajuste fino para a referência visual =====
   Grade (padrão): cartão vertical compacto, com ícone em cima, nome, descrição e botão embaixo, até seis por linha.
   Em contratação e indisponíveis: cartões menores, três por linha, com o ícone ao lado do nome. */
.vh-view-grid .module-grid { --row: 178px; grid-template-columns: repeat(auto-fill, minmax(max(148px, calc((100% - 60px) / 6)), 1fr)); gap: 12px; }
.vh-view-grid .module-pair .module-grid { --row: 128px; grid-template-columns: repeat(auto-fill, minmax(max(132px, calc((100% - 24px) / 3)), 1fr)); }
.vh-view-grid .module-inner { grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto 1fr auto; gap: 4px 10px; align-items: start; padding: 16px 14px 14px; isolation: isolate; }
.vh-view-grid .module-text, .vh-view-grid .module-title { display: contents; }
.vh-view-grid .module-icon { grid-column: 1 / -1; width: 34px; height: 34px; margin-bottom: 4px; }
.vh-view-grid .module-icon svg { width: 32px; height: 32px; }
.vh-view-grid .module-name { grid-column: 1 / -1; }
.vh-view-grid .module-name small { font-size: 8px; }
.vh-view-grid .module-name b { font-size: 16px; letter-spacing: .14em; }
.vh-view-grid .module-desc { grid-column: 1 / -1; margin-top: 4px; font-size: 11px; line-height: 1.45; }
.vh-view-grid .module-actions { grid-column: 1 / -1; align-self: end; display: block; margin-top: 10px; }
.vh-view-grid .module-security { grid-column: 1 / -1; margin-top: 10px; padding-top: 10px; font-size: 11px; }
/* na grade o estado já vem do título da seção e do texto do botão; o selo fica só para leitor de tela (menos no
   liberado sem endereço, que não tem botão e precisa do selo "Em implantação" à vista) */
.vh-view-grid .module-card:not([data-state="pending"]) .module-badge { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); border: 0; }
.vh-view-grid .module-card[data-state="pending"] .module-badge { grid-column: 1 / -1; justify-self: start; }
.vh-view-grid .module-cta { width: 100%; min-height: 30px; padding: 0 8px; gap: 6px; font: 600 11px var(--sans); letter-spacing: 0; text-transform: none; white-space: nowrap; border-radius: var(--radius-s); }
.vh-view-grid .module-cta::after { content: '→'; font-size: 13px; }
.vh-view-grid .module-card[data-state="contracting"] .module-cta::after { content: '↗'; }
.vh-view-grid .module-card[data-state="locked"] .module-cta::after { content: none; }
.vh-view-grid .module-pair .module-cta { width: 100%; padding: 0 4px; gap: 4px; font-size: 10.5px; }
/* "Saiba mais" vira um botão pequeno no canto do cartão; o resumo de segurança abre dentro dele */
.vh-view-grid .module-more { position: absolute; top: 8px; right: 8px; z-index: 2; width: 36px; min-height: 36px; padding: 0; font-size: 0; border-color: transparent; }
.vh-view-grid .module-more { top: 4px; right: 4px; }
@media (pointer: coarse) { .vh-view-grid .module-more { width: 44px; min-height: 44px; } }
.vh-view-grid .module-more:hover, .vh-view-grid .module-more:focus-visible { border-color: var(--line-strong); }
/* ondas junto à base do cartão liberado, na cor do módulo */
.vh-view-grid .module-card[data-state="open"] .module-wave, .vh-view-grid .module-card[data-state="pending"] .module-wave { display: block; top: auto; right: 0; bottom: 0; left: 0; z-index: -1; width: auto; height: 64px; opacity: .8; -webkit-mask-image: var(--wave); mask-image: var(--wave); -webkit-mask-size: 200px 100%; mask-size: 200px 100%; -webkit-mask-repeat: repeat-x; mask-repeat: repeat-x; -webkit-mask-composite: source-over; mask-composite: add; }
.vh-view-grid .module-card[data-state="open"] .module-inner, .vh-view-grid .module-card[data-state="pending"] .module-inner { background: linear-gradient(180deg, color-mix(in srgb, var(--c) 5%, transparent), color-mix(in srgb, var(--c) 20%, transparent)); }
.vh-view-grid .module-card[data-state="open"], .vh-view-grid .module-card[data-state="pending"] { border-color: color-mix(in srgb, var(--c) 70%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 14%, transparent), 0 10px 26px -18px var(--c); }
/* cartões menores: ícone ao lado do nome */
.vh-view-grid .module-pair .module-inner { padding: 12px; }
.vh-view-grid .module-pair .module-icon { grid-column: 1; width: 26px; height: 26px; margin: 0; }
.vh-view-grid .module-pair .module-icon svg { width: 26px; height: 26px; }
.vh-view-grid .module-pair .module-name { grid-column: 2; padding-right: 30px; }
.vh-view-grid .module-pair .module-name b { font-size: 13px; }
.vh-view-grid .module-card[data-state="contracting"] { border: 1px solid var(--amber-line); }
.vh-view-grid .module-card[data-state="locked"] { border-color: var(--line-strong); }
.module-pair { gap: 26px; }
.module-pair > .module-group + .module-group { padding-left: 26px; border-left: 1px solid var(--line-strong); }
.module-pair:has(> [hidden]) > .module-group { padding-left: 0; border-left: 0; }
.module-group h3 { font-size: 15px; }
.module-groups { gap: 20px; min-height: 420px; }

/* cabeçalho dos módulos e busca com ícone */
.module-heading { display: flex; gap: 14px; align-items: center; }
.module-heading > svg { flex: none; width: 34px; height: 34px; fill: none; stroke: var(--gold-light); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.search-box { position: relative; flex: 0 1 290px; min-width: 0; }
.search-box svg { position: absolute; top: 50%; left: 12px; width: 18px; height: 18px; margin-top: -9px; fill: none; stroke: var(--slate-300); stroke-width: 1.4; stroke-linecap: round; pointer-events: none; }
.hub .search-box #module-search { width: 100%; padding-left: 40px; border-radius: var(--radius); }
.hub .module-filters { gap: 12px; margin-bottom: 18px; }
.hub .module-filters button { min-height: 38px; padding: 0 18px; color: var(--white); font-size: 14px; }
.hub .module-filters button[aria-pressed="true"] { color: var(--white); background: var(--amber-wash); border-color: var(--gold); box-shadow: 0 0 0 1px var(--amber-line); }
.hub .module-filters [data-count] { min-width: 0; }

/* hero: fita de linhas douradas com brilho */
.hub .portal-hero { min-height: 250px; padding: 30px 0 26px; }
.hub .portal-hero h1 { font-size: clamp(36px, 3.4vw, 54px); font-weight: 600; letter-spacing: -.03em; }
.hub .portal-hero p:not(.eyebrow) { max-width: 520px; font-size: 14px; }
.hero-art { -webkit-mask-image: linear-gradient(90deg, transparent 30%, var(--mask-solid) 62%); mask-image: linear-gradient(90deg, transparent 30%, var(--mask-solid) 62%); background: radial-gradient(ellipse at 78% 50%, color-mix(in srgb, var(--gold) 22%, transparent), transparent 58%); }
/* o brilho da fita vem do gradiente do .hero-art (parado); filtro em SVG grande e animado custaria quadros */
.hero-waves { animation-duration: 44s; }
.hero-waves path { stroke-width: .8; opacity: .5; }
.hero-waves .r0 { stroke: var(--gold-light); opacity: .85; }
.hero-waves .r2 { opacity: .3; }
.hero-spark.s6 { top: 30%; left: 70%; animation-delay: -.6s; }
.hero-spark.s7 { top: 52%; left: 94%; animation-delay: -1.8s; }
.hero-spark.s8 { top: 84%; left: 62%; animation-delay: -2.9s; }

/* painel lateral */
.side-card.account { grid-template-columns: auto minmax(0, 1fr); }
.account-plan { grid-column: 2; margin: 2px 0 0; }
.overview-stats div { display: grid; grid-template-columns: auto 1fr; gap: 0 8px; align-items: center; }
.overview-stats svg { grid-row: 1; width: 20px; height: 20px; fill: none; stroke: var(--slate-300); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.overview-stats [data-tile="enabled"] svg { stroke: var(--green); }
.overview-stats [data-tile="contracting"] svg { stroke: var(--gold-light); }
.overview-stats dd { grid-row: 1; grid-column: 2; color: var(--white); }
.overview-stats [data-tile="enabled"] dd, .overview-stats [data-tile="contracting"] dd { color: var(--white); }
.overview-stats dt { grid-row: 2; grid-column: 1 / -1; margin-top: 4px; font-size: 10.5px; }
.overview-ring { width: 104px; height: 104px; filter: drop-shadow(0 0 8px color-mix(in srgb, var(--gold) 45%, transparent)); }
.overview-number { font-size: 26px; }
.side-card.expand { display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: 12px; align-items: center; padding: 26px 22px; background: radial-gradient(ellipse at 90% 40%, color-mix(in srgb, var(--gold) 20%, transparent), transparent 62%), var(--surface); }
.expand h2 { font-size: 22px; line-height: 1.1; }
.expand h2 em { color: var(--gold-light); font-style: normal; }
.expand button { min-height: 40px; padding: 0 18px; font-size: 13px; border-radius: var(--radius); }
.expand-art { width: 96px; height: 96px; fill: none; stroke: var(--gold-light); stroke-width: 1.4; stroke-linejoin: round; filter: drop-shadow(0 0 8px color-mix(in srgb, var(--gold) 60%, transparent)); }
.hub-cta { min-height: 42px; margin-top: 18px; }

@media (max-width: 1280px) { .portal-shell.hub { grid-template-columns: 150px minmax(0, 1fr); } }
@media (max-width: 1100px) { .vh-view-grid .module-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); } .module-pair { grid-template-columns: minmax(0, 1fr); } .module-pair > .module-group + .module-group { padding-left: 0; border-left: 0; } }
@media (max-width: 860px) { .portal-shell.hub { grid-template-columns: minmax(0, 1fr); } .vh-view-grid .module-grid, .vh-view-grid .module-pair .module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .search-box { flex: 1 1 auto; } }

/* Os estilos da árvore do ecossistema ficam em src/tree/tree.css (o site usa a mesma árvore). */


/* ---- motion global do painel: entrada das seções e dos cartões do painel lateral, uma vez só ---- */
.vh-motion .reveal { opacity: 0; transform: translateY(14px); }
.vh-motion .reveal.is-in { opacity: 1; transform: none; transition: opacity var(--m-section) var(--m-ease), transform var(--m-section) var(--m-ease); transition-delay: var(--stagger, 0ms); }
.hub-nav a svg { transition: transform var(--m-micro) var(--m-ease); }
.hub-nav a:hover svg { transform: scale(1.12); }
.module-filters button, .view-toggle button { transition: transform var(--m-micro) var(--m-ease); }

@media (prefers-reduced-motion: reduce) {
  .tree-node-icon, .tree-node-name, .tree-tip, .hub-nav a svg, .module-filters button, .view-toggle button { transition: none; }
  .tree-panel { animation: none; }
  .hub-nav a:hover svg, .tree-node.is-hover .tree-node-icon { transform: none; }
}

/* ===== Proporções do site =====
   O painel segue as mesmas medidas do site institucional: tudo deriva de φ (respiros de 26 / 42 / 68px, em --s2, --s3
   e --s4), a largura é a da faixa NEX (--wrap-nex, 1547px) com a mesma margem lateral, o cabeçalho tem 86px com a
   marca a 1/φ da barra, e a coluna de módulos está para a lateral como φ² para 1. Títulos na escala do site. */
@media (min-width: 861px) {
  .portal-shell.hub { width: min(var(--wrap-nex), calc(100% - var(--gutter) * 2)); max-width: none; padding: 0 0 var(--s3); column-gap: var(--s2); }
  .hub .portal-header { height: 86px; --bar: 86px; }
  .hub-nav, .hub-side { padding-top: var(--s2); }
  .hub-nav a { gap: 10px; padding: 0 12px; font-size: 15px; }
  .hub .portal-hero { min-height: 0; margin-top: var(--s2); padding: var(--s4) 0 var(--s3); }
  .hub .module-head { margin: var(--s3) 0 var(--s2); }
  .tree-section { margin-top: var(--s4); }
  .tree-copy { top: var(--s3); left: var(--s3); max-width: 580px; }
}
@media (min-width: 1281px) { .portal-shell.hub { grid-template-columns: 150px minmax(0, 2.618fr) minmax(340px, 1fr); } }
.hub .portal-hero h1 { font-size: clamp(37px, 4.4vw, 62px); font-weight: 500; line-height: 1.1; letter-spacing: -.055em; }
.hub .portal-hero p:not(.eyebrow) { max-width: 580px; font-size: 17px; line-height: 1.7; }
.hub .module-head h2, .hub .admin-section h2 { font-size: calc(16px * var(--phi)); letter-spacing: -.045em; }
.module-heading p { font-size: 14px; }
.module-group h3 { font-size: 16px; }
.tree-copy h2 { font-size: clamp(34px, 4.4vw, 62px); letter-spacing: -.055em; }
.tree-copy p:not(.eyebrow) { font-size: 17px; line-height: 1.7; }

/* ===== Página de definir senha e formulários de gestão ===== */
.auth-page { display: grid; grid-template-rows: auto 1fr; min-height: 100vh; }
.auth-card { width: min(460px, 100%); margin: var(--s3, 42px) auto; padding: 8px 0 40px; }
.auth-card h1 { margin: 0 0 18px; font: 500 34px var(--title); letter-spacing: -.05em; }
.auth-form { display: grid; gap: 8px; color: var(--slate-300); font-size: 12px; font-weight: 500; }
.auth-form[hidden] { display: none; }
.auth-intro { margin: 0 0 8px; color: var(--slate-300); font-size: 14px; line-height: 1.65; }
.auth-form input, .manage-form input, .manage-form select, .manage-tools select, .user-row select { min-height: 44px; padding: 0 12px; color: var(--white); background: var(--surface-soft); border: 1px solid var(--line-strong); border-radius: var(--radius-s); font-size: 14px; }
.manage-form select, .manage-tools select, .user-row select { background: var(--navy-700); }
.auth-form button, .manage-form button, .user-actions button, .manage-tools button, .contractor-state button { min-height: 44px; padding: 0 16px; color: var(--navy); background: var(--gold-light); border: 0; border-radius: var(--radius-s); font-size: 12px; font-weight: 600; cursor: pointer; }
.auth-form button { margin-top: 10px; }
.auth-form button:hover, .manage-form button:hover, .user-actions button:hover, .manage-tools button:hover, .contractor-state button:hover { background: var(--gold); }
.auth-form button:disabled, .manage-form button:disabled, .user-actions button:disabled, .manage-tools button:disabled { opacity: .55; cursor: default; }
.auth-status { min-height: 20px; margin: 16px 0 8px; color: var(--gold-light); font-size: 13px; line-height: 1.5; }
.auth-back a { color: var(--slate-300); font-size: 12px; text-decoration: underline; }
.manage-block { margin-top: 34px; padding-top: 24px; border-top: 1px solid var(--line); }
.manage-block h3 { margin: 0 0 6px; font: 500 18px var(--title); letter-spacing: -.03em; }
.manage-block[hidden] { display: none; }
.manage-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; align-items: end; max-width: 860px; margin: 14px 0; color: var(--slate-300); font-size: 11px; font-weight: 500; }
.manage-form label { display: grid; gap: 6px; }
.manage-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 12px 0; color: var(--slate-300); font-size: 12px; }
.user-list, .audit-list { margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); }
.user-list li, .audit-list li { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; justify-content: space-between; padding: 12px 16px; font-size: 13px; }
.user-list li + li, .audit-list li + li { border-top: 1px solid var(--line); }
.user-row small, .audit-list small { color: var(--slate-300); font: 11px var(--mono); }
.user-row.is-off b { text-decoration: line-through; color: var(--slate-400); }
.user-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.user-actions button { min-height: 36px; padding: 0 12px; }
.user-row select { min-height: 36px; font-size: 12px; }
.contractor-state { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 4px 16px 12px; color: var(--slate-300); font-size: 12px; }
.contractor-state button { min-height: 36px; }
.account-password { margin-top: 14px; }
.account-password summary { cursor: pointer; color: var(--gold-light); font-size: 13px; }
.account-password form { display: grid; gap: 8px; margin-top: 12px; }
.account-password input { min-height: 40px; padding: 0 10px; color: var(--white); background: var(--surface-soft); border: 1px solid var(--line-strong); border-radius: var(--radius-s); }
.account-password button { min-height: 40px; color: var(--navy); background: var(--gold-light); border: 0; border-radius: var(--radius-s); font-size: 12px; font-weight: 600; cursor: pointer; }
.account-password label { color: var(--slate-300); font-size: 11px; }
.access-help.forgot { margin-top: 6px; }
/* troca de senha obrigatória: só o cartão aparece; navegação, módulos, conta e árvore ficam fora da tela */
.force-password { grid-column: 1 / -1; width: min(460px, 100%); margin: 56px auto; }
.force-password[hidden] { display: none; }
.force-password .force-intro { margin: 8px 0 14px; color: var(--slate-300); font-size: 14px; line-height: 1.6; }
.force-password form { display: grid; gap: 8px; }
.force-password input { min-height: 40px; padding: 0 10px; color: var(--white); background: var(--surface-soft); border: 1px solid var(--line-strong); border-radius: var(--radius-s); }
.force-password button[type="submit"] { min-height: 42px; margin-top: 6px; }
.vh-must-change .hub-nav, .vh-must-change .hub-main, .vh-must-change .hub-side, .vh-must-change .tree-section { display: none; }

/* Senha provisória exibida uma única vez (administrador interno e administrador da empresa) */
.credential-box { display: grid; gap: 10px; max-width: 640px; margin: 14px 0; padding: 16px; color: var(--white); background: var(--surface-soft); border: 1px solid var(--gold-light); border-radius: var(--radius-s); font-size: 13px; line-height: 1.6; }
.credential-box[hidden] { display: none; }
.credential-box p { margin: 0; color: var(--slate-300); }
.credential-value { display: block; padding: 12px; font: 600 18px var(--mono); letter-spacing: .06em; color: var(--gold-light); background: var(--navy-700); border-radius: var(--radius-s); user-select: all; overflow-wrap: anywhere; }
.credential-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.credential-actions button { min-height: 36px; padding: 0 12px; color: var(--navy); background: var(--gold-light); border: 0; border-radius: var(--radius-s); font-size: 12px; font-weight: 600; cursor: pointer; }
.contractor-form select { flex: 1 1 220px; min-height: 44px; padding: 0 12px; color: var(--white); background: var(--navy-700); border: 1px solid var(--line-strong); border-radius: var(--radius-s); font-size: 14px; }
