:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --panel: #ffffff;
  --ink: #17202e;
  --muted: #637083;
  --line: #d9e0ea;
  --accent: #0f766e;
  --accent-dark: #115e59;
  --reject: #be123c;
  --reject-dark: #9f1239;
  --warn: #b45309;
  --bad: #b91c1c;
  --good: #15803d;
}

* {
  box-sizing: border-box;
}

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

.shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 30px;
  line-height: 1.1;
}

h2 {
  margin-bottom: 12px;
  font-size: 16px;
}

p,
.muted,
.meta {
  color: var(--muted);
}

.panel,
.stats > div {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgb(16 24 40 / 6%);
}

.controls {
  display: grid;
  grid-template-columns: 130px minmax(180px, 1.2fr) minmax(240px, 2fr) 120px auto;
  gap: 12px;
  align-items: end;
  padding: 16px;
}

.monitor-controls {
  display: grid;
  grid-template-columns: 180px 120px 120px auto;
  gap: 12px;
  align-items: end;
  padding: 16px;
}

label span {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 650;
}

input,
select {
  width: 100%;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}

input:focus,
select:focus {
  outline: 2px solid color-mix(in srgb, var(--accent) 35%, transparent);
  border-color: var(--accent);
}

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

button {
  height: 40px;
  border: 0;
  border-radius: 6px;
  padding: 0 16px;
  font: inherit;
  font-weight: 700;
  color: white;
  background: var(--accent);
  cursor: pointer;
}

button:hover {
  background: var(--accent-dark);
}

button.secondary {
  color: var(--ink);
  background: #e9eef5;
}

button.secondary:hover {
  background: #dce4ef;
}

.status-pill {
  min-width: 92px;
  border-radius: 999px;
  padding: 8px 12px;
  text-align: center;
  font-weight: 750;
  color: var(--muted);
  background: #e9eef5;
}

.status-pill.running {
  color: white;
  background: var(--accent);
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.tab-button {
  height: 42px;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  color: var(--muted);
  background: transparent;
}

.tab-button:hover,
.tab-button.active {
  color: var(--accent-dark);
  background: transparent;
  border-bottom-color: var(--accent);
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

.stats {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin: 14px 0;
}

.stats > div {
  padding: 14px;
}

.stats strong,
.stats span {
  display: block;
}

.stats strong {
  font-size: 26px;
}

.stats span {
  color: var(--muted);
  font-size: 13px;
}

.current {
  padding: 16px;
}

.nfo-panel {
  margin-top: 14px;
  padding: 16px;
}

.nfo-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.nfo-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 12px 0;
  color: var(--muted);
  font-size: 14px;
}

.nfo-stats strong {
  color: var(--ink);
}

.review {
  margin-bottom: 14px;
  padding: 16px;
}

.review-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.decision-card {
  min-height: 210px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #fbfcfe;
}

.decision-card.empty {
  background: #f9fbfe;
}

.card-topic {
  margin-bottom: 8px;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.decision-card h3 {
  margin: 0 0 10px;
  overflow-wrap: anywhere;
  font-size: 24px;
  line-height: 1.2;
}

.decision-card p {
  max-width: 80ch;
  line-height: 1.5;
}

.decision-card .meta {
  margin-top: 12px;
}

.website-link {
  display: inline-flex;
  margin-top: 12px;
  color: var(--accent-dark);
  font-weight: 700;
}

.website-link[hidden] {
  display: none;
}

.decision-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

.decision-actions button {
  height: 52px;
  font-size: 18px;
}

button.approve {
  background: var(--accent);
}

button.approve:hover {
  background: var(--accent-dark);
}

button.reject {
  background: var(--reject);
}

button.reject:hover {
  background: var(--reject-dark);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

button:disabled:hover {
  background: var(--accent);
}

button.reject:disabled:hover {
  background: var(--reject);
}

.progress {
  height: 10px;
  margin: 12px 0 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8edf4;
}

#progressBar {
  width: 0%;
  height: 100%;
  background: var(--accent);
  transition: width 0.25s ease;
}

.grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 14px;
  margin-top: 14px;
}

.grid .panel {
  min-height: 320px;
  padding: 16px;
}

.list {
  display: grid;
  gap: 8px;
}

.item {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  background: #fbfcfe;
}

.item-title {
  overflow-wrap: anywhere;
  font-weight: 700;
}

.item-meta {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.new-content-panel {
  margin-top: 14px;
  padding: 16px;
}

.content-list {
  display: grid;
  gap: 10px;
}

.content-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfe;
}

.content-title {
  overflow-wrap: anywhere;
  font-weight: 800;
}

.content-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0;
  color: var(--muted);
  font-size: 13px;
}

.content-description {
  color: var(--muted);
  line-height: 1.45;
}

.content-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.content-actions button {
  white-space: nowrap;
}

.bad {
  color: var(--bad);
}

.good {
  color: var(--good);
}

.warn {
  color: var(--warn);
}

@media (max-width: 840px) {
  .controls,
  .monitor-controls,
  .grid,
  .stats {
    grid-template-columns: 1fr;
  }

  .content-row {
    grid-template-columns: 1fr;
  }

  .review-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
}
