:root {
  --black: #000000;
  --ink: #151115;
  --paper: #f7f7f3;
  --white: #ffffff;
  --warm: #efebe8;
  --line: #d9d4ce;
  --muted: #6b6669;
  --lime: #ecfe50;
  --red: #f23d3d;
  --blue: #0089d1;
  --green: #61bb45;
  --violet: #8c5cd6;
  --night: #00367a;
  --shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
}

button,
a {
  font: inherit;
}

button {
  border: 0;
}

a {
  color: inherit;
}

#app {
  min-height: 100vh;
}

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

.sidebar {
  position: sticky;
  top: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 18px;
  height: 100vh;
  padding: 18px;
  background: var(--black);
  color: var(--paper);
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  background: var(--lime);
  color: var(--black);
  font-weight: 900;
}

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

.brand small {
  margin-top: 2px;
  color: rgba(247, 247, 243, 0.62);
}

.side-nav {
  display: grid;
  align-content: start;
  gap: 6px;
}

.side-nav button,
.button,
.icon-button {
  min-height: 36px;
  border: 1px solid transparent;
  cursor: pointer;
}

.side-nav button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  background: transparent;
  color: rgba(247, 247, 243, 0.6);
  text-align: left;
}

.side-nav button.available {
  color: var(--paper);
}

.side-nav button span {
  color: var(--lime);
  font-size: 11px;
  font-weight: 900;
}

.sidebar-card {
  display: grid;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid rgba(247, 247, 243, 0.16);
}

.sidebar-card strong {
  font-size: 16px;
}

.sidebar-card small {
  color: rgba(247, 247, 243, 0.62);
}

.workspace {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 74px;
  padding: 14px clamp(16px, 3vw, 34px);
  background: rgba(247, 247, 243, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

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

h1 {
  font-size: 22px;
  line-height: 1.1;
}

h2 {
  font-size: 18px;
  line-height: 1.2;
}

.top-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.meta-label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.sidebar .meta-label,
.panel .meta-label {
  letter-spacing: 0;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  padding: 0 clamp(16px, 3vw, 34px);
  background: var(--line);
}

.metric {
  display: grid;
  gap: 5px;
  min-height: 74px;
  padding: 14px;
  background: var(--white);
}

.metric span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.metric strong {
  font-size: 15px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
  padding: 18px clamp(16px, 3vw, 34px) 34px;
}

.panel {
  grid-column: span 6;
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 0;
  padding: 14px;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.panel.wide {
  grid-column: span 12;
}

.panel-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.status.lime {
  background: var(--lime);
  border-color: var(--lime);
}

.status.green {
  background: rgba(97, 187, 69, 0.16);
  border-color: var(--green);
}

.status.red {
  background: rgba(242, 61, 61, 0.13);
  border-color: var(--red);
}

.status.blue {
  background: rgba(0, 137, 209, 0.12);
  border-color: var(--blue);
}

.stepper {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border: 1px solid var(--line);
}

.stepper div {
  display: grid;
  gap: 5px;
  min-height: 70px;
  padding: 9px;
  background: var(--paper);
  border-right: 1px solid var(--line);
  color: var(--muted);
  text-align: left;
}

.stepper div:last-child {
  border-right: 0;
}

.stepper div span {
  font-size: 11px;
  font-weight: 900;
}

.stepper div.done {
  background: rgba(97, 187, 69, 0.1);
  color: var(--ink);
}

.stepper div.active {
  background: var(--black);
  color: var(--paper);
}

.next-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  text-decoration: none;
}

.button.primary {
  background: var(--lime);
  border-color: var(--black);
  color: var(--black);
  font-weight: 900;
}

.button.secondary,
.icon-button {
  background: var(--black);
  color: var(--paper);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  padding: 9px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--black);
  color: var(--paper);
  font-size: 11px;
  text-transform: uppercase;
}

tfoot td {
  font-weight: 900;
}

.key-values {
  display: grid;
  gap: 8px;
}

.key-values div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

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

.proof {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 12px;
}

.proof img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--line);
}

.proof div {
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  gap: 6px;
}

.director-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.5);
}

.director {
  width: min(620px, 100%);
  display: grid;
  gap: 18px;
  padding: 18px;
  background: var(--white);
  border: 1px solid var(--black);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.director-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

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

  .sidebar {
    position: static;
    height: auto;
    grid-template-rows: auto;
  }

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

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

  .panel,
  .panel.wide {
    grid-column: span 12;
  }

  .stepper {
    grid-template-columns: 1fr;
  }

  .stepper div {
    min-height: 44px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 620px) {
  .topbar,
  .next-action,
  .panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .summary-strip,
  .director-grid,
  .side-nav {
    grid-template-columns: 1fr;
  }

  .key-values div,
  .proof {
    grid-template-columns: 1fr;
  }
}
