:root {
  --bg: #05070a;
  --panel: #0b0f14;
  --panel-strong: #111821;
  --ink: #f4f7fb;
  --muted: #a7b1c0;
  --line: #33404f;
  --primary: #00d9ff;
  --primary-dark: #00a9c8;
  --accent: #ffe600;
  --warning: #ffb000;
  --error: #ff5c5c;
  --shadow: 0 0 0 1px rgba(0, 217, 255, 0.22);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 1px solid var(--line);
  background: #0f151c;
  color: var(--ink);
  border-radius: 0;
  min-height: 32px;
  padding: 0 10px;
  cursor: pointer;
}

button:hover {
  border-color: var(--primary);
  color: #ffffff;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.app-shell {
  height: 100vh;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  min-height: 58px;
  padding: 8px 14px;
  border-bottom: 2px solid var(--line);
  background: #070a0f;
}

.brand-block,
.project-status,
.tool-cluster,
.inline-actions,
.preset-row,
.swatch-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 0;
  background: var(--primary);
  color: #020407;
  font-weight: 800;
}

.eyebrow,
.panel-header p,
.section-title span,
.floating-card span,
.output-strip span,
.drawing-grid article span {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1 {
  margin: 2px 0 0;
  font-size: 16px;
  line-height: 1.2;
}

h2,
h3,
p {
  margin: 0;
}

.primary-button {
  border-color: var(--primary);
  background: var(--primary);
  color: #020407;
  font-weight: 700;
}

.primary-button:hover {
  background: #70edff;
  color: #020407;
}

.primary-button.full {
  width: 100%;
}

.icon-button {
  min-width: 56px;
}

.workspace {
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: clamp(300px, 28vw, 350px) minmax(0, 1fr);
}

.control-panel {
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  border-right: 2px solid var(--line);
  background: var(--panel);
  padding: 12px;
}

.panel-header {
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--panel-strong);
}

.panel-header strong {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 17px;
}

.stepper {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 10px 0;
}

.step-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--muted);
  min-height: 30px;
  font-size: 12px;
}

.step-tab b {
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border-radius: 0;
  background: #192331;
  color: var(--muted);
  font-size: 10px;
}

.step-tab.active,
.view-tabs button.active,
.segmented-control button.active {
  border-color: var(--primary);
  background: #001f2a;
  color: #ffffff;
  font-weight: 800;
}

.step-tab.active b {
  background: var(--primary);
  color: #020407;
}

.step-tab.complete:not(.active),
.product-flow-tabs button.complete:not(.active) {
  border-color: #227484;
  background: #0b1a22;
  color: #d7faff;
}

.step-tab.complete:not(.active) b,
.product-flow-tabs button.complete:not(.active) b {
  background: #123340;
  color: #d7faff;
}

.step-panel {
  grid-row: 3;
  display: none;
  min-height: 0;
  overflow: auto;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--panel-strong);
}

.step-panel.active {
  display: block;
}

.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.section-title h2 {
  font-size: 15px;
}

label {
  display: grid;
  gap: 5px;
  margin-bottom: 10px;
  color: #d8e1ea;
  font-size: 12px;
  font-weight: 700;
}

input,
select {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 7px 9px;
  background: #070b10;
  color: var(--ink);
}

input[type="color"] {
  padding: 3px;
}

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

.client-capture {
  display: grid;
  gap: 7px;
  margin-bottom: 9px;
  padding: 8px;
  border: 1px solid var(--line);
  background: #0a1017;
}

.client-capture label,
.quote-control-grid label {
  min-width: 0;
  margin-bottom: 0;
}

.client-capture input,
.quote-control-grid select {
  min-height: 31px;
  padding: 6px 8px;
}

.client-capture-row,
.quote-control-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.quote-control-grid {
  margin-bottom: 9px;
}

.room-type-block {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
}

.room-type-block span {
  color: #d8e1ea;
  font-size: 12px;
  font-weight: 700;
}

.preset-row,
.inline-actions {
  flex-wrap: wrap;
}

.preset-row button,
.inline-actions button {
  flex: 1;
}

.object-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.object-card {
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 9px;
  background: #0a1017;
}

.object-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.object-card strong {
  font-size: 14px;
}

.object-card .mini-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.object-card label {
  margin-bottom: 0;
  font-size: 11px;
}

