* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: #f5f5f0;
  color: #1a1a1a;
}

.brand {
  color: #b91c1c;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #666;
  font-size: 0.9rem;
  margin: 0.5rem 0 0.1rem;
}

/* ---------- index.html ---------- */

.index-body { display: flex; min-height: 100vh; align-items: center; justify-content: center; }
.index-main { text-align: center; }
.index-main .brand { font-size: 2.5rem; margin-bottom: 0; }
.index-main .subtitle { color: #555; margin-top: 0.2rem; margin-bottom: 2rem; }

/* ---------- Botões ---------- */

.btn-big {
  display: block;
  width: min(420px, 90vw);
  margin: 1rem auto;
  padding: 1.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  color: #fff;
  background: #b91c1c;
  border: none;
  border-radius: 16px;
  cursor: pointer;
}
.btn-big:disabled { background: #999; cursor: default; }

.btn-secondary {
  display: block;
  width: min(420px, 90vw);
  margin: 0.75rem auto;
  padding: 1rem;
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
  color: #b91c1c;
  background: #fff;
  border: 2px solid #b91c1c;
  border-radius: 12px;
  cursor: pointer;
}

.hint { text-align: center; color: #666; }

/* ---------- tv.html ---------- */

.tv-body { text-align: center; padding: 1rem; }
.tv-body .brand { font-size: 1.8rem; }

.tv-current .tv-number {
  font-size: clamp(5rem, 18vw, 12rem);
  margin: 0;
  font-weight: 800;
  color: #1a1a1a;
}

.tv-next-number {
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 700;
  margin: 0 0 1rem;
  color: #444;
}

.tv-history ul {
  list-style: none;
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  padding: 0;
  font-size: 1.3rem;
  color: #555;
}

.tv-qr { margin-top: 2rem; }
#qrcode { display: inline-block; margin: 0 auto; }

.status-line { color: #777; font-size: 0.9rem; margin-top: 1.5rem; }
.status-line.warning-line { color: #b91c1c; font-weight: 600; }

/* ---------- cliente.html ---------- */

.cliente-main { text-align: center; padding: 1.5rem 1rem; max-width: 480px; margin: 0 auto; }
.cliente-main .brand { font-size: 1.6rem; }

.ticket-number {
  font-size: clamp(3rem, 15vw, 5rem);
  margin: 0;
  font-weight: 800;
}

.current-number {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
  color: #444;
}

.remaining { color: #555; margin-bottom: 1.5rem; }

/* ---------- Overlays ---------- */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  text-align: center;
  padding: 2rem;
  color: #fff;
}
.overlay[hidden] { display: none; }

.overlay h2 { font-size: clamp(1.8rem, 7vw, 3rem); margin: 0; }

.overlay-blue { background: #1d4ed8; animation: pulse-bg 1.2s infinite; }
.overlay-green { background: #15803d; animation: pulse-bg 1s infinite; }
.overlay-amber { background: #b45309; animation: pulse-bg 1.6s infinite; }

.huge-number {
  font-size: clamp(4rem, 20vw, 8rem);
  font-weight: 800;
  margin: 0;
}

.overlay .warning {
  background: rgba(0, 0, 0, 0.3);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.95rem;
}

@keyframes pulse-bg {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.25); }
}

/* ---------- Diagnóstico ---------- */

.diagnostico {
  margin: 2rem auto 1rem;
  max-width: 480px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  color: #333;
}
.diagnostico summary {
  cursor: pointer;
  font-weight: 700;
  padding: 0.4rem 0;
}
.diagnostico ul {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0.5rem;
}
.diagnostico li {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.2rem 0;
  border-bottom: 1px solid #f0f0f0;
  word-break: break-all;
}
