:root {
  --bg: #f2f4f8;
  --panel: #ffffff;
  --line: #1f2937;
  --soft-line: #ccd3df;
  --header: #d9e5f6;
  --title: #e8ccd8;
  --accent: #2563eb;
  --accent-strong: #1749c8;
  --att: #36bdc4;
  --section: #eef3f9;
  --text: #081225;
  --muted: #556174;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
}

.runner-shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 6px 0 24px;
}

h1 {
  margin: 0 0 10px;
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: 0;
}

.domain-panel,
.report-panel {
  background: var(--panel);
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.domain-panel {
  padding: 12px;
  margin-bottom: 14px;
}

.domain-form {
  display: grid;
  grid-template-columns:
    minmax(150px, 1.4fr)
    minmax(100px, 0.8fr)
    minmax(150px, 1fr)
    minmax(170px, 1.2fr)
    minmax(140px, 1fr)
    minmax(140px, 1fr)
    140px;
  gap: 12px;
  align-items: end;
}

.field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.field span {
  font-weight: 700;
  font-size: 12px;
}

input,
select {
  width: 100%;
  height: 36px;
  border: 1px solid #aab4c5;
  border-radius: 5px;
  padding: 0 11px;
  font: inherit;
  background: #fff;
}

input:focus,
select:focus {
  border-color: var(--accent);
  outline: 2px solid rgba(37, 99, 235, 0.16);
}

input:disabled {
  background: #f1f5f9;
  color: #64748b;
}

button {
  height: 36px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 0 14px;
  background: #fff;
  color: #003bed;
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  background: #eef4ff;
}

button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.start-button {
  background: var(--accent);
  color: #fff;
}

.start-button:hover {
  background: var(--accent-strong);
}

.job-row {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  align-items: center;
  min-height: 24px;
  margin-top: 7px;
  font-size: 16px;
}

.job-row strong {
  font-weight: 800;
}

.alive-note {
  color: var(--muted);
  font-size: 13px;
}

.queue-panel {
  margin-top: 12px;
  overflow-x: auto;
}

.job-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
  font-size: 13px;
}

.job-table th,
.job-table td {
  border: 1px solid var(--soft-line);
  padding: 7px 8px;
  text-align: left;
  white-space: nowrap;
}

.job-table th {
  background: var(--section);
  font-size: 12px;
}

.job-table tr[data-status="RUNNING"] {
  background: #eef6ff;
}

.job-table tr[data-status="QUEUED"] {
  background: #fff8e6;
}

.status-done {
  color: #12733d;
  font-weight: 700;
}

.status-failed {
  color: #b42318;
  font-weight: 700;
}

.status-running,
.status-queued {
  color: #1749c8;
  font-weight: 700;
}

.status-aborted {
  color: #d32f2f;
  font-weight: 700;
}

.report-button {
  height: 28px;
  padding: 0 10px;
}

.stop-button {
  height: 28px;
  padding: 0 10px;
  background-color: #d32f2f;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 700;
}

.stop-button:hover {
  background-color: #b71c1c;
}

.history-action-row td {
  background: #fff8f0;
  border-top: 2px dashed #e2a86a;
  text-align: right;
  padding: 6px 8px;
}

.clear-history-button {
  height: 28px;
  padding: 0 12px;
  background-color: #e67e22;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 700;
  font-size: 12px;
  transition: background-color 0.15s;
}

.clear-history-button:hover {
  background-color: #ca6f1e;
}


.report-panel {
  height: min(640px, calc(100vh - 190px));
  min-height: 420px;
  overflow: hidden;
}

#report-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

a {
  color: #005cff;
}

@media (max-width: 900px) {
  .runner-shell {
    width: min(100vw - 16px, 1180px);
  }

  .domain-form {
    grid-template-columns: 1fr 1fr;
  }

  .field-domain,
  .start-button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  h1 {
    font-size: 20px;
  }

  .domain-form {
    grid-template-columns: 1fr;
  }

  .job-row {
    gap: 10px;
    font-size: 14px;
  }

  .report-panel {
    min-height: 420px;
  }
}
