/* ============================================
   CORE.CSS
   Reset, variáveis de tema (tokens), tipografia
   e elementos de base compartilhados por todo o painel.
   ============================================ */

:root {
  --bg: #0a0a0a;
  --surface: #111111;
  --surface2: #1a1a1a;
  --border: #222222;
  --accent: #c9a84c;
  --accent-dim: #7a6230;
  --accent-rgb: 201, 168, 76;
  --on-accent: #0a0a0a;
  --text: #e8e8e0;
  --muted: #666;
  --green: #3ddc84;
  --red: #ff6b6b;
  --blue: #5b9cf6;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --font-display: 'Bebas Neue', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --tracking-brand: 6px;
  --tracking-heading: 3px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
  overscroll-behavior-y: none; /* tira o "puxar pra atualizar" do navegador, comportamento de app */
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  min-height: 100vh;
  min-height: 100dvh; /* respeita a barra de status/gestos em tablets/celulares */
  -webkit-user-select: none;
  user-select: none; /* evita selecionar texto sem querer ao tocar, como num app nativo */
}

input, textarea {
  -webkit-user-select: text;
  user-select: text; /* mas campos de digitação continuam selecionáveis normalmente */
}

.icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  vertical-align: middle;
  stroke: currentColor;
}

/* ---------- Telas (login x painel) ---------- */
.screen {
  display: none;
  flex-direction: column;
  min-height: 100vh;
}
.screen.active {
  display: flex;
}

/* ---------- Inputs genéricos ---------- */
.field-label {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

select,
input[type="password"],
input[type="date"],
input[type="text"] {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 13px 16px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color .2s;
  cursor: pointer;
}
select:focus,
input:focus {
  border-color: var(--accent);
}
select option {
  background: var(--surface2);
  color: var(--text);
}

.input-wrap {
  position: relative;
}
.toggle-pw {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
}
.toggle-pw .icon {
  width: 18px;
  height: 18px;
}

/* ---------- Botões genéricos ---------- */
.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  border: none;
  border-radius: 10px;
  padding: 15px;
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 2px;
  cursor: pointer;
  width: 100%;
  transition: opacity .2s, transform .1s;
}
.btn-primary:hover { opacity: .9; }
.btn-primary:active { transform: scale(.98); }

.error-msg {
  background: rgba(255, 107, 107, .1);
  border: 1px solid rgba(255, 107, 107, .3);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--red);
  display: none;
}

/* ---------- Vazio / loading genéricos ---------- */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--muted);
  gap: 12px;
  text-align: center;
}
.empty-icon {
  opacity: .3;
}
.empty-icon .icon {
  width: 44px;
  height: 44px;
}
