:root {
  color-scheme: light dark;
  --fundo: #f4f5f7;
  --cartao: #ffffff;
  --texto: #1c1e21;
  --texto-fraco: #606770;
  --borda: #d0d3d7;
  --campo: #ffffff;
  --acento: #1877f2;
  --erro: #b3261e;
  --erro-fundo: #fdeceb;
  --alerta: #8a6100;
  --alerta-fundo: #fff6e0;
  --raio: 8px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fundo: #18191a;
    --cartao: #242526;
    --texto: #e4e6eb;
    --texto-fraco: #b0b3b8;
    --borda: #4e4f50;
    --campo: #3a3b3c;
    --erro-fundo: #3a1f1e;
    --alerta-fundo: #3a2f14;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--fundo);
  color: var(--texto);
}

.cartao {
  background: var(--cartao);
  padding: 40px 32px;
  border-radius: 12px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, .08), 0 4px 10px rgba(0, 0, 0, .04);
}

h1 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 600;
}

.subtitulo {
  margin: 0 0 24px;
  font-size: 14px;
  color: var(--texto-fraco);
  line-height: 1.5;
}

label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
}

input {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 15px;
  font-family: inherit;
  color: var(--texto);
  background: var(--campo);
  border: 1px solid var(--borda);
  border-radius: var(--raio);
}

input:focus {
  outline: 2px solid var(--acento);
  outline-offset: -1px;
}

button {
  width: 100%;
  padding: 12px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  background: var(--acento);
  border: 0;
  border-radius: var(--raio);
  cursor: pointer;
}

button:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.erro {
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--erro);
  background: var(--erro-fundo);
  border-radius: var(--raio);
}

.alerta {
  padding: 14px;
  margin-bottom: 16px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--alerta);
  background: var(--alerta-fundo);
  border-radius: var(--raio);
}
