@font-face {
  font-family: 'Nebulas';
  src: url('/fonts/Nebulas-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Suit';
  src: url('/fonts/SUIT-Variable.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ink: #edf1f3;
  --muted: rgba(237, 241, 243, 0.65);
  --accent: #e6e6e6;
  --accent-dark: #2b2b2b;
  --accent-glow: transparent;
  --paper: #0b0f12;
  --card: #12161b;
  --border: rgba(237, 241, 243, 0.12);
  --shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --surface: #12171d;
  --surface-soft: rgba(18, 23, 29, 0.75);
  --surface-strong: #0f1318;
  font-family: 'Suit', system-ui, sans-serif;
  color: var(--ink);
  background: #0b0f12;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #0b0f12;
  padding: 2rem 3rem;
  position: relative;
}

.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: none;
  opacity: 0;
  z-index: 0;
}

.topbar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.5rem 2rem;
  border-radius: 0;
  background: rgba(18, 22, 27, 0.9);
  border: 1px solid var(--border);
  box-shadow: none;
  backdrop-filter: blur(8px);
  animation: float-in 0.7s ease;
}

.brand {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.brand__badge {
  font-family: 'Nebulas', serif;
  text-transform: uppercase;
  letter-spacing: 0.4em;
  font-size: 0.85rem;
  padding: 0.55rem 1.1rem;
  border-radius: 0;
  background: #08181b;
  color: #f5f5f0;
}

.topbar h1 {
  margin: 0 0 0.35rem;
  font-family: 'Nebulas', serif;
  font-size: 1.6rem;
  letter-spacing: 0.03em;
}

.topbar p {
  margin: 0;
  color: var(--muted);
  max-width: 480px;
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.flow-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.flow-header__center {
  flex: 1;
  display: flex;
  justify-content: center;
}

.flow-header__right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.wizard {
  position: fixed;
  inset: 0;
  background: rgba(6, 7, 10, 0.85);
  display: grid;
  place-items: center;
  z-index: 30;
}

.wizard.hidden {
  display: none;
}

.wizard__panel {
  width: min(640px, 92vw);
  background: #10151b;
  border: 1px solid var(--border);
  padding: 1.5rem;
}

.wizard__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.wizard__eyebrow {
  margin: 0 0 0.3rem;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.wizard__progress {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.wizard__dot {
  flex: 1;
  height: 2px;
  background: rgba(230, 230, 230, 0.15);
}

.wizard__dot.is-active {
  background: #e6e6e6;
}

.wizard__body {
  display: grid;
  gap: 1rem;
}

.wizard__field {
  display: grid;
  gap: 0.4rem;
}

.wizard__field label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.wizard__field input,
.wizard__field select,
.wizard__field textarea {
  background: transparent;
  border: 1px solid var(--border);
  padding: 0.5rem 0.6rem;
  color: var(--ink);
  font-size: 0.9rem;
}

.wizard__field textarea {
  min-height: 90px;
  resize: vertical;
}

.wizard__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.wizard__footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
}

.edit-mode {
  padding: 2rem 3rem 3rem;
}

.edit-mode.hidden {
  display: none;
}

.edit-mode--flow {
  padding: 0;
  background: transparent;
}

body.is-edit-mode .app,
body.is-edit-mode .tabs,
body.is-edit-mode .flow-header {
  display: none;
}

.edit-mode__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
}

.edit-mode__eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.edit-mode__header h2 {
  margin: 0.5rem 0;
  font-size: 2rem;
}

.edit-mode__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 1.2rem;
}

.edit-card {
  background: #14181c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.1rem 1.2rem;
  display: grid;
  gap: 0.35rem;
  min-height: 120px;
  border-radius: var(--radius-md);
}

.edit-card.is-warning {
  background: rgba(225, 177, 73, 0.2);
  border-color: rgba(225, 177, 73, 0.5);
}

.edit-card.is-critical {
  background: rgba(210, 65, 65, 0.22);
  border-color: rgba(210, 65, 65, 0.6);
}

.edit-card--highlight {
  background: #1f5f44;
  color: #f2fff7;
}

.edit-card--highlight p,
.edit-card--highlight .edit-card__meta {
  color: rgba(242, 255, 247, 0.75);
}

.edit-card--wide {
  grid-column: span 2;
}

.edit-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.edit-card h3 {
  margin: 0;
  font-size: 1.8rem;
}

.edit-card__meta {
  font-size: 0.75rem;
  color: var(--muted);
}

.edit-card__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.edit-card__list {
  display: grid;
  gap: 0.6rem;
  margin-top: 0.6rem;
}

.edit-list-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.flow-subtabs .subtab.is-hidden {
  display: none;
}

#flowEditPanel.is-hidden {
  display: none;
}

