:root {
  --ink: #2d3142;
  --paper: #f7fff7;
  --accent: #ff9f1c;
  --teal: #2ec4b6;
  --muted: #69707f;
  --line: rgba(45, 49, 66, 0.16);
  --danger: #c83e4d;
  --surface: #ffffff;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100%;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background:
    linear-gradient(90deg, rgba(46, 196, 182, 0.08) 1px, transparent 1px),
    linear-gradient(180deg, rgba(45, 49, 66, 0.08) 1px, transparent 1px),
    var(--paper);
  background-size: 48px 48px;
}

.command-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto minmax(280px, 1fr) minmax(220px, 320px) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 24px;
  background: rgba(247, 255, 247, 0.94);
  border-bottom: 2px solid var(--ink);
  backdrop-filter: blur(10px);
}

.brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
  min-width: 190px;
}

.brand strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.12rem;
  line-height: 1.05;
}

.brand small,
.row-main small,
.metric small,
.doc-row small,
.event time {
  color: var(--muted);
}

.screen-tabs,
.stage-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.tab,
.filter {
  min-height: 36px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.62);
  color: var(--ink);
  padding: 7px 11px;
  border-radius: 7px;
}

.tab.is-active,
.filter.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.search-box {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 0 11px;
  border-radius: 7px;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.primary-action,
.submit-row {
  border: 0;
  background: var(--accent);
  color: #17140d;
  min-height: 38px;
  padding: 9px 14px;
  border-radius: 7px;
  font-weight: 800;
  box-shadow: inset 0 -2px 0 rgba(45, 49, 66, 0.22);
}

main {
  padding: 24px;
}

.screen {
  display: none;
  animation: rise 220ms ease-out;
}

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

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

.workspace-heading.compact {
  max-width: 920px;
}

.kicker {
  margin: 0 0 5px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 0.76rem;
  font-weight: 800;
}

h1,
h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  line-height: 1.04;
}

h1 {
  font-size: clamp(2rem, 4vw, 4.2rem);
  max-width: 850px;
}

h2 {
  font-size: clamp(1.7rem, 3vw, 3rem);
}

.status-cue {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 340px;
  margin: 0;
  color: var(--ink);
  font-weight: 700;
}

.status-cue span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 6px rgba(46, 196, 182, 0.18);
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  background: rgba(255, 255, 255, 0.7);
}

.metric {
  min-height: 116px;
  padding: 16px;
  border-right: 1px solid var(--line);
  display: grid;
  align-content: space-between;
}

.metric:last-child {
  border-right: 0;
}

.metric span,
.finance-cell span {
  color: var(--muted);
  font-weight: 800;
  font-size: 0.82rem;
}

.metric strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.2rem;
}

.tone-warn strong {
  color: #a45b00;
}

.tone-good strong {
  color: #13786f;
}

.board-tools {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin: 18px 0 12px;
}

.sync-label {
  color: var(--muted);
  font-size: 0.9rem;
}

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

.stage {
  min-width: 0;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-top: 5px solid var(--teal);
  border-radius: 8px;
  overflow: hidden;
}

.stage[data-stage="batch"] {
  border-top-color: var(--accent);
}

.stage[data-stage="test"] {
  border-top-color: var(--ink);
}

.stage[data-stage="launch"] {
  border-top-color: #7b61ff;
}

.stage-head {
  height: 42px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  font-weight: 900;
}

.work-row,
.doc-row {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 13px 12px;
  transition: background 140ms ease, transform 140ms ease;
}

.work-row:hover,
.doc-row:hover {
  background: rgba(46, 196, 182, 0.1);
  transform: translateY(-1px);
}

.work-row strong,
.doc-row strong {
  display: block;
  overflow-wrap: anywhere;
}

.row-meta {
  text-align: right;
}

.row-meta b {
  display: block;
  color: var(--ink);
}

.priority-high {
  box-shadow: inset 4px 0 0 var(--accent);
}

.priority-medium {
  box-shadow: inset 4px 0 0 var(--teal);
}

.priority-low {
  box-shadow: inset 4px 0 0 var(--line);
}

.empty-stage {
  padding: 16px 12px;
  color: var(--muted);
}

.request-form {
  max-width: 920px;
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 14px;
  padding-top: 8px;
}

.request-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 800;
}

.request-form input,
.request-form select {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 12px;
  background: var(--surface);
  color: var(--ink);
}

.submit-row {
  grid-column: 1 / -1;
  justify-self: start;
}

.form-result {
  grid-column: 1 / -1;
  min-height: 24px;
  margin: 0;
  color: #13786f;
  font-weight: 800;
}

.document-list,
.finance-grid {
  max-width: 980px;
}

.document-list {
  border-top: 2px solid var(--ink);
}

.doc-row {
  min-height: 72px;
  background: rgba(255, 255, 255, 0.72);
}

.doc-row b {
  color: var(--ink);
  background: rgba(255, 159, 28, 0.24);
  border-radius: 6px;
  padding: 6px 9px;
}

.finance-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
}

.finance-cell {
  min-height: 150px;
  display: grid;
  align-content: center;
  gap: 12px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.74);
  border-right: 1px solid var(--line);
}

.finance-cell:last-child {
  border-right: 0;
}

.finance-cell strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 5vw, 4rem);
}

.finance-note {
  max-width: 980px;
  margin-top: 16px;
  color: var(--muted);
}

.event-stream {
  border-top: 2px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  padding: 12px 24px 18px;
}

.stream-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

#eventStream {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 10px;
}

.event {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 8px;
  align-items: start;
  min-height: 52px;
  padding: 9px 0;
  border-top: 1px solid rgba(247, 255, 247, 0.2);
}

.event time {
  color: var(--accent);
  font-weight: 800;
}

.event span {
  overflow-wrap: anywhere;
}

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

@media (max-width: 1040px) {
  .command-bar {
    grid-template-columns: 1fr;
  }

  .metric-strip,
  .dense-board,
  #eventStream {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .command-bar,
  main,
  .event-stream {
    padding-left: 14px;
    padding-right: 14px;
  }

  .workspace-heading,
  .board-tools {
    display: grid;
    align-items: start;
  }

  .metric-strip,
  .dense-board,
  .request-form,
  .finance-grid,
  #eventStream {
    grid-template-columns: 1fr;
  }

  .metric,
  .finance-cell {
    min-height: 108px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

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

  .tab,
  .filter,
  .primary-action {
    width: 100%;
  }
}

