:root {
  --bg: #0b1020;
  --panel: #131b31;
  --panel-2: #1a2440;
  --line: #27314f;
  --text: #eaf0ff;
  --muted: #a8b3d4;
  --accent: #6ea8fe;
  --green: #2cb67d;
  --amber: #f3b562;
  --orange: #ff8b5e;
  --red: #ff6b6b;
  --violet: #b18cff;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.24);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: linear-gradient(180deg, #09101f 0%, #0d1430 100%);
  color: var(--text);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(110, 168, 254, 0.12), transparent 30%),
    radial-gradient(circle at bottom left, rgba(177, 140, 255, 0.1), transparent 25%);
  pointer-events: none;
}

.app-shell {
  position: relative;
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

.sidebar {
  padding: 28px 22px;
  background: rgba(10, 16, 31, 0.9);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #6ea8fe, #8c6bff);
  font-size: 1.3rem;
  box-shadow: var(--shadow);
}

.brand-name {
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-subtitle,
.muted,
.summary-note,
.job-meta,
.job-customer,
.lede.small,
.explain,
.timeline-body p,
.sidebar-panel p,
.sidebar-panel li {
  color: var(--muted);
}

.nav-tabs {
  display: grid;
  gap: 10px;
  margin-bottom: 24px;
}

.nav-tab {
  display: block;
  padding: 13px 14px;
  border-radius: 14px;
  color: var(--text);
  text-decoration: none;
  background: transparent;
  border: 1px solid transparent;
}

.nav-tab:hover,
.nav-tab.active {
  background: rgba(110, 168, 254, 0.12);
  border-color: rgba(110, 168, 254, 0.3);
}

.sidebar-panel {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 16px;
}

.sidebar-panel h3,
.detail-card h3,
.column-header h2,
.secondary-jobs h2 {
  margin-top: 0;
}

.sidebar-panel ul,
.detail-list {
  padding-left: 18px;
  margin-bottom: 0;
}

.main-content {
  padding: 28px;
}

.page-header,
.detail-hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.74rem;
  color: var(--accent);
  margin-bottom: 8px;
}

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

.lede {
  max-width: 720px;
  color: #d6def7;
}

.header-actions,
.hero-topline,
.hero-actions,
.tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.pill,
.tag,
.status {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  background: rgba(255, 255, 255, 0.08);
}

.pill.red,
.tag.red {
  background: rgba(255, 107, 107, 0.18);
  color: #ffc8c8;
}

.pill.amber,
.status.warn {
  background: rgba(243, 181, 98, 0.18);
  color: #ffe1b4;
}

.pill.blue,
.tag.blue {
  background: rgba(110, 168, 254, 0.18);
  color: #d6e6ff;
}

.tag.orange {
  background: rgba(255, 139, 94, 0.18);
  color: #ffd3c4;
}

.status.good {
  background: rgba(44, 182, 125, 0.18);
  color: #c9ffe7;
}

.summary-grid,
.detail-grid,
.mini-cards,
.customer-layout {
  display: grid;
  gap: 18px;
}

.summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 24px;
}

.summary-card,
.detail-card,
.job-card,
.mini-card {
  background: linear-gradient(180deg, rgba(19, 27, 49, 0.94), rgba(15, 22, 39, 0.94));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.summary-label {
  color: var(--muted);
  font-size: 0.84rem;
  margin-bottom: 10px;
}

.summary-value {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.board-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.board-column {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 24px;
  padding: 16px;
}

.column-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.column-header span,
.score {
  font-weight: 700;
}

.job-card + .job-card {
  margin-top: 14px;
}

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

.job-code {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.job-code.big {
  font-size: 0.95rem;
}

.job-next,
.next-action {
  color: #f4f7ff;
  font-weight: 600;
}

.card-link,
.inline-link {
  color: #9ec5ff;
  text-decoration: none;
}

.card-link:hover,
.inline-link:hover,
.button:hover {
  text-decoration: underline;
}

.top-priority {
  border-color: rgba(255, 107, 107, 0.35);
}

.joe-highlight {
  border-color: rgba(110, 168, 254, 0.4);
  box-shadow: 0 18px 40px rgba(72, 118, 255, 0.14);
}

.button {
  display: inline-block;
  text-decoration: none;
  color: #061226;
  background: #cfe0ff;
  padding: 11px 14px;
  border-radius: 14px;
  font-weight: 600;
}

.button.secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.detail-hero {
  background: linear-gradient(180deg, rgba(24, 35, 65, 0.96), rgba(16, 25, 44, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 24px;
}

.detail-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 24px;
}

.customer-layout {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 24px;
}

.wide {
  grid-column: span 2;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  vertical-align: top;
}

.data-table th {
  color: var(--muted);
  font-weight: 600;
}

.timeline {
  display: grid;
  gap: 14px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.timeline-date {
  color: var(--accent);
  font-weight: 600;
}

.push-down {
  margin-bottom: 12px;
}

.error-banner {
  margin: 18px;
  padding: 14px 18px;
  border-radius: 14px;
  background: rgba(255, 107, 107, 0.16);
  border: 1px solid rgba(255, 107, 107, 0.35);
  color: #ffd3d3;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .board-grid,
  .summary-grid,
  .detail-grid,
  .customer-layout {
    grid-template-columns: 1fr;
  }

  .wide {
    grid-column: span 1;
  }

  .page-header,
  .detail-hero,
  .timeline-item {
    grid-template-columns: 1fr;
    display: grid;
  }
}
