:root {
  color-scheme: light;
  --bg: #f5f7f8;
  --panel: #ffffff;
  --ink: #172026;
  --muted: #64717a;
  --line: #d9e0e5;
  --accent: #1b7f79;
  --accent-dark: #12635e;
  --warn: #b65b16;
  --ok: #247a3b;
  --shadow: 0 18px 45px rgba(31, 47, 60, 0.1);
}

* {
  box-sizing: border-box;
}

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

button,
input,
textarea {
  font: inherit;
}

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

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1;
}

.release-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.release-meta strong {
  color: var(--ink);
}

h2 {
  font-size: 20px;
}

.notice {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
  padding: 18px 20px;
  border-color: #e1c9aa;
  background: #fffaf2;
  box-shadow: none;
}

.notice h2 {
  color: #8a4b12;
}

.notice p {
  margin: 0;
  color: #2d3439;
  font-size: 14px;
  line-height: 1.5;
}

.status-pill {
  min-width: 106px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 14px;
  background: #fff;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
  font-weight: 700;
}

.status-pill.busy {
  color: var(--warn);
}

.status-pill.ok {
  color: var(--ok);
}

.workspace {
  display: grid;
  grid-template-columns: 400px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.controls {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.panel-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 4px;
}

.panel-header span {
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.auth-help {
  display: grid;
  gap: 10px;
  border: 1px solid #cfdde3;
  border-radius: 8px;
  padding: 14px;
  background: #f8fbfb;
}

.auth-help p {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
}

.auth-help dl {
  display: grid;
  gap: 9px;
  margin: 0;
}

.auth-help div {
  display: grid;
  gap: 2px;
}

.auth-help dt {
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 900;
}

.auth-help dd {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfd;
  color: var(--ink);
  outline: none;
}

input {
  height: 42px;
  padding: 0 12px;
}

textarea {
  min-height: 112px;
  resize: vertical;
  padding: 12px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
}

input:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(27, 127, 121, 0.14);
}

.file-drop {
  border: 1px dashed #a8b7bf;
  border-radius: 8px;
  padding: 16px;
  background: #f9fbfb;
  color: var(--ink);
  cursor: pointer;
}

.file-drop input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.file-drop span {
  font-size: 15px;
}

.file-drop small {
  color: var(--muted);
  font-weight: 500;
  line-height: 1.4;
}

button {
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
}

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

button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

button.primary:not(:disabled):hover {
  background: var(--accent-dark);
}

.monitor {
  min-height: 624px;
  padding: 20px;
}

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

.progress div {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1b7f79, #38a06f);
  transition: width 220ms ease;
}

.progress-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.progress-meta strong {
  color: var(--ink);
}

.download-ready {
  border: 1px solid rgba(36, 122, 59, 0.35);
  border-radius: 8px;
  margin-bottom: 18px;
  padding: 12px 14px;
  background: #eef8f1;
  color: var(--ok);
  font-weight: 900;
}

.download-ready[hidden] {
  display: none;
}

.actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(110px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.details-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfd;
}

.details-grid span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.details-grid strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 15px;
}

pre {
  overflow: auto;
  min-height: 220px;
  max-height: 440px;
  margin: 0;
  border: 1px solid #20303a;
  border-radius: 8px;
  padding: 16px;
  background: #101820;
  color: #d7eee7;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.5;
}

h3 {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 10px;
}

.subhead button {
  width: auto;
  height: 32px;
  padding: 0 12px;
  font-size: 12px;
}

.log-list {
  display: grid;
  gap: 8px;
  overflow: auto;
  min-height: 116px;
  max-height: 188px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.log-list li {
  display: grid;
  grid-template-columns: 82px 58px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: #fbfcfd;
  color: var(--ink);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.35;
}

.log-list .time,
.log-list .level {
  color: var(--muted);
  font-weight: 800;
}

.log-list .level.error {
  color: #a53720;
}

.log-list .level.ok {
  color: var(--ok);
}

.log-list .message {
  overflow-wrap: anywhere;
}

.response-title {
  margin: 0 0 10px;
}

@media (max-width: 880px) {
  .shell {
    width: min(100vw - 24px, 680px);
    padding: 20px 0;
  }

  .topbar,
  .workspace {
    display: grid;
  }

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

  .actions,
  .details-grid {
    grid-template-columns: 1fr;
  }

  .panel-header {
    display: grid;
  }

  .panel-header span {
    text-align: left;
  }
}
