/*
 * Login, cadastro, painel e admin. Paleta "Entidade", a mesma da landing e
 * da área da fila. Os nomes das variáveis (--bg, --line, --texto…) ficam os
 * mesmos porque páginas e estilos inline já usam esses nomes.
 */
:root {
  --bg: #0b0809;
  --card: #151012;
  --card2: #1d1619;
  --line: #2b2023;
  --line-forte: #3d2e32;
  --texto: #f0e7dc;
  --sub: #a99d97;
  --acento: #b3121f;        /* fundo de botão (texto osso por cima: 6:1) */
  --acento-hover: #c81a28;
  --acento-texto: #f05a5a;  /* vermelho como texto sobre o escuro */
  --erro: #f05a5a;
  --ok: #f2b544;
  --display: 'Oswald', 'Arial Narrow', system-ui, sans-serif;
  --body: 'Barlow', system-ui, -apple-system, sans-serif;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--texto);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
  background: radial-gradient(ellipse 900px 520px at 50% -10%, rgba(179, 18, 31, 0.16), transparent 64%), var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
}
.card {
  position: relative;
  width: 100%;
  max-width: 400px;
  background: linear-gradient(180deg, var(--card2), var(--card));
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 32px 28px 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}
.card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--acento); }
.card.larga { max-width: 560px; }

.voltar, .link-discreto { font-size: 13px; color: var(--sub); text-decoration: none; transition: color 200ms ease; }
.voltar:hover { color: var(--texto); }
.link-discreto:hover { color: var(--texto); text-decoration: underline; }
.contato { text-align: center; font-size: 12px; color: var(--sub); }
.contato a { color: var(--acento-texto); text-decoration: none; }
.contato a:hover { text-decoration: underline; }

h1 {
  font-family: var(--display); font-size: 32px; font-weight: 700; line-height: 1;
  letter-spacing: 0.01em; margin: 0 0 8px;
  /* sem caixa-alta: o painel mostra o nome de usuário, e maiúscula muda o nome */
}
p.sub { color: var(--sub); font-size: 14px; margin: 0 0 22px; line-height: 1.45; }
label { display: block; font-size: 13px; font-weight: 600; color: var(--sub); margin: 16px 0 6px; }
input[type="text"], input[type="password"], textarea {
  width: 100%; height: 44px; background: var(--bg); border: 1px solid var(--line-forte); color: var(--texto);
  padding: 10px 12px; border-radius: 6px; font-size: 16px; /* 16px: o iPhone não dá zoom ao focar */
  font-family: inherit; transition: border-color 200ms ease, box-shadow 200ms ease;
}
textarea { height: auto; resize: vertical; min-height: 80px; }
input:focus, textarea:focus {
  outline: none; border-color: var(--acento-texto); box-shadow: 0 0 0 3px rgba(240, 90, 90, 0.25);
}

button {
  width: 100%; margin-top: 22px; height: 48px; border-radius: 6px; border: none; cursor: pointer;
  background: var(--acento); color: var(--texto);
  font-family: var(--display); font-weight: 600; font-size: 18px; letter-spacing: 0.06em; text-transform: uppercase;
  box-shadow: 0 10px 26px rgba(179, 18, 31, 0.28);
  -webkit-tap-highlight-color: transparent;
  transition: transform 160ms var(--ease-out), background-color 200ms ease, box-shadow 200ms ease;
}
button:not(:disabled):active { transform: scale(0.97); }
button:focus-visible { outline: 2px solid var(--texto); outline-offset: 2px; }
button.secundario {
  background: transparent; border: 1px solid var(--line-forte); color: var(--texto); box-shadow: none;
  font-family: var(--body); font-size: 14px; font-weight: 600; text-transform: none; letter-spacing: 0;
}
button:disabled { opacity: 0.55; cursor: default; }
@media (hover: hover) and (pointer: fine) {
  button:not(:disabled):hover { background: var(--acento-hover); box-shadow: 0 14px 34px rgba(179, 18, 31, 0.42); }
  button.secundario:not(:disabled):hover { background: rgba(240, 231, 220, 0.05); border-color: var(--texto); box-shadow: none; }
}

.msg { font-size: 13px; margin-top: 12px; min-height: 18px; }
.msg.erro { color: var(--erro); }
.msg.ok { color: var(--ok); }
.rodape { text-align: center; margin-top: 18px; font-size: 13px; color: var(--sub); }
.rodape a { color: var(--acento-texto); text-decoration: none; font-weight: 600; }
.rodape a:hover { text-decoration: underline; }
.key-box {
  background: var(--bg); padding: 12px; border-radius: 6px; font-size: 12.5px;
  color: var(--ok); word-break: break-all; user-select: all; font-family: ui-monospace, monospace;
  border: 1px solid var(--line); margin-top: 8px;
}
.linha { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: 0.02em; }
.badge.ativa { background: rgba(242, 181, 68, 0.16); color: var(--ok); }
.badge.inativa { background: rgba(240, 90, 90, 0.16); color: var(--erro); }
hr { border: none; border-top: 1px solid var(--line); margin: 22px 0; }

@media (prefers-reduced-motion: reduce) {
  button:not(:disabled):active { transform: none; }
}