:root {
  color-scheme: light;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: #19211c;
  background: #f3f6f3;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(48, 132, 85, 0.1), transparent 35rem),
    #f3f6f3;
}

.shell {
  width: min(760px, calc(100% - 32px));
  margin: 0 auto;
  padding: 64px 0;
}

header {
  margin-bottom: 32px;
}

.eyebrow {
  margin-bottom: 12px;
  color: #187546;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: clamp(2rem, 6vw, 3.25rem);
  letter-spacing: -0.05em;
}

header p,
.section-heading p {
  color: #627068;
}

.panel {
  margin-top: 18px;
  padding: 24px;
  border: 1px solid #dbe3dd;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 30px rgba(22, 55, 37, 0.06);
}

.panel h2 {
  margin-bottom: 18px;
  font-size: 1.05rem;
}

label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.875rem;
  font-weight: 700;
}

.input-row {
  display: flex;
  gap: 10px;
}

input {
  min-width: 0;
  flex: 1;
  padding: 13px 14px;
  border: 1px solid #bfcac2;
  border-radius: 10px;
  outline: none;
  font: inherit;
}

input:focus {
  border-color: #218653;
  box-shadow: 0 0 0 3px rgba(33, 134, 83, 0.14);
}

button {
  padding: 13px 20px;
  border: 0;
  border-radius: 10px;
  color: white;
  background: #187546;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

button:hover {
  background: #116038;
}

button:disabled {
  cursor: wait;
  opacity: 0.58;
}

.hint,
.error {
  min-height: 18px;
  margin: 8px 0 0;
  font-size: 0.8rem;
}

.hint {
  color: #768079;
}

.error {
  color: #b3261e;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.section-heading h2 {
  margin-bottom: 5px;
}

.section-heading p {
  margin-bottom: 18px;
  font-size: 0.875rem;
}

.dashboard-filters {
  display: grid;
  min-width: 220px;
  grid-template-columns: repeat(2, minmax(170px, 1fr));
  gap: 10px;
}

.dashboard-filter {
  margin: 0;
  color: #637067;
  font-size: 0.75rem;
}

.dashboard-filter span {
  display: block;
  margin-bottom: 6px;
}

.dashboard-filter select {
  width: 100%;
  padding: 9px 34px 9px 11px;
  border: 1px solid #bfcac2;
  border-radius: 9px;
  color: #243129;
  background: white;
  font: inherit;
}

.dashboard-filter select:focus {
  border-color: #218653;
  outline: none;
  box-shadow: 0 0 0 3px rgba(33, 134, 83, 0.14);
}

.count {
  padding: 6px 10px;
  border-radius: 999px;
  color: #326044;
  background: #e7f2ea;
  font-size: 0.8rem;
  font-weight: 800;
  white-space: nowrap;
}

.dashboard-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.metric {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid #dfe6e1;
  border-radius: 12px;
  color: #19211c;
  background: #f8faf8;
  text-align: left;
  cursor: pointer;
}

.metric:hover,
.metric.active {
  border-color: #218653;
  box-shadow: 0 0 0 3px rgba(33, 134, 83, 0.13);
}

.metric span {
  color: #637067;
  font-size: 0.78rem;
  font-weight: 750;
}

.metric strong {
  font-size: 1.45rem;
}

.metric.passed {
  color: #126a3b;
  background: #edf8f0;
}

.metric.failed {
  color: #a9231c;
  background: #fff1ef;
}

.metric.queued {
  color: #245b87;
  background: #edf6fc;
}

.metric.skipped {
  color: #765b00;
  background: #fff8dc;
}

.metric.no-ac {
  color: #8a4d0f;
  background: #fff4e5;
}

.history-heading {
  margin-top: 22px;
}

.history-heading h3 {
  margin: 0 0 5px;
  font-size: 0.95rem;
}

.history-heading p {
  margin-bottom: 12px;
  color: #68746c;
  font-size: 0.8rem;
}

.history-list {
  display: grid;
  gap: 9px;
  max-height: 310px;
  overflow-y: auto;
}

.history-entry {
  display: grid;
  gap: 7px;
}

.history-run {
  display: grid;
  width: 100%;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid #dde5df;
  color: #243129;
  background: #fafcfa;
  text-align: left;
}

.history-run:hover,
.history-run.selected {
  border-color: #218653;
  color: #183f29;
  background: #edf8f0;
}

.history-run strong {
  overflow: hidden;
  font-size: 0.86rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-run span,
.history-run small {
  color: #66736a;
  font-size: 0.73rem;
  font-weight: 550;
}

.history-ticket-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 4px 10px 10px;
}

.history-ticket {
  width: auto;
  padding: 8px 11px;
  border: 1px solid #d9e2db;
  color: #344239;
  background: white;
  font-size: 0.78rem;
}

.history-ticket:hover,
.history-ticket.selected {
  border-color: #218653;
  color: #126a3b;
  background: #edf8f0;
}

.ticket-list {
  display: grid;
  gap: 10px;
}

.ticket {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid #e1e7e3;
  border-radius: 12px;
  background: #fbfcfb;
}

.ticket-id {
  font-weight: 800;
}

.ticket-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #6c776f;
  font-size: 0.84rem;
  font-weight: 700;
}