.remove-object {
  min-height: 28px;
  padding: 0 8px;
  color: var(--error);
}

.swatch-row {
  flex-wrap: wrap;
}

.swatch-row button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.swatch-row span {
  width: 18px;
  height: 18px;
  border-radius: 0;
  border: 1px solid var(--line);
}

.product-flow-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
  margin-bottom: 10px;
}

.product-flow-tabs button {
  display: grid;
  place-items: center;
  gap: 1px;
  min-height: 42px;
  padding: 5px 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.1;
}

.product-flow-tabs button b {
  color: #879093;
  font-size: 10px;
}

.product-flow-tabs button.active {
  border-color: var(--primary);
  background: #001f2a;
  color: #ffffff;
  font-weight: 800;
}

.product-flow-tabs button.active b {
  color: #ffffff;
}

.product-flow-tabs button.complete::after {
  content: "OK";
  color: var(--primary);
  font-size: 9px;
  font-weight: 900;
}

.product-flow-panel {
  display: none;
}

.product-flow-panel.active {
  display: block;
}

.category-header {
  display: grid;
  gap: 2px;
  margin-bottom: 10px;
  padding: 8px 10px;
  border: 1px solid #28495a;
  border-radius: 0;
  background: #07131b;
}

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

.category-header strong {
  overflow: hidden;
  color: #d8e1ea;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.item-preview-card {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #0a1017;
}

.item-preview-card span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.item-preview-card strong {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.item-preview-card p {
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}

.item-thumb {
  position: relative;
  width: 76px;
  height: 58px;
  overflow: hidden;
  border: 1px solid #4b5968;
  border-radius: 0;
  background: #111821;
}

.item-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.32);
  pointer-events: none;
}

.paint-thumb::before {
  content: "";
  position: absolute;
  right: 9px;
  top: 10px;
  width: 13px;
  height: 32px;
  border-radius: 0;
  background: rgba(31, 36, 38, 0.82);
  box-shadow: -5px -4px 0 rgba(31, 36, 38, 0.82), -18px 2px 0 -4px rgba(255, 255, 255, 0.9);
}

.tile-thumb::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.2) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.2) 1px, transparent 1px);
  background-size: 22px 18px;
}

.cladding-thumb::before {
  content: "";
  position: absolute;
  inset: 8px 8px 7px;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.16);
}

.carpentry-thumb::before {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  top: 10px;
  height: 8px;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.38);
  box-shadow:
    0 15px 0 rgba(255, 255, 255, 0.38),
    0 30px 0 rgba(255, 255, 255, 0.38),
    24px 15px 0 -2px rgba(31, 36, 38, 0.32);
}

.product-card {
  display: grid;
  gap: 4px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid #28495a;
  border-radius: 0;
  background: #07131b;
}

