* { box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  margin: 0;
  background: #f4f6f8;
  color: #222;
}
nav {
  background: #2c3e50;
  color: white;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
nav .brand { font-weight: 700; padding: 1rem 0; font-size: 1.1rem; }
nav ul { list-style: none; display: flex; gap: 1.2rem; margin: 0; padding: 0; }
nav a { color: #ecf0f1; text-decoration: none; font-size: 0.92rem; }
nav a:hover { color: #3498db; }
.badge {
  background: #e74c3c;
  color: white;
  border-radius: 10px;
  padding: 1px 7px;
  font-size: 0.75rem;
  margin-left: 4px;
}
main { max-width: 1100px; margin: 1.5rem auto; padding: 0 1.5rem; }
.card {
  background: white;
  border-radius: 8px;
  padding: 1.2rem 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  margin-bottom: 1.2rem;
}
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
.stat { text-align: left; }
.stat .label { color: #777; font-size: 0.8rem; text-transform: uppercase; }
.stat .value { font-size: 1.6rem; font-weight: 700; margin-top: 0.2rem; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { text-align: left; padding: 0.5rem 0.6rem; border-bottom: 1px solid #eee; }
th { background: #f0f2f5; }
.btn {
  display: inline-block;
  padding: 0.45rem 0.9rem;
  border-radius: 5px;
  border: none;
  background: #3498db;
  color: white;
  text-decoration: none;
  cursor: pointer;
  font-size: 0.88rem;
}
.btn:hover { background: #2980b9; }
.btn.secondary { background: #95a5a6; }
.btn.secondary:hover { background: #7f8c8d; }
.btn.danger { background: #e74c3c; }
.btn.danger:hover { background: #c0392b; }
.btn.small { padding: 0.25rem 0.55rem; font-size: 0.78rem; }
.actions { display: flex; gap: 0.4rem; flex-wrap: wrap; }
form.inline { display: inline; }
.filters { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: end; margin-bottom: 1rem; }
.filters label { display: block; font-size: 0.78rem; color: #555; margin-bottom: 0.2rem; }
.filters input, .filters select { padding: 0.35rem; border: 1px solid #ccc; border-radius: 4px; }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.3rem; font-weight: 600; font-size: 0.88rem; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 0.9rem;
}
.errors { color: #e74c3c; font-size: 0.8rem; margin-top: 0.2rem; }
.flash { padding: 0.7rem 1rem; border-radius: 6px; margin-bottom: 1rem; font-size: 0.9rem; }
.flash.success { background: #d4efdf; color: #196f3d; }
.flash.danger { background: #fadbd8; color: #922b21; }
.flash.info { background: #d6eaf8; color: #21618c; }
.flash.warning { background: #fdebd0; color: #9c640c; }
h1 { font-size: 1.4rem; }
.status-pill { padding: 2px 8px; border-radius: 10px; font-size: 0.75rem; }
.status-pill.pending { background: #fdebd0; color: #9c640c; }
.status-pill.matched { background: #d6eaf8; color: #21618c; }
.status-pill.confirmed { background: #d4efdf; color: #196f3d; }
.status-pill.ignored { background: #eee; color: #888; }
.top-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
