:root {
  --bg: #0b1220;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-stroke: rgba(148, 163, 184, 0.18);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --primary: #2563eb;
  --primary-strong: #1d4ed8;
  --success: #166534;
  --warning: #92400e;
  --danger: #991b1b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(1000px 520px at 15% 10%, rgba(37, 99, 235, 0.16), transparent 55%),
    radial-gradient(900px 560px at 85% 0%, rgba(14, 165, 233, 0.14), transparent 58%),
    radial-gradient(800px 500px at 50% 100%, rgba(59, 130, 246, 0.10), transparent 60%),
    var(--bg);
}

.shell {
  max-width: 1320px;
  width: 100%;
  margin: 0 auto;
  padding: 24px max(24px, env(safe-area-inset-right, 0px)) 24px max(24px, env(safe-area-inset-left, 0px));
}

.hero {
  margin-bottom: 24px;
  padding: 24px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.22), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 20px 50px rgba(2, 6, 23, 0.28);
}

.hero__topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.hero__links,
.hero__user {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.hero__links a,
.hero__user,
.linkbtn {
  color: #bfdbfe;
  font-size: 14px;
  text-decoration: none;
}

.linkbtn {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
}

.hero__links a:hover,
.linkbtn:hover {
  text-decoration: underline;
}

.hero__logout {
  margin: 0;
}

.hero__badge {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.16);
  color: #fde68a;
  font-size: 13px;
  font-weight: 600;
}

.hero h1 {
  margin: 0 0 12px;
  font-size: 30px;
}

.hero p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.6;
}

.hero__tips {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.hero-tip {
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.28);
  border: 1px solid rgba(191, 219, 254, 0.12);
}

.hero-tip h2 {
  margin: 0 0 6px;
  font-size: 15px;
}

.hero-tip p {
  font-size: 13px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(360px, 0.92fr) minmax(0, 1.08fr);
  gap: 20px;
  align-items: start;
}

.workspace__panel {
  display: grid;
  gap: 20px;
}

.card {
  padding: 20px;
  border-radius: 16px;
  background: var(--panel);
  border: 1px solid var(--panel-stroke);
  box-shadow: 0 14px 32px rgba(2, 6, 23, 0.25);
  backdrop-filter: blur(10px);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.section-heading h2 {
  margin: 0;
  font-size: 18px;
}

.section-heading p,
.status-text,
.note {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field {
  display: grid;
  gap: 8px;
}

.field-check {
  gap: 10px;
}

.field-check__row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
  line-height: 1.5;
}

.field-check__row input[type="checkbox"] {
  margin-top: 3px;
}

.field-check__text {
  font-size: 14px;
}

.field--full {
  grid-column: 1 / -1;
}

.input,
.textarea {
  width: 100%;
  box-sizing: border-box;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.92);
  color: #f8fafc;
  padding: 10px 12px;
}

.textarea {
  resize: vertical;
}

.details {
  margin-top: 14px;
}

.details summary {
  cursor: pointer;
  color: #bfdbfe;
}

.file-input {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(37, 99, 235, 0.18);
  color: #e2e8f0;
  cursor: pointer;
}

.file-input:hover {
  background: rgba(37, 99, 235, 0.28);
}

.file-input__native {
  position: absolute;
  width: 0.1px;
  height: 0.1px;
  opacity: 0;
  overflow: hidden;
  z-index: -1;
}

.file-input__text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.actions--compact {
  margin-top: 16px;
}

.btn {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  background: rgba(51, 65, 85, 0.92);
  color: #f8fafc;
  cursor: pointer;
  text-decoration: none;
}

.btn:hover {
  background: rgba(71, 85, 105, 0.95);
}

.btn--primary {
  background: linear-gradient(135deg, #3b82f6, var(--primary));
}

.btn--primary:hover {
  background: linear-gradient(135deg, #3b82f6, var(--primary-strong));
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(51, 65, 85, 0.92);
  font-weight: 700;
}

.status-badge--success {
  background: var(--success);
}

.status-badge--danger {
  background: var(--danger);
}

.status-badge--warning {
  background: var(--warning);
}

.status-badge--running {
  background: var(--primary-strong);
}

.status-badge--queued {
  background: rgba(71, 85, 105, 0.92);
}

.meta-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.meta-item {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.45);
  border: 1px solid rgba(148, 163, 184, 0.12);
  color: #dbeafe;
  font-size: 13px;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.preview-title {
  margin-bottom: 8px;
  color: #bfdbfe;
  font-size: 13px;
}

.image-wrap {
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed rgba(148, 163, 184, 0.3);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.72);
}

.image-wrap--compact {
  min-height: 260px;
}

.image-wrap img {
  max-width: 100%;
  max-height: 480px;
  display: block;
  border-radius: 12px;
}

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

.panel {
  min-height: 220px;
  max-height: 420px;
  overflow: auto;
  background: rgba(2, 6, 23, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 12px;
  padding: 14px;
  white-space: pre-wrap;
  word-break: break-word;
}

.code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.jobs-list {
  display: grid;
  gap: 12px;
}

.job-card {
  text-align: left;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.45);
  color: var(--text);
  padding: 12px;
  cursor: pointer;
}

.job-card:hover {
  background: rgba(30, 41, 59, 0.82);
}

.job-card--active {
  border-color: #60a5fa;
  box-shadow: inset 0 0 0 1px #60a5fa;
}

.job-card__title {
  font-weight: 700;
  margin-bottom: 6px;
}

.job-card__meta {
  color: #93c5fd;
  margin-bottom: 6px;
  font-size: 13px;
}

.job-card__desc {
  color: #cbd5e1;
  font-size: 13px;
  line-height: 1.45;
}

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

@media (max-width: 900px) {
  .hero__tips,
  .field-grid,
  .preview-grid {
    grid-template-columns: 1fr;
  }
}