.product-card span {
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.product-card strong {
  font-size: 13px;
}

.product-card p {
  color: #bfd3dc;
  font-size: 12px;
  line-height: 1.35;
}

.form-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.form-actions:has(button + button) {
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
}

.package-status {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.package-status div {
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #0a1017;
}

.package-status span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.package-status strong {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.paint-preview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  gap: 8px 10px;
  align-items: center;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #0a1017;
}

.paint-preview span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.paint-preview strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.paint-preview i {
  display: block;
  width: 34px;
  height: 28px;
  border: 1px solid rgba(0, 0, 0, 0.22);
  border-radius: 0;
}

.product-checklist {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.product-checklist div {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #0a1017;
}

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

.product-checklist strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.sticky-package {
  display: none;
  gap: 8px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid #28495a;
  border-radius: 0;
  background: #07131b;
}

.sticky-package > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sticky-package span {
  color: var(--primary);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.sticky-package strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.sticky-package dl {
  display: grid;
  gap: 5px;
  margin: 0;
}

.sticky-package dl div {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 8px;
}

.sticky-package dt,
.sticky-package dd {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}

.sticky-package dt {
  color: var(--muted);
  font-weight: 800;
}

.sticky-package dd {
  color: var(--ink);
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

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

.check-row input {
  min-height: auto;
}

.canvas-stage {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  background: #05070a;
}

.canvas-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 2px solid var(--line);
  background: #070a0f;
}

.view-tabs {
  display: flex;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}

.viewport {
  min-height: 0;
  position: relative;
  overflow: hidden;
  padding: 12px;
}

.view-panel {
  display: none;
  width: 100%;
  height: 100%;
  position: relative;
}

.view-panel.active {
  display: block;
}

#planCanvas,
#drawingPlan,
#drawingCeiling {
  width: 100%;
  background: #070b10;
  border: 1px solid #445264;
  border-radius: 0;
  box-shadow: var(--shadow);
}

#planCanvas {
  height: 100%;
}

#drawingPlan,
#drawingCeiling {
  height: calc(100% - 42px);
}

.floating-card {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: min(260px, calc(100% - 36px));
  border: 1px solid #445264;
  border-radius: 0;
  padding: 10px;
  background: rgba(7, 10, 15, 0.92);
  box-shadow: var(--shadow);
}

.floating-card strong,
.floating-card small {
  display: block;
  margin-top: 3px;
}

.room-preview {
  position: relative;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  border: 1px solid #445264;
  border-radius: 0;
  background: #070b10;
  perspective: 1100px;
  box-shadow: var(--shadow);
}

.preview-floor,
.preview-ceiling,
.preview-back-wall,
.preview-left-wall,
.preview-right-wall {
  position: absolute;
  transform-style: preserve-3d;
}

.preview-floor {
  left: 12%;
  right: 12%;
  bottom: 5%;
  height: 45%;
  background: linear-gradient(135deg, #b78e5d, #dfc296 42%, #a97d4d);
  transform: rotateX(68deg);
  transform-origin: bottom;
  border: 1px solid rgba(71, 54, 34, 0.25);
}

.preview-ceiling {
  left: 12%;
  right: 12%;
  top: 6%;
  height: 26%;
  background: #faf8f2;
  transform: rotateX(-64deg);
  transform-origin: top;
  border: 1px solid rgba(71, 54, 34, 0.12);
}

.preview-back-wall {
  left: 18%;
  right: 18%;
  top: 15%;
  bottom: 31%;
  background: #f3efe5;
  border: 1px solid rgba(71, 54, 34, 0.15);
}

.preview-left-wall {
  left: 12%;
  top: 15%;
  width: 22%;
  bottom: 18%;
  background: #ece4d5;
  transform: skewY(20deg);
  transform-origin: right;
}

.preview-right-wall {
  right: 12%;
  top: 15%;
  width: 22%;
  bottom: 18%;
  background: #e8dfd0;
  transform: skewY(-20deg);
  transform-origin: left;
}

.preview-window {
  position: absolute;
  right: 12%;
  top: 18%;
  width: 22%;
  height: 42%;
  background: linear-gradient(145deg, #d4edf0, #7fa8b5);
  border: 7px solid #f8f4ea;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);
}

.curtain-left,
.curtain-right {
  position: absolute;
  top: -14px;
  width: 38%;
  height: calc(100% + 72px);
  background: repeating-linear-gradient(90deg, rgba(208, 194, 174, 0.92), rgba(208, 194, 174, 0.92) 7px, rgba(238, 228, 212, 0.92) 8px, rgba(238, 228, 212, 0.92) 15px);
}

.curtain-left {
  left: -32%;
}

.curtain-right {
  right: -32%;
}

.wall-feature {
  position: absolute;
  left: 11%;
  top: 18%;
  width: 34%;
  height: 60%;
  background: repeating-linear-gradient(90deg, #807467, #807467 8px, #9c9185 8px, #9c9185 14px);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.16);
}

.light-grid {
  position: absolute;
  left: 23%;
  right: 23%;
  top: 14%;
  height: 20%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px 32px;
  pointer-events: none;
}

.light-dot {
  width: 14px;
  height: 14px;
  justify-self: center;
  border-radius: 0;
  background: var(--accent);
  box-shadow: 0 0 20px rgba(255, 224, 102, 0.95);
}

.render-result {
  height: 100%;
  min-height: 0;
  display: grid;
  place-items: end start;
  padding: 28px;
  border: 1px solid #445264;
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(12, 19, 20, 0.1), rgba(12, 19, 20, 0.58)),
    radial-gradient(circle at 68% 30%, rgba(255, 241, 194, 0.9), transparent 18%),
    linear-gradient(135deg, #e8dfd1 0 36%, #c5aa84 36% 56%, #63594f 56% 100%);
  box-shadow: var(--shadow);
}

.final-quote-view {
  position: relative;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 10px;
}

.protected-view {
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}

.protected-view::after {
  content: attr(data-watermark);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(0, 217, 255, 0.12);
  font-size: clamp(24px, 4vw, 64px);
  font-weight: 900;
  text-transform: uppercase;
  transform: rotate(-18deg);
  pointer-events: none;
  z-index: 3;
}

.boq-panel {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  border: 1px solid #445264;
  background: #070b10;
  box-shadow: var(--shadow);
}

.boq-header,
.boq-footer {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: #0a1017;
}

.boq-footer {
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.boq-header span,
.boq-footer span {
  display: block;
  color: var(--primary);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.boq-header strong,
.boq-footer strong {
  display: block;
  margin-top: 4px;
  font-size: 15px;
}

.boq-header small {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.boq-list {
  min-height: 0;
  overflow: auto;
}

.boq-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 78px 84px;
  gap: 8px;
  align-items: start;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(68, 82, 100, 0.65);
}

.boq-row strong,
.boq-row span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.boq-row strong {
  display: block;
  white-space: nowrap;
  font-size: 13px;
}

.boq-row small {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.boq-row span {
  color: #d8e1ea;
  text-align: right;
  white-space: nowrap;
  font-size: 12px;
}

.render-result.rendered {
  background:
    linear-gradient(180deg, rgba(11, 17, 18, 0.03), rgba(11, 17, 18, 0.48)),
    radial-gradient(circle at 50% 18%, rgba(255, 246, 205, 0.98), transparent 18%),
    linear-gradient(110deg, #f6f0e4 0 30%, #bca98d 30% 44%, #eee5d6 44% 64%, #6d675d 64% 100%);
}

.render-copy {
  max-width: 390px;
  color: white;
}

.render-copy span {
  display: inline-block;
  margin-bottom: 8px;
  padding: 5px 8px;
  border-radius: 0;
  background: rgba(0, 0, 0, 0.66);
  font-size: 12px;
}

.render-copy strong {
  display: block;
  font-size: 26px;
  line-height: 1.08;
}

.render-copy p {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.5;
}

.drawing-grid {
  height: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: minmax(0, 1fr) 145px;
  gap: 10px;
  overflow: auto;
}

.drawing-grid article {
  min-width: 0;
  min-height: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.drawing-grid article:last-child {
  grid-column: 1 / -1;
}

.drawing-grid h3 {
  margin: 2px 0 8px;
  font-size: 15px;
}

.schedule-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.schedule-item {
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 10px;
  background: #0a1017;
}

.schedule-item strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
}

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

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

.output-strip div {
  min-width: 0;
  padding: 8px 12px;
  background: #0b0f14;
}

.output-strip strong {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

@media (max-width: 1180px), (max-height: 760px) {
  .topbar,
  .canvas-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .project-status,
  .tool-cluster {
    flex-wrap: wrap;
  }
}

@media (max-height: 720px) {
  .sticky-package dl {
    display: none;
  }

  .sticky-package {
    gap: 6px;
    padding: 8px;
  }
}

@media (max-height: 620px) {
  .sticky-package {
    display: none;
  }
}

@media (max-width: 560px) {
  body {
    overflow: hidden;
  }

  .app-shell {
    height: 100vh;
    min-height: 0;
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
  }

  .topbar,
  .canvas-toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .workspace {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(230px, 40vh) minmax(260px, 1fr);
    min-height: 0;
    overflow: hidden;
  }

  .control-panel {
    min-height: 0;
    overflow: hidden;
    max-height: none;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .canvas-stage {
    min-height: 0;
    grid-template-rows: auto minmax(210px, 1fr) auto;
    overflow: hidden;
  }

  .view-tabs,
  .tool-cluster,
  .project-status {
    flex-wrap: wrap;
  }

  .drawing-grid,
  .output-strip {
    grid-template-columns: 1fr;
  }

  .drawing-grid {
    grid-template-rows: repeat(2, minmax(190px, 1fr)) minmax(150px, auto);
  }

  .drawing-grid article:last-child {
    grid-column: auto;
  }

  .final-quote-view {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(220px, 1fr) minmax(240px, 1fr);
  }

  .client-capture-row,
  .quote-control-grid {
    grid-template-columns: 1fr;
  }
}