.edit-tracking__group {
  margin-top: 1.5rem;
}

.edit-tracking__tabs {
  margin-bottom: 1.5rem;
}

.tracking-form {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.tracking-form input,
.tracking-form select {
  border: 1px solid var(--border);
  background: #0b0f12;
  color: var(--ink);
  padding: 0.55rem 0.75rem;
  border-radius: 999px;
}

.tracking-form .ghost-btn {
  align-self: stretch;
}

.line-item-form {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr auto;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.line-item-form input,
.line-item-form select {
  border: 1px solid var(--border);
  background: #0b0f12;
  color: var(--ink);
  padding: 0.55rem 0.75rem;
  border-radius: 999px;
  font-size: 0.7rem;
}

.line-item-form .ghost-btn {
  align-self: stretch;
}

.line-item-summary {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.8rem;
  color: var(--muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.tracking-table td:last-child {
  text-align: right;
}

.tracking-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.35rem 0.6rem;
}

.tracking-section {
  margin-bottom: 0.9rem;
}

.tracking-section__title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.tracking-item {
  border: 1px solid rgba(237, 241, 243, 0.12);
  background: #0f1318;
  padding: 0.5rem 0.7rem;
  border-radius: 10px;
  display: grid;
  gap: 0.35rem;
  position: relative;
}

.tracking-item__text {
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  color: var(--ink);
}

.tracking-item__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.tracking-item__select {
  background: transparent;
  border: 1px solid rgba(237, 241, 243, 0.12);
  color: var(--ink);
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.tracking-item__detail {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.tracking-item__notes {
  font-size: 0.65rem;
  color: var(--muted);
  margin-top: 0.35rem;
}

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

.line-item-table {
  display: grid;
  gap: 0.45rem;
}

.line-item-row {
  display: grid;
  grid-template-columns: 2fr 1fr 0.9fr 1fr 2fr auto;
  gap: 0.5rem;
  align-items: center;
  padding: 0.5rem 0.6rem;
  border: 1px solid rgba(237, 241, 243, 0.12);
  background: #0f1318;
  border-radius: 10px;
}

.line-item-row--head {
  background: transparent;
  border: none;
  padding: 0;
  text-transform: uppercase;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.line-item-cell input,
.line-item-cell select {
  width: 100%;
  border: 1px solid rgba(237, 241, 243, 0.12);
  background: transparent;
  color: var(--ink);
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  font-size: 0.7rem;
}

.line-item-row.is-done {
  border-color: rgba(25, 195, 125, 0.6);
  background: rgba(18, 52, 36, 0.55);
}

.line-item-remove {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.9rem;
  cursor: pointer;
}

.line-item-remove:hover {
  color: var(--ink);
}

@media (max-width: 1100px) {
  .line-item-form {
    grid-template-columns: 1fr 1fr;
  }
  .tracking-grid--line {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .line-item-row {
    grid-template-columns: 1fr 1fr;
  }
  .line-item-row--head {
    display: none;
  }
}

.tracking-item__remove {
  position: absolute;
  top: 6px;
  right: 6px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.9rem;
  cursor: pointer;
}

.tracking-item__remove:hover {
  color: var(--ink);
}

.tracking-item.is-done {
  border-color: rgba(25, 195, 125, 0.6);
  background: rgba(18, 52, 36, 0.55);
}

.tracking-item.is-done .tracking-item__text {
  color: #c9f6dc;
}

.tracking-item .ghost-btn.danger {
  padding: 0.25rem 0.55rem;
  font-size: 0.55rem;
}

@media (max-width: 900px) {
  .tracking-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.edit-card__item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.7rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.8rem;
}

.edit-card__item span {
  color: var(--muted);
  font-size: 0.7rem;
}

.edit-card__timeline {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.4rem;
  height: 80px;
  align-items: end;
}

.edit-card__timeline span {
  background: rgba(255, 255, 255, 0.12);
  height: 100%;
}

.edit-card__timeline span:nth-child(3) {
  background: #28d17c;
  height: 70%;
}

@media (max-width: 960px) {
  .edit-mode__grid {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .edit-card--wide {
    grid-column: span 2;
  }
}

@media (max-width: 640px) {
  .edit-mode {
    padding: 1.5rem;
  }

  .edit-mode__grid {
    grid-template-columns: 1fr;
  }

  .edit-card--wide {
    grid-column: span 1;
  }
}
.status-pill {
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(230, 230, 230, 0.12);
  color: #f3f3f3;
}

.tabs {
  display: flex;
  gap: 0.4rem;
  margin: 0;
  flex-wrap: wrap;
  justify-content: flex-start;
  position: relative;
  background: #0b0f12;
  border: none;
  border-radius: 999px;
  padding: 0.30rem;
}

.tab {
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  padding: 0.9rem 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.62rem;
  cursor: pointer;
  border-radius: 999px;
  position: relative;
  z-index: 1;
}

.tab.is-active {
  color: #0b0f12;
  border-color: transparent;
  background: transparent;
}

.tab-indicator {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  border-radius: 999px;
  background: #e6e6e6;
  border: none;
  transition: transform 0.25s ease, width 0.25s ease;
  z-index: 0;
}

.app {
  position: relative;
  z-index: 1;
}

.section {
  display: none;
  padding: 0;
  border-radius: var(--radius-lg);
  background: transparent;
  border: none;
  box-shadow: none;
  animation: rise 0.6s ease;
}

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

.constants-stack {
  display: grid;
  gap: 2rem;
}

.subtabs {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
  position: relative;
  background: #0b0f12;
  border-radius: 999px;
  padding: 0.35rem;
}

.subtab {
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  padding: 0.9rem 1rem;
  border-radius: 999px;
  font-size: 0.62rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  position: relative;
  z-index: 1;
}

.subtab.is-active {
  color: #0b0f12;
  border-color: transparent;
  background: transparent;
}

.subtab-indicator {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  border-radius: 999px;
  background: #e6e6e6;
  border: none;
  transition: transform 0.25s ease, width 0.25s ease;
  z-index: 0;
}

.subtab-panel {
  display: none;
  border-radius: var(--radius-lg);
  background: var(--surface-soft);
  border: 1px solid rgba(237, 241, 243, 0.1);
  padding: 1.5rem;
}

.subtab-panel.is-active {
  display: block;
}

.subtab-panel .section__header {
  margin-bottom: 1.25rem;
}

.invoice-panel {
  border: 1px solid rgba(237, 241, 243, 0.16);
  padding: 1.5rem;
  background: var(--surface-soft);
  border-radius: var(--radius-lg);
}

.section__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section__header h2 {
  margin: 0 0 0.4rem;
  font-family: 'Nebulas', serif;
  letter-spacing: 0.03em;
  font-size: 2rem;
}

.section__header--hero h2 {
  font-size: 8rem;
  line-height: 0.9;
}

.section__header p {
  margin: 0;
  color: var(--muted);
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.overview-card {
  border: 1px solid rgba(237, 241, 243, 0.16);
  padding: 1.1rem;
  background: var(--surface-strong);
  border-radius: var(--radius-md);
}

.overview-card h4 {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.overview-card .value {
  font-size: 1.45rem;
  font-family: 'Nebulas', serif;
}

.overview-panel {
  border: 1px solid rgba(237, 241, 243, 0.16);
  padding: 1.1rem;
  background: var(--surface-strong);
  border-radius: var(--radius-md);
}

.overview-panel--todos {
  margin-bottom: 1.5rem;
}

.overview-panel h3 {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}



.section__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.flow-copyright {
  font-size: 0.9rem;
  color: var(--muted);
  margin-left: 0.4rem;
  vertical-align: top;
}

.section[data-section="flow"] .section__header {
  position: relative;
}

.section[data-section="flow"] .flow-copyright {
  position: static;
}

.search {
  border-radius: 999px;
  border: 1px solid var(--border);
  padding: 0.55rem 1rem;
  font-size: 0.9rem;
  min-width: 180px;
  background: #0f1318;
  color: var(--ink);
}

.primary-btn {
  border: none;
  background: var(--accent);
  color: #0b1012;
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: none;
  transition: transform 0.2s ease;
}

.primary-btn:hover {
  transform: translateY(-1px);
}

.ghost-btn {
  border: 1px solid var(--border);
  background: transparent;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  color: var(--ink);
}

.ghost-btn.danger {
  border-color: rgba(255, 88, 88, 0.4);
  color: #ff9c9c;
}

.ghost-btn.tiny {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field-inline-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.table-shell {
  overflow-x: auto;
}

.flow {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 0.15rem;
  margin: 1.5rem 0 2rem;
  position: relative;
}

.flow__slider {
  display: grid;
  gap: 0.6rem;
  justify-items: center;
  align-content: center;
  position: absolute;
  right: -35px;
  top: 50%;
  transform: translateY(-50%);
}

.flow__node-fill {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: #e6e6e6;
  transition: transform 0.34s ease;
  z-index: 0;
}

.flow__node {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(237, 241, 243, 0.4);
  background: transparent;
  cursor: pointer;
  padding: 0;
  position: relative;
  z-index: 1;
}

.flow__node--current {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border-color: #e6e6e6;
  background: #e6e6e6;
  cursor: default;
}

.flow__node:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.flow__slider.is-animating .flow__node--current {
  background: transparent;
}

.flow__stage {
  position: relative;
  min-height: 220px;
  display: grid;
  place-items: center;
}

.flow__card-wrap {
  position: relative;
  width: min(520px, 80vw);
  height: 160px;
}

.flow__track {
  display: flex;
  gap: 0;
  align-items: center;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  transition: transform 0.4s ease;
  z-index: 1;
  display: none;
}

.flow__step {
  width: 220px;
  height: 120px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.7rem;
  color: var(--muted);
}

.flow__step.is-main {
  border-color: rgba(230, 230, 230, 0.4);
  background: rgba(230, 230, 230, 0.12);
  color: #f1f1f1;
}

.flow__phase {
  margin-top: 0.5rem;
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #d6d6d6;
}

.flow__step.is-active {
  border-color: #f1f1f1;
  color: #f1f1f1;
}

.flow__step.is-locked::after {
  content: "LOCK";
  margin-top: 0.5rem;
  font-size: 0.65rem;
  color: #8a8a8a;
}

.flow__project {
  width: 100%;
  height: 100%;
  background: #e6e6e6;
  border: none;
  color: #111;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  z-index: 2;
  text-align: left;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
}

.flow__title {
  font-size: 1.2rem;
  font-weight: 600;
}

.flow__subtitle {
  font-size: 0.85rem;
  color: #3b3b3b;
}

.flow__step-label {
  margin-top: auto;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #2b2b2b;
}


.flow__requirements {
  background: transparent;
  border: none;
  padding: 0;
  margin-top: -1.25rem;
}

.flow__req-title {
  font-size: 1.4rem;
  font-family: 'Nebulas', serif;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.flow__req-subtitle {
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 0.5rem;
}

.flow__req-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 1.5rem;
}

.flow__req-grid {
  display: grid;
  gap: 0.4rem;
  max-width: 520px;
  margin: 0 auto;
}

.flow__req-card {
  border: 1px solid rgba(237, 241, 243, 0.16);
  padding: 0.85rem 1rem;
  background: #10151a;
  border-radius: var(--radius-md);
  transform: translateY(calc(var(--stack-index) * 6px));
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.flow__req-card.is-done {
  opacity: 0.7;
  transform: translateY(calc(var(--stack-index) * -6px));
}

.flow__req-card.is-pending {
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.flow__req-card.is-collapsed .flow__req-body {
  display: none;
}

.flow__req-card.is-collapsed {
  padding-bottom: 0.55rem;
  opacity: 0.6;
}

.flow__req-card.is-active {
  opacity: 1;
}

.flow__req-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.8rem;
}

.flow__req-card-title {
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  max-width: 70%;
}

.flow__req-pill {
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid rgba(237, 241, 243, 0.2);
  color: var(--muted);
}

.flow__req-pill.done {
  color: #0b0f12;
  background: #e6e6e6;
  border-color: transparent;
}

.flow__req-pill.pending {
  color: var(--muted);
}

.flow__req-pill.auto {
  color: #0b0f12;
  background: rgba(230, 230, 230, 0.6);
  border-color: transparent;
}

.flow__req-toggle {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.flow__req-toggle input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

.flow__req-input label,
.flow__req-upload .flow__req-label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.flow__req-upload {
  display: grid;
  gap: 0.5rem;
}

.flow__req-input {
  display: grid;
  gap: 0.4rem;
}

.flow__req-inline {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.flow__req-inline input,
.flow__req-inline select {
  flex: 1;
  background: #0b0f12;
  border: 1px solid var(--border);
  color: var(--ink);
  padding: 0.55rem 0.75rem;
  border-radius: 999px;
}

.flow__req-inline button {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--ink);
  padding: 0.55rem 1rem;
  cursor: pointer;
  border-radius: 999px;
}

.flow__req-auto {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.flow__req-status {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.modal__body {
  display: grid;
  gap: 1rem;
}

.project-group {
  border: 1px solid rgba(237, 241, 243, 0.08);
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.03);
}

.project-group h4 {
  margin: 0 0 0.6rem;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.6rem 1rem;
}

.project-field {
  display: grid;
  gap: 0.35rem;
  padding: 0;
  border-bottom: none;
}

.project-field span {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.project-field strong {
  font-size: 0.85rem;
  color: #e6e6e6;
  line-height: 1.4;
  font-weight: 500;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

thead th {
  text-align: left;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.75rem 0.75rem;
  border-bottom: 1px solid rgba(237, 241, 243, 0.12);
}

tbody td {
  padding: 0.85rem 0.75rem;
  border-bottom: 1px solid rgba(237, 241, 243, 0.08);
  font-size: 0.92rem;
}

tbody tr:hover {
  background: rgba(230, 230, 230, 0.08);
}

.pill {
  display: inline-flex;
  padding: 0.2rem 0.6rem;
  border-radius: 0;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(230, 230, 230, 0.12);
  color: #f3f3f3;
}

.link {
  color: #f2f2f2;
  text-decoration: none;
  border-bottom: 1px solid rgba(230, 230, 230, 0.4);
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  z-index: 5;
}

.modal.hidden {
  display: none;
}

.modal__panel {
  background: #11161b;
  border-radius: 0;
  padding: 1.5rem;
  width: min(720px, 100%);
  box-shadow: none;
  border: 1px solid var(--border);
  max-height: calc(100vh - 4rem);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.modal__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.modal__eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.35rem;
}

.modal__form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.modal__form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.modal__form input,
.modal__form select,
.modal__form textarea {
  border-radius: 0;
  border: 1px solid var(--border);
  padding: 0.55rem 0.75rem;
  font-size: 0.95rem;
  background: #0f1318;
  color: var(--ink);
}

.modal__form textarea {
  min-height: 80px;
  resize: vertical;
}

.modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.meta-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.empty {
  padding: 2rem;
  text-align: center;
  color: var(--muted);
  background: rgba(230, 230, 230, 0.08);
  border-radius: 0;
}

@keyframes float-in {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.vault-upload {
  display: grid;
  gap: 1.5rem;
}

.vault-upload__drop {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  background: var(--surface-soft);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.vault-upload__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.vault-upload__drop p {
  margin: 0;
}

.vault-upload__drop .muted {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 0.35rem;
}

.vault-upload__drop.is-dragover {
  border-color: rgba(237, 241, 243, 0.6);
  background: var(--surface);
}

.vault-upload__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
}

.vault-upload__list {
  display: grid;
  gap: 0.75rem;
}

.vault-upload__item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.2rem;
  border-radius: var(--radius-md);
  background: var(--surface-strong);
  border: 1px solid var(--border);
  font-size: 0.9rem;
}

.vault-upload__name {
  flex: 1;
  min-width: 180px;
}

.vault-upload__field {
  display: grid;
  gap: 0.35rem;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.vault-upload__field select {
  background: #0b0f12;
  border: 1px solid var(--border);
  color: var(--ink);
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
}

.vault-upload__status {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.65rem;
}

.vault-upload__status.is-success {
  color: #9fffd7;
}

.vault-upload__status.is-error {
  color: #ff8a8a;
}

.table-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.icon-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.icon-btn:hover {
  border-color: rgba(237, 241, 243, 0.4);
  background: rgba(237, 241, 243, 0.08);
}

.icon-btn.danger {
  color: #ffb4b4;
}

@media (max-width: 720px) {
  body {
    padding: 1.2rem;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .section__header {
    flex-direction: column;
  }

  .section__actions {
    width: 100%;
    flex-wrap: wrap;
  }
}
