/* Base e componentes compartilhados por instalação, app, admin e telão */
*, *::before, *::after { box-sizing: border-box; }

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

/* O atributo hidden sempre vence o display dos componentes */
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--ink);
  color: #fff;
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
h3 { font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0; color: var(--body-dark); }
a { color: var(--blue-light); }
img { max-width: 100%; display: block; }

:focus-visible { outline: 2px solid var(--blue-light); outline-offset: 3px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* Rótulo numerado: "01 / ENVIE SUA PERGUNTA" */
.label {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--blue-light);
}

.meta {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}

/* Palavra com gradiente laranja → amarelo */
.grad {
  background: var(--gradient-cta);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Botões */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 26px;
  border-radius: 999px;
  border: 0;
  font: 600 15px/1.2 var(--sans);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .15s ease, filter .15s ease;
}
.btn:active { transform: scale(0.98); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--gradient-cta); color: #0b0b0b; }
.btn-primary:hover { filter: brightness(1.05); }
.btn-primary::after { content: "→"; font-weight: 500; }
.btn-secondary {
  background: transparent;
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}
.btn-block { width: 100%; }

/* Cartões */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.card-navy { background: var(--navy); border-color: rgba(255, 255, 255, 0.12); }
.card-glass {
  background: var(--surface-glass);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  backdrop-filter: blur(8px);
}

/* Número de destaque */
.stat-num {
  font-weight: 700;
  font-size: clamp(40px, 12vw, 56px);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--orange);
}

/* Badges de status */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font: 500 11px/1.4 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge-pending  { background: rgba(255, 255, 255, 0.12); color: #fff; }
.badge-approved { background: rgba(74, 167, 252, 0.16); color: var(--blue-light); box-shadow: inset 0 0 0 1px rgba(74, 167, 252, 0.45); }
.badge-answered { background: var(--gradient-cta); color: #0b0b0b; }
.badge-rejected { background: rgba(255, 255, 255, 0.06); color: rgba(255, 255, 255, 0.55); }

/* Formulários */
.field { display: grid; gap: 8px; }
.field > span { font-weight: 500; font-size: 14px; }
.input, .textarea, .select {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font: 400 16px/1.4 var(--sans); /* 16px evita zoom automático no iOS */
}
.textarea { min-height: 120px; resize: vertical; }
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--blue-light); box-shadow: 0 0 0 3px rgba(74, 167, 252, 0.25); }
.hint { font: 400 12px/1.4 var(--mono); color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 36px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  font: 400 13px/1.2 var(--sans);
  cursor: pointer;
}
.chip[aria-pressed="true"] { background: rgba(74, 167, 252, 0.16); border-color: var(--blue-light); color: #fff; }

.check { display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start; font-size: 14px; color: var(--body-dark); }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--orange); }

/* Barra superior */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px var(--pad-x);
  background: rgba(3, 6, 14, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; }
.brand img { height: 22px; width: auto; }
.brand span { font: 500 12px/1 var(--mono); letter-spacing: 0.2em; text-transform: uppercase; white-space: nowrap; }
.topbar .meta, .bottombar .meta { white-space: nowrap; }

/* Faixa inferior fixa */
.bottombar {
  position: fixed;
  inset: auto 0 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px var(--pad-x) calc(10px + env(safe-area-inset-bottom));
  background: rgba(3, 6, 14, 0.92);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
}

.toast {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: rgba(74, 167, 252, 0.14);
  border: 1px solid rgba(74, 167, 252, 0.4);
  font-size: 14px;
  color: #fff;
}
.toast-warn { background: rgba(245, 199, 3, 0.12); border-color: rgba(245, 199, 3, 0.45); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
