* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, Arial, sans-serif;
  background: #f6f7fb;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.card {
  width: min(720px, 100%);
  background: white;
  padding: 24px;
  border-radius: 14px;
  box-shadow: 0 10px 25px rgba(0,0,0,.08);
}
h1 { margin: 0 0 14px; font-size: 24px; }
.form { display: grid; gap: 14px; }
label { display: grid; gap: 6px; font-size: 14px; }
input, select {
  padding: 12px;
  border: 1px solid #d7dbe7;
  border-radius: 10px;
  font-size: 15px;
}
button {
  padding: 12px;
  border: 0;
  border-radius: 10px;
  font-size: 15px;
  cursor: pointer;
  background: #2f6fed;
  color: white;
}
button:hover { opacity: .92; }
.flash {
  padding: 10px 12px;
  border-radius: 10px;
  background: #eef6ff;
  border: 1px solid #cfe5ff;
  margin-bottom: 14px;
}
.hint { margin-top: 14px; font-size: 14px; color: #444; }
a { color: #2f6fed; text-decoration: none; }
a:hover { text-decoration: underline; }

/* admin table */
.table-wrap { overflow:auto; margin-top: 12px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align:left; padding: 10px; border-bottom: 1px solid #e7eaf3; font-size: 14px; white-space: nowrap; }
.badge {
  display:inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12px;
  border: 1px solid #d7dbe7; background: #f6f7fb;
}
.badge.approved { background:#eefcf3; border-color:#c9f0d3; }
.badge.pending { background:#fff6ea; border-color:#ffe1b3; }
.actions { display:flex; gap: 8px; }
.btn-small {
  padding: 8px 10px; border-radius: 10px; font-size: 13px; border: 1px solid #d7dbe7;
  background: white; color:#111; cursor:pointer;
}
.btn-small.primary { border:0; background:#2f6fed; color:white; }
.btn-small.danger { border:0; background:#e23b3b; color:white; }
.topbar { display:flex; justify-content:space-between; align-items:center; gap: 12px; }
.filters { display:grid; gap: 10px; margin-top: 10px; }
.filters-row { display:grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 10px; }
@media (max-width: 820px) {
  .filters-row { grid-template-columns: 1fr 1fr; }
}
.pager { display:flex; gap: 10px; justify-content:center; margin-top: 14px; }


/* code highlighting */
.code-tag {
  display:inline-block;
  padding: 6px 10px;
  border-radius: 8px;
  font-weight: 600;
}
.code-approved-valid { background: #e60000; color: #fff; }  /* red */
.code-pending-valid  { background: #ffd54a; color: #111; }  /* yellow */
.code-invalid        { background: #e5e7eb; color: #111; }  /* gray */

.legend {
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top: 10px;
}
.legend-item {
  display:flex;
  align-items:center;
  gap:8px;
  font-size: 14px;
  color:#333;
}
.legend-swatch {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 1px solid #d7dbe7;
}
.swatch-red { background:#e60000; }
.swatch-yellow { background:#ffd54a; }
.swatch-gray { background:#e5e7eb; }

/* prevent <code> tag style from overriding colored code pills */
.code-tag code {
  background: transparent !important;
  padding: 0 !important;
  border-radius: 0 !important;
  color: inherit !important;
}

