:root {
  color-scheme: dark;
  --bg: #07111f;
  --panel: #0d1b2e;
  --panel-2: #10243c;
  --panel-soft: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.12);
  --text: #f8fbff;
  --muted: #9fb2ca;
  --blue: #2f7df6;
  --orange: #ff7417;
  --green: #39d98a;
  --danger: #ff5f6d;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 1180px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(47, 125, 246, 0.26), transparent 36%),
    linear-gradient(135deg, #05101f 0%, #071b32 55%, #050b16 100%);
  color: var(--text);
}

button,
input,
select {
  font: inherit;
}

.studio-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 278px 1fr;
}

.sidebar {
  border-right: 1px solid var(--line);
  padding: 28px 22px;
  background: rgba(5, 12, 24, 0.72);
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  gap: 34px;
}

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

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: white;
  font-weight: 950;
  background: linear-gradient(135deg, var(--orange), #ff9d35);
  box-shadow: 0 18px 44px rgba(255, 116, 23, 0.34);
}

.brand-kicker,
.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 23px;
  line-height: 1;
}

h2 {
  margin-top: 8px;
  font-size: 32px;
  line-height: 1.05;
}

h3 {
  margin-top: 6px;
  font-size: 20px;
  line-height: 1.1;
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-item,
.ghost-button,
.primary-button {
  border: 0;
  cursor: pointer;
}

.nav-item {
  width: 100%;
  height: 44px;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  padding: 0 14px;
  font-weight: 850;
}

.nav-item.active,
.nav-item:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.worker-card {
  margin-top: auto;
  min-height: 74px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.05);
}

.worker-card p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 99px;
  background: var(--green);
  box-shadow: 0 0 0 6px rgba(57, 217, 138, 0.12);
}

.workspace {
  padding: 28px;
}

.topbar {
  height: 84px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 26px;
}

.topbar-actions {
  display: flex;
  gap: 10px;
}

.primary-button,
.ghost-button {
  min-width: 132px;
  height: 42px;
  border-radius: 8px;
  font-weight: 900;
}

.primary-button {
  color: white;
  background: linear-gradient(90deg, var(--orange), #ff8d2c);
  box-shadow: 0 16px 34px rgba(255, 116, 23, 0.22);
}

.ghost-button {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
}

.ghost-button.compact {
  min-width: 72px;
  height: 34px;
  font-size: 13px;
}

.grid {
  display: grid;
  grid-template-columns: minmax(420px, 0.9fr) minmax(430px, 1fr);
  gap: 18px;
  align-items: start;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 27, 46, 0.86);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.24);
}

.panel-header {
  min-height: 72px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pill {
  min-width: 68px;
  height: 30px;
  border-radius: 8px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffd9c1;
  background: rgba(255, 116, 23, 0.14);
  border: 1px solid rgba(255, 116, 23, 0.24);
  font-size: 12px;
  font-weight: 950;
}

.pill.blue {
  color: #cfe0ff;
  background: rgba(47, 125, 246, 0.16);
  border-color: rgba(47, 125, 246, 0.32);
}

.job-panel {
  padding-bottom: 18px;
}

.field {
  display: grid;
  gap: 8px;
  padding: 18px 18px 0;
}

.field span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

input,
select {
  width: 100%;
  height: 46px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  padding: 0 13px;
  outline: none;
}

input:focus,
select:focus {
  border-color: rgba(47, 125, 246, 0.78);
  box-shadow: 0 0 0 3px rgba(47, 125, 246, 0.18);
}

select option {
  color: #08111f;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
}

.toggle-grid {
  padding: 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.toggle {
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
}

.toggle input {
  width: 16px;
  height: 16px;
  accent-color: var(--orange);
}

.stage-list {
  margin: 0;
  padding: 18px;
  display: grid;
  gap: 12px;
  list-style: none;
}

.stage {
  min-height: 62px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  grid-template-columns: 38px 1fr;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.045);
}

.stage-index {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: white;
  background: var(--blue);
  font-size: 13px;
  font-weight: 950;
}

.stage strong {
  font-size: 14px;
}

.stage p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.variants-panel,
.queue-panel {
  grid-column: span 1;
}

.variant-grid {
  padding: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.variant-card {
  min-height: 112px;
  border-radius: 8px;
  border: 1px solid var(--line);
  padding: 14px;
  background:
    linear-gradient(145deg, rgba(47, 125, 246, 0.16), transparent 58%),
    rgba(255, 255, 255, 0.045);
}

.variant-card strong {
  display: block;
  margin-bottom: 9px;
  font-size: 15px;
}

.variant-card p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.job-list {
  padding: 18px;
  display: grid;
  gap: 12px;
}

.job-empty,
.job-item {
  border-radius: 8px;
  border: 1px solid var(--line);
  padding: 14px;
  background: rgba(255, 255, 255, 0.045);
}

.job-empty {
  color: var(--muted);
  font-size: 13px;
}

.job-item {
  display: grid;
  gap: 8px;
}

.job-item header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.job-item strong {
  font-size: 14px;
}

.job-item p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  word-break: break-word;
}

.job-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.download-link {
  min-height: 36px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 13px;
  color: white;
  background: linear-gradient(90deg, var(--orange), #ff8d2c);
  font-size: 13px;
  font-weight: 950;
  text-decoration: none;
  box-shadow: 0 12px 28px rgba(255, 116, 23, 0.18);
}

@media (max-width: 900px) {
  body {
    min-width: 0;
  }

  .studio-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .workspace {
    padding: 18px;
  }

  .topbar,
  .grid,
  .field-row,
  .toggle-grid,
  .variant-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    height: auto;
    align-items: flex-start;
    gap: 18px;
    flex-direction: column;
  }
}
