/* 1Desk Pro — base visual comum (site, área do cliente e páginas de estado).
   Kit de marca: #007BFF · #0A1F44 · #00D4FF · #FFFFFF · Montserrat.
   Sem estilo dentro do HTML: a política de segurança do site (CSP) bloqueia; tudo vive aqui. */

@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 300 800; font-display: swap;
  src: url("../fonts/montserrat-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 300 800; font-display: swap;
  src: url("../fonts/montserrat-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --azul: #007BFF; --marinho: #0A1F44; --azul-claro: #00D4FF; --branco: #FFFFFF;
  --fundo: #061530; --superficie: #0A1F44; --superficie-2: #0F2A57; --linha: #1A3766; --linha-forte: #26487F;
  --texto: #FFFFFF; --texto-2: #B4C2DB; --texto-3: #7B8FB3;
  --azul-hover: #0066D9; --azul-10: rgba(0, 123, 255, .12); --foco: 0 0 0 3px rgba(0, 212, 255, .35);
  --sucesso: #1FB86E; --sucesso-10: rgba(31, 184, 110, .14); --sucesso-txt: #4ADE95;
  --alerta: #F2A93B; --alerta-10: rgba(242, 169, 59, .14); --alerta-txt: #F7C26B;
  --perigo: #F04B4B; --perigo-10: rgba(240, 75, 75, .14); --perigo-txt: #FF8A8A;
  --info-10: rgba(0, 212, 255, .12); --neutro-10: rgba(180, 194, 219, .12);
  --fonte: "Montserrat", "Segoe UI", system-ui, sans-serif;
  --mono: Consolas, "Roboto Mono", ui-monospace, Menlo, monospace;
  --r-1: 4px; --r-2: 8px; --r-3: 12px;
  --sombra-2: 0 8px 24px rgba(2, 8, 23, .45); --sombra-3: 0 24px 64px rgba(2, 8, 23, .6);
  --largura: 1200px; --rapido: .15s ease;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--fundo); color: var(--texto); font-family: var(--fonte); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: none; box-shadow: var(--foco); border-radius: var(--r-1); }
[hidden] { display: none !important; }
::selection { background: rgba(0, 123, 255, .35); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* ---------- tipografia ---------- */
.t-display { font-size: clamp(36px, 5vw, 56px); line-height: 1.12; font-weight: 700; letter-spacing: -.02em; margin: 0; }
.t-h1 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.2; font-weight: 700; letter-spacing: -.015em; margin: 0; }
.t-h2 { font-size: clamp(24px, 2.6vw, 32px); line-height: 1.25; font-weight: 700; letter-spacing: -.01em; margin: 0; }
.t-h3 { font-size: 22px; line-height: 30px; font-weight: 600; margin: 0; }
.t-h4 { font-size: 17px; line-height: 25px; font-weight: 600; margin: 0; }
.t-grande { font-size: 18px; line-height: 28px; color: var(--texto-2); margin: 0; }
.t-pequeno { font-size: 14px; line-height: 20px; }
.t-mini { font-size: 12px; line-height: 16px; }
.t-legenda { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--texto-3); }
.t-legenda.destaque { color: var(--azul-claro); }
.t-mono { font-family: var(--mono); letter-spacing: .02em; }
.apoio { color: var(--texto-2); }
.fraco { color: var(--texto-3); }
.forte { color: var(--texto); font-weight: 600; }
.centro { text-align: center; }
.link { color: var(--azul-claro); font-weight: 600; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
p { margin: 0; }

/* ---------- espaço (sem estilo inline) ---------- */
.pilha { display: flex; flex-direction: column; }
.linha { display: flex; align-items: center; }
.quebra { flex-wrap: wrap; }
.g-1 { gap: 4px; } .g-2 { gap: 8px; } .g-3 { gap: 12px; } .g-4 { gap: 16px; } .g-5 { gap: 24px; } .g-6 { gap: 32px; }
.mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mt-5 { margin-top: 24px; } .mt-6 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; }
.cresce { flex: 1; min-width: 0; }
.direita { margin-left: auto; }
.inicio { align-self: flex-start; }
.largura-total { width: 100%; }

/* ---------- ícones (traço, 20 px) ---------- */
.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ic-16 { width: 16px; height: 16px; }
.ic-24 { width: 24px; height: 24px; }

/* ---------- logo ---------- */
.logo { height: 26px; width: auto; }
.logo-p { height: 22px; }

