:root {
  --bg: #f6efe6;
  --bg-alt: #f1f7f3;
  --ink: #1c1a16;
  --ink-muted: #5b5347;
  --accent: #e96a3c;
  --accent-2: #117a68;
  --card: #fff7ee;
  --card-border: rgba(28, 26, 22, 0.08);
  --shadow: 0 20px 60px rgba(28, 26, 22, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Zen Kaku Gothic New", sans-serif;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
}

.bg-gradient {
  position: fixed;
  inset: -20% -10% auto auto;
  height: 60vh;
  width: 60vh;
  background: radial-gradient(circle at top, #f7c9a8, transparent 70%);
  opacity: 0.7;
  z-index: -2;
  animation: drift 18s ease-in-out infinite;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image: linear-gradient(transparent 95%, rgba(0, 0, 0, 0.04) 100%),
    linear-gradient(90deg, transparent 95%, rgba(0, 0, 0, 0.04) 100%);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: -3;
}

@keyframes drift {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(-6%, 4%);
  }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 8vw;
  background: rgba(246, 239, 230, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--card-border);
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-family: "Fraunces", serif;
}

.brand-mark {
  font-size: 28px;
  letter-spacing: -0.04em;
  color: var(--accent-2);
}

.brand-title {
  font-size: 20px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.site-nav a {
  text-decoration: none;
  color: var(--ink);
}

.nav-cta {
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
}

.link-button {
  background: none;
  border: none;
  font: inherit;
  color: var(--ink);
  cursor: pointer;
  padding: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.site-main {
  padding: 32px 8vw 80px;
  animation: rise 0.6s ease forwards;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.kicker {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 12px;
  color: var(--accent-2);
  margin: 0 0 8px;
}

h1,
h2,
h3 {
  font-family: "Fraunces", serif;
  margin: 0 0 8px;
}

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

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 32px;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  border-radius: 999px;
  border: none;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  cursor: pointer;
}

.primary-button {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow);
}

.ghost-button {
  border: 1px solid var(--card-border);
  color: var(--ink);
  background: transparent;
}

.ghost-button.disabled {
  opacity: 0.6;
  pointer-events: none;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  padding: 18px 20px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--card-border);
  box-shadow: 0 8px 20px rgba(28, 26, 22, 0.08);
}

.stat-card strong {
  display: block;
  font-size: 24px;
  margin-top: 6px;
}

.job-list .section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.job-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.job-card,
.card {
  background: var(--card);
  border-radius: 18px;
  padding: 20px;
  border: 1px solid var(--card-border);
  color: inherit;
  text-decoration: none;
  box-shadow: 0 12px 30px rgba(28, 26, 22, 0.08);
}

.job-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: cardIn 0.5s ease forwards;
  opacity: 0;
  transform: translateY(12px);
  animation-delay: var(--delay, 0ms);
}

@keyframes cardIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.job-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.job-title {
  font-weight: 600;
  margin: 0;
}

.job-meta {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--ink-muted);
}

.status-pill {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(17, 122, 104, 0.12);
  color: var(--accent-2);
}

.status-pill.status-running {
  background: rgba(233, 106, 60, 0.12);
  color: var(--accent);
}

.status-pill.status-pending {
  background: rgba(91, 83, 71, 0.12);
  color: var(--ink-muted);
}

.status-pill.status-completed,
.status-pill.status-yes {
  background: rgba(17, 122, 104, 0.12);
  color: var(--accent-2);
}

.status-pill.status-failed {
  background: rgba(199, 59, 59, 0.12);
  color: #c73b3b;
}

.status-pill.status-unknown {
  background: rgba(91, 83, 71, 0.12);
  color: var(--ink-muted);
}

.progress {
  height: 8px;
  background: rgba(28, 26, 22, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #f1a45d);
  border-radius: inherit;
}

.job-stats {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--ink-muted);
}

.empty-state {
  padding: 32px;
  border-radius: 20px;
  border: 1px dashed var(--card-border);
  text-align: center;
  background: rgba(255, 255, 255, 0.6);
}

.upload-shell {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card.subtle {
  background: #fffdf8;
}

.form-stack {
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 6px;
  font-size: 14px;
}

.field input,
.field textarea,
.field select {
  border: 1px solid var(--card-border);
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  background: #fff;
}

.checklist {
  margin: 16px 0;
  padding-left: 18px;
  color: var(--ink-muted);
}

.callout {
  padding: 14px;
  border-radius: 12px;
  background: rgba(17, 122, 104, 0.08);
  display: grid;
  gap: 4px;
  font-size: 13px;
}

.auth-shell {
  display: grid;
  gap: 32px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: center;
}

.auth-aside h1 {
  font-size: 36px;
}

.lead {
  font-size: 16px;
  color: var(--ink-muted);
}

.auth-card {
  background: var(--card);
  border-radius: 20px;
  padding: 28px;
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
}

.form-error {
  background: rgba(199, 59, 59, 0.12);
  color: #c73b3b;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
}

.form-footer {
  margin-top: 16px;
  display: flex;
  gap: 8px;
  font-size: 13px;
}

.table-shell {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

thead {
  text-align: left;
  border-bottom: 1px solid var(--card-border);
}

th,
td {
  padding: 12px 8px;
  vertical-align: top;
}

tbody tr {
  border-bottom: 1px solid rgba(28, 26, 22, 0.06);
}

.overview {
  max-width: 320px;
}

.evidence-list {
  margin: 0;
  padding-left: 18px;
}

.pagination {
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.pagination a {
  text-decoration: none;
  color: var(--accent-2);
}

.message-stack {
  margin-bottom: 16px;
}

.message {
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(17, 122, 104, 0.1);
}

@media (max-width: 900px) {
  .site-header {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .job-stats {
    flex-direction: column;
    gap: 6px;
  }
}
