:root {
  --onyx: #22333b;
  --paper: #f2f4f3;
  --alert: #e63946;
  --aqua: #a8dadc;
  --ink: #182328;
  --muted: #6f7c82;
  --line: rgba(34, 51, 59, 0.13);
  --surface: #ffffff;
  --shadow: 0 18px 50px rgba(34, 51, 59, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--paper);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(168, 218, 220, 0.22), transparent 34%),
    var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.spine {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-height: 100vh;
  padding: 28px 22px;
  color: var(--paper);
  background: var(--onyx);
}

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

.brand img {
  width: 42px;
  height: 42px;
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  font-size: 18px;
  line-height: 1.1;
  letter-spacing: 0;
}

.brand span,
.eyebrow,
.metric-focus span,
.metric-focus small,
.metric-list span,
.job-meta,
.job-foot,
.list-head span,
.timeline-row span,
.workflow-row span,
.workflow-row em,
.team-row span {
  color: rgba(242, 244, 243, 0.66);
  font-size: 12px;
  line-height: 1.35;
}

.nav {
  display: grid;
  gap: 6px;
}

.nav__item {
  width: 100%;
  min-height: 42px;
  padding: 0 14px;
  color: rgba(242, 244, 243, 0.72);
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 8px;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.nav__item:hover,
.nav__item.is-active {
  color: var(--paper);
  background: rgba(242, 244, 243, 0.11);
  transform: translateX(3px);
}

.metric-focus {
  display: grid;
  gap: 4px;
  padding: 22px 0;
  border-top: 1px solid rgba(242, 244, 243, 0.14);
  border-bottom: 1px solid rgba(242, 244, 243, 0.14);
}

.metric-focus strong {
  color: var(--alert);
  font-size: clamp(44px, 6vw, 72px);
  line-height: 0.95;
  letter-spacing: 0;
}

.metric-list {
  display: grid;
  gap: 14px;
  margin-top: auto;
}

.metric-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(242, 244, 243, 0.12);
}

.metric-list strong {
  text-align: right;
}

.workspace {
  min-width: 0;
  padding: 30px;
}

.topbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 26px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--alert);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  color: var(--onyx);
  letter-spacing: 0;
}

h1 {
  max-width: 820px;
  font-size: clamp(28px, 4vw, 54px);
  line-height: 0.95;
}

h2 {
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1;
}

.search {
  display: grid;
  gap: 7px;
  min-width: min(330px, 100%);
  color: var(--muted);
  font-size: 12px;
}

.search input,
.quick-create input {
  width: 100%;
  min-height: 42px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
}

.search input {
  padding: 0 14px;
}

.search input:focus,
.quick-create input:focus {
  border-color: var(--aqua);
  box-shadow: 0 0 0 4px rgba(168, 218, 220, 0.28);
}

.view {
  display: none;
}

.view.is-active {
  display: block;
  animation: rise 220ms ease both;
}

#queueView.is-active {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 22px;
  align-items: start;
}

.board {
  display: grid;
  grid-template-columns: repeat(4, minmax(210px, 1fr));
  gap: 14px;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 8px;
}

.lane {
  min-width: 210px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.lane header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 30px;
  margin-bottom: 12px;
}

.lane__title {
  color: var(--onyx);
  font-weight: 800;
}

.lane__count {
  display: grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  color: var(--onyx);
  background: var(--aqua);
  border-radius: 999px;
}

.lane__items {
  display: grid;
  gap: 10px;
}

.job-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid rgba(34, 51, 59, 0.1);
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(34, 51, 59, 0.07);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.job-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.job-card.is-risk {
  border-color: rgba(230, 57, 70, 0.58);
}

.job-card__top,
.job-foot,
.job-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.job-client {
  min-width: 0;
  overflow-wrap: anywhere;
}

.job-score {
  flex: 0 0 auto;
  color: var(--alert);
  font-size: 11px;
  font-weight: 800;
}

.job-vehicle {
  min-height: 42px;
  margin: 0;
  color: #33464d;
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.job-meta,
.job-foot {
  color: var(--muted);
}

.job-meta {
  align-items: start;
}

.job-meta span,
.job-foot span {
  overflow-wrap: anywhere;
}

.advance,
.primary {
  min-height: 38px;
  padding: 0 13px;
  color: var(--paper);
  font-weight: 800;
  background: var(--onyx);
  border: 0;
  border-radius: 8px;
  transition: background 160ms ease, transform 160ms ease;
}

.advance:hover,
.primary:hover {
  background: #314852;
  transform: translateY(-1px);
}

.advance:disabled {
  cursor: default;
  opacity: 0.46;
  transform: none;
}

.quick-create {
  display: grid;
  gap: 16px;
  padding: 18px;
  background: var(--onyx);
  color: var(--paper);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.panel-title,
.list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.panel-title strong {
  color: var(--aqua);
}

.quick-create form {
  display: grid;
  gap: 12px;
}

.quick-create label {
  display: grid;
  gap: 6px;
  color: rgba(242, 244, 243, 0.76);
  font-size: 12px;
}

.quick-create input {
  padding: 0 12px;
}

.quick-create .primary {
  color: var(--onyx);
  background: var(--aqua);
}

.form-message {
  min-height: 20px;
  margin: 0;
  color: var(--aqua);
  font-size: 13px;
}

.form-message.is-error {
  color: #ffb3ba;
}

.empty-lane {
  margin: 18px 0;
  color: var(--muted);
  font-size: 13px;
}

.list-head {
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.list-head span,
.timeline-row span,
.workflow-row span,
.workflow-row em,
.team-row span {
  color: var(--muted);
}

.timeline,
.workflow-list,
.team-grid {
  display: grid;
  gap: 10px;
  max-width: 980px;
}

.timeline-row,
.workflow-row,
.team-row {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  min-height: 76px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.timeline-row time {
  color: var(--alert);
  font-size: 13px;
  font-weight: 800;
}

.timeline-row p {
  margin: 4px 0;
  overflow-wrap: anywhere;
}

.workflow-row {
  grid-template-columns: 54px minmax(0, 1fr) 150px;
}

.workflow-row > strong {
  color: var(--aqua);
  font-size: 28px;
}

.workflow-row b,
.team-row strong {
  display: block;
  margin-bottom: 4px;
}

.workflow-row em {
  justify-self: end;
  font-style: normal;
}

.team-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.team-row {
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 86px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.54);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.team-row b {
  color: var(--onyx);
}

.team-row--resource {
  background: rgba(168, 218, 220, 0.2);
}

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

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

  .spine {
    position: relative;
    min-height: auto;
  }

  .metric-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #queueView.is-active {
    grid-template-columns: 1fr;
  }

  .quick-create {
    max-width: none;
  }
}

@media (max-width: 760px) {
  .workspace,
  .spine {
    padding: 20px;
  }

  .topbar,
  .panel-title,
  .list-head {
    align-items: stretch;
    flex-direction: column;
  }

  .metric-list {
    grid-template-columns: 1fr;
  }

  .board {
    grid-template-columns: minmax(236px, 1fr);
    overflow-x: visible;
  }

  .lane {
    min-width: 0;
  }

  .job-card__top,
  .job-foot,
  .job-meta {
    align-items: start;
    flex-direction: column;
  }

  .advance,
  .primary {
    width: 100%;
  }

  .timeline-row,
  .workflow-row,
  .team-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .workflow-row em {
    justify-self: start;
  }

  .team-grid {
    grid-template-columns: 1fr;
  }
}

