/* ═══════════════════════════════════════════
   VARIÁVEIS GLOBAIS
═══════════════════════════════════════════ */
:root {
  /* Cores de fundo */
  --bg:         #0e1015;
  --surface:    #141820;
  --surface2:   #1a2030;
  --surface3:   #1f2840;

  /* Bordas */
  --border:     #1a2030;
  --border2:    #2d3a52;

  /* Cor de destaque */
  --accent:     #00b4d8;
  --accent-dim: rgba(0, 180, 216, 0.12);

  /* Texto */
  --text:       #dce8f7;
  --text2:      #8fa3bf;
  --muted:      #4d6080;

  /* Estados */
  --success:    #3ba55d;
  --error:      #ed4245;
  --warning:    #faa61a;

  /* Tipografia */
  --sans: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

/* ═══════════════════════════════════════════
   RESET E BASE
═══════════════════════════════════════════ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* ═══════════════════════════════════════════
   SCROLLBAR GLOBAL
═══════════════════════════════════════════ */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border2);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

/* ═══════════════════════════════════════════
   BOTÕES
═══════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.8rem;
  border-radius: 4px;
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  border: none;
}

.btn:hover {
  text-decoration: none;
}

.btn-primario {
  background: var(--accent);
  color: #000;
}
.btn-primario:hover {
  background: #00cfef;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 180, 216, 0.3);
}

.btn-secundario {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border2);
}
.btn-secundario:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.btn-perigo {
  background: transparent;
  color: var(--error);
  border: 1px solid rgba(237, 66, 69, 0.3);
}
.btn-perigo:hover {
  background: rgba(237, 66, 69, 0.08);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ═══════════════════════════════════════════
   CAMPOS DE FORMULÁRIO
═══════════════════════════════════════════ */
.campo {
  margin-bottom: 1.1rem;
}

.campo label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.campo input,
.campo textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border2);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.9rem;
  padding: 0.7rem 0.9rem;
  border-radius: 4px;
  outline: none;
  transition: border-color 0.15s;
}

.campo input:focus,
.campo textarea:focus {
  border-color: var(--accent);
}

.campo input:disabled {
  opacity: 0.45;
}

.campo textarea {
  resize: vertical;
  min-height: 80px;
}

.campo .dica {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.35rem;
}

/* ═══════════════════════════════════════════
   MENSAGENS DE FEEDBACK
═══════════════════════════════════════════ */
.msg-erro {
  display: none;
  color: var(--error);
  background: rgba(237, 66, 69, 0.08);
  border: 1px solid rgba(237, 66, 69, 0.2);
  border-radius: 4px;
  padding: 0.6rem 0.9rem;
  font-size: 0.83rem;
  font-family: var(--mono);
  margin-top: 0.75rem;
}

.msg-sucesso {
  display: none;
  color: var(--success);
  background: rgba(59, 165, 93, 0.08);
  border: 1px solid rgba(59, 165, 93, 0.2);
  border-radius: 4px;
  padding: 0.6rem 0.9rem;
  font-size: 0.83rem;
  font-family: var(--mono);
  margin-top: 0.75rem;
}

/* ═══════════════════════════════════════════
   GRELHA DE FUNDO ANIMADA
   (usada na index, login e register)
═══════════════════════════════════════════ */
.fundo-grelha::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 180, 216, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 180, 216, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  animation: grelhaMove 20s linear infinite;
  pointer-events: none;
  z-index: 0;
}
@keyframes grelhaMove {
  to { background-position: 40px 40px; }
}

/* ═══════════════════════════════════════════
   CURSOR A PISCAR
   (usado no título da index)
═══════════════════════════════════════════ */
.cursor-piscar {
  display: inline-block;
  width: 2px;
  height: 0.9em;
  background: var(--accent);
  vertical-align: text-bottom;
  margin-left: 2px;
  animation: piscar 1s step-end infinite;
}
@keyframes piscar {
  50% { opacity: 0; }
}

/* ═══════════════════════════════════════════
   BADGE / ETIQUETA
   (usado no topo da index)
═══════════════════════════════════════════ */
.badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--accent);
  background: rgba(0, 180, 216, 0.08);
  border: 1px solid rgba(0, 180, 216, 0.2);
  padding: 0.35rem 1rem;
  border-radius: 2px;
}