@charset "UTF-8";

:root {
  --ink: #1a1a2e;
  --paper: #f2e9e4;
  --paper-2: #fbf7f3;
  --mauve: #9a8c98;
  --clay: #c9ada7;
  --line: rgba(26, 26, 46, 0.18);
  --line-strong: rgba(26, 26, 46, 0.34);
  --green: #5e7b63;
  --amber: #b77946;
  --red: #a84f4f;
  --shadow: 0 24px 80px rgba(26, 26, 46, 0.12);
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(26, 26, 46, 0.05) 1px, transparent 1px),
    linear-gradient(0deg, rgba(26, 26, 46, 0.04) 1px, transparent 1px),
    var(--paper);
  background-size: 28px 28px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

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

.left-rail,
.inspector {
  background: rgba(251, 247, 243, 0.92);
  backdrop-filter: blur(8px);
}

.left-rail {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  border-right: 2px solid var(--ink);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 88px;
  padding: 22px 20px;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid var(--ink);
}

.brand img {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
}

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

.brand strong {
  font-size: 18px;
  line-height: 1.05;
}

.brand small {
  margin-top: 4px;
  color: var(--mauve);
  font-size: 12px;
  text-transform: uppercase;
}

.rail-nav {
  display: grid;
  gap: 0;
}

.nav-item {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 0 18px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  text-align: left;
}

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

.nav-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid currentColor;
  font-weight: 800;
}

.rail-note {
  margin-top: auto;
  padding: 20px;
  border-top: 2px solid var(--ink);
}

.rail-note span,
.eyebrow,
.metric span,
.queue-header,
.inspection-kicker span {
  color: var(--mauve);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.rail-note strong {
  display: block;
  margin-top: 8px;
  line-height: 1.35;
}

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

.topbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 24px;
  border-bottom: 2px solid var(--ink);
}

.eyebrow {
  margin: 0 0 8px;
}

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

h1 {
  margin-bottom: 0;
  font-size: clamp(30px, 4vw, 56px);
  line-height: 0.94;
}

h2 {
  margin-bottom: 0;
  font-size: 24px;
  line-height: 1.1;
}

h3 {
  margin-bottom: 8px;
  font-size: 13px;
  text-transform: uppercase;
}

.search-bar {
  display: grid;
  grid-template-columns: minmax(220px, 360px) 150px;
  gap: 10px;
}

.search-bar input,
.search-bar select,
.setting-row input,
.action-form select,
.action-form textarea {
  width: 100%;
  min-height: 42px;
  border: 2px solid var(--ink);
  border-radius: 0;
  color: var(--ink);
  background: var(--paper-2);
  padding: 10px 12px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 24px 0;
  border: 2px solid var(--ink);
  background: var(--paper-2);
  box-shadow: var(--shadow);
}

.metric {
  min-width: 0;
  padding: 18px;
  border-right: 1px solid var(--line-strong);
}

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

.metric strong {
  display: block;
  margin-top: 6px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 4vw, 58px);
  line-height: 0.9;
  letter-spacing: 0;
}

.metric.risk strong {
  color: var(--red);
}

.canvas {
  min-height: 520px;
  border: 2px solid var(--ink);
  background:
    linear-gradient(180deg, rgba(201, 173, 167, 0.16), transparent 160px),
    var(--paper-2);
  box-shadow: var(--shadow);
}

.canvas-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border-bottom: 2px solid var(--ink);
}

.text-action,
.action-form button {
  min-height: 42px;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  font-weight: 800;
}

.text-action {
  padding: 0 16px;
}

.queue-table {
  display: grid;
}

.queue-header,
.queue-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.6fr) minmax(120px, 0.8fr) 108px 112px 104px;
  gap: 14px;
  align-items: center;
}

.queue-header {
  padding: 12px 18px;
  border-bottom: 1px solid var(--line-strong);
}

.queue-row {
  width: 100%;
  min-height: 86px;
  padding: 14px 18px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: background 160ms ease, transform 160ms ease;
}

.queue-row:hover,
.queue-row.is-selected {
  background: rgba(201, 173, 167, 0.22);
}

.queue-row:hover {
  transform: translateX(3px);
}

.row-main strong,
.row-main small {
  display: block;
}

.row-main strong {
  font-size: 16px;
  line-height: 1.2;
}

.row-main small {
  margin-top: 6px;
  color: rgba(26, 26, 46, 0.68);
}

.stage-line {
  display: grid;
  grid-template-columns: repeat(4, 18px);
  gap: 6px;
}