/* ---------- botões: um primário por tela; o resto tem menos peso ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border: 1px solid transparent;
  border-radius: var(--r-1); font-size: 15px; font-weight: 600; letter-spacing: .01em; white-space: nowrap; background: none;
  transition: background var(--rapido), border-color var(--rapido), color var(--rapido), transform var(--rapido); }
.btn:active { transform: translateY(1px); }
.btn-p { height: 36px; padding: 0 14px; font-size: 14px; }
.btn-g { height: 52px; padding: 0 28px; font-size: 16px; }
.btn-primario { background: var(--azul); color: var(--branco); }
.btn-primario:hover { background: var(--azul-hover); }
.btn-secundario { border-color: var(--linha-forte); color: var(--texto); }
.btn-secundario:hover { border-color: var(--texto-2); background: rgba(255, 255, 255, .03); }
.btn-fantasma { color: var(--texto-2); }
.btn-fantasma:hover { color: var(--texto); background: rgba(255, 255, 255, .05); }
.btn-perigo { background: var(--perigo); color: var(--branco); }
.btn-perigo:hover { background: #D63B3B; }
.btn-perigo-contorno { border-color: rgba(240, 75, 75, .5); color: var(--perigo-txt); }
.btn-perigo-contorno:hover { background: var(--perigo-10); }
.btn-icone { width: 36px; height: 36px; padding: 0; }
.btn:disabled, .btn.desabilitado { opacity: .45; cursor: not-allowed; pointer-events: none; }
.btn.carregando { color: transparent !important; position: relative; pointer-events: none; }
.btn.carregando::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: var(--branco); animation: gira .8s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }

/* ---------- campos ---------- */
.campo { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.campo > label, .rotulo { font-size: 13px; font-weight: 600; color: var(--texto-2); }
.entrada { display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 14px; background: var(--superficie-2); border: 1px solid var(--linha);
  border-radius: var(--r-1); min-width: 0; transition: border-color var(--rapido), box-shadow var(--rapido); }
.entrada:hover { border-color: var(--linha-forte); }
.entrada:focus-within { border-color: var(--azul-claro); box-shadow: var(--foco); }
.entrada input, .entrada select { flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: 0; font-size: 15px; }
.entrada select { appearance: none; -webkit-appearance: none; cursor: pointer; }
.entrada select option { background: var(--superficie); color: var(--texto); }
.entrada input::placeholder, textarea.entrada::placeholder { color: var(--texto-3); }
.entrada > .ic { color: var(--texto-3); }
.entrada .olho { display: grid; place-items: center; width: 32px; height: 32px; margin-right: -8px; border: 0; background: none; color: var(--texto-3); border-radius: var(--r-1); }
.entrada .olho:hover { color: var(--texto); }
.entrada.erro { border-color: var(--perigo); }
textarea.entrada { height: auto; min-height: 96px; padding: 12px 14px; resize: vertical; outline: 0; font-size: 15px; }
.ajuda { font-size: 13px; color: var(--texto-3); }
.ajuda.erro { color: var(--perigo-txt); }
.caixa { display: inline-flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--texto-2); cursor: pointer; }
.caixa input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--azul); flex: none; }
.forca { display: flex; gap: 4px; }
.forca span { flex: 1; height: 4px; border-radius: 2px; background: var(--linha); transition: background var(--rapido); }
.forca[data-n="1"] span:nth-child(-n+1), .forca[data-n="2"] span:nth-child(-n+2) { background: var(--alerta); }
.forca[data-n="3"] span:nth-child(-n+3), .forca[data-n="4"] span { background: var(--sucesso); }

/* ---------- estados ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px; border-radius: var(--r-1); font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.b-ok { background: var(--sucesso-10); color: var(--sucesso-txt); }
.b-alerta { background: var(--alerta-10); color: var(--alerta-txt); }
.b-neutro { background: var(--neutro-10); color: var(--texto-2); }
.b-perigo { background: var(--perigo-10); color: var(--perigo-txt); }
.b-info { background: var(--info-10); color: var(--azul-claro); }
.aviso { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--r-1); border: 1px solid; font-size: 14px; line-height: 20px; color: var(--texto-2); }
.aviso b { display: block; color: var(--texto); font-weight: 600; margin-bottom: 2px; }
.aviso.info { background: var(--info-10); border-color: rgba(0, 212, 255, .3); } .aviso.info > .ic { color: var(--azul-claro); }
.aviso.ok { background: var(--sucesso-10); border-color: rgba(31, 184, 110, .35); } .aviso.ok > .ic { color: var(--sucesso); }
.aviso.alerta { background: var(--alerta-10); border-color: rgba(242, 169, 59, .35); } .aviso.alerta > .ic { color: var(--alerta); }
.aviso.erro { background: var(--perigo-10); border-color: rgba(240, 75, 75, .4); } .aviso.erro > .ic { color: var(--perigo); }
.placeholder { display: inline-block; padding: 1px 6px; border: 1px dashed var(--alerta); border-radius: 3px; color: var(--alerta-txt); font-size: 12px; font-weight: 600; letter-spacing: .02em; }

/* faixa do modo demonstração: sempre visível, para não confundir com o site no ar */
.faixa-demo { position: relative; z-index: 60; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 7px 16px;
  background: repeating-linear-gradient(-45deg, rgba(242, 169, 59, .16) 0 12px, rgba(242, 169, 59, .08) 12px 24px);
  border-bottom: 1px solid rgba(242, 169, 59, .4); color: var(--alerta-txt); font-size: 13px; font-weight: 600; text-align: center; }
