:root {
  color-scheme: light;
  --ink: #1c2430;
  --muted: #5c6b7a;
  --line: #d7dee6;
  --blue: #1f4e79;
  --blue-2: #2f6fa3;
  --new: #e7f6ee;
  --bg: #f4f7fa;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-end;
  padding: 22px 28px 18px;
  background: var(--blue);
  color: white;
}

.eyebrow {
  margin: 0 0 4px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 12px;
  opacity: 0.8;
}

h1 { margin: 0; font-size: 28px; font-weight: 650; }

.header-actions { text-align: right; }

#status-line {
  margin: 0 0 10px;
  font-size: 14px;
  max-width: 520px;
}

button, input {
  font: inherit;
}

#fetch-btn, .chip {
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}

#fetch-btn {
  background: white;
  color: var(--blue);
  padding: 8px 14px;
  font-weight: 650;
}

#fetch-btn:disabled { opacity: 0.6; cursor: wait; }

.toolbar {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 14px 28px;
  background: white;
  border-bottom: 1px solid var(--line);
}

#search {
  flex: 1;
  min-width: 220px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.chips { display: flex; gap: 8px; }

.chip {
  background: #e8eef4;
  color: var(--ink);
  padding: 7px 12px;
}

.chip.active { background: var(--blue-2); color: white; }

#count-line { margin: 0; color: var(--muted); white-space: nowrap; }

.table-wrap { overflow: auto; max-height: calc(100vh - 168px); }

table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  background: white;
}

th, td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

th {
  position: sticky;
  top: 0;
  background: #e8eef4;
  cursor: pointer;
  white-space: nowrap;
  z-index: 1;
}

td.description { min-width: 280px; max-width: 420px; }

tr.new td { background: var(--new); }

tr:hover td { background: #f3f8fc; }

.empty {
  padding: 32px 28px;
  color: var(--muted);
}

@media (max-width: 800px) {
  header, .toolbar { flex-direction: column; align-items: stretch; }
  .header-actions { text-align: left; }
}
