:root {
  --ink: #1b1b3a;
  --paper: #fbfefb;
  --coral: #ff6b6b;
  --teal: #4ecdc4;
  --line: rgba(27, 27, 58, 0.14);
  --muted: rgba(27, 27, 58, 0.64);
  --soft: #eef7f5;
  --amber: #f5b84b;
  --shadow: 0 18px 50px rgba(27, 27, 58, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  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: 100svh;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 360px;
  background:
    linear-gradient(90deg, rgba(78, 205, 196, 0.08), transparent 34%),
    linear-gradient(180deg, #fbfefb 0%, #f2f5ef 100%);
}

.sidebar,
.inspector {
  border-color: var(--line);
  background: rgba(251, 254, 251, 0.88);
  backdrop-filter: blur(18px);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100svh;
  padding: 24px 18px;
  border-right: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  margin-bottom: 32px;
}

.brand strong,
h1,
h2,
h3 {
  font-family: "Arial Narrow", "Inter Tight", Inter, ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0;
}

.brand strong {
  display: block;
  font-size: 21px;
  line-height: 1;
  text-transform: uppercase;
}

.brand small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

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

.nav-tab {
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: transparent;
  text-align: left;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

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

.nav-tab:hover {
  transform: translateX(2px);
}

.filters {
  margin-top: 34px;
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  min-width: 0;
}

label span,
.metric-block span,
.finance-lanes span,
.inspector-stats span {
  color: var(--muted);
  font-size: 12px;
}

input,
select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
  color: var(--ink);
}

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

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

.eyebrow {
  margin: 0 0 7px;
  color: var(--coral);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.02;
}

h1 {
  max-width: 760px;
  font-size: clamp(34px, 5vw, 76px);
}

h2 {
  font-size: 28px;
}

h3 {
  margin-top: 24px;
  font-size: 18px;
}

.clock-panel {
  min-width: 118px;
  padding: 10px 12px;
  border-left: 4px solid var(--teal);
  background: #fff;
  box-shadow: var(--shadow);
}

.clock-panel span,
.clock-panel strong {
  display: block;
}

.clock-panel span {
  color: var(--muted);
  font-size: 12px;
}

.clock-panel strong {
  font-size: 26px;
}

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

.metric-block {
  min-height: 96px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 18px;
  background: rgba(251, 254, 251, 0.95);
}

.metric-block strong {
  font-size: 30px;
  line-height: 1;
}

.accent-red strong {
  color: var(--coral);
}

.accent-teal strong {
  color: #168c85;
}

.screen {
  display: none;
}

.screen.is-active {
  display: block;
  animation: rise 220ms ease-out;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}

.object-tile {
  min-height: 198px;
  display: grid;
  gap: 10px;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  text-align: left;
  box-shadow: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.object-tile:hover,
.object-tile.is-selected {
  border-color: rgba(78, 205, 196, 0.9);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

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

.tile-head strong {
  font-size: 24px;
}

.state,
.stop-row em,
.document-row em {
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--paper);
  background: var(--ink);
  font-size: 11px;
  font-style: normal;
  white-space: nowrap;
}

.state-risk,
.doc-missing {
  background: var(--coral);
}

.state-watch,
.doc-review {
  color: var(--ink);
  background: var(--amber);
}

.state-clear,
.doc-approved {
  color: var(--ink);
  background: var(--teal);
}

.guest {
  font-size: 21px;
  font-weight: 800;
  line-height: 1.1;
}

.timeline,
.tile-foot,
.channel,
.form-note,
.inspector-empty p,
.stop-row span,
.document-row span {
  color: var(--muted);
  font-size: 13px;
}

.progress {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(27, 27, 58, 0.1);
}

.progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--coral), var(--teal));
}

.inspector {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: auto;
  border-left: 1px solid var(--line);
  padding: 26px 22px;
}

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

.inspector-stats,
.finance-lanes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 18px 0;
  border: 1px solid var(--line);
  background: var(--line);
}

.inspector-stats div,
.finance-lanes div {
  min-width: 0;
  padding: 14px;
  background: #fff;
}

.inspector-stats strong,
.finance-lanes strong {
  display: block;
  margin-top: 6px;
  font-size: 18px;
  overflow-wrap: anywhere;
}

.stage-rail {
  display: grid;
  gap: 8px;
  margin: 18px 0;
}

.stage-rail span {
  min-height: 34px;
  display: flex;
  align-items: center;
  border-left: 5px solid rgba(27, 27, 58, 0.16);
  padding-left: 10px;
  color: var(--muted);
}

.stage-rail span.is-done {
  border-color: var(--teal);
  color: var(--ink);
  font-weight: 800;
}

.stop-list,
.document-list {
  display: grid;
  gap: 10px;
}

.stop-row,
.document-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.document-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.stop-row strong,
.document-row strong {
  display: block;
  overflow-wrap: anywhere;
}

.priority {
  width: 11px;
  height: 36px;
  border-radius: 999px;
  background: var(--teal);
}

.priority-critical,
.priority-high {
  background: var(--coral);
}

.priority-normal {
  background: var(--amber);
}

.request-form,
.split-list,
.finance-board {
  max-width: 860px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
}

.request-form > div:first-child,
.request-form .wide,
.request-form button,
.request-form .form-note,
.split-list > div:first-child,
.split-list .document-list,
.finance-board > div:first-child,
.finance-board .finance-lanes {
  grid-column: 1 / -1;
}

.request-form button {
  width: fit-content;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  color: var(--paper);
  background: var(--ink);
}

.empty-state {
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.7);
}

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

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

  .inspector {
    grid-column: 1 / -1;
    position: static;
    height: auto;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 760px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

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

  .nav-tab {
    text-align: center;
  }

  .workspace {
    padding: 18px;
  }

  .topline {
    display: grid;
  }

  h1 {
    font-size: 38px;
  }

  .metrics,
  .request-form,
  .split-list,
  .finance-board,
  .inspector-stats,
  .finance-lanes {
    grid-template-columns: 1fr;
  }
}
