* { box-sizing: border-box; }
body {
  margin: 0;
  font: 14px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
  background: #f2f4f7;
  color: #1c2430;
}
.hidden { display: none !important; }

header {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 10px 20px;
  background: #14213d;
  color: #fff;
}
header h1 { font-size: 18px; margin: 0; }
header nav { flex: 1; display: flex; gap: 8px; }

h2 { font-size: 15px; margin: 0 0 10px; }
h3 { font-size: 13px; margin: 0 0 6px; }

button {
  padding: 6px 14px;
  border: 1px solid #14213d;
  border-radius: 4px;
  background: #14213d;
  color: #fff;
  cursor: pointer;
}
button:hover { opacity: .9; }
button.ghost { background: transparent; color: inherit; border-color: currentColor; }
button.danger { background: #b3261e; border-color: #b3261e; }
.tab { background: transparent; border: none; color: #cbd5e1; }
.tab.active { color: #fff; border-bottom: 2px solid #fca311; border-radius: 0; }

section { padding: 16px 20px; }
.card {
  background: #fff;
  border: 1px solid #dde3ea;
  border-radius: 6px;
  padding: 14px;
  margin-bottom: 16px;
  overflow-x: auto;
}

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.filters input, .filters select, .login-card input {
  padding: 6px 8px;
  border: 1px solid #b8c2cf;
  border-radius: 4px;
}
.filters input[type=number] { width: 90px; }
.filters input.narrow { width: 100px; }
.fld { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: #5a6b80; font-weight: 600; }
.fld input, .fld button { font-weight: 400; }
.poll { font-size: 12px; color: #5a6b80; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid #e8ecf1; white-space: nowrap; }
th { background: #f7f9fb; font-weight: 600; }
tbody tr { cursor: pointer; }
tbody tr:hover { background: #f0f6ff; }

.st { padding: 2px 8px; border-radius: 10px; font-size: 12px; background: #e8ecf1; }
.st-aprovada { background: #d7f2dd; color: #14532d; }
.st-emandamento { background: #fff3cd; color: #7a5c00; }
.st-disponivel { background: #dbeafe; color: #1e3a8a; }
.st-cancelada, .st-falha, .st-declinada { background: #fde2e1; color: #7f1d1d; }

.pager { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.msg { color: #b3261e; min-height: 1em; margin: 6px 0 0; }
.msg.ok { color: #14532d; }

#login { display: flex; justify-content: center; padding-top: 12vh; }
.login-card { width: 300px; display: flex; flex-direction: column; gap: 10px; }
.login-card h1 { margin: 0 0 6px; font-size: 20px; text-align: center; }
.login-card label { display: flex; flex-direction: column; gap: 4px; }

dialog {
  border: none;
  border-radius: 8px;
  padding: 18px;
  width: min(860px, 94vw);
  max-height: 90vh;
}
dialog::backdrop { background: rgba(0,0,0,.4); }
.detail-head { display: flex; justify-content: space-between; align-items: center; }
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 6px 16px;
  margin: 12px 0;
}
.detail-grid b { display: block; font-size: 12px; color: #5a6b80; font-weight: 600; }
.receipts { display: flex; gap: 16px; flex-wrap: wrap; }
.receipts > div { flex: 1; min-width: 260px; }
.receipts pre {
  background: #f7f9fb;
  border: 1px solid #e8ecf1;
  border-radius: 4px;
  padding: 10px;
  font-size: 12px;
  overflow-x: auto;
  min-height: 60px;
}
.detail-actions { display: flex; gap: 10px; align-items: center; margin-top: 12px; }