.step {
  display: block;
  width: 18px;
  height: 18px;
  border: 2px solid var(--mauve);
  background: transparent;
}

.step.is-done {
  background: var(--ink);
  border-color: var(--ink);
}

.risk-meter {
  position: relative;
  display: block;
  height: 12px;
  border: 1px solid var(--ink);
  background: var(--paper);
}

.risk-meter::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--risk);
  background: linear-gradient(90deg, var(--green), var(--amber), var(--red));
  content: "";
}

.risk-meter em {
  position: absolute;
  right: 0;
  top: 17px;
  font-style: normal;
  font-size: 12px;
}

.due {
  font-variant-numeric: tabular-nums;
}

.chip {
  display: inline-grid;
  min-height: 30px;
  place-items: center;
  padding: 4px 8px;
  border: 1px solid var(--ink);
  background: var(--paper);
  font-size: 12px;
  font-weight: 800;
}

.chip.critical {
  background: #f0c9c9;
}

.chip.high {
  background: #ead0b9;
}

.chip.medium {
  background: #ddd1da;
}

.inspector {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  border-left: 2px solid var(--ink);
}

.inspector-head {
  padding: 22px;
  border-bottom: 2px solid var(--ink);
}

.inspector-head h2 {
  overflow-wrap: anywhere;
}

.inspector-body {
  padding: 22px;
}

.muted {
  color: rgba(26, 26, 46, 0.66);
  line-height: 1.5;
}

.inspection-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line-strong);
}

.inspection-kicker strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 30px;
}

.inspection-block {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.inspection-block p {
  margin-bottom: 0;
  line-height: 1.48;
}

.action-form {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.action-form label {
  font-size: 13px;
  font-weight: 800;
}

.action-form textarea {
  resize: vertical;
}

.action-form button {
  width: 100%;
}

.timeline,
.settings-list,
.team-list,
.workflow-board {
  display: grid;
}

.timeline-row,
.setting-row,
.team-row {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.timeline-row {
  grid-template-columns: 168px 1fr;
}

.timeline-row time {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
}

.timeline-row p,
.team-row p {
  margin: 6px 0;
  line-height: 1.42;
}

.timeline-row span,
.team-row span,
.team-row small,
.setting-row small {
  color: rgba(26, 26, 46, 0.64);
}

.workflow-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 2px solid var(--ink);
}

.workflow-strip span {
  min-height: 72px;
  padding: 18px;
  border-right: 1px solid var(--line-strong);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
}

.workflow-strip span:last-child {
  border-right: 0;
}

.setting-row {
  grid-template-columns: 1fr 120px;
  align-items: center;
}

.setting-row strong,
.setting-row small {
  display: block;
}

.setting-row small {
  margin-top: 5px;
}

.team-row {
  grid-template-columns: minmax(170px, 0.9fr) minmax(200px, 1.2fr) minmax(130px, 0.7fr) minmax(130px, 0.7fr);
  align-items: center;
}

.team-row strong,
.team-row span {
  display: block;
}

meter {
  width: 100%;
  height: 16px;
}

.empty-state {
  display: grid;
  min-height: 260px;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 28px;
  text-align: center;
}

.empty-state strong {
  font-size: 24px;
}

.empty-state.error strong,
.error-line {
  color: var(--red);
}

.error-line {
  border: 1px solid var(--red);
  padding: 10px;
}

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

  .left-rail {
    z-index: 2;
  }

  .brand span,
  .nav-item span:last-child,
  .rail-note {
    display: none;
  }

  .brand,
  .nav-item {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
  }

  .nav-item {
    grid-template-columns: 34px;
  }

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

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

  .left-rail {
    position: static;
    height: auto;
    border-right: 0;
  }

  .brand span,
  .nav-item span:last-child {
    display: block;
  }

  .brand {
    justify-content: flex-start;
  }

  .rail-nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-bottom: 2px solid var(--ink);
  }

  .nav-item {
    grid-template-columns: 1fr;
    justify-items: center;
    min-height: 72px;
    padding: 8px;
    border-right: 1px solid var(--line);
    font-size: 12px;
    text-align: center;
  }

  .workspace {
    padding: 18px;
  }

  .topbar {
    display: grid;
  }

  .search-bar {
    grid-template-columns: 1fr;
  }

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

  .metric:nth-child(2) {
    border-right: 0;
  }

  .metric:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line-strong);
  }

  .queue-header {
    display: none;
  }

  .queue-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .risk-meter {
    max-width: 220px;
  }

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

  .workflow-strip span {
    min-height: 54px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    font-size: 20px;
  }
}

