:root {
  --ink: #102a43;
  --paper: #f5f7fa;
  --warm: #fffaf1;
  --line: #d6dee6;
  --accent: #d64545;
  --teal: #56a3a6;
  --gold: #c99b36;
  --muted: #607184;
  --shadow: 0 22px 55px rgba(16, 42, 67, 0.15);
  color-scheme: light;
  font-family: "Arial Narrow", "Roboto Condensed", "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(16, 42, 67, 0.04) 1px, transparent 1px),
    linear-gradient(0deg, rgba(16, 42, 67, 0.035) 1px, transparent 1px),
    var(--paper);
  background-size: 34px 34px;
  color: var(--ink);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.rail {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 18px;
  background: var(--ink);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #ffffff;
  text-decoration: none;
  font-size: 23px;
  font-weight: 800;
}

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

.nav-tabs {
  display: grid;
  gap: 7px;
}

.nav-tab {
  border: 0;
  border-left: 3px solid transparent;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  min-height: 42px;
  padding: 10px 12px;
  text-align: left;
  text-transform: uppercase;
  font-size: 13px;
  line-height: 1.2;
}

.nav-tab:hover,
.nav-tab.is-active {
  border-left-color: var(--teal);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.rail-note {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  padding-top: 18px;
  line-height: 1.65;
}

.note-label,
.eyebrow {
  display: block;
  color: var(--teal);
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 800;
}

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

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

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

h1 {
  margin-bottom: 0;
  font-size: 36px;
  line-height: 1.05;
}

h2 {
  margin-bottom: 6px;
  font-size: 26px;
}

.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.toolbar input,
.toolbar select {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  min-height: 42px;
  border-radius: 8px;
  padding: 0 12px;
  max-width: 100%;
}

.toolbar input {
  width: min(320px, 48vw);
}

.metrics-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-bottom: 18px;
}

.metrics-strip div {
  background: rgba(255, 255, 255, 0.9);
  padding: 15px;
}

.metrics-strip span {
  color: var(--muted);
  display: block;
  font-size: 13px;
  margin-bottom: 5px;
}

.metrics-strip strong {
  font-size: 28px;
}

.screen {
  display: none;
  animation: liftIn 240ms ease-out;
}

.screen.is-active {
  display: block;
}

.wall-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: start;
}

