/* ─── Reset ──────────────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ─── Variáveis ──────────────────────────────────────────────────────────────── */
:root {
  --bg: #0b1026;
  --panel: #1a2352;
  --primary: #ff4d6d;
  --secondary: #4cc9f0;
  --accent: #ffe66d;
  --text: #fdfdfd;
  --muted: #d7d7f2;
  --border: #2d3b7a;
  --shadow: rgba(0, 0, 0, 0.35);
  --font-display: "Press Start 2P", cursive;
  --font-mono: "DM Mono", monospace;
}

/* ─── Base ───────────────────────────────────────────────────────────────────── */
body {
  background: linear-gradient(180deg, #0f1738 0%, #1b2d6b 100%);
  color: var(--text);
  font-family: var(--font-mono);
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: var(--secondary);
  text-decoration: none;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

a:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

.retro-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  position: relative;
  overflow-x: hidden;
}

.stars {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, #fff 1.5px, transparent 1.5px);
  background-size: 24px 24px;
  opacity: 0.14;
  animation: drift 12s linear infinite;
}

@keyframes drift {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(30px);
  }
}

.hero-card,
.interaction-card,
.panel {
  position: relative;
  z-index: 1;
  background: rgba(26, 35, 82, 0.95);
  border: 4px solid var(--accent);
  box-shadow:
    0 0 0 6px var(--shadow),
    0 12px 30px var(--shadow);
  padding: 24px;
  border-radius: 18px;
}

.booth-page .interaction-card {
  background: rgba(76, 201, 240, 0.15);
  border-color: var(--secondary);
}

.reward-page .interaction-card {
  background: rgba(124, 252, 0, 0.15);
  border-color: #7cfc00;
}

.hero-card {
  max-width: 760px;
  text-align: center;
}
.interaction-card {
  max-width: 700px;
  width: 100%;
  text-align: center;
}
.dashboard {
  width: min(1000px, 100%);
  position: relative;
  z-index: 1;
}

.label {
  color: var(--accent);
  letter-spacing: 0.2em;
  font-size: 0.75rem;
  margin-bottom: 10px;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.5;
  text-transform: uppercase;
}

h1 {
  font-size: 1.3rem;
  margin-bottom: 12px;
}
h2 {
  font-size: 1rem;
}
h3 {
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.subtitle,
p,
li {
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--muted);
}

.actions {
  display: grid;
  gap: 20px;
  margin-top: 24px;
}

.action-group {
  display: grid;
  gap: 10px;
}

.action-group + .action-group {
  padding-top: 20px;
  border-top: 2px solid var(--border);
}

.action-group-label {
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 0.65rem;
  text-transform: uppercase;
}

.action-group-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.follow-up-group .action-group-label {
  color: var(--secondary);
}

.btn {
  display: inline-block;
  padding: 12px 16px;
  border-radius: 999px;
  color: white;
  background: var(--primary);
  border: 3px solid var(--accent);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.25);
  font-family: var(--font-display);
  font-size: 0.7rem;
}

.btn.secondary {
  background: var(--secondary);
}
.btn.admin {
  background: #6a4c93;
}

.btn-tertiary {
  background: var(--accent);
  color: var(--bg);
}

.btn.small {
  padding: 8px 12px;
  font-size: 0.65rem;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
  margin-bottom: 20px;
}

.login-card {
  max-width: 420px;
  width: 100%;
  text-align: center;
}

.login-form {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.login-form label {
  display: grid;
  gap: 8px;
  font-size: 0.75rem;
  text-align: left;
}

.login-form input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.login-form input:focus {
  outline: 2px solid var(--secondary);
}

video {
  width: 100%;
  max-width: 480px;
  border-radius: 12px;
  margin: 20px 0;
  border: 4px solid var(--accent);
  background: #000;
  animation: bounceIn 0.5s ease;
}

button {
  font-family: var(--font-display);
  background: var(--primary);
  color: white;
  border: none;
  padding: 12px 18px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.75rem;
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.25);
}

button:disabled {
  opacity: 0.7;
  cursor: wait;
}

#status {
  margin-top: 16px;
  min-height: 24px;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 0.7rem;
}

.header-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 12px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.stat-card h2 {
  color: var(--accent);
  margin: 0 0 8px;
}
.stat-card p {
  margin: 0;
}

.stat-card-accent {
  border-color: var(--secondary);
}

.stat-card-accent h2 {
  color: var(--secondary);
}

.analytics-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.chart-panel {
  min-width: 0;
  border-color: var(--secondary);
}

.chart-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.chart-heading h3 {
  margin-bottom: 0;
}

.chart-heading .label,
.insight-strip .label {
  margin-bottom: 6px;
  color: var(--secondary);
}

.chart-note {
  color: var(--muted);
  font-size: 0.65rem;
  white-space: nowrap;
}

.chart-wrap {
  height: 230px;
  position: relative;
}

.insight-strip {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  border-color: var(--primary);
}

.insight-strip strong {
  display: block;
  font-size: 0.72rem;
  color: var(--text);
}

.insight-icon {
  color: var(--accent);
  font-size: 1.3rem;
}

.insight-divider {
  width: 2px;
  height: 32px;
  background: var(--border);
  margin: 0 8px;
}

.recent-list {
  list-style: none;
  display: grid;
  gap: 10px;
}

.recent-list li {
  display: grid;
  grid-template-columns: 70px 1fr 90px 180px;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
}

.recent-list .list-header {
  background: var(--accent);
  color: var(--bg);
  font-family: var(--font-display);
  font-size: 0.62rem;
  text-transform: uppercase;
  font-weight: bold;
}

.recent-list .list-header span {
  color: var(--bg);
}

.ok {
  color: #7cfc00;
  font-weight: bold;
}

.warn {
  color: var(--accent);
  font-weight: bold;
}

.message {
  background: rgba(255, 230, 109, 0.15);
  border: 2px solid var(--accent);
  color: var(--accent);
  padding: 12px;
  border-radius: 12px;
  margin-bottom: 16px;
}

@keyframes bounceIn {
  from {
    transform: scale(0.96);
    opacity: 0.6;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@media (max-width: 760px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .analytics-grid {
    grid-template-columns: 1fr;
  }

  .recent-list li {
    grid-template-columns: 1fr;
  }

  .recent-list .list-header {
    display: none;
  }

  .header-panel {
    flex-direction: column;
    align-items: flex-start;
  }

  .actions {
    flex-direction: column;
  }

  .action-group-links {
    flex-direction: column;
    align-items: stretch;
  }

  .action-group-links .btn {
    text-align: center;
  }

  .insight-strip {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .insight-divider {
    display: none;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

.site-footer {
  position: relative;
  z-index: 1;
  margin-top: 24px;
  padding: 14px 18px;
  text-align: center;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 0.62rem;
  border-top: 3px solid var(--accent);
  background: rgba(11, 16, 38, 0.8);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 8px;
  flex-wrap: wrap;
  font-size: 24px;
}

.footer-links a {
  color: var(--secondary);
}

.footer-links a:hover {
  color: var(--accent);
}

/* PWA install button */
.pwa-install-button {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1200;
  display: none;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--primary);
  color: white;
  border: 3px solid var(--accent);
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.25);
  font-family: var(--font-display);
  font-size: 0.75rem;
}

.pwa-install-button.show {
  display: inline-block;
}

/* Site logo */
.site-logo {
  width: 84px;
  height: auto;
  display: inline-block;
  margin-bottom: 12px;
}
