:root {
  --bg: #0f172a;
  --bg-soft: #111827;
  --card: #020617;
  --accent: #38bdf8;
  --accent-soft: rgba(56,189,248,0.1);
  --text-main: #e5e7eb;
  --text-muted: #9ca3af;
  --border-subtle: #1f2937;
  --danger: #f97373;
  --radius-lg: 16px;
  --radius-md: 10px;
  --shadow-soft: 0 18px 40px rgba(15,23,42,0.75);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #1f2937 0, #020617 55%);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(2, 6, 23, 0.85);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: conic-gradient(from 180deg, #22d3ee, #38bdf8, #4f46e5, #22d3ee);
  padding: 2px;
}

.brand-mark-inner {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: #020617;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: #e0f2fe;
}

.brand-text-main {
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 13px;
  color: #e5e7eb;
}

.brand-text-sub {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.header-cta {
  display: flex;
  gap: 10px;
  align-items: center;
}

main {
  flex: 1;
  padding: 24px 16px 40px;
}

.main-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.card {
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.12), transparent 55%),
              linear-gradient(145deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.98));
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(148, 163, 184, 0.15);
}

.card.compact { padding: 14px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.4);
  color: var(--text-muted);
}

.pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.9);
}

.title {
  font-size: 24px;
  line-height: 1.15;
  margin: 6px 0 8px;
  background: linear-gradient(120deg, #38bdf8, #22c55e);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.subtitle {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
}

.btn {
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #38bdf8, #22c55e);
  color: #0b1120;
  box-shadow: 0 10px 28px rgba(34, 197, 94, 0.35);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(34, 197, 94, 0.45);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.btn-ghost:hover {
  background: rgba(15, 23, 42, 0.9);
  color: var(--text-main);
}

.btn-small {
  padding: 7px 12px;
  font-size: 12px;
}

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

@media (min-width: 720px) {
  .grid-2 { grid-template-columns: 1.2fr 0.8fr; }
  .title { font-size: 28px; }
}

.jobs-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.seg {
  display: inline-flex;
  border-radius: 999px;
  background: rgba(15,23,42,0.75);
  border: 1px solid rgba(148,163,184,0.25);
  padding: 3px;
}

.seg button {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  padding: 7px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 650;
}

.seg button.active {
  background: rgba(56,189,248,0.25);
  color: #e0f2fe;
  border: 1px solid rgba(56,189,248,0.35);
}

.input {
  border-radius: 999px;
  border: 1px solid rgba(31,41,55,0.9);
  background: rgba(15,23,42,0.9);
  color: var(--text-main);
  font-size: 13px;
  padding: 10px 12px;
  font-family: inherit;
  outline: none;
  min-width: 220px;
}

.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(56,189,248,0.4);
}

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

.job-row {
  background: linear-gradient(135deg, #020617, #020617);
  border-radius: var(--radius-md);
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.85);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.job-row:hover {
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: 0 14px 34px rgba(8, 47, 73, 0.8);
}

.job-row-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.kv {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-muted);
}

.kv b { color: var(--text-main); font-weight: 650; }

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid rgba(148,163,184,0.25);
  color: var(--text-muted);
  background: rgba(15,23,42,0.85);
}

.status-badge.queued {
  border-color: rgba(250, 204, 21, 0.45);
  color: #fde68a;
}

.status-badge.done {
  border-color: rgba(34, 197, 94, 0.45);
  color: #86efac;
}

.proofs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.proof-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 10px;
  border: 1px solid rgba(148,163,184,0.18);
  background: rgba(2,6,23,0.55);
}

.proof-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.proof-name {
  font-size: 13px;
  color: var(--text-main);
  font-weight: 650;
}

.proof-sub {
  font-size: 11px;
  color: var(--text-muted);
}

hr.sep {
  border: none;
  border-top: 1px solid rgba(148,163,184,0.14);
  margin: 12px 0;
}

footer {
  padding: 12px 16px 18px;
  border-top: 1px solid var(--border-subtle);
  background: #020617;
  font-size: 11px;
  color: var(--text-muted);
}

.footer-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-inner a { color: #38bdf8; text-decoration: none; }
.footer-inner a:hover { text-decoration: underline; }

/* Modal (borrowed from your workflow page patterns) */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
}
.modal-backdrop.active { display: flex; }

.modal {
  background: #020617;
  border-radius: 14px;
  border: 1px solid #1f2937;
  max-width: 720px;
  width: 92%;
  max-height: 82vh;
  box-shadow: 0 25px 60px rgba(0,0,0,0.7);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal-header {
  padding: 12px 16px;
  border-bottom: 1px solid #1f2937;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: radial-gradient(circle at top left, rgba(37,99,235,0.3), transparent);
}
.modal-title {
  font-size: 1rem;
  font-weight: 650;
  color: #e5edff;
}
.modal-close {
  border: none;
  background: transparent;
  color: #9ca3c4;
  font-size: 1.2rem;
  cursor: pointer;
}
.modal-body {
  padding: 12px 16px 16px;
  overflow-y: auto;
  font-size: 0.9rem;
  color: #e5e7eb;
}
