:root {
  --bg: #050608;
  --panel: #11151b;
  --panel-soft: #171d25;
  --line: #29313d;
  --text: #f3f6fb;
  --muted: #99a3b3;
  --blue: #1797ff;
  --blue-dark: #0c64b8;
  --green: #a7ff3f;
  --danger: #ff5d4d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: "Avenir Next", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

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

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

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo {
  width: 142px;
  height: auto;
  display: block;
}

.subhead,
.auth-status {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-box {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.auth-button,
.secondary {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-soft);
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.05em;
  padding: 10px 12px;
  text-decoration: none;
  text-transform: uppercase;
}

.auth-button:hover,
.secondary:hover {
  border-color: var(--blue);
}

.hidden {
  display: none;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.section-head.compact {
  align-items: center;
  margin-bottom: 8px;
}

h1,
h2,
label {
  margin: 0;
  color: var(--text);
  font-weight: 850;
}

h1 {
  font-size: 26px;
  letter-spacing: -0.03em;
}

h2 {
  font-size: 18px;
  margin-bottom: 14px;
}

.section-head p {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

label {
  display: block;
  margin: 14px 0 8px;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

textarea,
input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #080b10;
  color: var(--text);
  font: 14px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace;
  padding: 13px;
  outline: none;
}

textarea {
  min-height: 245px;
  resize: vertical;
}

textarea.details {
  min-height: 120px;
  font-family: "Avenir Next", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

textarea:focus,
input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(23, 151, 255, 0.18);
}

.actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 16px 0 4px;
}

.credentials-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

button {
  border: 0;
  border-radius: 10px;
  background: var(--blue);
  color: white;
  cursor: pointer;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.05em;
  padding: 12px 16px;
  text-transform: uppercase;
}

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

button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--muted);
}

.checkbox input {
  width: auto;
}

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

.empty {
  color: var(--muted);
}

.row {
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
  color: var(--muted);
}

.row:last-child {
  border-bottom: 0;
}

.row strong {
  color: var(--text);
}

.recent-panel {
  margin-top: 16px;
}

.run-row {
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}

.run-row:last-child {
  border-bottom: 0;
}

.status {
  display: inline-block;
  margin-left: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.status.approved {
  color: var(--green);
}

.status.rejected {
  color: var(--danger);
}

.status.max-round-submit {
  color: #ffd166;
}

.path {
  margin-top: 5px;
  color: var(--muted);
  font: 12px/1.35 ui-monospace, SFMono-Regular, Menlo, monospace;
  overflow-wrap: anywhere;
}

.path.source {
  color: #ffd166;
}

.run-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.hint {
  color: var(--muted);
  font-size: 12px;
}

pre {
  min-height: 250px;
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
  color: #dbe5f3;
  font: 13px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace;
}

@media (max-width: 820px) {
  .section-head,
  .credentials-grid,
  .grid {
    display: block;
  }

  .section-head p {
    margin-top: 8px;
  }

  .grid .panel {
    margin-top: 16px;
  }
}