.ticket-status::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #aab3ad;
  content: "";
}

.ticket.processing {
  border-color: #72b28e;
  background: #f3faf5;
}

.ticket.processing .ticket-status {
  color: #187546;
}

.ticket.processing .ticket-status::before {
  background: #218653;
  box-shadow: 0 0 0 4px rgba(33, 134, 83, 0.13);
  animation: pulse 1.3s infinite;
}

.ticket.completed .ticket-status,
.ticket.passed .ticket-status {
  color: #187546;
}

.ticket.completed .ticket-status::before,
.ticket.passed .ticket-status::before {
  background: #218653;
}

.ticket.failed .ticket-status {
  color: #b3261e;
}

.ticket.failed .ticket-status::before {
  background: #d13b32;
}

.ticket.skipped .ticket-status {
  color: #8a6500;
}

.ticket.skipped .ticket-status::before {
  background: #d29a00;
}

.results-list {
  display: grid;
  gap: 12px;
}

.results-empty {
  margin: 0;
  padding: 18px;
  border: 1px dashed #cbd6ce;
  border-radius: 10px;
  color: #69756d;
  background: #f8faf8;
  text-align: center;
}

.result-card {
  padding: 18px;
  border: 1px solid #dfe6e1;
  border-left-width: 5px;
  border-radius: 12px;
  background: #fbfcfb;
}

.result-card.passed {
  border-left-color: #218653;
}

.result-card.failed {
  border-left-color: #d13b32;
}

.result-card.skipped {
  border-left-color: #d29a00;
}

.result-card.queued {
  border-left-color: #347caf;
}

.result-card h3,
.criterion h4 {
  margin: 0;
}

.result-card h3 {
  font-size: 1rem;
}

.result-meta {
  margin: 6px 0 0;
  color: #68746c;
  font-size: 0.78rem;
}

.result-badge {
  display: inline-block;
  margin-bottom: 14px;
  padding: 9px 14px;
  border-radius: 8px;
  color: white;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.result-badge.passed {
  background: #187546;
}

.result-badge.failed {
  background: #c83028;
}

.result-badge.skipped {
  background: #a87900;
}

.result-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 16px;
}

.result-counts span {
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.result-counts .passed {
  color: #126a3b;
  background: #e3f4e9;
}

.result-counts .failed {
  color: #a9231c;
  background: #fbe8e6;
}

.result-counts .skipped {
  color: #765b00;
  background: #fff4c7;
}

.result-table-wrap {
  overflow-x: auto;
}

.result-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.result-table th,
.result-table td {
  padding: 10px;
  border: 1px solid #dfe6e1;
  text-align: left;
  vertical-align: top;
}

.result-table th {
  color: #3e4b43;
  background: #edf2ee;
  font-size: 0.76rem;
  text-transform: uppercase;
}

.result-table .status-cell {
  font-weight: 800;
  white-space: nowrap;
}

.result-table tr.passed {
  background: #f4fbf6;
}

.result-table tr.failed {
  background: #fff6f5;
}

.result-table tr.skipped {
  background: #fffbeb;
}

.result-error {
  margin: 6px 0 0;
  color: #5e6962;
  font-size: 0.84rem;
  line-height: 1.5;
}

.result-error {
  color: #b3261e;
}

.result-pending {
  margin: 8px 0 0;
  color: #557185;
  font-size: 0.84rem;
}

.log-panel {
  padding: 0;
  overflow: hidden;
}

.log-panel summary {
  padding: 18px 22px;
  font-weight: 750;
  cursor: pointer;
}

pre {
  max-height: 340px;
  margin: 0;
  padding: 18px 22px;
  overflow: auto;
  color: #d9e7dd;
  background: #17211b;
  font: 0.75rem/1.55 Consolas, "Courier New", monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.hidden {
  display: none;
}

@keyframes pulse {
  50% {
    opacity: 0.45;
  }
}

@media (max-width: 560px) {
  .shell {
    padding: 32px 0;
  }

  .input-row {
    flex-direction: column;
  }

  .section-heading {
    flex-direction: column;
  }

  .dashboard-filters {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .dashboard-metrics {
    grid-template-columns: 1fr;
  }

  button {
    width: 100%;
  }
}