.reservation-wall {
  display: grid;
  grid-template-columns: repeat(4, minmax(190px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.stage-column {
  min-width: 190px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
}

.stage-column header {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border-bottom: 3px solid var(--teal);
}

.stage-column[data-stage="project"] header {
  border-bottom-color: var(--gold);
}

.stage-column[data-stage="build"] header {
  border-bottom-color: var(--accent);
}

.stage-column[data-stage="demo"] header {
  border-bottom-color: var(--ink);
}

.stage-column header span {
  font-size: 14px;
  text-transform: uppercase;
  font-weight: 800;
}

.stage-column header b {
  background: var(--ink);
  color: #ffffff;
  min-width: 26px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
}

.lane {
  display: grid;
  gap: 10px;
  padding: 10px;
  min-height: 520px;
}

.reservation-card {
  width: 100%;
  border: 1px solid rgba(16, 42, 67, 0.16);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  text-align: left;
  padding: 12px;
  display: grid;
  gap: 8px;
  min-height: 142px;
  box-shadow: 0 1px 0 rgba(16, 42, 67, 0.05);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.reservation-card:hover,
.reservation-card.is-selected {
  transform: translateY(-2px);
  border-color: var(--teal);
  box-shadow: var(--shadow);
}

.bench {
  width: max-content;
  background: var(--warm);
  border: 1px solid #ead8b5;
  border-radius: 999px;
  padding: 4px 8px;
  color: #6d5118;
  font-weight: 800;
  font-size: 12px;
}

.reservation-card strong {
  font-size: 17px;
  line-height: 1.25;
}

.reservation-card small {
  color: var(--muted);
  line-height: 1.45;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
}

.card-foot i {
  font-style: normal;
  border-radius: 999px;
  padding: 4px 8px;
  color: #ffffff;
  font-size: 12px;
}

.status-queued {
  background: var(--muted);
}

.status-active {
  background: var(--teal);
}

.status-risk {
  background: var(--accent);
}

.status-ready {
  background: var(--ink);
}

.detail-sheet {
  position: sticky;
  top: 18px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  min-height: 420px;
  padding: 18px;
}

.detail-empty {
  min-height: 360px;
  display: grid;
  place-items: center;
  color: var(--muted);
  text-align: center;
}

.is-hidden {
  display: none !important;
}

.sheet-head {
  display: grid;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
  margin-bottom: 16px;
}

.sheet-head span {
  width: max-content;
  background: var(--ink);
  color: #ffffff;
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 800;
}

.sheet-head strong {
  font-size: 25px;
  line-height: 1.18;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 0 0 18px;
}

.detail-grid div {
  min-width: 0;
}

.detail-grid dt {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 800;
}

.detail-grid dd {
  margin: 4px 0 0;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.resource-copy {
  border-left: 3px solid var(--accent);
  padding-left: 12px;
  line-height: 1.7;
  color: #344a5f;
}

.sheet-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.sheet-actions button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 800;
  padding: 10px;
}

.sheet-actions .ghost {
  background: #ffffff;
  color: var(--accent);
  border: 1px solid rgba(214, 69, 69, 0.4);
}

.section-head {
  max-width: 720px;
  margin-bottom: 18px;
}

.section-head p {
  color: var(--muted);
  line-height: 1.7;
}

.action-feed {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.action-feed li {
  display: grid;
  grid-template-columns: 110px minmax(160px, 0.8fr) minmax(180px, 1fr);
  gap: 12px;
  padding: 14px;
  background: #ffffff;
  align-items: start;
}

.action-feed time,
.action-feed span {
  color: var(--muted);
}

.action-feed p {
  grid-column: 3;
  margin: 0;
  line-height: 1.5;
}

.workflow-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 12px;
}

.drawer {
  border: 1px solid var(--line);
  background: #ffffff;
  border-radius: 8px;
  padding: 14px;
  min-height: 130px;
  display: grid;
  grid-template-columns: 10px 1fr;
  gap: 12px;
}

.drawer-swatch {
  background: var(--swatch);
  border-radius: 999px;
}

.drawer strong {
  font-size: 20px;
}

.drawer p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.team-table {
  border: 1px solid var(--line);
  background: var(--line);
  display: grid;
  gap: 1px;
}

.team-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) minmax(140px, 1fr) 110px;
  gap: 12px;
  padding: 14px;
  background: #ffffff;
  align-items: center;
}

.team-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.team-row small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
  line-height: 1.4;
}

.team-head {
  background: var(--ink);
  color: #ffffff;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 800;
}

.empty-lane {
  min-height: 90px;
  border: 1px dashed var(--line);
  color: var(--muted);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 12px;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: var(--ink);
  color: #ffffff;
  padding: 12px 14px;
  border-radius: 8px;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

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

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

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

  .rail {
    position: static;
    height: auto;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
  }

  .nav-tabs {
    display: flex;
    flex-wrap: wrap;
  }

  .rail-note {
    margin-top: 0;
    margin-left: auto;
    max-width: 300px;
  }

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

  .detail-sheet {
    position: static;
  }
}

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

  .topbar {
    display: grid;
    align-items: start;
  }

  h1 {
    font-size: 30px;
  }

  .toolbar {
    justify-content: stretch;
  }

  .toolbar input,
  .toolbar select {
    width: 100%;
  }

  .metrics-strip {
    grid-template-columns: 1fr 1fr;
  }

  .reservation-wall {
    grid-template-columns: repeat(4, 78vw);
  }

  .action-feed li,
  .team-row {
    grid-template-columns: 1fr;
  }

  .action-feed p {
    grid-column: auto;
  }

  .workflow-grid,
  .detail-grid,
  .sheet-actions {
    grid-template-columns: 1fr;
  }
}