.faixa-demo a { color: var(--texto); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- blocos ---------- */
.bloco { background: var(--superficie); border: 1px solid var(--linha); border-radius: var(--r-2); }
.bloco-cab { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 24px; border-bottom: 1px solid var(--linha); }
.bloco-corpo { padding: 24px; display: flex; flex-direction: column; gap: 20px; }
.dados { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 24px; margin: 0; }
.dados div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.dados dt { font-size: 12px; font-weight: 600; color: var(--texto-3); letter-spacing: .04em; text-transform: uppercase; }
.dados dd { margin: 0; font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.chave-grande { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 12px 12px 16px; background: var(--fundo);
  border: 1px solid var(--linha-forte); border-radius: var(--r-1); }
.chave-grande code { font-family: var(--mono); font-size: 16px; letter-spacing: .04em; white-space: nowrap; overflow-x: auto; }
.chave-grande .btn { flex: none; }

/* ---------- toast e modal ---------- */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: flex; flex-direction: column; gap: 8px; max-width: calc(100vw - 40px); }
.toast { display: flex; align-items: center; gap: 12px; padding: 12px 16px; min-width: 260px; background: var(--superficie); border: 1px solid var(--linha-forte);
  border-left: 3px solid var(--sucesso); border-radius: var(--r-1); box-shadow: var(--sombra-2); font-size: 14px; animation: entra .18s ease-out; }
.toast.erro { border-left-color: var(--perigo); }
@keyframes entra { from { opacity: 0; transform: translateY(6px); } }
dialog.modal { width: 520px; max-width: calc(100vw - 32px); padding: 0; color: var(--texto); background: var(--superficie); border: 1px solid var(--linha-forte);
  border-radius: var(--r-2); box-shadow: var(--sombra-3); }
dialog.modal::backdrop { background: rgba(2, 8, 23, .72); }
.modal-cab { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 22px 24px 0; }
.modal-corpo { padding: 14px 24px 22px; display: flex; flex-direction: column; gap: 16px; color: var(--texto-2); font-size: 15px; }
.modal-rodape { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 24px; border-top: 1px solid var(--linha); }

/* ---------- seletor de idioma ---------- */
.idioma { display: inline-flex; border: 1px solid var(--linha); border-radius: var(--r-1); overflow: hidden; }
.idioma button { border: 0; background: none; padding: 5px 9px; font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--texto-3); }
.idioma button[aria-pressed="true"] { background: var(--superficie-2); color: var(--texto); }
.idioma button:hover { color: var(--texto); }

/* ---------- páginas de estado (erro, licença inválida...) ---------- */
.estado-pagina { min-height: 100vh; display: flex; flex-direction: column; }
.estado-pagina > header { display: flex; align-items: center; justify-content: space-between; padding: 22px 32px; }
.estado-corpo { flex: 1; display: grid; place-items: center; padding: 32px 16px 96px; }
.estado-caixa { width: 100%; max-width: 560px; display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.estado-codigo { font-family: var(--mono); font-size: 13px; color: var(--azul-claro); letter-spacing: .08em; }
.simb { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; }
.simb .ic { width: 26px; height: 26px; }
.simb.ok { background: var(--sucesso-10); color: var(--sucesso); }
.simb.espera { background: var(--alerta-10); color: var(--alerta); }
.simb.erro { background: var(--perigo-10); color: var(--perigo); }
.simb.info { background: var(--info-10); color: var(--azul-claro); }
.girando { width: 26px; height: 26px; border-radius: 50%; border: 3px solid rgba(0, 212, 255, .25); border-top-color: var(--azul-claro); animation: gira .9s linear infinite; }

@media (max-width: 640px) {
  .bloco-cab, .bloco-corpo { padding-left: 16px; padding-right: 16px; }
  .chave-grande { flex-wrap: wrap; padding: 12px; }
  .chave-grande code { font-size: 13px; }
  .chave-grande .btn { width: 100%; }
  .estado-pagina > header { padding: 18px 16px; }
  .toasts { left: 16px; right: 16px; bottom: 16px; }
  .toast { min-width: 0; }
}
