:root {
  --noite: #06063a;
  --marinho: #0f0f72;
  --azul: #2800c8;
  --azul2: #4930e2;
  --ciano: #00aeef;
  --amarelo: #f0fa00;
  --grad-marca: linear-gradient(135deg, #2800c8 0%, #4930e2 55%, #00aeef 130%);
  --grad-amarelo: linear-gradient(180deg, #f6ff3c 0%, #f0fa00 100%);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

@property --giro { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@property --e { syntax: "<number>"; inherits: false; initial-value: .4; }

html { scrollbar-width: thin; scrollbar-color: #c8d0ea transparent; }
::selection { background: var(--amarelo); color: var(--marinho); }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #c8d0ea; border-radius: 6px; border: 2px solid transparent; background-clip: padding-box; }

.btn-yellow { background: var(--grad-amarelo); box-shadow: 0 10px 24px rgba(200, 210, 0, .38), inset 0 1px 0 rgba(255, 255, 255, .6); position: relative; overflow: hidden; transition: translate .25s var(--ease), box-shadow .25s; }
.btn-yellow:hover { translate: 0 -2px; box-shadow: 0 16px 34px rgba(200, 210, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .6); }
.btn-outline { background: rgba(255, 255, 255, .7); backdrop-filter: blur(6px); transition: background .25s, color .25s, translate .25s var(--ease), box-shadow .25s; }
.btn-outline:hover { translate: 0 -2px; box-shadow: 0 12px 26px rgba(40, 0, 200, .2); }

/* ---------- carregando ---------- */
#carga {
  position: fixed; inset: 0; z-index: 5000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px;
  background: radial-gradient(circle at 50% 40%, #2a0fd1 0%, #06063a 72%); transition: opacity .6s ease, visibility 0s .6s;
}
#carga.some { opacity: 0; visibility: hidden; }
#carga img { width: 92px; content: url("n-branco.png"); animation: carga-pulso 1.7s ease-in-out infinite; }
#carga .barra { width: 150px; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .16); overflow: hidden; }
#carga .barra i { display: block; width: 42%; height: 100%; border-radius: 2px; background: linear-gradient(90deg, #f0fa00, #00aeef); animation: carga-barra 1.1s ease-in-out infinite; }
@keyframes carga-pulso { 0%, 100% { transform: scale(1); opacity: .85; } 50% { transform: scale(1.09); opacity: 1; } }
@keyframes carga-barra { 0% { transform: translateX(-120%); } 100% { transform: translateX(340%); } }

.rede-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
#confete { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 200000; }

/* ---------- janelas do motor (tipificação, aviso, carregando) ---------- */
.modal-overlay { backdrop-filter: blur(10px) saturate(1.1); background: radial-gradient(circle at 50% 30%, rgba(40, 0, 200, .5), rgba(6, 6, 58, .82)); animation: fundo-entra .35s ease both; }
@keyframes fundo-entra { from { opacity: 0; } }
.modal-card { border-radius: 32px; animation: cartao-entra .55s var(--ease) both; box-shadow: 0 40px 100px rgba(10, 0, 100, .5), 0 0 0 1px rgba(255, 255, 255, .6) inset; }
@keyframes cartao-entra { from { opacity: 0; transform: translateY(34px) scale(.93); filter: blur(6px); } }
.modal-bar { height: 6px; background: linear-gradient(90deg, var(--amarelo), #b8f400 45%, var(--ciano)); }
.custom-modal-box { border-radius: 32px; }
.custom-modal-icon { background: var(--grad-marca); color: #fff; box-shadow: 0 10px 24px rgba(40, 0, 200, .3); }
.tabulacao-field select, .tabulacao-field textarea { border-radius: 14px; border: 2px solid transparent; background: #f3f4fb; padding: 12px 16px; font: 400 15px var(--font); transition: border-color .2s, box-shadow .25s, background .2s; }
.tabulacao-field select:focus, .tabulacao-field textarea:focus { outline: none; border-color: var(--azul); background: #fff; box-shadow: 0 0 0 5px rgba(40, 0, 200, .12); }
.tabulacao-field textarea { width: 100%; box-sizing: border-box; resize: vertical; }
.tabulacao-secao { display: flex; align-items: center; gap: 10px; }
.tabulacao-secao::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(40, 0, 200, .2), transparent); }
.tipificacao-check { margin-top: 10px; padding: 12px 16px; border-radius: 14px; font: 400 13px/1.5 var(--font); display: flex; flex-direction: column; gap: 3px; background: #eef0f9; border-left: 4px solid #a6b0d4; }
.tipificacao-check strong { font-weight: 600; }
.tipificacao-check.correta { background: #e5f8ee; border-left-color: #00b85a; }
.tipificacao-check.incorreta { background: #ffeaee; border-left-color: #ff4b6e; }
.tipificacao-check ul { margin: 4px 0 0 16px; list-style: disc; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
