/* Portal do Estúdio. As cores são as do sistema visual do programa (docs/design/sistema-visual.md), escuro por padrão
   e claro quando o aparelho pede. Fontes do próprio sistema: nada vem de fora. */

:root {
  color-scheme: dark;
  --fundo: #0b0e14;
  --brilho: rgb(124 58 237 / 0.22);
  --painel: #121722;
  --campo: #1a2030;
  --linha: rgb(255 255 255 / 0.09);
  --texto: #f1f5f9;
  --texto-suave: #94a3b8;
  --primaria: #7c3aed;
  --primaria-forte: #8b5cf6;
  --primaria-suave: rgb(124 58 237 / 0.16);
  --primaria-texto: #c4b5fd;
  --perigo-suave: rgb(239 68 68 / 0.14);
  --perigo-texto: #fca5a5;
  --sombra: 0 24px 60px rgb(0 0 0 / 0.45);
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --fundo: #f5f3ff;
    --brilho: rgb(124 58 237 / 0.14);
    --painel: #ffffff;
    --campo: #f8fafc;
    --linha: rgb(15 23 42 / 0.12);
    --texto: #0f172a;
    --texto-suave: #475569;
    --primaria-texto: #6d28d9;
    --perigo-suave: #fee2e2;
    --perigo-texto: #991b1b;
    --sombra: 0 24px 60px rgb(76 29 149 / 0.12);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(60rem 30rem at 50% -10rem, var(--brilho), transparent 70%),
    var(--fundo);
  color: var(--texto);
  font-family: 'Segoe UI', system-ui, -apple-system, Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid var(--primaria-forte);
  outline-offset: 3px;
}

.pagina {
  width: min(100% - 32px, 460px);
  padding: 40px 0 32px;
}

.marca {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.logo {
  width: 60px;
  height: 60px;
  flex: none;
  filter: drop-shadow(0 8px 18px rgb(124 58 237 / 0.35));
}

h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.lema {
  margin: 4px 0 0;
  color: var(--texto-suave);
}

.cartao {
  background: var(--painel);
  border: 1px solid var(--linha);
  border-radius: 20px;
  padding: 28px 24px;
  box-shadow: var(--sombra);
}

h2 {
  margin: 0 0 8px;
  font-size: 21px;
  line-height: 1.25;
}

h3 {
  margin: 0 0 12px;
  font-size: 17px;
}

.texto {
  margin: 0 0 20px;
  color: var(--texto-suave);
}

.texto a {
  color: var(--primaria-texto);
}

.formulario {
  display: grid;
  gap: 10px;
}

label {
  font-size: 15px;
  font-weight: 600;
}

input {
  width: 100%;
  height: 54px;
  padding: 0 16px;
  border: 1px solid var(--linha);
  border-radius: 12px;
  background: var(--campo);
  color: var(--texto);
  font: inherit;
  font-size: 19px;
}

input::placeholder {
  color: var(--texto-suave);
  opacity: 0.6;
}

input:focus {
  border-color: var(--primaria-forte);
}

.campo-codigo {
  height: 64px;
  text-align: center;
  font-size: 30px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.35em;
  padding-left: calc(16px + 0.35em);
}

.botao {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 54px;
  margin-top: 6px;
  padding: 12px 20px;
  border: 0;
  border-radius: 12px;
  background: var(--primaria);
  color: #ffffff;
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.botao:hover:not(:disabled) {
  background: var(--primaria-forte);
}

.botao:active:not(:disabled) {
  transform: translateY(1px);
}

.botao:disabled {
  cursor: progress;
  opacity: 0.7;
}

.botao-grande {
  min-height: 64px;
  font-size: 18px;
  box-shadow: 0 12px 28px rgb(124 58 237 / 0.35);
}

.icone {
  width: 24px;
  height: 24px;
  flex: none;
}

.botao-link {
  padding: 8px 4px;
  border: 0;
  background: none;
  color: var(--primaria-texto);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.botao-link:hover:not(:disabled) {
  text-decoration: underline;
}

.botao-link:disabled {
  color: var(--texto-suave);
  cursor: default;
}

.acoes {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
}

.sair {
  display: block;
  margin: 20px auto 0;
}

.aviso {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--perigo-suave);
  color: var(--perigo-texto);
  font-size: 15px;
}

.aviso-info {
  margin: 0 0 16px;
  background: var(--primaria-suave);
  color: var(--texto);
}

.detalhe {
  margin: 12px 0 0;
  color: var(--texto-suave);
  font-size: 15px;
  text-align: center;
}

.progresso {
  margin-top: 18px;
}

progress {
  display: block;
  width: 100%;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: var(--campo);
  overflow: hidden;
  appearance: none;
}

progress::-webkit-progress-bar {
  background: var(--campo);
  border-radius: 999px;
}

progress::-webkit-progress-value {
  background: var(--primaria-forte);
  border-radius: 999px;
}

progress::-moz-progress-bar {
  background: var(--primaria-forte);
  border-radius: 999px;
}

.passos {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--linha);
}

.passos ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: passo;
  display: grid;
  gap: 14px;
}

.passos li {
  position: relative;
  padding-left: 44px;
  counter-increment: passo;
}

.passos li::before {
  content: counter(passo);
  position: absolute;
  left: 0;
  top: -1px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primaria-suave);
  color: var(--primaria-texto);
  font-weight: 700;
}

.arquivo {
  overflow-wrap: anywhere;
  font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace;
  font-size: 14px;
}

.rodape {
  margin: 20px 0 0;
  color: var(--texto-suave);
  font-size: 14px;
  text-align: center;
}

.sem-js {
  position: fixed;
  inset: auto 16px 16px;
  margin: 0;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--perigo-suave);
  color: var(--perigo-texto);
  text-align: center;
}

@media (max-width: 380px) {
  .cartao {
    padding: 22px 18px;
  }

  h1 {
    font-size: 26px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
