:root {
  --ink: #22333b;
  --paper: #f2f4f3;
  --accent: #e63946;
  --aqua: #a8dadc;
  --line: rgba(34, 51, 59, 0.14);
  --muted: rgba(34, 51, 59, 0.62);
  --white: #ffffff;
  --shadow: 0 24px 70px rgba(34, 51, 59, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

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

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

.brand {
  color: inherit;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 780;
  letter-spacing: 0;
}

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

.spine-block {
  border-top: 1px solid rgba(242, 244, 243, 0.18);
  padding-top: 22px;
}

.spine-block strong {
  display: block;
  font-size: clamp(42px, 6vw, 68px);
  line-height: 0.95;
  letter-spacing: 0;
}

.spine-block span,
.spine-grid small,
.section-head p,
.work-item p,
.workflow-row p,
.team-card p {
  color: var(--muted);
}

.metric-spine .spine-block span,
.metric-spine .spine-grid small {
  color: rgba(242, 244, 243, 0.68);
}

.spine-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid rgba(242, 244, 243, 0.16);
}

.spine-grid div {
  padding: 16px;
}

.spine-grid div + div {
  border-left: 1px solid rgba(242, 244, 243, 0.16);
}

.spine-grid b {
  display: block;
  margin-top: 8px;
  font-size: 28px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

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

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

h1 {
  margin-bottom: 0;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  font-size: 18px;
  letter-spacing: 0;
}

h3 {
  font-size: 15px;
  line-height: 1.25;
  letter-spacing: 0;
}

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

.search input,
.quick-create input,
.quick-create textarea,
.workflow-row input {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  border-radius: 8px;
  padding: 12px 13px;
  outline: none;
}

.search input:focus,
.quick-create input:focus,
.quick-create textarea:focus,
.workflow-row input:focus {
  border-color: var(--aqua);
  box-shadow: 0 0 0 3px rgba(168, 218, 220, 0.38);
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  overflow-x: auto;
}

.tab,
.move-row button,
.workflow-row button,
.quick-create button {
  border: 0;
  border-radius: 8px;
  color: var(--ink);
  background: rgba(34, 51, 59, 0.08);
  min-height: 40px;
  padding: 0 14px;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.tab:hover,
.move-row button:hover,
.workflow-row button:hover,
.quick-create button:hover {
  transform: translateY(-1px);
}

.tab.active,
.quick-create button {
  background: var(--ink);
  color: var(--paper);
}

.screen {
  display: none;
  animation: rise 240ms ease both;
}

.screen.active {
  display: block;
}

.queue-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 24px;
  align-items: start;
}

.board {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 10px;
}

.lane {
  min-width: 220px;
  border-top: 3px solid var(--ink);
}

.lane:nth-child(2) {
  border-color: var(--aqua);
}

.lane:nth-child(3) {
  border-color: var(--accent);
}

.lane:nth-child(4) {
  border-color: #6b705c;
}

.lane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 2px 12px;
}

.lane-head h2 {
  margin: 0;
}

.lane-head span {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: var(--white);
  border: 1px solid var(--line);
  font-size: 13px;
}

.lane-items {
  display: grid;
  gap: 12px;
}

.work-item,
.quick-create,
.timeline-row,
.workflow-row,
.team-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.work-item {
  padding: 15px;
  position: relative;
  overflow: hidden;
}

.work-item::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--aqua);
}

.work-item.priority-high::before,
.work-item.priority-urgent::before {
  background: var(--accent);
}

.item-top,
.item-meta,
.move-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.item-top {
  justify-content: space-between;
  margin-bottom: 12px;
}

.item-top strong {
  font-size: 13px;
}

.item-top span,
.item-meta span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  color: var(--muted);
}

.work-item h3 {
  margin-bottom: 8px;
}

.work-item p {
  margin-bottom: 10px;
  font-size: 13px;
}

.tests {
  min-height: 48px;
}

.move-row {
  margin-top: 14px;
}

.move-row button {
  min-height: 32px;
  padding-inline: 10px;
  font-size: 12px;
}

.quick-create {
  padding: 20px;
  position: sticky;
  top: 24px;
}

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

.quick-create label,
.workflow-row label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

.quick-create textarea {
  resize: vertical;
}

.quick-create button {
  margin-top: 4px;
}

.section-head {
  max-width: 740px;
  margin-bottom: 20px;
}

.timeline,
.workflow-list,
.team-grid {
  display: grid;
  gap: 12px;
}

.timeline-row,
.workflow-row,
.team-card {
  padding: 16px;
}

.timeline-row {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 18px;
}

.timeline-row time,
.timeline-row small,
.team-card small,
.workflow-row small {
  color: var(--muted);
  font-size: 12px;
}

.timeline-row p {
  margin: 7px 0;
}

.workflow-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px 120px;
  gap: 14px;
  align-items: end;
}

.workflow-row h3,
.team-card h3 {
  margin-bottom: 6px;
}

.workflow-row p,
.team-card p {
  margin-bottom: 0;
}

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

.team-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--aqua);
  color: var(--ink);
  font-weight: 800;
}

.team-card strong {
  min-width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--paper);
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  transform: translateY(16px);
  opacity: 0;
  pointer-events: none;
  background: var(--ink);
  color: var(--paper);
  border-radius: 8px;
  padding: 12px 16px;
  box-shadow: var(--shadow);
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

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

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

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

  .queue-layout {
    grid-template-columns: 1fr;
  }

  .quick-create {
    position: static;
  }
}

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

  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .search {
    width: 100%;
  }

  .board {
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .lane {
    min-width: 0;
  }

  .timeline-row,
  .workflow-row {
    grid-template-columns: 1fr;
  }
}

