:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --panel: #ffffff;
  --line: #d8dde6;
  --text: #17202a;
  --muted: #667085;
  --accent: #0f766e;
  --danger: #b42318;
  --warning: #b54708;
}

* {
  box-sizing: border-box;
}

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

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

h1, h2, p {
  margin: 0;
}

h1 {
  font-size: 22px;
}

.topbar p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

button {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: white;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
}

.layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 16px;
}

.panel {
  min-height: 220px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.panel.wide {
  grid-column: 1 / -1;
}

.panel-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.panel-title h2 {
  font-size: 16px;
}

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

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

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

th {
  background: #f9fafb;
  color: #344054;
  font-weight: 600;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  gap: 10px;
  padding: 14px;
}

.step {
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  padding: 10px;
  background: #fbfcfd;
  min-height: 74px;
}

.step strong {
  display: block;
  font-size: 14px;
}

.step span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.badge-danger {
  color: var(--danger);
  font-weight: 600;
}

.badge-warning {
  color: var(--warning);
  font-weight: 600;
}

.empty, .error {
  padding: 16px;
  color: var(--muted);
}

.error {
  color: var(--danger);
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .timeline {
    grid-template-columns: 1fr;
  }
}
