:root {
  color-scheme: light;
  --ink: #111111;
  --muted: #777777;
  --soft: #f4f4f4;
  --paper: #ffffff;
  --line: #dddddd;
  --blue-bg: #ddeeff;
  --blue-line: #a8cef2;
  --green-bg: #ddf7ea;
  --green-line: #9ddbbb;
  --pink-bg: #ffe1ea;
  --pink-line: #f2a7be;
  --violet-bg: #eee4ff;
  --violet-line: #c9b1f2;
  --amber-bg: #fff3c8;
  --amber-line: #e4c866;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, Arial, sans-serif;
  background: var(--soft);
  color: var(--ink);
}

button,
input,
select,
textarea {
  font: inherit;
}

.shell {
  display: grid;
  grid-template-columns: minmax(320px, 440px) minmax(0, 1fr);
  min-height: 100vh;
}

.settings-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 28px;
  background: #fafafa;
  border-right: 1px solid var(--line);
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #111111;
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: 0;
}

.brand p,
.eyebrow,
.status-line,
label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.mode-tab,
.ghost-button {
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #555555;
  cursor: pointer;
  font-weight: 700;
}

.mode-tab.active {
  background: #111111;
  color: #ffffff;
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field-row {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

label {
  text-transform: uppercase;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: #222222;
  outline: none;
}

input,
select {
  min-height: 42px;
  padding: 0 12px;
}

textarea {
  resize: vertical;
  min-height: 96px;
  padding: 12px;
  line-height: 1.45;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #111111;
  box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.08);
}

.two-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.file-map {
  margin-top: 8px;
}

.file-map label {
  display: grid;
  grid-template-columns: 52px 1fr;
  align-items: center;
  gap: 10px;
}

.advanced {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 13px;
}

.advanced summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.advanced[open] {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.submit-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  background: #111111;
  color: #ffffff;
  cursor: pointer;
  font-weight: 800;
}

.submit-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.button-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green-bg);
}

.output-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 28px;
  overflow: auto;
}

.output-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.output-topline h2 {
  margin-top: 4px;
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: 0;
}

.ghost-button {
  padding: 0 14px;
  border: 1px solid var(--line);
  background: #ffffff;
}

.status-line {
  padding: 10px 12px;
  border: 1px solid var(--blue-line);
  border-radius: 8px;
  background: var(--blue-bg);
  color: #245074;
}

.jobs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.job-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 220px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.job-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.job-kind,
.job-status {
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
}

.job-kind {
  background: var(--violet-bg);
  border: 1px solid var(--violet-line);
  color: #4d3470;
}

.job-status {
  background: var(--amber-bg);
  border: 1px solid var(--amber-line);
  color: #654b00;
}

.job-status.done {
  background: var(--green-bg);
  border-color: var(--green-line);
  color: #24563b;
}

.job-status.failed {
  background: var(--pink-bg);
  border-color: var(--pink-line);
  color: #7a263d;
}

.job-prompt {
  color: #333333;
  font-size: 14px;
  line-height: 1.45;
}

.job-assets {
  display: grid;
  gap: 10px;
}

.job-assets img,
.job-assets video {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f7f7;
}

.job-assets a {
  color: #245074;
  font-weight: 700;
}

.job-meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 10px;
  margin: auto 0 0;
  color: #777777;
  font-size: 12px;
}

.job-meta dt {
  font-weight: 800;
}

.job-meta dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 360px;
  border: 1.5px dashed var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: #777777;
  text-align: center;
  font-weight: 700;
}

.hidden {
  display: none;
}

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

  .settings-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 520px) {
  .settings-panel,
  .output-panel {
    padding: 18px;
  }

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

  .output-topline {
    align-items: flex-start;
    flex-direction: column;
  }
}
