:root {
  color-scheme: light;
  --paper: #ffffff;
  --canvas: #f3f3f0;
  --graphite: #111312;
  --graphite-soft: #555b58;
  --muted: #747b77;
  --line: #d5d8d4;
  --line-strong: #aeb4b0;
  --cyan: #00d9ca;
  --cyan-dark: #007f78;
  --cyan-pale: #e5fbf8;
  --orange: #f05a28;
  --success: #16856f;
  --display: "Bahnschrift Condensed", "Arial Narrow", Impact, sans-serif;
  --ui: "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
  --sidebar-width: 224px;
  font-family: var(--ui);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--graphite);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--graphite);
  background: var(--paper);
  font-family: var(--ui);
  font-size: 14px;
  text-rendering: optimizeLegibility;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.75;
}

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

.sidebar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  color: #f7f8f7;
  background:
    radial-gradient(circle at 18% 72%, rgba(255,255,255,.025) 0 1px, transparent 1.5px) 0 0 / 7px 7px,
    var(--graphite);
  border-right: 5px solid var(--cyan);
}

.sidebar::after {
  position: absolute;
  top: 0;
  right: -1px;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, transparent 0 2%, var(--cyan) 8% 91%, transparent 98%);
  opacity: .55;
  content: "";
}

.brand {
  display: grid;
  place-items: center;
  min-height: 132px;
  padding: 14px 14px 12px;
  border-bottom: 1px solid #343937;
  color: white;
  text-decoration: none;
}

.brand img {
  width: auto;
  max-width: 100%;
  height: 105px;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .35));
}

.navigation {
  display: grid;
  flex: 1 1 auto;
  align-content: start;
  min-height: 0;
  padding: 10px 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #48504d transparent;
}

.nav-link {
  position: relative;
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  gap: 13px;
  min-height: 54px;
  padding: 10px 24px;
  color: #b8bfbc;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.25;
  text-decoration: none;
  transition: color 160ms ease, background 160ms ease;
}

.nav-link::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: transparent;
  content: "";
}

.nav-link svg {
  width: 22px;
  height: 22px;
  color: #919996;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: #fff;
  background: #1b1f1e;
  outline: none;
}

.nav-link.active {
  color: var(--cyan);
  background: #1b1f1e;
}

.nav-link.active::before {
  background: var(--cyan);
}

.nav-link.active svg {
  color: var(--cyan);
}

.sidebar-footer {
  flex: none;
  margin-top: auto;
  padding: 14px 20px 16px;
  border-top: 1px solid #343937;
}

.studio-state {
  display: flex;
  align-items: center;
  gap: 11px;
}

.studio-state strong,
.studio-state span {
  display: block;
}

.studio-state strong {
  font-size: 13px;
}

.studio-state div > span {
  margin-top: 2px;
  color: #89918e;
  font-size: 11px;
}

.status-dot {
  width: 9px;
  height: 9px;
  flex: none;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 4px rgba(0, 217, 202, .12);
}

.sidebar-footer p {
  margin: 12px 0 0;
  color: #6f7673;
  font-family: var(--display);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.sidebar-footer p span {
  color: var(--cyan);
}

.drawer-scrim {
  display: none;
}

.main-content {
  width: 100%;
  max-width: 1560px;
  min-width: 0;
  margin: 0 auto;
  padding: 0 42px 56px;
  background: var(--paper);
}

.topbar {
  display: flex;
  align-items: center;
  min-height: 88px;
  border-bottom: 1px solid var(--line-strong);
}

.today-label {
  margin: 0;
  color: var(--graphite-soft);
  font-size: 13px;
  letter-spacing: .02em;
  text-transform: capitalize;
}

.topbar-rule {
  width: 1px;
  height: 28px;
  margin: 0 25px;
  background: var(--line-strong);
}

.topbar h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(28px, 2.8vw, 38px);
  font-stretch: condensed;
  font-weight: 800;
  letter-spacing: -.015em;
  line-height: 1;
  text-transform: uppercase;
}

.icon-button,
.primary-button,
.outline-button,
.link-button {
  cursor: pointer;
}

.icon-button {
  display: grid;
  width: 42px;
  height: 42px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--graphite);
  border-radius: 4px;
  background: var(--paper);
}

.icon-button svg {
  width: 22px;
  height: 22px;
}

.menu-button {
  display: none;
  margin-right: 16px;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  margin-left: auto;
  padding: 0 19px;
  border: 1px solid var(--graphite);
  border-radius: 4px;
  color: var(--graphite);
  background: var(--cyan);
  box-shadow: 4px 4px 0 var(--graphite);
  font-family: var(--display);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.primary-button svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}

.button-label-short {
  display: none;
}

.primary-button:hover,
.primary-button:focus-visible {
  background: #22e7d9;
  box-shadow: 2px 2px 0 var(--graphite);
  outline: 2px solid var(--graphite);
  outline-offset: 3px;
  transform: translate(2px, 2px);
}

.view {
  padding-top: 28px;
  animation: view-in 180ms ease both;
}

.year-ledger {
  display: grid;
  grid-template-columns: minmax(280px, .85fr) minmax(0, 1.9fr);
  border-top: 1px solid var(--graphite);
  border-bottom: 1px solid var(--graphite);
}

.revenue-block {
  min-width: 0;
  padding: 24px 30px 26px 4px;
  border-right: 1px solid var(--line-strong);
}

.section-label {
  position: relative;
  display: inline-block;
  color: var(--graphite);
  font-family: var(--display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: .025em;
  line-height: 1;
  text-transform: uppercase;
}

.paint-underline::after {
  position: absolute;
  right: -8px;
  bottom: -7px;
  left: -2px;
  height: 5px;
  background: var(--cyan);
  clip-path: polygon(0 30%, 96% 0, 100% 62%, 7% 100%);
  content: "";
}

.revenue-block > strong {
  display: block;
  margin-top: 23px;
  font-family: var(--display);
  font-size: clamp(52px, 5.2vw, 82px);
  font-weight: 900;
  letter-spacing: -.045em;
  line-height: .9;
}

.revenue-block > strong span,
.metric-item strong span {
  font-size: .55em;
  letter-spacing: -.01em;
}

.revenue-block > p {
  margin: 8px 0 22px;
  color: var(--graphite-soft);
  font-size: 12px;
}

.goal-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 7px;
  color: var(--graphite-soft);
  font-size: 11px;
  font-weight: 650;
}

.progress-track {
  height: 6px;
  overflow: hidden;
  background: #dedfdd;
}

.progress-track span {
  display: block;
  height: 100%;
  background: var(--cyan);
}

.metric-ledger {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-item {
  display: flex;
  min-width: 0;
  align-items: flex-end;
  gap: 14px;
  padding: 26px 22px;
  border-right: 1px solid var(--line);
}

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

.metric-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: none;
  place-items: center;
  border: 1px solid var(--graphite);
  border-radius: 4px;
}

.metric-icon svg {
  width: 20px;
  height: 20px;
}

.metric-item > div:last-child {
  min-width: 0;
}

.metric-item span,
.metric-item strong,
.metric-item small {
  display: block;
}

.metric-item > div > span {
  min-height: 30px;
  color: var(--graphite-soft);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .045em;
  line-height: 1.35;
  text-transform: uppercase;
}

.metric-item strong {
  margin: 8px 0 6px;
  overflow: hidden;
  font-family: var(--display);
  font-size: clamp(29px, 3.2vw, 43px);
  font-weight: 850;
  letter-spacing: -.02em;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-item strong span {
  display: inline;
}

.metric-item small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.work-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(340px, .85fr);
  border-bottom: 1px solid var(--graphite);
}

.work-section {
  min-width: 0;
  padding: 25px 26px 25px 4px;
}

.pipeline-section {
  padding-right: 4px;
  padding-left: 30px;
  border-left: 1px solid var(--line-strong);
}

.section-heading {
  display: flex;
  min-height: 35px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 13px;
}

.section-heading h2,
.module-copy h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 24px;
  font-weight: 850;
  letter-spacing: .015em;
  line-height: 1;
  text-transform: uppercase;
}

.section-heading h2::after {
  display: block;
  width: 28px;
  height: 3px;
  margin-top: 8px;
  background: var(--cyan);
  content: "";
}

