/* Nort: componentes compartilhados (site + painel) */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--fog); color: var(--navy);
  font-family: var(--font); font-size: var(--t-body-sm); line-height: 1.5;
  -webkit-font-smoothing: antialiased; font-feature-settings: "ss01";
}
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--electric); outline-offset: 3px; border-radius: 6px; }
.num { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Tipo */
.display { font-size: var(--t-display); font-weight: 700; letter-spacing: var(--tr-display); line-height: 0.91; margin: 0; }
.h-lg { font-size: var(--t-h-lg); font-weight: 700; letter-spacing: -0.04em; line-height: 0.9; margin: 0; }
.h { font-size: var(--t-h); font-weight: 700; letter-spacing: var(--tr-h); line-height: 1; margin: 0; }
.h-sm { font-size: var(--t-h-sm); font-weight: 600; letter-spacing: var(--tr-h-sm); line-height: 1.18; margin: 0; }
.sub { font-size: var(--t-sub); font-weight: 600; letter-spacing: var(--tr-sub); line-height: 1.25; margin: 0; }
.lede { font-size: var(--t-body); letter-spacing: var(--tr-body); line-height: 1.41; color: var(--dusk); margin: 0; }
.label { font-size: 11px; font-weight: 700; letter-spacing: var(--tr-tag); text-transform: uppercase; color: var(--dusk); } /* Smoke reprovava em contraste (2,5:1) */
.muted { color: var(--dusk); }

/* Botões */
.btn {
  display: inline-flex; align-items: center; gap: 10px; border: 0; border-radius: var(--r-pill);
  padding: 12px 20px; font-size: 16px; font-weight: 600; white-space: nowrap; text-decoration: none;
  transition: transform var(--d-fast) var(--ease), box-shadow var(--d-fast) var(--ease), background var(--d-fast);
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(1px) scale(0.98); }
.btn-primary { background: var(--navy); color: var(--white); box-shadow: var(--sh-btn); }
.btn-primary:hover { box-shadow: var(--sh-raised); }
.btn-ghost { background: var(--white); color: var(--cornflower); box-shadow: inset 0 0 0 1.5px var(--hyacinth); }
.btn-lg { padding: 16px 28px; font-size: 18px; }
.btn-icon { width: 44px; height: 44px; padding: 0; border: 0; justify-content: center; background: transparent; border-radius: var(--r-pill); }
.btn-icon:hover { background: var(--mist); }

/* Superfícies */
.card { background: var(--white); border-radius: var(--r-card); box-shadow: var(--sh-card); padding: var(--s3); }
.card-nested { background: var(--fog); border-radius: var(--r-card); padding: var(--s2); }
.card-voltage { background: var(--voltage); color: var(--abyss); border-radius: var(--r-card); box-shadow: var(--sh-edge); padding: var(--s3); }

/* Etiquetas (Category Tag) */
.tag {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: var(--r-pill);
  background: var(--fog); color: var(--dusk); font-size: 11px; font-weight: 700;
  letter-spacing: var(--tr-tag); text-transform: uppercase; white-space: nowrap;
}
.tag svg { width: 14px; height: 14px; color: var(--cornflower); }
.card .tag { background: var(--fog); }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--navy); white-space: nowrap; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--silver)); box-shadow: 0 0 0 1px rgba(32,41,76,.15); }

/* Ponto "ao vivo" (Electric, 1 por tela) */
.live { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--electric); position: relative; }
.live i::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--electric); animation: pulse 1.8s var(--ease) infinite; }
@keyframes pulse { from { transform: scale(0.6); opacity: 1; } to { transform: scale(1.8); opacity: 0; } }

/* Nav pill (Fold) */
.nav-pill {
  display: flex; align-items: center; gap: var(--s3); padding: 10px 12px 10px 20px;
  background: rgba(240, 241, 245, 0.86); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  border-radius: var(--r-panel); box-shadow: var(--sh-raised);
}
.nav-pill a { color: var(--navy); font-weight: 600; font-size: 15px; }
.nav-pill a[aria-current="page"], .nav-pill a.ativo { color: var(--link); }
.marca { display: inline-flex; align-items: center; gap: 8px; color: var(--navy); font-weight: 900; font-size: 22px; letter-spacing: -0.06em; }
.marca:hover { text-decoration: none; }
.marca svg { width: 26px; height: 26px; }

