:root {
  --bg-top: #0f172a;
  --bg-bottom: #111827;
  --surface: rgba(255, 255, 255, 0.94);
  --surface-strong: #ffffff;
  --surface-border: rgba(148, 163, 184, 0.22);
  --text: #0f172a;
  --muted: #475569;
  --accent: #1d4ed8;
  --accent-strong: #1e3a8a;
  --accent-soft: rgba(29, 78, 216, 0.14);
  --success-bg: rgba(220, 252, 231, 0.92);
  --success-text: #166534;
  --error-bg: rgba(254, 226, 226, 0.94);
  --error-text: #991b1b;
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.28);
  --shadow-sm: 0 10px 24px rgba(15, 23, 42, 0.12);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: Aptos, "Segoe UI Variable", "Segoe UI", sans-serif;
  color: #e2e8f0;
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.28), transparent 30%),
    radial-gradient(circle at right 20%, rgba(37, 99, 235, 0.18), transparent 28%),
    linear-gradient(160deg, var(--bg-top), var(--bg-bottom));
}

body::before {
  content: "";
  position: fixed;
  inset: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 32px;
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration: none;
}

.shell {
  width: min(1240px, calc(100% - 28px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.topbar {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 22px;
  padding: 24px;
  border: 1px solid rgba(191, 219, 254, 0.18);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(236, 242, 255, 0.14), rgba(191, 219, 254, 0.08)),
    rgba(30, 41, 59, 0.58);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(18px);
}

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

.eyebrow {
  margin: 0 0 10px;
  color: #93c5fd;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 10px;
  font-size: clamp(2rem, 6vw, 3.4rem);
  color: #f8fafc;
  letter-spacing: -0.04em;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  color: var(--text);
  letter-spacing: -0.03em;
}

h3 {
  margin-bottom: 8px;
  font-size: 1rem;
  color: var(--text);
}

p {
  color: var(--muted);
  line-height: 1.55;
}

.topbar-copy {
  max-width: 60ch;
  color: #cbd5e1;
}

.dashboard-grid {
  display: grid;
  gap: 20px;
}

.panel {
  padding: 22px;
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--surface-strong), var(--surface));
  box-shadow: var(--shadow-lg);
  color: var(--text);
}

.panel-head {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 18px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  padding: 14px 20px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #f8fafc;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.button.button-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.status-banner {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 14px;
}

.status-banner.hidden {
  display: none;
}

.status-banner.status-error {
  background: var(--error-bg);
  color: var(--error-text);
}

.status-banner.status-success {
  background: var(--success-bg);
  color: var(--success-text);
}

.jobs-list,
.files-list,
.materials-table,
.detail-grid {
  display: grid;
  gap: 14px;
}

.job-card,
.file-card,
.material-row,
.detail-card {
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 16px;
  background: #f8fafc;
}

.job-card {
  display: grid;
  gap: 12px;
}

.job-card-top,
.file-card,
.material-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.job-card-meta,
.detail-card p {
  margin: 0;
}

.job-card-actions,
.file-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.job-status,
.file-type,
.pill {
  display: inline-flex;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(29, 78, 216, 0.1);
  color: var(--accent-strong);
  font-size: 0.85rem;
  font-weight: 700;
}

.detail-grid {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.detail-card strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
}

.materials-head,
.material-row {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(72px, 0.5fr));
  gap: 12px;
  align-items: center;
}

.materials-head {
  padding: 0 4px 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.material-row span:last-child {
  font-weight: 800;
  color: var(--text);
}

.empty-state {
  padding: 18px;
  border: 1px dashed rgba(148, 163, 184, 0.26);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
}

@media (min-width: 900px) {
  .shell {
    padding-top: 42px;
  }

  .topbar {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }

  .panel-head {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }

  .job-card-top,
  .file-card {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}
