:root {
  --bg: #edf4f6;
  --card: rgba(255, 255, 255, 0.9);
  --ink: #07243b;
  --muted: #4d6476;
  --line: #c4d6df;
  --brand: #07243b;
  --brand-dark: #041624;
  --brand-soft: #dce9ee;
  --accent: #0d4c78;
  --ok: #1f6a57;
  --warn: #8d6a14;
  --bad: #9b2c3b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, sans-serif;
  background:
    linear-gradient(rgba(237, 244, 246, 0.88), rgba(237, 244, 246, 0.93)),
    url("/static/paramita-logo.svg") center center / 980px no-repeat fixed,
    radial-gradient(circle at top left, rgba(7, 36, 59, 0.1) 0, transparent 35%),
    linear-gradient(180deg, #f7fbfc 0%, var(--bg) 100%);
  color: var(--ink);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
}

.brand {
  text-decoration: none;
  color: var(--brand-dark);
  font-size: 1.4rem;
  font-weight: 800;
}

.subtitle {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
}

.hero, .grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 1.25rem;
}

.card, .hero-copy, .hero-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.25rem;
  box-shadow: 0 16px 36px rgba(7, 36, 59, 0.08);
}

.stack > * + * {
  margin-top: 1rem;
}

.primary-button, .link-button, button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.8rem 1rem;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  font-weight: 700;
}

.primary-button, button {
  background: linear-gradient(135deg, var(--brand) 0%, var(--accent) 100%);
  color: white;
}

.link-button {
  color: var(--brand-dark);
  background: var(--brand-soft);
}

label span {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 700;
}

select, input[type="file"] {
  width: 100%;
  padding: 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: white;
}

.feature-list, .job-list, .actions, .flash-stack, .detail-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.requirements-box {
  padding: 0.9rem 1rem;
  border-radius: 12px;
  border: 1px dashed var(--line);
  background: rgba(220, 233, 238, 0.6);
}

.requirements-box summary {
  cursor: pointer;
  font-weight: 700;
}

.compact > * + * {
  margin-top: 0.6rem;
}

.job-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  background: white;
}

.filter-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.9rem;
  align-items: end;
}

.job-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.status {
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
}

.status-queued {
  background: #eef3f5;
  color: var(--warn);
}

.status-running {
  background: #e8f2f8;
  color: var(--accent);
}

.status-completed {
  background: #e8f7ee;
  color: var(--ok);
}

.status-failed {
  background: #fdeced;
  color: var(--bad);
}

.flash {
  padding: 0.9rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.flash-success {
  background: #e7f5f0;
  color: var(--ok);
}

.flash-error {
  background: #fbecee;
  color: var(--bad);
}

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

.log-box {
  margin: 0;
  padding: 1rem;
  background: #161616;
  color: #d4f7d4;
  border-radius: 14px;
  overflow: auto;
  max-height: 420px;
  white-space: pre-wrap;
  word-break: break-word;
}

.user-chip {
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  background: var(--brand-soft);
  font-size: 0.9rem;
}

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

  .topbar, .job-header, .filter-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .filter-row {
    grid-template-columns: 1fr;
  }

  body {
    background:
      linear-gradient(rgba(237, 244, 246, 0.9), rgba(237, 244, 246, 0.95)),
      url("/static/paramita-logo.svg") center center / 560px no-repeat fixed,
      linear-gradient(180deg, #f7fbfc 0%, var(--bg) 100%);
  }
}