/* Abas EN / PT / ES */
.abas { display: inline-flex; padding: 4px; background: var(--fog); border-radius: var(--r-pill); gap: 2px; }
.abas button { border: 0; background: transparent; padding: 7px 14px; border-radius: var(--r-pill); font-size: 13px; font-weight: 600; color: var(--dusk); transition: background var(--d-fast) var(--ease), color var(--d-fast); }
.abas button[aria-selected="true"] { background: var(--white); color: var(--navy); box-shadow: var(--sh-btn); }

/* Toasts */
.toasts { position: fixed; right: 20px; bottom: 20px; display: grid; gap: 10px; z-index: 60; width: min(380px, calc(100vw - 40px)); }
.toast {
  display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: center;
  background: var(--white); border-radius: var(--r-card); box-shadow: var(--sh-card); padding: 14px 16px;
  animation: toast-in var(--d-slow) var(--ease) both;
}
.toast.sai { animation: toast-out var(--d-mid) var(--ease) both; }
.toast .ico { width: 36px; height: 36px; border-radius: 50%; background: var(--fog); display: grid; place-items: center; color: var(--cornflower); }
.toast b { display: block; font-size: 14px; }
.toast span { font-size: 13px; color: var(--dusk); }
.toast time { font-size: 12px; color: var(--dusk); }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px) scale(0.96); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(40px); } }

/* Carimbo */
.carimbo {
  display: inline-block; padding: 4px 10px; border: 2px solid currentColor; border-radius: 6px;
  font-weight: 900; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--cornflower);
  transform: rotate(-6deg);
}
.carimbo.bate { animation: bate 0.5s var(--ease) both; }
@keyframes bate { 0% { transform: rotate(-6deg) scale(2.2); opacity: 0; } 60% { transform: rotate(-6deg) scale(0.92); opacity: 1; } 100% { transform: rotate(-6deg) scale(1); } }

/* Chave de som */
.som[aria-pressed="false"] .on, .som[aria-pressed="true"] .off { display: none; }
.nav-pill a.btn-primary { color: var(--white); }
.nav-pill a.btn:hover { text-decoration: none; }
[hidden] { display: none !important; }

/* Avatar + menu da conta (painel e Minha conta) */
button.avatar { border: 0; cursor: pointer; transition: box-shadow var(--d-fast) var(--ease); }
button.avatar:hover, button.avatar[aria-expanded="true"] { box-shadow: 0 0 0 3px var(--mist); }
.menu-conta { position: fixed; top: 84px; right: max(16px, calc((100vw - var(--max)) / 2)); width: min(300px, calc(100vw - 32px)); z-index: 66; padding: 8px; display: grid; animation: toast-in var(--d-mid) var(--ease); }
.menu-quem { display: flex; gap: 12px; align-items: center; padding: 10px 10px 14px; border-bottom: 1px solid var(--fog); margin-bottom: 6px; }
.menu-quem .avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--cornflower); color: var(--white); display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: none; }
.menu-quem b { display: block; font-size: 15px; }
.menu-quem span { font-size: 13px; color: var(--dusk); word-break: break-all; }
.menu-demo { margin: 0 10px 6px; }
.menu-conta a, .menu-conta button { display: flex; align-items: center; gap: 12px; padding: 11px 10px; border-radius: 10px; color: var(--navy); font-weight: 600; font-size: 15px; border: 0; background: none; text-align: left; width: 100%; }
.menu-conta a:hover, .menu-conta button:hover, .menu-conta [role=menuitem]:focus-visible { background: var(--fog); text-decoration: none; }
.menu-conta svg { color: var(--cornflower); }
.menu-conta .menu-sair { border-top: 1px solid var(--fog); border-radius: 0 0 10px 10px; margin-top: 6px; color: var(--rubro); }
.menu-conta .menu-sair svg { color: var(--rubro); }

/* Link de pular para o conteúdo: invisível até receber foco do teclado */
.pular { position: fixed; left: 16px; top: -60px; z-index: 100; background: var(--navy); color: var(--white); padding: 12px 18px; border-radius: var(--r-pill); font-weight: 600; transition: top var(--d-fast) var(--ease); }
.pular:focus { top: 16px; text-decoration: none; }

/* Seletor de idioma PT | ES */
.abas.idioma { padding: 3px; flex: none; }
.abas.idioma button { padding: 6px 10px; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; }
.abas.idioma button[aria-pressed="true"] { background: var(--white); color: var(--navy); box-shadow: var(--sh-btn); }
