/* WP2-WP3 additions on top of base.css: tables, status badges, detail panels. */

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.page-head h2 { margin: 0 0 0.25rem; }

/* Short green bar under page titles, echoing the site's section headings */
.page-head h2::after {
  content: "";
  display: block;
  width: 3rem;
  height: 4px;
  margin-top: 0.5rem;
  background: var(--amaltea-green);
  border-radius: 0 0 0 4px;
}

.muted { color: var(--text-light); }

/* The reset zeroes paragraph margins; space prose and button rows in cards,
   but keep a checksum glued to its label. */
.card > p + p:not(.mono),
.card > p + dl.facts { margin-top: 0.75rem; }
.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85em;
  word-break: break-all;
}

/* -- Tables --------------------------------------------------------------- */

.table-wrap { overflow-x: auto; }

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

table.data th,
table.data td {
  padding: 0.6rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

table.data th {
  font-weight: 700;
  color: var(--amaltea-blue);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  white-space: nowrap;
  border-bottom: 2px solid var(--amaltea-sky);
}

table.data td:first-child { width: auto; color: inherit; }
table.data tbody tr:hover { background: rgba(209, 240, 245, 0.45); }

/* -- Status badges -------------------------------------------------------- */

.badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  text-transform: uppercase;
  border: 1px solid currentColor;
  background: white;
}

.badge-uploaded      { color: #b26a00; }
.badge-under_review  { color: var(--amaltea-blue); background: #EEF8FA; }
.badge-released      { color: var(--amaltea-green-dark); background: #EAF8E4; }
.badge-completed     { color: #4A5568; }
.badge-rejected      { color: #b42318; }

.sev-info    { color: var(--amaltea-blue); }
.sev-warning { color: #b26a00; }
.sev-error   { color: #b42318; }

/* -- Panels / layout ------------------------------------------------------ */

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  align-items: start;
}

dl.facts { margin: 0; }
dl.facts div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border);
}
dl.facts dt { color: var(--text-light); font-size: 0.85rem; }
dl.facts dd { margin: 0; text-align: right; }

.feedback-list { list-style: none; padding: 0; margin: 0; }
.feedback-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}
.feedback-list li:last-child { border-bottom: none; }
.feedback-meta {
  font-size: 0.8rem;
  color: var(--text-light);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.field { margin-bottom: 0.9rem; }
.field label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 0.25rem;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 10px 0 0 0;
  font: inherit;
  background: white;
  color: inherit;
}
.field textarea { min-height: 5rem; resize: vertical; }

.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.filters a {
  padding: 0.3rem 0.9rem;
  border: 1px solid rgba(43, 100, 143, 0.25);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-decoration: none;
}
.filters a:hover { border-color: var(--amaltea-blue); text-decoration: none; }
.filters a.active {
  background: var(--amaltea-blue);
  border-color: var(--amaltea-blue);
  color: white;
}

.empty {
  padding: 2rem;
  text-align: center;
  color: var(--text-light);
}
