* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: system-ui, -apple-system, sans-serif; background: #f6f7f9; color: #1a1a1a; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.75rem 1rem; background: #0f766e; color: #fff;
}
.topbar .brand { color: #fff; text-decoration: none; font-weight: 700; font-size: 1.1rem; }
.topbar nav a { color: #d1fae5; text-decoration: none; margin-left: 1rem; font-size: 0.95rem; }
.topbar nav a:hover { color: #fff; }

.container { max-width: 720px; margin: 1rem auto; padding: 0 1rem; }

h1 { margin: 0 0 0.5rem; font-size: 1.5rem; }
.muted { color: #666; font-size: 0.9rem; margin: 0 0 1rem; }
.muted a { color: #0f766e; }

.form-card {
  background: #fff; border-radius: 12px; padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  display: flex; flex-direction: column; gap: 1rem;
}
.form-card label { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.9rem; color: #555; }
.form-card input {
  font-size: 1rem; padding: 0.7rem 0.8rem; border: 1px solid #d4d4d8; border-radius: 8px; background: #fff;
  font-family: inherit;
}
.form-card input:focus { outline: 2px solid #0f766e; outline-offset: -1px; }
.form-card .erro { color: #b91c1c; font-size: 0.9rem; margin: 0; }

button {
  font-size: 1rem; padding: 0.75rem 1rem; border-radius: 8px; border: 0; cursor: pointer; font-weight: 600;
  background: #0f766e; color: #fff;
}
button:hover { background: #0d5f58; }
.btn-som { background: #f59e0b; }
.btn-som:hover { background: #d97706; }

.som-estado { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.som-ok { color: #0f766e; font-weight: 600; font-size: 0.95rem; }
.som-erro { color: #b91c1c; font-weight: 600; font-size: 0.9rem; }
.btn-som-testar {
  background: #e4e4e7; color: #1a1a1a; font-size: 0.8rem;
  padding: 0.35rem 0.7rem; border-radius: 6px;
}
.btn-som-testar:hover { background: #d4d4d8; }

.login-card { max-width: 360px; margin: 3rem auto; }
.login-card h1 { text-align: center; color: #0f766e; font-size: 2rem; }
.login-card .muted { text-align: center; }

.painel-header {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap;
  background: #fff; border-radius: 12px; padding: 1rem 1.25rem; box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  margin-bottom: 1rem;
}
.totais { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; align-items: flex-end; }
.stat-label { font-size: 0.75rem; color: #666; text-transform: uppercase; letter-spacing: 0.05em; }
.stat-valor { font-size: 1.5rem; font-weight: 700; color: #0f766e; }

.recebidos { display: flex; flex-direction: column; gap: 0.75rem; }
.vazio { color: #888; text-align: center; padding: 2rem; background: #fff; border-radius: 12px; border: 1px dashed #d4d4d8; }

.card-pix {
  background: #fff; border-radius: 12px; padding: 1rem 1.25rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05); border-left: 4px solid #0f766e;
  animation: none;
}
.card-pix.novo {
  animation: flash-verde 1.8s ease-out;
  border-left-color: #22c55e;
}
@keyframes flash-verde {
  0% { background: #dcfce7; transform: scale(0.98); }
  30% { background: #bbf7d0; transform: scale(1); }
  100% { background: #fff; }
}
.card-pix-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.25rem; }
.card-pix .valor { font-size: 1.4rem; font-weight: 700; color: #0f766e; }
.card-pix time { font-size: 0.85rem; color: #666; font-variant-numeric: tabular-nums; }
.card-pix .pagador { margin: 0; color: #333; font-size: 0.95rem; }

.filtros {
  display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap;
  background: #fff; padding: 0.75rem 1rem; border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05); margin-bottom: 1rem;
}
.filtros input[type="text"] { flex: 1; min-width: 200px; padding: 0.55rem 0.7rem; border: 1px solid #d4d4d8; border-radius: 8px; font-size: 0.95rem; }
.filtros label { display: flex; align-items: center; gap: 0.35rem; font-size: 0.85rem; color: #666; }
.filtros input[type="date"] { padding: 0.4rem 0.5rem; border: 1px solid #d4d4d8; border-radius: 8px; font-size: 0.9rem; font-family: inherit; }
.btn-csv { background: #0f766e; color: #fff; padding: 0.55rem 0.9rem; border-radius: 8px; text-decoration: none; font-size: 0.9rem; font-weight: 600; }
.btn-csv:hover { background: #0d5f58; }

.historico { width: 100%; background: #fff; border-radius: 12px; border-collapse: collapse; box-shadow: 0 1px 3px rgba(0,0,0,0.05); overflow: hidden; }
.historico th, .historico td { padding: 0.7rem 0.9rem; text-align: left; border-bottom: 1px solid #f3f4f6; font-size: 0.92rem; }
.historico th { background: #f9fafb; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; color: #666; font-weight: 600; }
.historico td.num, .historico th.num { text-align: right; font-variant-numeric: tabular-nums; }
.historico td.valor { color: #0f766e; font-weight: 700; }
.historico tr:last-child td { border-bottom: 0; }
.historico td time { color: #666; font-size: 0.85rem; }
.historico td .info { font-size: 0.8rem; color: #888; margin-top: 0.15rem; }

.paginacao { display: flex; gap: 1rem; align-items: center; justify-content: center; margin: 1rem 0; font-size: 0.9rem; }
.paginacao a { color: #0f766e; text-decoration: none; font-weight: 600; }
.paginacao a:hover { text-decoration: underline; }
.paginacao .disabled { color: #bbb; cursor: not-allowed; }