.section-meta {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.link-button {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  color: var(--cyan-dark);
  background: transparent;
  font-size: 12px;
  font-weight: 750;
}

.link-button svg {
  width: 16px;
  height: 16px;
  transition: transform 160ms ease;
}

.link-button:hover svg,
.link-button:focus-visible svg {
  transform: translateX(3px);
}

.link-button:focus-visible {
  outline: 2px solid var(--cyan-dark);
  outline-offset: 3px;
}

.priority-list {
  border-top: 1px solid var(--line);
}

.priority-item {
  display: grid;
  grid-template-columns: 82px 34px minmax(0, 1fr) auto;
  min-height: 64px;
  align-items: center;
  gap: 13px;
  border-bottom: 1px solid var(--line);
  transition: background 160ms ease;
}

.priority-item:hover {
  background: var(--canvas);
}

.priority-date {
  color: var(--graphite-soft);
  font-size: 11px;
  line-height: 1.35;
}

.priority-date strong {
  display: block;
  color: var(--graphite);
  font-size: 12px;
}

.priority-date.danger strong {
  color: var(--orange);
}

.priority-toggle {
  display: grid;
  width: 28px;
  height: 28px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: var(--paper);
  cursor: pointer;
}

.priority-toggle svg {
  width: 16px;
  height: 16px;
  opacity: 0;
}

.priority-toggle:hover,
.priority-toggle:focus-visible {
  border-color: var(--graphite);
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.priority-copy {
  min-width: 0;
}

.priority-copy strong,
.priority-copy small {
  display: block;
}

.priority-copy strong {
  overflow: hidden;
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.priority-copy small {
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.due-label {
  color: var(--graphite-soft);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.due-label.danger {
  color: var(--orange);
}

.priority-item.is-complete .priority-toggle {
  border-color: var(--cyan-dark);
  color: var(--paper);
  background: var(--cyan-dark);
}

.priority-item.is-complete .priority-toggle svg {
  opacity: 1;
}

.priority-item.is-complete .priority-copy,
.priority-item.is-complete .priority-date,
.priority-item.is-complete .due-label {
  opacity: .48;
}

.priority-item.is-complete .priority-copy strong {
  text-decoration: line-through;
}

.phase-list {
  border-top: 1px solid var(--line);
}

.phase-row {
  display: grid;
  grid-template-columns: minmax(92px, 1fr) minmax(100px, 1.25fr) 24px;
  min-height: 64px;
  align-items: center;
  gap: 13px;
  border-bottom: 1px solid var(--line);
}

.phase-copy strong,
.phase-copy small {
  display: block;
}

.phase-copy strong {
  font-size: 12px;
}

.phase-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.phase-track {
  height: 19px;
  background: #e4e5e3;
  clip-path: polygon(4% 0, 100% 0, 94% 100%, 0 100%);
}

.phase-fill {
  height: 100%;
  background: var(--cyan);
}

.phase-row:nth-child(2) .phase-fill {
  background: #85dcd4;
}

.phase-row:nth-child(3) .phase-fill {
  background: var(--cyan-dark);
}

.phase-row:nth-child(4) .phase-fill {
  background: var(--graphite);
}

.phase-count {
  font-family: var(--display);
  font-size: 20px;
  text-align: right;
}

.orders-section {
  padding-top: 26px;
  border-bottom: 1px solid var(--graphite);
}

.orders-heading {
  align-items: flex-end;
  margin-bottom: 15px;
}

.orders-heading p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.search-field {
  display: flex;
  width: min(320px, 36vw);
  height: 40px;
  align-items: center;
  gap: 9px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--paper);
}

.search-field:focus-within {
  border-color: var(--graphite);
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.search-field svg {
  width: 18px;
  height: 18px;
  flex: none;
  color: var(--muted);
}

.search-field input {
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  color: var(--graphite);
  background: transparent;
  font-size: 12px;
}

.search-field input::placeholder {
  color: #8a908d;
}

.table-wrap {
  overflow-x: auto;
  border-top: 1px solid var(--graphite);
}

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

th,
td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th:first-child,
td:first-child {
  padding-left: 7px;
}

th {
  color: var(--graphite-soft);
  font-family: var(--display);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .035em;
  text-transform: uppercase;
}

tbody tr {
  position: relative;
  cursor: pointer;
  transition: background 140ms ease;
}

tbody tr:hover,
tbody tr:focus-visible,
tbody tr.selected {
  background: var(--cyan-pale);
  outline: none;
}

tbody tr.selected td:first-child {
  box-shadow: inset 4px 0 0 var(--cyan);
}

.orders-table tbody tr.is-zapzarap td {
  color: #686e6b;
}

.orders-table tbody tr.is-zapzarap .phase-tag {
  border-color: #727875;
  color: #606663;
}

.order-number {
  font-family: var(--display);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .025em;
}

.order-title {
  font-weight: 700;
}

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

.phase-tag {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 2px 8px;
  border: 1px solid var(--cyan-dark);
  border-radius: 3px;
  color: var(--cyan-dark);
  font-size: 10px;
  font-weight: 750;
}

.empty-row,
.empty-row:hover {
  background: transparent;
  cursor: default;
}

.empty-row td {
  padding: 36px 12px;
  color: var(--muted);
  text-align: center;
}

.table-footer {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--muted);
  font-size: 11px;
}

.module-view {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(250px, .8fr);
  min-height: calc(100vh - 145px);
  align-content: center;
  gap: 70px;
  overflow: hidden;
  border-bottom: 1px solid var(--graphite);
}

.module-number {
  position: absolute;
  top: 5%;
  right: 1%;
  z-index: 0;
  color: var(--canvas);
  font-family: var(--display);
  font-size: clamp(190px, 28vw, 420px);
  font-weight: 900;
  line-height: .8;
  pointer-events: none;
}

.module-copy,
.module-features {
  position: relative;
  z-index: 1;
}

.module-copy h2 {
  max-width: 800px;
  font-size: clamp(58px, 8vw, 116px);
  letter-spacing: -.035em;
  line-height: .82;
}

.module-copy h2::after {
  display: block;
  width: 92px;
  height: 8px;
  margin-top: 26px;
  background: var(--cyan);
  content: "";
}

.module-copy p {
  max-width: 580px;
  margin: 28px 0;
  color: var(--graphite-soft);
  font-size: 17px;
  line-height: 1.6;
}

.outline-button {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--graphite);
  border-radius: 4px;
  background: var(--paper);
  font-family: var(--display);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.outline-button:hover,
.outline-button:focus-visible {
  color: var(--graphite);
  background: var(--cyan);
  outline: 2px solid var(--graphite);
  outline-offset: 3px;
}

.module-features {
  display: grid;
  align-self: center;
  border-top: 1px solid var(--graphite);
}

.module-features span {
  padding: 19px 4px;
  border-bottom: 1px solid var(--line-strong);
  font-family: var(--display);
  font-size: 18px;
  font-weight: 750;
  text-transform: uppercase;
}

.module-features span::before {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 12px;
  background: var(--cyan);
  content: "";
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 50;
  max-width: min(390px, calc(100vw - 48px));
  padding: 14px 17px;
  border: 1px solid var(--cyan);
  border-radius: 4px;
  color: #fff;
  background: var(--graphite);
  box-shadow: 8px 8px 0 rgba(0, 217, 202, .28);
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

[hidden] {
  display: none !important;
}

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

@media (max-width: 1180px) {
  :root {
    --sidebar-width: 204px;
  }

  .main-content {
    padding-right: 28px;
    padding-left: 28px;
  }

  .brand {
    min-height: 120px;
  }

  .brand img {
    width: auto;
    height: 94px;
  }

  .nav-link {
    padding-right: 18px;
    padding-left: 18px;
  }

  .metric-item {
    display: block;
    padding: 23px 17px;
  }

  .metric-icon {
    margin-bottom: 17px;
  }

  .priority-item {
    grid-template-columns: 70px 30px minmax(0, 1fr) auto;
    gap: 10px;
  }

  th:nth-child(5),
  td:nth-child(5) {
    display: none;
  }
}

@media (max-width: 920px) {
  .year-ledger {
    grid-template-columns: minmax(255px, .8fr) minmax(0, 1.7fr);
  }

  .metric-item > div > span {
    min-height: 44px;
  }

  .metric-item small {
    min-height: 30px;
  }

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

  .pipeline-section {
    padding-left: 4px;
    border-top: 1px solid var(--graphite);
    border-left: 0;
  }

  .phase-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .phase-row {
    display: block;
    min-height: 112px;
    padding: 14px 14px 13px;
    border-right: 1px solid var(--line);
  }

  .phase-row:last-child {
    border-right: 0;
  }

  .phase-track {
    height: 8px;
    margin: 12px 0 8px;
  }

  .phase-count {
    text-align: left;
  }
}

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

  .sidebar {
    position: fixed;
    width: min(280px, 86vw);
    border-right-width: 4px;
    transform: translateX(-105%);
    transition: transform 210ms ease;
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: 24px 0 70px rgba(17, 19, 18, .32);
  }

  .drawer-scrim {
    position: fixed;
    inset: 0;
    z-index: 19;
    display: block;
    visibility: hidden;
    background: rgba(17, 19, 18, .48);
    opacity: 0;
    transition: opacity 210ms ease, visibility 210ms ease;
  }

  .drawer-scrim.visible {
    visibility: visible;
    opacity: 1;
  }

  .main-content {
    max-width: none;
  }

  .menu-button {
    display: grid;
  }

  .module-view {
    grid-template-columns: 1fr;
    gap: 46px;
  }

  .changes-masthead .eyebrow { margin-left: 52px; }
}

@media (max-width: 680px) {
  .main-content {
    padding: 0 18px 36px;
  }

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

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

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

  .topbar {
    min-height: 76px;
  }

  .today-label,
  .topbar-rule {
    display: none;
  }

  .topbar h1 {
    font-size: 27px;
  }

  .primary-button {
    min-height: 42px;
    padding: 0 12px;
    box-shadow: 3px 3px 0 var(--graphite);
    font-size: 14px;
  }

  .primary-button svg {
    width: 17px;
    height: 17px;
  }

  .view {
    padding-top: 20px;
  }

  .year-ledger {
    grid-template-columns: 1fr;
  }

  .revenue-block {
    padding: 21px 4px 24px;
    border-right: 0;
    border-bottom: 1px solid var(--graphite);
  }

  .revenue-block > strong {
    font-size: clamp(58px, 18vw, 78px);
  }

  .metric-item {
    padding: 17px 10px;
  }

  .metric-item:first-child {
    padding-left: 3px;
  }

  .metric-item:last-child {
    padding-right: 3px;
  }

  .metric-icon {
    display: none;
  }

  .metric-item > div > span {
    min-height: 32px;
    font-size: 9px;
  }

  .metric-item strong {
    margin-top: 6px;
    font-size: clamp(24px, 8vw, 34px);
  }

  .metric-item small {
    min-height: 0;
    font-size: 9px;
  }

  .work-section,
  .pipeline-section {
    padding: 22px 3px;
  }

  .priority-item {
    grid-template-columns: 62px 28px minmax(0, 1fr);
  }

  .due-label {
    display: none;
  }

  .phase-list {
    overflow-x: auto;
  }

  .phase-row {
    min-width: 118px;
  }

  .orders-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .search-field {
    width: 100%;
  }

  .table-wrap {
    overflow: visible;
  }

  table,
  tbody {
    display: block;
    width: 100%;
  }

  thead {
    display: none;
  }

  tbody tr {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    min-height: 74px;
    align-items: center;
    column-gap: 10px;
    border-bottom: 1px solid var(--line);
  }

  tbody td {
    display: block;
    padding: 0;
    border: 0;
    white-space: normal;
  }

  tbody td:nth-child(1) {
    grid-row: 1 / span 2;
    padding-left: 7px;
  }

  tbody td:nth-child(2) {
    grid-column: 2;
    align-self: end;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  tbody td:nth-child(3) {
    grid-column: 2;
    align-self: start;
    overflow: hidden;
    color: var(--muted);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  tbody td:nth-child(4) {
    grid-column: 3;
    grid-row: 2;
    align-self: start;
    text-align: right;
  }

  tbody td:nth-child(5) {
    display: none;
  }

  tbody td:nth-child(6) {
    grid-column: 3;
    grid-row: 1;
    align-self: end;
    padding-right: 4px;
  }

  tbody tr.selected td:first-child {
    box-shadow: inset 4px 0 0 var(--cyan);
  }

  .phase-tag {
    min-height: 20px;
    padding: 1px 5px;
    font-size: 9px;
  }

  .empty-row {
    display: block;
  }

  .empty-row td {
    padding: 30px 0;
  }

  .module-view {
    min-height: calc(100vh - 112px);
    align-content: start;
    padding-top: 54px;
  }

  .module-copy h2 {
    font-size: clamp(50px, 17vw, 76px);
  }

  .module-copy p {
    font-size: 15px;
  }
}

@media (max-width: 430px) {
  .main-content {
    padding-right: 14px;
    padding-left: 14px;
  }

  .topbar h1 {
    font-size: 24px;
  }

  .menu-button {
    width: 38px;
    height: 38px;
    margin-right: 11px;
  }

  .button-label-full {
    display: none;
  }

  .button-label-short {
    display: inline;
  }

  .priority-date {
    font-size: 10px;
  }

  .priority-copy strong {
    font-size: 12px;
  }

  .table-footer > span {
    display: none;
  }

  .table-footer {
    justify-content: flex-end;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* Authenticated application surfaces */
.eyebrow {
  display: block;
  color: var(--cyan-dark);
  font-family: var(--display);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.login-screen {
  display: grid;
  grid-template-columns: minmax(320px, 1.15fr) minmax(420px, .85fr);
  min-height: 100vh;
  color: #fff;
  background: var(--graphite);
}

.login-art {
  position: relative;
  display: flex;
  min-height: 100vh;
  align-items: flex-end;
  overflow: hidden;
  padding: clamp(36px, 6vw, 86px);
  border-right: 5px solid var(--cyan);
  background:
    linear-gradient(145deg, rgba(0,217,202,.06), transparent 44%),
    radial-gradient(circle at 20% 25%, rgba(255,255,255,.03) 0 1px, transparent 1.5px) 0 0 / 9px 9px,
    #0d0f0e;
}

.login-art::after {
  position: absolute;
  right: -8%;
  bottom: 16%;
  width: 78%;
  height: 15px;
  background: var(--cyan);
  clip-path: polygon(0 28%, 95% 0, 100% 70%, 5% 100%);
  opacity: .85;
  transform: rotate(-7deg);
  content: "";
}

.login-index {
  position: absolute;
  top: 6%;
  left: -1%;
  color: #191d1b;
  font-family: var(--display);
  font-size: clamp(190px, 34vw, 520px);
  font-weight: 900;
  letter-spacing: -.08em;
  line-height: .8;
}

.login-art p {
  position: relative;
  z-index: 1;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(46px, 6.5vw, 96px);
  font-weight: 900;
  letter-spacing: -.035em;
  line-height: .86;
  text-transform: uppercase;
}

.login-panel {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  justify-content: center;
  padding: clamp(38px, 7vw, 110px);
  color: var(--graphite);
  background: var(--paper);
}

.login-logo {
  width: min(220px, 58%);
  margin-bottom: clamp(48px, 8vh, 90px);
  filter: invert(1);
}

.login-heading h1 {
  margin: 12px 0 18px;
  font-family: var(--display);
  font-size: clamp(58px, 6vw, 88px);
  font-weight: 900;
  letter-spacing: -.045em;
  line-height: .96;
  text-transform: uppercase;
}

.login-heading p {
  max-width: 430px;
  margin: 0;
  color: var(--graphite-soft);
  line-height: 1.55;
}

.login-form {
  display: grid;
  gap: 18px;
  max-width: 480px;
  margin-top: 36px;
}

.login-button {
  width: 100%;
  margin: 6px 0 0;
}

.login-note {
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.logout-button {
  margin-top: 14px;
  padding: 0;
  border: 0;
  color: #9ba39f;
  background: transparent;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.logout-button:hover,
.logout-button:focus-visible {
  color: var(--cyan);
}

.view-state {
  display: grid;
  min-height: 280px;
  place-content: center;
  gap: 8px;
  padding: 40px;
  border-top: 1px solid var(--graphite);
  border-bottom: 1px solid var(--graphite);
  color: var(--muted);
  text-align: center;
}

.view-state strong {
  color: var(--graphite);
  font-family: var(--display);
  font-size: 22px;
  text-transform: uppercase;
}

.view-state .outline-button {
  margin: 18px auto 0;
}

.view-state.loading::before {
  width: 28px;
  height: 28px;
  margin: 0 auto 10px;
  border: 3px solid var(--line);
  border-top-color: var(--cyan-dark);
  border-radius: 50%;
  animation: spin 720ms linear infinite;
  content: "";
}

.inline-empty {
  display: grid;
  min-height: 130px;
  place-items: center;
  padding: 20px;
  color: var(--muted);
  text-align: center;
}

.priority-button {
  grid-template-columns: 82px 10px minmax(0, 1fr);
  width: 100%;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.priority-marker {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 4px var(--cyan-pale);
}

.priority-button:focus-visible {
  background: var(--cyan-pale);
  outline: 2px solid var(--cyan-dark);
  outline-offset: -2px;
}

.management-view {
  padding-bottom: 40px;
}

.module-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  padding: 26px 4px 28px;
  border-bottom: 1px solid var(--graphite);
}

.module-header h2 {
  margin: 8px 0 5px;
  font-family: var(--display);
  font-size: clamp(48px, 6vw, 78px);
  font-weight: 900;
  letter-spacing: -.035em;
  line-height: .9;
  text-transform: uppercase;
}

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

.inline-primary {
  flex: none;
  margin-left: 0;
}

.list-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 4px;
  border-bottom: 1px solid var(--line);
}

.list-toolbar .search-field {
  width: min(430px, 55vw);
}

.select-field select {
  min-width: 180px;
  height: 40px;
  padding: 0 34px 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  color: var(--graphite);
  background: var(--paper);
}

.select-field select:focus {
  border-color: var(--graphite);
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.data-surface {
  border-bottom: 1px solid var(--graphite);
}

.data-table td {
  height: 62px;
}

.customer-order-count {
  color: var(--cyan-dark);
  font-family: var(--display);
  font-size: 18px;
  font-weight: 850;
}

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

.empty-row strong {
  margin-bottom: 6px;
  color: var(--graphite);
  font-family: var(--display);
  font-size: 18px;
  text-transform: uppercase;
}

.editor-dialog {
  width: min(720px, calc(100vw - 32px));
  max-height: min(900px, calc(100vh - 32px));
  padding: 0;
  overflow: auto;
  border: 1px solid var(--graphite);
  border-radius: 5px;
  color: var(--graphite);
  background: var(--paper);
  box-shadow: 12px 12px 0 var(--cyan);
}

.editor-dialog.order-editor {
  width: min(820px, calc(100vw - 32px));
}

.editor-dialog::backdrop {
  background: rgba(17, 19, 18, .68);
  backdrop-filter: blur(2px);
}

.editor-form {
  padding: 28px 30px 30px;
}

.editor-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--graphite);
}

.editor-header h2 {
  margin: 7px 0 0;
  font-family: var(--display);
  font-size: clamp(36px, 5vw, 52px);
  font-weight: 900;
  letter-spacing: -.025em;
  line-height: .9;
  text-transform: uppercase;
}

.dialog-close {
  width: 38px;
  height: 38px;
  padding: 0 0 4px;
  border: 1px solid var(--graphite);
  border-radius: 3px;
  background: var(--paper);
  font-family: Arial, sans-serif;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.dialog-close:hover,
.dialog-close:focus-visible {
  background: var(--cyan);
  outline: 2px solid var(--graphite);
  outline-offset: 2px;
}

.form-section {
  padding: 22px 0 4px;
  border-bottom: 1px solid var(--line);
}

.form-section h3 {
  margin: 0 0 16px;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 850;
  text-transform: uppercase;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px 18px;
  padding-top: 24px;
}

.form-section .form-grid {
  padding-top: 0;
}

.form-span-2,
.form-span-4 {
  grid-column: 1 / -1;
}

.form-field {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.form-field > span {
  color: var(--graphite-soft);
  font-family: var(--display);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .045em;
  text-transform: uppercase;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  color: var(--graphite);
  background: var(--paper);
}

.form-field textarea {
  min-height: 88px;
  resize: vertical;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--graphite);
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.form-field small {
  color: var(--muted);
  font-size: 10px;
}

.money-input {
  position: relative;
}

.money-input input {
  padding-right: 38px;
}

.money-input span {
  position: absolute;
  top: 50%;
  right: 12px;
  color: var(--muted);
  transform: translateY(-50%);
}

.calculation-preview {
  display: grid;
  align-content: center;
  padding: 12px 15px;
  border-left: 4px solid var(--cyan);
  background: var(--canvas);
}

.calculation-preview span,
.calculation-preview small {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.calculation-preview strong {
  margin: 4px 0;
  font-family: var(--display);
  font-size: 28px;
}

.form-error {
  margin: 18px 0 0;
  padding: 11px 13px;
  border-left: 4px solid var(--orange);
  color: #8a2f11;
  background: #fff0ea;
  font-size: 12px;
  line-height: 1.45;
}

.editor-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 26px;
}

button:disabled {
  cursor: wait;
  opacity: .58;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 920px) {
  .login-screen { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .login-panel { min-height: 100vh; }
  .phase-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .module-header { align-items: stretch; flex-direction: column; }
  .module-header h2 { font-size: 54px; }
  .inline-primary { width: 100%; }
  .list-toolbar { align-items: stretch; flex-direction: column; }
  .list-toolbar .search-field { width: 100%; }
  .select-field select { width: 100%; }
  .management-view .table-wrap { overflow-x: auto; }
  .management-view table.data-table { display: table; min-width: 760px; }
  .management-view .data-table thead { display: table-header-group; }
  .management-view .data-table tbody { display: table-row-group; }
  .management-view .data-table tr { display: table-row; }
  .management-view .data-table th,
  .management-view .data-table td,
  .management-view .data-table th:nth-child(n),
  .management-view .data-table td:nth-child(n) { display: table-cell; height: auto; padding: 13px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
  .management-view .data-table td:first-child { box-shadow: none; }
  .editor-form { padding: 23px 18px 24px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-span-2,
  .form-span-4 { grid-column: auto; }
  .editor-footer { align-items: stretch; flex-direction: column-reverse; }
  .editor-footer .outline-button { width: 100%; }
  .login-panel { padding: 30px 22px; }
  .login-logo { margin-bottom: 48px; }
  .login-heading h1 { font-size: 62px; }
  .phase-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Documents, settings and page-specific chrome */
.topbar.page-hidden {
  height: 0;
  min-height: 0;
  overflow: visible;
  border: 0;
}

.topbar.page-hidden > * {
  display: none;
}

.header-actions {
  display: flex;
  flex: none;
  align-items: center;
  gap: 12px;
}

.document-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--graphite);
}

.document-summary > div {
  display: flex;
  min-height: 94px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 26px;
  border-right: 1px solid var(--line);
}

.document-summary > div:last-child { border-right: 0; }

.document-summary span {
  color: var(--graphite-soft);
  font-family: var(--display);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .045em;
  text-transform: uppercase;
}

.document-summary strong {
  font-family: var(--display);
  font-size: 42px;
  line-height: 1;
}

.document-ready,
.document-missing {
  font-weight: 750;
}

.document-ready { color: var(--cyan-dark); }
.document-missing { color: var(--orange); }

.document-editor { width: min(980px, calc(100vw - 32px)); }

.document-add-dialog {
  width: min(760px, calc(100vw - 32px));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.document-add-sheet {
  padding: 28px 30px 30px;
}

.document-add-intro {
  max-width: 570px;
  margin: 26px 0 22px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.document-add-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.document-add-choice {
  display: grid;
  min-height: 190px;
  padding: 20px;
  align-content: start;
  border: 1px solid var(--graphite);
  border-radius: 0;
  background: var(--canvas);
  color: var(--graphite);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 120ms ease, background-color 120ms ease, box-shadow 120ms ease;
}

.document-add-choice:hover,
.document-add-choice:focus-visible {
  background: var(--cyan-pale);
  box-shadow: 6px 6px 0 var(--graphite);
  outline: none;
  transform: translate(-2px, -2px);
}

.document-choice-index {
  color: var(--cyan-dark);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .12em;
}

.document-add-choice strong {
  margin-top: 26px;
  font-family: var(--display);
  font-size: 31px;
  font-weight: 900;
  line-height: .95;
  text-transform: uppercase;
}

.document-add-choice small {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.document-add-step[hidden] {
  display: none;
}

.document-step-back {
  margin-top: 20px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
}

.document-step-back:hover,
.document-step-back:focus-visible {
  color: var(--graphite);
  outline: none;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.document-step-heading {
  margin-top: 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--graphite);
}

.document-step-heading span {
  color: var(--cyan-dark);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.document-step-heading h3 {
  margin: 6px 0 0;
  font-family: var(--display);
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 900;
  line-height: .95;
  text-transform: uppercase;
}

.document-generate-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 26px;
}

.document-generate-actions .outline-button,
.document-generate-actions .primary-button {
  width: 100%;
  min-height: 58px;
  margin: 0;
}

.document-upload-zone {
  position: relative;
  display: grid;
  min-height: 145px;
  padding: 22px;
  align-content: center;
  border: 1px dashed var(--line-strong);
  background: var(--canvas);
  cursor: pointer;
}

.document-upload-zone:hover,
.document-upload-zone:focus-within {
  border-color: var(--graphite);
  background: var(--cyan-pale);
}

.document-upload-zone > span {
  color: var(--cyan-dark);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.document-upload-zone strong {
  margin-top: 8px;
  font-family: var(--display);
  font-size: 24px;
  font-weight: 900;
  text-transform: uppercase;
}

.document-upload-zone small {
  margin-top: 7px;
  color: var(--muted);
}

.document-upload-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.document-upload-footer {
  padding-bottom: 0;
}

.section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.section-row h3 { margin-bottom: 0; }

.line-items {
  display: grid;
  gap: 8px;
}

.line-item {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 82px 100px 120px 105px 34px;
  align-items: center;
  gap: 8px;
}

.line-item input {
  width: 100%;
  min-width: 0;
  height: 40px;
  padding: 8px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
}

.line-item input:focus {
  border-color: var(--graphite);
  outline: 2px solid var(--cyan);
  outline-offset: 1px;
}

.line-total {
  font-family: var(--display);
  font-size: 16px;
  text-align: right;
  white-space: nowrap;
}

.line-remove {
  width: 32px;
  height: 32px;
  padding: 0 0 3px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  color: var(--muted);
  background: var(--paper);
  font-size: 21px;
  cursor: pointer;
}

.line-remove:hover,
.line-remove:focus-visible {
  border-color: var(--orange);
  color: var(--orange);
  outline: 2px solid #ffd8ca;
}

.document-totals {
  width: min(340px, 100%);
  margin: 22px 0 14px auto;
  border-top: 1px solid var(--graphite);
}

.document-totals > div {
  display: flex;
  justify-content: space-between;
  padding: 9px 4px;
  border-bottom: 1px solid var(--line);
}

.document-totals span {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.document-totals .grand-total {
  border-bottom-color: var(--graphite);
  font-family: var(--display);
  font-size: 22px;
}

.settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(330px, .65fr);
  align-items: start;
  gap: 22px;
  padding-top: 22px;
}

.settings-stack {
  display: grid;
  gap: 22px;
}

.settings-panel {
  margin: 0;
  padding: 24px;
  border: 1px solid var(--graphite);
  background: var(--paper);
}

.settings-profile { border-top: 6px solid var(--cyan); }

.panel-heading {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.panel-heading.horizontal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.panel-heading > div {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.panel-index {
  color: var(--cyan-dark);
  font-family: var(--display);
  font-size: 12px;
  font-weight: 850;
}

.panel-heading h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 25px;
  font-weight: 850;
  text-transform: uppercase;
}

.panel-heading p {
  margin: 8px 0 0 34px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.single-column { grid-template-columns: 1fr; }

.panel-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 22px;
}

.user-list { display: grid; }

.user-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto 34px;
  align-items: center;
  gap: 11px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.user-row:last-child { border-bottom: 0; }

.user-initials {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--graphite);
  background: var(--cyan-pale);
  font-family: var(--display);
  font-weight: 850;
}

.user-row strong,
.user-row div > span { display: block; }
.user-row div > span { margin-top: 2px; color: var(--muted); font-size: 10px; }
.user-role { color: var(--cyan-dark); font-size: 10px; font-weight: 750; text-transform: uppercase; }

.user-row.is-inactive { opacity: .52; }

.user-edit-button {
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  cursor: pointer;
}

.user-edit-button:hover:not(:disabled),
.user-edit-button:focus-visible { border-color: var(--graphite); background: var(--cyan-pale); outline: none; }
.user-edit-button:disabled { cursor: not-allowed; opacity: .45; }
.user-edit-button svg { width: 17px; height: 17px; stroke-width: 1.8; }

.user-danger-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 24px;
  padding: 20px;
  border: 1px solid var(--orange);
  background: #fff6f2;
}

.user-danger-zone strong { font-family: var(--display); font-size: 21px; text-transform: uppercase; }
.user-danger-zone p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }

.changes-masthead {
  position: relative;
  display: flex;
  min-height: 215px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--graphite);
  overflow: hidden;
}

.changes-masthead h2 {
  position: relative;
  z-index: 1;
  margin: 18px 0 9px;
  font-family: var(--display);
  font-size: clamp(64px, 8vw, 110px);
  font-weight: 900;
  letter-spacing: -.03em;
  line-height: .9;
  text-transform: uppercase;
}

.changes-masthead p { position: relative; z-index: 1; margin: 0; color: var(--muted); font-size: 16px; }
.changes-number { color: var(--canvas); font-family: var(--display); font-size: 210px; line-height: .68; }
.changes-content { padding-top: 28px; }
.changes-list { display: grid; }

.changes-day {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 0 10px;
  color: var(--cyan-dark);
  font-family: var(--display);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.changes-day:first-child { padding-top: 0; }
.changes-day span { height: 1px; flex: 1; background: var(--line); }

.change-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 86px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--line);
  color: var(--graphite);
  text-decoration: none;
}

a.change-row:hover,
a.change-row:focus-visible { padding-left: 10px; background: var(--cyan-pale); outline: none; }

.change-initials {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--graphite);
  background: var(--cyan-pale);
  font-family: var(--display);
  font-size: 17px;
  font-weight: 850;
}

.change-copy p { margin: 0; font-size: 14px; line-height: 1.45; }
.change-copy time { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }
.change-type { color: var(--cyan-dark); font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.changes-empty { display: grid; min-height: 240px; place-content: center; text-align: center; }
.changes-empty strong { font-family: var(--display); font-size: 30px; text-transform: uppercase; }
.changes-empty span { margin-top: 6px; color: var(--muted); }

@media (max-width: 1050px) {
  .settings-layout { grid-template-columns: 1fr; }
  .settings-stack { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .topbar.page-hidden .menu-button {
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 18;
    display: grid;
    margin: 0;
    background: var(--paper);
    box-shadow: 3px 3px 0 var(--graphite);
  }
  .topbar.page-hidden + .view { padding-top: 66px; }
}

@media (max-width: 760px) {
  .header-actions { align-items: stretch; flex-direction: column-reverse; }
  .document-summary > div { display: grid; justify-content: start; gap: 6px; padding: 15px; }
  .document-summary strong { font-size: 34px; }
  .settings-stack { grid-template-columns: 1fr; }
  .line-item {
    grid-template-columns: minmax(0, 1fr) 34px;
    padding: 12px;
    border: 1px solid var(--line);
  }
  .line-description { grid-column: 1; }
  .line-remove { grid-column: 2; grid-row: 1; }
  .line-quantity,
  .line-unit,
  .line-price,
  .line-total { grid-column: 1 / -1; }
  .line-total { padding-top: 5px; text-align: left; }
  .changes-masthead { min-height: 170px; }
  .changes-number { position: absolute; right: -6px; bottom: 24px; font-size: 150px; }
  .changes-masthead p { max-width: 300px; font-size: 13px; }
  .change-row { grid-template-columns: 40px minmax(0, 1fr); gap: 12px; min-height: 94px; }
  .change-initials { width: 40px; height: 40px; }
  .change-type { grid-column: 2; justify-self: start; margin-top: -8px; }
  .user-danger-zone { align-items: stretch; flex-direction: column; }
}

@media (max-width: 520px) {
  .document-summary span { font-size: 10px; }
  .document-summary strong { font-size: 29px; }
  .settings-panel { padding: 20px 16px; }
  .panel-heading.horizontal { align-items: flex-start; flex-direction: column; }
  .panel-heading.horizontal .outline-button { width: 100%; }
}

/* Wandkunst pixel pet */
.studio-pet {
  --pet-drag-tilt: 0deg;
  position: fixed;
  top: clamp(104px, 18vh, 168px);
  right: 22px;
  z-index: 18;
  width: 163px;
  pointer-events: none;
  transform: translateX(0);
  transform-origin: 50% 55%;
  transition: transform 480ms cubic-bezier(.2, .82, .24, 1), opacity 260ms ease, filter 260ms ease;
}

.studio-pet[data-mode="teaser"] {
  transform: translateX(66%);
}

.studio-pet[data-mode="retreating"] {
  transform: translateX(128%);
}

.studio-pet[data-mode="smoke-closing"] {
  opacity: 0;
  filter: blur(7px);
  transform: scale(.72) rotate(-5deg);
}

.studio-pet.is-positioned {
  right: auto;
  transform: none;
}

.studio-pet button {
  pointer-events: auto;
}

.pet-character {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.pet-character:focus-visible {
  border-radius: 18px;
  outline: 3px solid var(--orange);
  outline-offset: 4px;
}

.pet-character img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  image-rendering: pixelated;
  filter: drop-shadow(8px 11px 0 rgba(17, 19, 18, .16));
  transform-origin: 50% 65%;
}

.studio-pet[data-mode="expanded"]:not(.is-dragging) .pet-character img {
  animation: pet-idle 2.7s steps(2, end) infinite;
}

.studio-pet.is-dragging .pet-character {
  cursor: grabbing;
}

.studio-pet.is-dragging .pet-character img {
  filter: drop-shadow(13px 18px 0 rgba(17, 19, 18, .12));
  transform: rotate(var(--pet-drag-tilt)) scale(.96, 1.04);
}

.pet-blink {
  position: absolute;
  top: 46.5%;
  left: 39.3%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 21.8%;
  height: 5.5%;
  padding: 0 4%;
  background: #090d0e;
  opacity: 0;
  pointer-events: none;
}

.pet-blink i {
  width: 29%;
  height: 15%;
  background: #00e2dc;
  box-shadow: 0 0 4px rgba(0, 226, 220, .55);
}

.studio-pet.is-blinking .pet-blink {
  opacity: 1;
}

.pet-notice,
.pet-edge-close,
.pet-smoke-close {
  position: absolute;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 2px solid var(--graphite);
  color: var(--graphite);
  background: var(--paper);
  box-shadow: 4px 4px 0 var(--graphite);
  font-family: var(--display);
  font-size: 25px;
  font-weight: 900;
  line-height: 1;
  transition: transform 160ms ease, background 160ms ease, opacity 160ms ease;
}

.pet-notice:hover,
.pet-notice:focus-visible,
.pet-edge-close:hover,
.pet-edge-close:focus-visible,
.pet-smoke-close:hover,
.pet-smoke-close:focus-visible {
  background: var(--cyan);
  outline: none;
  transform: translate(-2px, -2px);
}

.pet-notice {
  top: 28px;
  left: -29px;
  border-radius: 50% 50% 8% 50%;
}

.pet-notice::after {
  position: absolute;
  right: -8px;
  bottom: -5px;
  width: 13px;
  height: 13px;
  border-right: 2px solid var(--graphite);
  border-bottom: 2px solid var(--graphite);
  background: inherit;
  content: "";
  transform: rotate(-11deg);
}

.pet-edge-close {
  bottom: 42px;
  left: -28px;
}

.pet-smoke-close {
  right: -4px;
  bottom: 36px;
  opacity: 0;
  transform: translateY(6px);
}

.studio-pet:hover .pet-smoke-close,
.studio-pet:focus-within .pet-smoke-close {
  opacity: 1;
  transform: translateY(0);
}

.studio-pet[data-mode="teaser"] .pet-smoke-close,
.studio-pet[data-mode="retreating"] .pet-smoke-close,
.studio-pet[data-mode="waiting"] .pet-smoke-close,
.studio-pet[data-mode="expanded"] .pet-edge-close,
.studio-pet[data-mode="expanded"] .pet-notice,
.studio-pet[data-mode="smoke-closing"] .pet-notice,
.studio-pet[data-mode="smoke-closing"] .pet-edge-close,
.studio-pet[data-mode="smoke-closing"] .pet-smoke-close {
  visibility: hidden;
  pointer-events: none;
}

.pet-message {
  position: absolute;
  top: calc(100% - 2px);
  right: 0;
  display: grid;
  gap: 7px;
  width: min(306px, calc(100vw - 32px));
  padding: 18px 20px 17px;
  border: 2px solid var(--graphite);
  color: var(--graphite);
  background: var(--paper);
  box-shadow: 7px 7px 0 var(--graphite);
  text-align: left;
  cursor: pointer;
  animation: pet-message-in 260ms 300ms both;
}

.pet-message::before {
  position: absolute;
  top: -12px;
  right: 52px;
  width: 20px;
  height: 20px;
  border-top: 2px solid var(--graphite);
  border-left: 2px solid var(--graphite);
  background: var(--paper);
  content: "";
  transform: rotate(45deg);
}

.pet-message:hover,
.pet-message:focus-visible {
  background: var(--cyan-pale);
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}

.pet-message > span {
  color: var(--cyan-dark);
  font-family: var(--display);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.pet-message > strong {
  font-size: 15px;
  line-height: 1.4;
}

.pet-message > small {
  color: var(--graphite-soft);
  font-size: 12px;
  font-weight: 700;
}

.pet-message.is-clear > span {
  color: var(--success);
}

.pet-smoke {
  position: absolute;
  inset: 12% 4% 8%;
  opacity: 0;
  pointer-events: none;
}

.pet-smoke i {
  position: absolute;
  width: 24px;
  height: 24px;
  background: var(--cyan);
  box-shadow: 18px -13px 0 #fff, -14px 14px 0 #c9cecb, 25px 22px 0 var(--graphite);
}

.pet-smoke i:nth-child(1) { top: 10%; left: 18%; }
.pet-smoke i:nth-child(2) { top: 28%; right: 15%; }
.pet-smoke i:nth-child(3) { top: 52%; left: 42%; }
.pet-smoke i:nth-child(4) { right: 32%; bottom: 4%; }
.pet-smoke i:nth-child(5) { bottom: 22%; left: 9%; }

.studio-pet[data-mode="smoke-closing"] .pet-smoke {
  opacity: 1;
}

.studio-pet[data-mode="smoke-closing"] .pet-smoke i {
  animation: pet-smoke 650ms steps(4, end) both;
}

.studio-pet[data-mode="smoke-closing"] .pet-smoke i:nth-child(even) {
  animation-direction: reverse;
}

@keyframes pet-idle {
  0%, 100% { transform: translateY(0) rotate(-.7deg); }
  50% { transform: translateY(-5px) rotate(.8deg); }
}

@keyframes pet-message-in {
  from { opacity: 0; transform: translateY(-9px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes pet-smoke {
  0% { opacity: 0; transform: translate(0, 18px) scale(.3); }
  35% { opacity: 1; }
  100% { opacity: 0; transform: translate(22px, -54px) scale(1.55); }
}

@media (max-width: 680px) {
  .studio-pet {
    top: 88px;
    right: 12px;
    width: 142px;
  }

  .studio-pet[data-mode="teaser"] {
    transform: translateX(64%);
  }

  .pet-notice,
  .pet-edge-close,
  .pet-smoke-close {
    width: 38px;
    height: 38px;
  }

  .pet-message {
    right: -2px;
    width: min(286px, calc(100vw - 24px));
    padding: 15px 16px;
  }
}

.admin-password-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: 22px;
}

.setting-check {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  min-height: 82px;
  padding: 15px 16px;
  border: 1px solid var(--line-strong);
  background: var(--canvas);
  cursor: pointer;
}

.setting-check input {
  width: 21px;
  height: 21px;
  flex: none;
  margin-top: 1px;
  accent-color: var(--cyan-dark);
}

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

.setting-check strong {
  font-size: 14px;
}

.setting-check small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.45;
}

.address-autocomplete {
  position: relative;
  display: block;
}

.address-autocomplete > input {
  width: 100%;
}

.address-suggestions {
  position: absolute;
  top: calc(100% + 5px);
  right: 0;
  left: 0;
  z-index: 45;
  max-height: 238px;
  overflow-y: auto;
  border: 1px solid var(--graphite);
  background: var(--paper);
  box-shadow: 5px 5px 0 var(--graphite);
}

.address-suggestion {
  display: block;
  width: 100%;
  padding: 11px 13px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.address-suggestion:last-child {
  border-bottom: 0;
}

.address-suggestion:hover,
.address-suggestion:focus-visible,
.address-suggestion.is-active {
  background: var(--cyan-pale);
  outline: none;
}

.address-suggestion strong,
.address-suggestion small {
  display: block;
}

.address-suggestion strong {
  font-size: 13px;
}

.address-suggestion small {
  margin-top: 2px;
  color: var(--muted);
}

.address-attribution {
  margin-top: 7px !important;
  font-size: 10px !important;
}

@media (max-width: 680px) {
  .admin-password-actions .outline-button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .studio-pet[data-mode="expanded"] .pet-character img,
  .studio-pet[data-mode="smoke-closing"] .pet-smoke i,
  .pet-message {
    animation: none !important;
  }
}
.address-copy-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: var(--canvas);
  cursor: pointer;
}

.address-copy-option input {
  width: 20px;
  height: 20px;
  accent-color: var(--cyan-dark);
}

.address-copy-option span,
.address-copy-option small {
  display: block;
}

.address-copy-option small {
  margin-top: 2px;
  color: var(--muted);
}
.document-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  text-align: right;
}

.document-format-button {
  padding: 7px 10px;
  border: 1px solid var(--graphite);
  background: var(--canvas);
  color: var(--graphite);
  font-weight: 800;
  cursor: pointer;
}

.document-format-button:hover,
.document-format-button:focus-visible {
  background: var(--cyan-pale);
  outline: none;
}

.template-copy-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
}

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

.static-setting strong { margin-top: 8px; }
.static-setting small { margin-top: 4px; color: var(--muted); }

.document-delete-button {
  padding: 7px 10px;
  border: 1px solid #c9aaa2;
  background: transparent;
  color: #9b321d;
  font-weight: 700;
  cursor: pointer;
}

.document-delete-button:hover,
.document-delete-button:focus-visible {
  border-color: var(--orange);
  background: #fff1ec;
  outline: none;
}
.detail-dialog {
  width: min(920px, calc(100vw - 32px));
}

.detail-sheet {
  display: grid;
  gap: 24px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

.detail-grid section {
  min-height: 92px;
  padding: 18px;
  background: var(--paper);
}

.detail-grid .detail-wide {
  grid-column: 1 / -1;
}

.detail-label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.detail-grid p {
  margin: 0;
  white-space: pre-line;
}

.detail-status-bar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 18px;
  border-left: 5px solid var(--cyan);
  background: var(--canvas);
}

.detail-status-bar > div:first-child strong {
  font-family: var(--display);
  font-size: 26px;
  text-transform: uppercase;
}

.status-action {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) auto;
  gap: 6px 10px;
}

.status-action label {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.status-action select {
  min-height: 42px;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  padding: 0 12px;
}

.detail-related h3 {
  margin: 0 0 12px;
  font-family: var(--display);
  font-size: 21px;
  text-transform: uppercase;
}

.detail-related-list {
  display: grid;
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

.detail-related-row,
.detail-empty {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  background: var(--paper);
}

.detail-related-row span {
  color: var(--muted);
}

.detail-footer,
.detail-footer > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.danger-button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid #c9aaa2;
  background: transparent;
  color: #9b321d;
  font-weight: 800;
  cursor: pointer;
}

.danger-button:hover,
.danger-button:focus-visible {
  border-color: var(--orange);
  background: #fff1ec;
}

@media (max-width: 700px) {
  .detail-grid { grid-template-columns: 1fr; }
  .detail-grid .detail-wide { grid-column: auto; }
  .detail-status-bar { align-items: stretch; flex-direction: column; }
  .status-action { width: 100%; grid-template-columns: 1fr; }
  .status-action label { grid-column: auto; }
  .detail-footer { align-items: stretch; flex-direction: column-reverse; }
  .detail-footer > div { flex-direction: column-reverse; }
}

/* Auftragsdetail – offene Studio-Ledger-Seite */
.order-detail-view {
  padding-top: 28px;
}

.order-detail-page {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
}

.order-detail-masthead {
  padding-bottom: 26px;
  border-bottom: 1px solid var(--graphite);
}

.order-detail-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
  cursor: pointer;
}

.order-detail-back svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.order-detail-back:hover,
.order-detail-back:focus-visible {
  color: var(--graphite);
  outline: none;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.order-detail-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-top: 18px;
}

.order-detail-heading {
  min-width: 0;
}

.order-detail-number {
  display: block;
  margin-bottom: 5px;
  color: var(--cyan-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.order-detail-heading h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(46px, 5.5vw, 68px);
  font-weight: 900;
  letter-spacing: -.025em;
  line-height: .9;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.order-detail-heading p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.order-detail-head-actions {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 12px;
}

.order-detail-head-actions .primary-button,
.order-detail-head-actions .outline-button,
.order-step-actions .primary-button,
.order-step-actions .outline-button {
  margin-left: 0;
  white-space: nowrap;
}

.order-workflow {
  padding: 22px 0 20px;
  border-bottom: 1px solid var(--graphite);
}

.order-workflow-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.order-workflow-caption h3,
.order-workflow-caption span {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.order-workflow-caption span {
  color: var(--cyan-dark);
}

.order-phase-rail {
  display: grid;
  grid-template-columns: 1fr 1.22fr 1fr 1fr 1fr;
  gap: 4px;
}

.order-phase-item {
  display: grid;
  min-width: 0;
  min-height: 92px;
  padding: 13px 14px 12px;
  align-content: start;
  border: 1px solid var(--line);
  background: var(--canvas);
}

.order-phase-item > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.order-phase-item strong {
  margin-top: 5px;
  font-family: var(--display);
  font-size: 21px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.order-phase-item small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.35;
}

.order-phase-item.is-complete {
  border-color: var(--graphite);
  color: var(--paper);
  background: var(--graphite);
}

.order-phase-item.is-complete > span {
  color: var(--cyan);
}

.order-phase-item.is-complete small {
  color: #b8bfbc;
}

.order-phase-item.is-current {
  border-color: var(--cyan);
  background: var(--cyan);
}

.order-phase-item.is-current > span,
.order-phase-item.is-current small {
  color: var(--graphite-soft);
}

.order-phase-item.is-special {
  border-color: var(--orange);
  background: #fff1ec;
}

.order-current-step {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 98px;
  margin-top: 14px;
  padding: 16px 18px;
  background: var(--cyan-pale);
}

.order-current-step.is-special {
  background: #fff1ec;
}

.order-current-copy {
  min-width: 0;
}

.order-current-copy > span {
  display: block;
  color: var(--cyan-dark);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.order-current-copy strong {
  display: block;
  margin-top: 3px;
  font-family: var(--display);
  font-size: clamp(24px, 2.4vw, 31px);
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.order-current-copy small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
}

.order-step-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.order-step-empty {
  color: var(--muted);
  font-size: 11px;
}

.order-status-more {
  margin-top: 12px;
}

.order-status-more summary {
  width: max-content;
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
}

.order-status-manual {
  display: grid;
  grid-template-columns: minmax(180px, 280px) auto;
  justify-content: end;
  gap: 7px 10px;
  margin-top: 10px;
}

.order-status-manual label {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.order-status-manual select {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: var(--paper);
  color: var(--graphite);
  font: inherit;
}

.order-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(300px, .95fr);
  gap: 34px;
  padding-top: 28px;
}

.order-detail-main-column {
  min-width: 0;
}

.order-description-section h3 {
  max-width: 760px;
  margin: 9px 0 7px;
  font-family: var(--display);
  font-size: clamp(24px, 2.6vw, 34px);
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.order-description-section p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-line;
}

.order-date-ledger {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 24px;
  background: var(--line);
}

.order-date-ledger > div {
  min-width: 0;
  min-height: 96px;
  padding: 15px 16px;
  background: var(--paper);
}

.order-date-ledger strong,
.order-date-ledger small {
  display: block;
}

.order-date-ledger strong {
  font-family: var(--display);
  font-size: 21px;
  font-weight: 900;
  line-height: 1.08;
  text-transform: uppercase;
}

.order-date-ledger small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}

.order-documents-section {
  margin-top: 28px;
}

.order-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 10px;
}

.order-section-heading h3 {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.order-detail-document-list {
  border-top: 1px solid var(--line);
}

.order-detail-document-row,
.order-detail-document-empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 58px;
  border-bottom: 1px solid var(--line);
}

.order-detail-document-empty {
  padding: 10px 0;
}

.order-document-open {
  display: flex;
  min-width: 0;
  min-height: 58px;
  padding: 10px 0;
  flex: 1 1 auto;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 0;
  border-radius: 0;
  color: var(--graphite);
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.order-document-open:hover,
.order-document-open:focus-visible {
  padding-right: 10px;
  padding-left: 10px;
  background: var(--cyan-pale);
  outline: none;
}

.order-document-open > div {
  min-width: 0;
}

.order-detail-document-row strong,
.order-detail-document-row small {
  display: block;
}

.order-detail-document-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-detail-document-row small,
.order-detail-document-empty {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.order-document-kind {
  flex: 0 0 auto;
  padding: 6px 9px;
  color: var(--cyan-dark);
  background: var(--cyan-pale);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.order-document-delete {
  flex: 0 0 auto;
  margin-left: 2px;
}

.order-document-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
}

.order-facts-rail {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--graphite);
  background: var(--canvas);
}

.order-value {
  margin: 16px 0 18px;
}

.order-value strong,
.order-value span {
  display: block;
}

.order-value strong {
  font-family: var(--display);
  font-size: clamp(34px, 3.5vw, 47px);
  font-weight: 900;
  letter-spacing: -.02em;
  line-height: 1;
}

.order-value span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
}

.order-finance-list {
  margin: 0;
}

.order-finance-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 43px;
  border-bottom: 1px solid var(--line);
}

.order-finance-list dt {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.order-finance-list dd {
  margin: 0;
  font-weight: 750;
}

.zapzarap-toggle {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 18px;
  padding: 13px;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  cursor: pointer;
}

.zapzarap-toggle input {
  width: 19px;
  height: 19px;
  flex: none;
  margin-top: 1px;
  accent-color: var(--cyan-dark);
}

.zapzarap-toggle span,
.zapzarap-toggle strong,
.zapzarap-toggle small {
  display: block;
}

.zapzarap-toggle strong {
  font-size: 12px;
}

.zapzarap-toggle small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.zapzarap-form-check {
  margin-top: 4px;
}

.order-facts-rail > section {
  margin-top: 21px;
}

.order-facts-rail section strong,
.order-facts-rail section p {
  margin: 0;
  line-height: 1.5;
  white-space: pre-line;
}

.order-facts-rail section p {
  color: var(--graphite-soft);
  font-size: 11px;
}

.order-detail-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

/* Kundendetail – gleiche offene Studio-Ledger-Sprache wie das Auftragsdetail */
.customer-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 22px;
  background: var(--line);
}

.customer-metrics > div {
  display: grid;
  min-width: 0;
  min-height: 112px;
  padding: 18px;
  align-content: start;
  background: var(--canvas);
}

.customer-metrics span,
.customer-metrics small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.customer-metrics strong {
  margin: 9px 0 5px;
  font-family: var(--display);
  font-size: clamp(28px, 3vw, 39px);
  font-weight: 900;
  line-height: .95;
  overflow-wrap: anywhere;
  text-transform: uppercase;
}

.customer-metrics > div:nth-child(2) {
  background: var(--cyan-pale);
}

.customer-detail-layout {
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, .95fr);
}

.customer-orders-section .order-section-heading {
  min-height: 28px;
  margin-bottom: 0;
}

.customer-orders-section .order-section-heading > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}

.customer-order-list {
  border-top: 1px solid var(--graphite);
}

.customer-order-row {
  display: grid;
  width: 100%;
  min-height: 76px;
  padding: 13px 12px;
  grid-template-columns: minmax(180px, 1.5fr) auto 90px 110px;
  align-items: center;
  gap: 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  color: var(--graphite);
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.customer-order-row:hover,
.customer-order-row:focus-visible {
  background: var(--cyan-pale);
  outline: none;
}

.customer-order-identity {
  min-width: 0;
}

.customer-order-identity span,
.customer-order-identity strong {
  display: block;
}

.customer-order-identity span {
  color: var(--cyan-dark);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .08em;
}

.customer-order-identity strong {
  margin-top: 4px;
  overflow: hidden;
  font-family: var(--display);
  font-size: 21px;
  font-weight: 900;
  line-height: 1;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.customer-order-date {
  color: var(--muted);
  font-size: 10px;
  text-align: right;
}

.customer-order-value {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 900;
  text-align: right;
  white-space: nowrap;
}

.customer-order-empty {
  min-height: 118px;
  padding: 34px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
}

.customer-kind-mark {
  margin: 16px 0 18px;
}

.customer-kind-mark strong,
.customer-kind-mark span {
  display: block;
}

.customer-kind-mark strong {
  font-family: var(--display);
  font-size: clamp(30px, 3vw, 42px);
  font-weight: 900;
  line-height: .95;
  text-transform: uppercase;
}

.customer-kind-mark span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 10px;
}

@media (max-width: 1100px) {
  .order-detail-layout {
    grid-template-columns: minmax(0, 1.55fr) minmax(280px, .9fr);
    gap: 24px;
  }

  .order-phase-item {
    padding-right: 10px;
    padding-left: 10px;
  }

  .order-phase-item strong {
    font-size: 18px;
  }

  .document-add-sheet {
    padding: 22px 18px 20px;
  }

  .document-add-choice-grid,
  .document-generate-actions {
    grid-template-columns: 1fr;
  }

  .document-add-choice {
    min-height: 145px;
  }

  .document-add-choice strong {
    margin-top: 17px;
  }
}

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

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

  .customer-order-date {
    text-align: left;
  }

  .customer-order-value {
    align-self: end;
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .order-detail-view {
    /* Platz für den fixierten mobilen Menüknopf lassen. */
    padding-top: 72px;
  }

  .order-detail-heading-row,
  .order-current-step {
    align-items: stretch;
    flex-direction: column;
  }

  .order-detail-heading h2 {
    font-size: clamp(40px, 12vw, 56px);
  }

  .order-detail-head-actions {
    display: grid;
    grid-template-columns: 1fr 1.45fr;
  }

  .order-detail-head-actions .outline-button,
  .order-detail-head-actions .primary-button {
    width: 100%;
  }

  .order-phase-rail {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .order-phase-item {
    grid-template-columns: 24px minmax(0, auto) 1fr;
    min-height: 58px;
    align-content: center;
    align-items: center;
    column-gap: 10px;
  }

  .order-phase-item strong,
  .order-phase-item small {
    margin: 0;
  }

  .order-phase-item small {
    justify-self: end;
    text-align: right;
  }

  .order-step-actions {
    justify-content: flex-start;
  }

  .order-detail-layout {
    grid-template-columns: 1fr;
  }

  .order-facts-rail {
    grid-row: 2;
  }

  .order-status-more summary,
  .order-status-manual {
    margin-left: 0;
  }
}

@media (max-width: 520px) {
  .customer-metrics > div {
    min-height: 94px;
    padding: 14px;
  }

  .customer-metrics strong {
    font-size: 27px;
  }

  .customer-detail-head-actions {
    grid-template-columns: 1fr;
  }

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

  .customer-order-row .phase-tag {
    width: max-content;
  }

  .customer-order-date,
  .customer-order-value {
    grid-column: auto;
    grid-row: auto;
    text-align: left;
  }

  .order-detail-document-row {
    align-items: stretch;
    flex-direction: column;
    gap: 0;
    padding-bottom: 10px;
  }

  .order-document-actions {
    align-self: flex-end;
    flex-wrap: wrap;
    justify-content: flex-end;
    margin-top: 8px;
  }

  .order-workflow-caption {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .order-detail-head-actions,
  .order-status-manual,
  .order-date-ledger {
    grid-template-columns: 1fr;
  }

  .order-detail-head-actions {
    gap: 10px;
  }

  .order-workflow {
    padding-top: 18px;
  }

  .order-current-step {
    padding: 14px;
  }

  .order-current-copy strong {
    font-size: 24px;
  }

  .order-step-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .order-step-actions .outline-button,
  .order-step-actions .primary-button {
    width: 100%;
  }

  .order-status-manual label {
    grid-column: auto;
  }

  .order-date-ledger {
    gap: 0;
    background: transparent;
  }

  .order-date-ledger > div {
    min-height: 78px;
    padding-right: 0;
    padding-left: 0;
    border-bottom: 1px solid var(--line);
  }

  .order-section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .order-facts-rail {
    padding: 18px;
  }

  .order-detail-footer .danger-button {
    width: 100%;
  }
}
