:root {
  color-scheme: light;
  --ink: #0f1419;
  --muted: #6b7785;
  --line: #d4d8de;
  --line-strong: #b8bfc7;
  --paper: #eceff3;
  --panel: #ffffff;
  --panel-glass: rgba(255, 255, 255, 0.84);
  --field-glass: rgba(245, 247, 250, 0.86);
  --field: #f5f7fa;
  --accent: #0f766e;
  --accent-dark: #115e59;
  --copper: #6b7785;
  --sage: #e3edec;
  --warning: #fde2d4;
  --shadow: 0 1px 0 rgba(15, 20, 25, 0.03), 0 0 0 1px rgba(15, 20, 25, 0.04);
  --shadow-lift: 0 1px 2px rgba(15, 20, 25, 0.06), 0 0 0 1px rgba(15, 20, 25, 0.05);
  --radius: 5px;
  --radius-sm: 3px;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background-color: var(--paper);
}

.bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  display: block;
}

.app-shell {
  position: relative;
  z-index: 1;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--panel);
  cursor: pointer;
  transition: border-color 0.12s ease, background-color 0.12s ease, color 0.12s ease;
}

button:hover {
  border-color: var(--line-strong);
}

button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 11px;
  color: var(--ink);
  background: var(--field);
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
}

textarea {
  min-height: 120px;
  padding: 10px 11px;
  resize: vertical;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

td {
  font-size: 0.94rem;
}

.app-shell {
  width: min(1540px, calc(100% - 44px));
  margin: 0 auto;
  padding: 18px 0 44px;
}

.app-toolbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(310px, 0.9fr) minmax(420px, 1.2fr) auto;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.brand-lockup {
  display: flex;
  gap: 14px;
  align-items: center;
  min-width: 0;
}

.tool-button {
  padding: 0 14px;
  color: #fff;
  border-color: var(--accent-dark);
  background: var(--accent);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.tool-button:hover {
  border-color: var(--accent-dark);
  background: var(--accent-dark);
}

.toolbar-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

.home-link {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}

.home-link:hover {
  color: var(--accent-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.desktop-update-button {
  min-height: 36px;
  white-space: nowrap;
}

.desktop-update-button[disabled] {
  cursor: wait;
  opacity: 0.72;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(1.1rem, 2vw, 1.55rem);
  line-height: 1.1;
}

.brand-status {
  display: inline-flex;
  align-items: center;
  margin-left: 0.35rem;
  border: 1px solid rgba(14, 116, 144, 0.32);
  border-radius: 999px;
  padding: 0.2rem 0.48rem;
  color: var(--accent-dark);
  background: rgba(14, 165, 233, 0.1);
  font-size: 0.58em;
  font-weight: 750;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  vertical-align: 0.16em;
}

h2 {
  font-size: 1.35rem;
}

h3 {
  font-size: 1.05rem;
}

.stage-tabs {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.tab {
  font-weight: 550;
  letter-spacing: 0.005em;
}

.tab.active {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}

.save-pill {
  justify-self: end;
  min-width: 112px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 12px;
  color: var(--muted);
  background: var(--field);
  font-size: 0.8rem;
  letter-spacing: 0.01em;
  text-align: center;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

#cutlistView.active {
  display: grid;
  gap: 18px;
}

.stage-grid,
.products-grid {
  display: grid;
  grid-template-columns: minmax(330px, 0.8fr) minmax(0, 1.45fr);
  gap: 18px;
}

.settings-grid {
  grid-template-columns: minmax(0, 1fr);
}

.room-grid {
  grid-template-columns: 300px minmax(0, 1fr) 320px;
}

.room-library-panel {
  align-self: start;
  position: sticky;
  top: 88px;
}

.room-library-panel .room-library-empty {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.room-library-grid {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  max-height: calc(100vh - 220px);
  overflow-y: auto;
  padding-right: 4px;
}

.room-library-grid .appliance-card {
  grid-template-columns: 64px minmax(0, 1fr);
}

.room-tools button.active-tool {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}

.room-commandbar {
  display: grid;
  grid-template-columns: minmax(420px, 0.95fr) minmax(0, 0.8fr);
  gap: 14px;
  align-items: end;
  margin-bottom: 14px;
  padding: 12px;
}

.room-picker {
  display: grid;
  grid-template-columns: 1.1fr minmax(180px, 1fr) 160px 118px;
  gap: 10px;
  align-items: end;
}

.add-room-button {
  border-color: #c98a62;
  color: #713d20;
  background: #f7e4d6;
  font-weight: 850;
}

.products-grid {
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 16px;
}

#productsView.active {
  width: min(100%, 1520px);
  margin-inline: auto;
}

.product-library-panel {
  align-self: start;
  padding: 10px;
  background: #f5f7f8;
}

.product-library {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
}

.legacy-door-tool {
  display: none;
}

.product-card {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  width: 100%;
  min-height: 72px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #fbfcfd;
  text-align: left;
}

.product-library-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.product-library-group[open] {
  background: #fbfcfd;
}

.product-library-group-summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 8px;
  color: var(--ink);
  font-size: 0.92rem;
}

.product-library-group-summary::-webkit-details-marker {
  display: none;
}

.product-library-group-summary::before {
  content: ">";
  margin-right: 8px;
  font-size: 0.75rem;
  color: var(--muted);
  transition: transform 0.15s ease;
  display: inline-block;
}

.product-library-group[open] .product-library-group-summary::before {
  transform: rotate(90deg);
}

.product-library-group-summary span {
  color: var(--muted);
  font-size: 0.8rem;
}

.product-card.active {
  border-color: var(--accent);
  background: var(--sage);
}

.cabinet-icon {
  display: grid;
  place-items: stretch;
  width: 54px;
  height: 58px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--field);
}

.product-card.active .cabinet-icon {
  border-color: var(--accent);
  background: #fff;
}

.cabinet-schematic {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.4;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

.cabinet-schematic .cs-body {
  stroke-width: 1.6;
}

.cabinet-schematic .cs-counter {
  stroke-width: 1.2;
}

.cabinet-schematic .cs-fill {
  fill: var(--accent);
  stroke: none;
}

.cabinet-schematic * {
  vector-effect: non-scaling-stroke;
}

/* --- Placed appliances list in the Room sidebar --- */

.room-appliances-section {
  margin-top: 20px;
}

.room-appliances-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.room-appliance-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.room-appliance-thumb {
  width: 48px;
  height: 56px;
  padding: 4px;
}

.room-appliance-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.room-appliance-copy strong {
  font-size: 0.9rem;
}

.room-appliance-copy span {
  color: var(--muted);
  font-size: 0.78rem;
}

.room-appliance-remove {
  width: 26px;
  height: 26px;
  min-height: 0;
  padding: 0;
  font-size: 1.1rem;
  line-height: 1;
  color: var(--muted);
}

.room-appliance-remove:hover {
  color: #8d2f24;
  border-color: #c89a8f;
}

.product-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.product-copy strong {
  font-size: 0.9rem;
}

.product-copy span,
.product-copy em,
.muted-line {
  color: var(--muted);
  font-size: 0.83rem;
  font-style: normal;
}

.product-room-header {
  display: flex;
  gap: 5px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.product-pricing-summary {
  display: grid;
  gap: 2px;
  min-width: 156px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fbfcfd;
  text-align: right;
}

.product-pricing-summary span,
.product-pricing-summary em {
  color: var(--muted);
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 750;
}

.product-pricing-summary strong {
  color: var(--accent-dark);
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
}

.product-tool-layout {
  grid-template-columns: minmax(560px, 1fr) minmax(292px, 308px);
  align-items: start;
  gap: 14px;
}

.product-room-stage {
  min-width: 0;
}

.product-secondary-section {
  display: none;
}

.product-tool-layout > section:not(.product-room-stage):not(.cabinet-editor) {
  grid-column: 1 / -1;
}

.product-selected {
  display: grid;
  gap: 6px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(251, 252, 253, 0.88);
}

.product-selected strong {
  font-size: 1rem;
}

.product-selected span {
  color: var(--muted);
  font-size: 0.84rem;
}

.product-placement-warnings {
  display: grid;
  gap: 4px;
  border: 1px solid #dc9b79;
  border-radius: 6px;
  padding: 8px;
  background: var(--warning);
  color: #8a321c;
  font-size: 0.82rem;
  font-weight: 750;
}

.product-placement-warnings[hidden] {
  display: none;
}

.product-placement-warnings span {
  color: inherit;
}

.product-selected button {
  min-height: 34px;
  margin-top: 4px;
  padding: 0 12px;
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
  font-weight: 850;
}

.product-selected button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.product-selected-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.product-selected-actions button {
  flex: 0 0 auto;
  margin-top: 4px;
}

.product-selected-actions #openProductEditor {
  flex: 1 1 124px;
}

#deleteSelectedCabinet,
#deleteSelectedCabinetTop {
  border-color: #c89a8f;
  color: #8d2f24;
  background: #fff5f4;
}

.room-toolbar {
  display: flex;
  gap: 4px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  padding: 8px;
  background: rgba(249, 251, 252, 0.86);
}

.room-toolbar button {
  min-height: 30px;
  padding: 0 10px;
  font-size: 0.83rem;
  font-weight: 850;
  white-space: nowrap;
}

.room-toolbar .active {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}

.product-room-preview {
  display: block;
  width: 100%;
  height: clamp(360px, 48vh, 540px);
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 0 0 8px 8px;
  background: var(--field);
  touch-action: none;
  cursor: default;
}

.product-room-preview .canvas-bg {
  fill: var(--field);
}

.product-room-preview .canvas-grid {
  fill: url("#productGridPattern");
}

.product-room-preview.is-panning {
  cursor: grabbing;
}

.product-room-preview.is-3d {
  cursor: grab;
}

.product-room-preview.is-orbiting {
  cursor: grabbing;
}

.product-room-preview.is-topdown {
  cursor: default;
}

.product-room-preview.is-pulling-3d {
  cursor: ns-resize;
}

.product-room-preview.is-3d .canvas-grid {
  opacity: 0.42;
}

.product-room-preview.is-3d .product-ortho-cabinet {
  cursor: grab;
}

.product-preview-wall {
  stroke: #2d3841;
  stroke-width: 8;
  stroke-linecap: square;
}

.product-preview-wall.island-line {
  stroke: var(--accent);
  stroke-width: 5;
  stroke-dasharray: 14 8;
}

.wall-back-dimension {
  stroke: #87939b;
  stroke-width: 1.4;
  stroke-dasharray: 5 5;
}

.product-dimension-lane {
  fill: none;
  stroke: rgba(83, 98, 110, 0.52);
  stroke-width: 1.2;
  stroke-dasharray: 5 5;
  pointer-events: none;
}

.product-dimension-lane.attachment-run {
  stroke-opacity: 0.34;
}

.product-dimension-lane.attachment-run.segment {
  stroke: rgba(32, 132, 123, 0.62);
  stroke-opacity: 1;
}

.product-dimension-lane.cabinet-run {
  stroke: rgba(154, 111, 63, 0.58);
}

.product-dimension-lane.cabinet-run.segment {
  stroke-opacity: 0.9;
}

.product-dimension-lane.top-cabinet-run {
  stroke: rgba(98, 115, 134, 0.56);
}

.product-dimension-lane.top-cabinet-run.segment {
  stroke-opacity: 0.9;
}

.product-dimension-tick {
  stroke: rgba(83, 98, 110, 0.58);
  stroke-width: 1.2;
  pointer-events: none;
}

.product-dimension-tick.attachment-run {
  stroke: rgba(32, 132, 123, 0.7);
  stroke-opacity: 1;
}

.product-dimension-tick.cabinet-run {
  stroke: rgba(154, 111, 63, 0.7);
}

.product-dimension-tick.top-cabinet-run {
  stroke: rgba(98, 115, 134, 0.76);
}

.wall-dimension-label {
  fill: #53626e;
  font-size: 13px;
  font-weight: 850;
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 4px;
}

.wall-dimension-label.cabinet-run {
  fill: #6d4b2a;
}

.wall-dimension-label.top-cabinet-run {
  fill: #445568;
}

.wall-dimension-label.attachment-run {
  fill: #176f67;
}

.build-style-status {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  gap: 7px;
  min-height: 22px;
}

.build-style-dot {
  width: 12px;
  height: 12px;
  border: 1px solid rgba(20, 26, 31, 0.18);
  border-radius: 999px;
  background: var(--build-style-color);
  flex: 0 0 auto;
}

.settings-picker-form {
  display: grid;
  gap: 16px;
}

.settings-workflow-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.settings-workflow-tabs button {
  min-height: 38px;
  font-weight: 800;
}

.settings-workflow-tabs button.active {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}

.settings-picker-section {
  display: grid;
  gap: 10px;
}

.settings-picker-section[hidden] {
  display: none;
}

.settings-build-layout {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(360px, 0.92fr);
  gap: 18px;
  align-items: stretch;
}

.settings-build-fields {
  display: grid;
  gap: 10px;
  align-content: start;
}

.settings-picker-section .setup-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hardware-guide-panel {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #f7fbfa;
  color: var(--ink);
  font-size: 0.86rem;
  line-height: 1.35;
}

.hardware-guide-panel:empty {
  display: none;
}

.hardware-guide-panel span {
  color: var(--muted);
}

.hardware-guide-panel b {
  color: var(--ink);
}

.overlay-family-note {
  margin: -2px 0 0;
  min-height: 1.2em;
  line-height: 1.35;
}

.overlay-family-note strong {
  color: var(--ink);
}

.window-top-size-control {
  display: grid;
  gap: 8px;
  align-content: end;
}

.window-top-size-control button {
  min-height: 36px;
  font-weight: 800;
}

.window-top-size-control button.active {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}

.face-frame-settings {
  display: grid;
  gap: 10px;
}

.face-frame-settings[hidden] {
  display: none;
}

.face-frame-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.settings-disclosure {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
  overflow: hidden;
}

.settings-disclosure + .settings-disclosure,
.settings-disclosure + .face-frame-settings {
  margin-top: 10px;
}

.settings-disclosure > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 14px;
  align-items: center;
  min-height: 48px;
  padding: 9px 12px;
  cursor: pointer;
  list-style: none;
}

.settings-disclosure > summary::-webkit-details-marker {
  display: none;
}

.settings-disclosure > summary::after {
  content: "+";
  grid-column: 2;
  grid-row: 1 / span 2;
  color: var(--accent-dark);
  font-size: 1.2rem;
  font-weight: 900;
}

.settings-disclosure[open] > summary::after {
  content: "−";
}

.settings-disclosure > summary span {
  color: var(--ink);
  font-weight: 900;
}

.settings-disclosure > summary small {
  color: var(--muted);
  font-size: 0.76rem;
}

.settings-disclosure-body {
  border-top: 1px solid var(--line);
  padding: 12px;
}

.settings-example-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  min-height: 330px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(239, 246, 248, 0.8)),
    var(--field);
}

.settings-example-copy {
  display: grid;
  gap: 3px;
}

.settings-example-copy h3 {
  font-size: 1rem;
}

.settings-example-copy p:last-child {
  margin: 0;
  min-height: 18px;
}

.settings-example-svg {
  width: 100%;
  min-height: 250px;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.settings-example-svg.is-spinning {
  cursor: grabbing;
}

.settings-example-shadow {
  fill: rgba(48, 62, 68, 0.1);
}

.settings-example-floor {
  stroke: rgba(76, 90, 99, 0.24);
  stroke-width: 1;
  stroke-dasharray: 6 5;
}

.settings-example-case {
  fill: color-mix(in srgb, var(--build-style-color) 13%, #f8fbfb);
  stroke: color-mix(in srgb, var(--build-style-color) 72%, #1d2a2e);
  stroke-width: 2;
}

.settings-example-side {
  fill: color-mix(in srgb, var(--build-style-color) 20%, #cbdada);
  stroke: color-mix(in srgb, var(--build-style-color) 60%, #1d2a2e);
  stroke-width: 1.4;
}

.settings-example-top {
  fill: url(#settingsExampleTop);
  stroke: color-mix(in srgb, var(--build-style-color) 55%, #1d2a2e);
  stroke-width: 1.4;
}

.settings-example-frame,
.settings-example-frameless {
  fill: none;
  stroke: var(--build-style-color);
  stroke-width: 6;
}

.settings-example-frameless {
  stroke-width: 3;
}

.settings-example-rail {
  stroke: var(--build-style-color);
  stroke-width: 5;
  stroke-linecap: round;
}

.settings-example-frame-piece {
  fill: color-mix(in srgb, var(--build-style-color) 86%, #fff);
  stroke: color-mix(in srgb, var(--build-style-color) 72%, #142126);
  stroke-width: 1.4;
}

.settings-example-face-wire,
.settings-example-face-wire-detail {
  fill: none;
  stroke: var(--build-style-color);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.settings-example-face-wire-frameless {
  stroke-width: 1.8;
}

.settings-example-frame-outline {
  fill: none;
  stroke: color-mix(in srgb, var(--build-style-color) 62%, #142126);
  stroke-width: 1.2;
  pointer-events: none;
}

.settings-example-door-wire {
  fill: rgba(255, 255, 255, 0.28);
  stroke: var(--build-style-color);
  stroke-width: 2.4;
  stroke-linejoin: round;
  pointer-events: none;
}

.settings-example-door-wire-inset {
  fill: rgba(255, 255, 255, 0.12);
  stroke-width: 2;
}

.settings-example-door-wire-overlay {
  fill: rgba(255, 255, 255, 0.54);
  filter: drop-shadow(0 3px 4px rgba(31, 45, 52, 0.18));
}

.settings-example-door-wire-panel {
  fill: none;
  stroke: color-mix(in srgb, var(--build-style-color) 72%, #263840);
  stroke-width: 1.6;
  pointer-events: none;
}

.settings-example-door rect:first-child {
  fill: none;
}

.settings-example-door-panel {
  fill: none;
  stroke: color-mix(in srgb, var(--build-style-color) 72%, #263840);
  stroke-width: 1.5;
}

.settings-example-dimension {
  stroke: #1f766f;
  stroke-width: 2;
  stroke-linecap: round;
}

.settings-example-measure {
  fill: #164d49;
  font-size: 18px;
  font-weight: 800;
  dominant-baseline: middle;
}

.settings-cutting-grid {
  display: grid;
  grid-template-columns: minmax(190px, 0.7fr) minmax(240px, 1fr);
  gap: 12px;
  align-items: end;
}

.settings-cutting-grid select:disabled {
  color: var(--muted);
  background: color-mix(in srgb, var(--field) 78%, #d5dde5);
  cursor: not-allowed;
}

.door-cutting-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  align-items: end;
}

.door-cutting-actions [hidden] {
  display: none !important;
}

.door-cutting-actions.has-workspace.has-cnc {
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 0.42fr);
}

.door-cutting-actions.workspace-only {
  grid-template-columns: minmax(180px, 0.42fr);
  justify-content: start;
}

.door-workspace-button {
  min-height: 36px;
  align-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1px;
  padding: 4px 12px;
  border-color: var(--accent-dark);
  background: var(--accent);
  color: #fff;
  font-weight: 850;
}

.door-workspace-button small {
  color: color-mix(in srgb, #fff 72%, var(--accent-dark));
  font-size: 0.68rem;
  line-height: 1;
}

.door-workspace-dialog {
  width: min(1120px, calc(100vw - 28px));
  border: 0;
  border-radius: 10px;
  padding: 0;
  background: transparent;
}

.door-workspace-dialog::backdrop {
  background: rgba(20, 26, 31, 0.42);
}

.door-workspace-shell {
  display: grid;
  gap: 14px;
  max-height: calc(100vh - 32px);
  overflow: auto;
}

.door-workspace-layout {
  display: grid;
  grid-template-columns: minmax(245px, 0.78fr) minmax(360px, 1fr) minmax(250px, 0.72fr);
  gap: 12px;
  align-items: start;
}

.door-workspace-panel,
.door-workspace-preview {
  box-sizing: border-box;
  min-width: 0;
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  background: color-mix(in srgb, var(--panel) 84%, #fff);
}

.door-workspace-left,
.door-workspace-right {
  align-content: start;
}

.door-workspace-preview {
  align-content: start;
  min-width: 0;
}

.door-workspace-group {
  display: grid;
  gap: 8px;
}

.door-workspace-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.door-workspace-wide {
  grid-column: 1 / -1;
}

.door-workspace-size-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.door-workspace-size-grid label,
.door-workspace-grid label,
.door-workspace-group > label {
  min-width: 0;
}

.door-workspace-check {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 34px;
  align-self: end;
  border-radius: 6px;
  padding-inline: 10px;
}

.door-workspace-check span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.door-workspace-option-list {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.door-workspace-option-list .door-workspace-check {
  justify-content: flex-start;
}

.door-workspace-inline-number {
  flex: 0 1 76px;
  width: min(76px, 45%);
  min-width: 0;
  min-height: 30px;
  margin-left: auto;
  padding: 4px 8px;
}

.door-workspace-sliders {
  display: grid;
  gap: 8px;
}

.door-workspace-sliders label {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.door-workspace-preview svg {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #5b5656;
  display: block;
}

.door-workspace-preview dl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 12px;
  margin: 0;
  font-size: 0.86rem;
}

.door-workspace-preview dt {
  color: var(--muted);
}

.door-workspace-preview dd {
  margin: 0;
  font-weight: 800;
  text-align: right;
}

.door-workspace-hardware-panel {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  background: #fff;
}

.door-workspace-hardware-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.door-workspace-hardware-head strong {
  color: var(--accent-dark);
  font-size: 0.78rem;
}

.door-workspace-hardware-grid {
  display: grid;
  gap: 8px;
}

.door-workspace-hardware-card {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  background: #f8faf9;
}

.door-workspace-hardware-card h3 {
  margin: 0;
  font-size: 0.92rem;
}

.door-workspace-hardware-fields {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) minmax(100px, 0.85fr) minmax(80px, 0.55fr);
  gap: 8px;
}

.door-workspace-hardware-fields label {
  min-width: 0;
}

.door-workspace-hardware-fields input,
.door-workspace-hardware-fields select {
  min-height: 32px;
  padding: 0 8px;
}

.settings-scope-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.settings-scope-actions button {
  min-height: 36px;
  font-weight: 800;
}

.settings-status {
  min-height: 18px;
}

.wall-dimension-label.on-line {
  font-size: 12px;
  stroke-width: 5px;
}

.placed-cabinet {
  fill: rgba(238, 214, 173, 0.86);
  stroke: #9a6f3f;
  stroke-width: 2;
  cursor: pointer;
}

.placed-cabinet.has-build-style {
  fill: color-mix(in srgb, var(--cabinet-build-style-color) 28%, #fff);
  stroke: var(--cabinet-build-style-color);
}

.placed-cabinet.upper-cabinet {
  fill: rgba(230, 236, 242, 0.72);
  stroke: #627386;
  stroke-dasharray: 7 4;
}

.placed-cabinet.has-build-style.upper-cabinet {
  fill: color-mix(in srgb, var(--cabinet-build-style-color) 18%, #fff);
  stroke: var(--cabinet-build-style-color);
}

.placed-cabinet.overlap-warning {
  fill: rgba(253, 226, 212, 0.9);
  stroke: #b44727;
  stroke-width: 4;
}

.placed-appliance.overlap-warning {
  fill: rgba(253, 226, 212, 0.9);
  stroke: #b44727;
  stroke-width: 4;
}

.placed-appliance.overlap-warning.selected {
  fill: rgba(253, 226, 212, 0.94);
  stroke: #b44727;
  stroke-width: 5;
}

.cabinet-tab {
  fill: #f7fff9;
  stroke: #2c9d69;
  stroke-width: 3;
  cursor: ew-resize;
}

.cabinet-tab.move {
  fill: #e7f1ff;
  stroke: #356aa0;
  cursor: move;
}

.cabinet-tab-grip {
  stroke: #2f7d55;
  stroke-width: 2;
  pointer-events: none;
}

.cabinet-snap-guide {
  stroke: #2c9d69;
  stroke-width: 3;
  stroke-dasharray: 6 5;
  pointer-events: none;
}

.placed-cabinet.selected {
  fill: rgba(226, 235, 229, 0.95);
  stroke: var(--accent);
  stroke-width: 4;
}

.placed-cabinet.overlap-warning.selected {
  fill: rgba(253, 226, 212, 0.94);
  stroke: #b44727;
  stroke-width: 5;
}

.product-ortho-cabinet {
  fill: rgba(232, 202, 139, 0.86);
  stroke: #8d663b;
  stroke-width: 2;
  cursor: pointer;
}

.product-ortho-cabinet.selected {
  fill: rgba(226, 235, 229, 0.95);
  stroke: var(--accent);
  stroke-width: 4;
}

.cabinet-face-line {
  fill: none;
  stroke: rgba(95, 68, 38, 0.78);
  stroke-width: 1.6;
  pointer-events: none;
}

.cabinet-face-line.drawer {
  stroke-dasharray: none;
}

.cabinet-face-line.door-swing {
  stroke: rgba(95, 68, 38, 0.62);
  stroke-width: 1.3;
}

.cabinet-label {
  fill: #1f2a35;
  font-size: 13px;
  font-weight: 850;
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 4px;
  pointer-events: none;
}

.product-render-floor {
  fill: rgba(220, 226, 226, 0.46);
  stroke: rgba(83, 98, 110, 0.18);
  stroke-width: 1.2;
}

.product-render-wall-panel {
  fill: rgba(47, 56, 65, 0.2);
  stroke: rgba(47, 56, 65, 0.55);
  stroke-width: 1.5;
}

.product-render-cabinet-side,
.product-render-cabinet-front,
.product-render-cabinet-top {
  stroke: #8d663b;
  stroke-width: 1.5;
}

.product-render-cabinet-side {
  fill: #d3ad73;
}

.product-render-cabinet-front {
  fill: #e9c987;
}

.product-render-cabinet-top {
  fill: #f1dca7;
}

.product-render-cabinet-side.selected,
.product-render-cabinet-front.selected,
.product-render-cabinet-top.selected {
  stroke: var(--accent);
  stroke-width: 2.6;
}

.product-render-label {
  fill: #1f2a35;
  font-size: 14px;
  font-weight: 900;
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 5px;
  pointer-events: none;
}

.placed-appliance {
  fill: rgba(216, 222, 227, 0.85);
  stroke: var(--accent);
  stroke-width: 1.5;
  cursor: move;
}

.placed-appliance.selected {
  fill: rgba(229, 238, 241, 0.95);
  stroke-width: 4;
}

.appliance-move-tab {
  stroke: var(--accent);
}

.appliance-label {
  fill: var(--accent);
  font-size: 11px;
  font-weight: 700;
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 4px;
  pointer-events: none;
}

.placed-window {
  fill: rgba(189, 224, 236, 0.72);
  stroke: #1d7a91;
  stroke-width: 2;
  cursor: move;
}

.placed-window-trim {
  fill: rgba(255, 255, 255, 0.82);
  stroke: rgba(29, 122, 145, 0.5);
  stroke-width: 1.5;
  pointer-events: none;
}

.placed-window.selected {
  fill: rgba(214, 239, 247, 0.92);
  stroke: var(--accent);
  stroke-width: 4;
}

.placed-door {
  fill: rgba(230, 216, 190, 0.86);
  stroke: #8b5e2f;
  stroke-width: 2;
  cursor: move;
}

.placed-door.selected {
  fill: rgba(242, 229, 204, 0.96);
  stroke: var(--accent);
  stroke-width: 4;
}

.placed-door-leaf {
  stroke: #7a4f25;
  stroke-width: 2.4;
  stroke-linecap: round;
  pointer-events: none;
}

.placed-door-swing {
  fill: none;
  stroke: rgba(122, 79, 37, 0.55);
  stroke-width: 1.6;
  stroke-dasharray: 5 4;
  pointer-events: none;
}

.window-move-tab {
  stroke: #1d7a91;
}

.window-label {
  fill: #15596b;
  font-size: 11px;
  font-weight: 800;
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 4px;
  pointer-events: none;
}

.door-label {
  fill: #6f461f;
  font-size: 11px;
  font-weight: 800;
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 4px;
  pointer-events: none;
}

.render-stage {
  display: grid;
  gap: 14px;
  min-height: calc(100vh - 180px);
}

.render-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 18px;
  align-items: end;
  border: 1px solid rgba(216, 222, 223, 0.95);
  border-radius: 8px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.render-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.render-controls button {
  padding: 0 14px;
}

.render-controls .active-tool {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}

.render-scene {
  display: block;
  width: 100%;
  min-height: min(760px, calc(100vh - 300px));
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, #eef3f2 0%, #f8faf8 42%, #e7e2d8 100%);
  box-shadow: var(--shadow);
  cursor: grab;
  touch-action: none;
  user-select: none;
}

@media (max-width: 960px) {
  .render-toolbar {
    grid-template-columns: 1fr;
    align-items: start;
  }
}

.render-scene:active {
  cursor: grabbing;
}

.render-floor {
  fill: #6f716f;
  opacity: 0.58;
}

.render-wall-panel {
  fill: #c8cec8;
  stroke: #747c78;
  stroke-width: 2;
  opacity: 0.88;
}

.render-wall-plan {
  stroke: #2d3841;
  stroke-width: 8;
  stroke-linecap: square;
}

.render-cabinet-side {
  fill: #d4b77a;
  stroke: #87683f;
  stroke-width: 2;
}

.render-cabinet-face {
  fill: #ead3a5;
  stroke: #87683f;
  stroke-width: 2;
}

.render-cabinet-top {
  fill: #cda768;
  stroke: #87683f;
  stroke-width: 2;
}

.render-board-side {
  fill: #eee8d7;
  stroke: #82613b;
  stroke-width: 1.8;
}

.render-board-face {
  fill: #f6f1e4;
  stroke: #82613b;
  stroke-width: 1.8;
}

.render-board-top {
  fill: #ded5bd;
  stroke: #82613b;
  stroke-width: 1.8;
}

.render-carcass-back .render-board-face,
.render-carcass-back.render-board-face {
  fill: #e5ddc9;
}

.render-carcass-toe.render-board-face,
.render-carcass-toe.render-board-side {
  fill: #b88a57;
}

.render-carcass-stretcher.render-board-top,
.render-carcass-top.render-board-top,
.render-carcass-bottom.render-board-top {
  fill: #e2d8bf;
}

.render-face-frame.render-board-face,
.render-face-frame.render-board-side,
.render-face-frame.render-board-top {
  fill: #bd8a52;
  stroke: #654625;
}

.render-door-frame.render-board-face,
.render-door-frame.render-board-side,
.render-door-frame.render-board-top {
  fill: #d0b06e;
  stroke: #72542e;
}

.render-door-panel.render-board-face,
.render-door-panel.render-board-side,
.render-door-panel.render-board-top {
  fill: #ead8ad;
  stroke: #72542e;
}

.render-label {
  fill: #23303a;
  font-size: 15px;
  font-weight: 850;
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 5px;
}

/* --- Appliance 3D render --- */

.render-appliance-side {
  fill: #c4ccd2;
  stroke: #6e7780;
  stroke-width: 1.4;
}

.render-appliance-face {
  fill: #d8dee3;
  stroke: #6e7780;
  stroke-width: 1.4;
}

.render-appliance-top {
  fill: #b6bdc3;
  stroke: #6e7780;
  stroke-width: 1.4;
}

.render-appliance-detail.render-appliance-side,
.render-appliance-detail.render-appliance-face,
.render-appliance-detail.render-appliance-top {
  fill: #2c333a;
  stroke: #1a1f24;
  stroke-width: 1;
}

.render-appliance-cooktop.render-appliance-top,
.render-appliance-cooktop.render-appliance-side,
.render-appliance-cooktop.render-appliance-face {
  fill: #1c1f23;
  stroke: #0a0d10;
  stroke-width: 1;
}

.render-appliance-handle.render-appliance-side,
.render-appliance-handle.render-appliance-face,
.render-appliance-handle.render-appliance-top {
  fill: #e8edf0;
  stroke: #828a91;
  stroke-width: 0.8;
}

.render-appliance-window.render-appliance-side,
.render-appliance-window.render-appliance-face,
.render-appliance-window.render-appliance-top {
  fill: #14181d;
  stroke: #2c333a;
  stroke-width: 1;
}

.render-appliance-label {
  fill: #1a2530;
}

.render-window-glass {
  fill: rgba(119, 190, 214, 0.56);
  stroke: #236a80;
  stroke-width: 1.3;
}

.render-door-opening {
  fill: rgba(88, 72, 58, 0.46);
  stroke: #7b5836;
  stroke-width: 1.8;
}

.render-door-leaf {
  fill: #cda66c;
  stroke: #6d4724;
  stroke-width: 1.6;
}

.render-opening-label {
  fill: #4f3826;
}

.render-window-plan {
  stroke: #1d7a91;
  stroke-width: 5;
  stroke-linecap: square;
}

.cabinet-editor {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(245, 247, 248, 0.84);
  backdrop-filter: blur(8px);
}

.cabinet-editor .compact-heading {
  margin: 0 0 10px;
}

.cabinet-readout-stack {
  display: grid;
  gap: 8px;
  max-height: calc(100vh - 190px);
  overflow-y: auto;
  padding-right: 2px;
}

.cabinet-readout-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: rgba(251, 252, 253, 0.88);
}

.cabinet-editor.is-empty .cabinet-readout-card {
  opacity: 0.62;
}

.cabinet-readout-card.corner-footprint-card {
  border-color: #9fc7bd;
  background: rgba(240, 249, 246, 0.92);
}

.cabinet-readout-disclosure {
  padding: 0;
  overflow: hidden;
}

.cabinet-readout-disclosure.is-missing {
  border-color: #c08a2c;
  background: linear-gradient(180deg, #f4dfa8 0%, #f4dfa8 36px, rgba(252, 247, 233, 0.95) 36px, rgba(252, 247, 233, 0.95) 100%);
}

.cabinet-readout-disclosure.is-following {
  border-color: #8ea77c;
  background: linear-gradient(180deg, #e4efd9 0%, #e4efd9 36px, rgba(246, 250, 240, 0.96) 36px, rgba(246, 250, 240, 0.96) 100%);
}

.cabinet-readout-disclosure.is-manual {
  border-color: var(--line);
  background: rgba(251, 252, 253, 0.88);
}

.cabinet-readout-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
  padding: 8px;
  cursor: pointer;
  list-style: none;
}

.cabinet-readout-summary::-webkit-details-marker {
  display: none;
}

.cabinet-readout-summary::after {
  content: "v";
  color: var(--muted);
  font-size: 0.82rem;
  transition: transform 0.16s ease;
}

.cabinet-readout-disclosure[open] .cabinet-readout-summary::after {
  transform: rotate(180deg);
}

.cabinet-readout-summary .eyebrow {
  color: #5a3a06;
  font-weight: 800;
  letter-spacing: 0.14em;
  margin: 0;
}

.cabinet-readout-disclosure.is-following .cabinet-readout-summary .eyebrow {
  color: #43632f;
}

.cabinet-readout-disclosure.is-manual .cabinet-readout-summary .eyebrow {
  color: var(--muted);
}

.cabinet-readout-body {
  padding: 0 8px 8px;
}

.cabinet-readout-summary > strong {
  color: var(--accent-dark);
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}

.pricing-breakdown {
  display: grid;
  gap: 6px;
}

.pricing-breakdown-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 8px;
  align-items: baseline;
  border-top: 1px solid rgba(216, 222, 223, 0.8);
  padding-top: 6px;
}

.pricing-breakdown-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.pricing-breakdown-row span {
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 800;
}

.pricing-breakdown-row em {
  grid-column: 1;
  color: var(--muted);
  font-size: 0.76rem;
  font-style: normal;
}

.pricing-breakdown-row strong {
  grid-column: 2;
  grid-row: 1 / span 2;
  color: var(--text);
  font-size: 0.86rem;
  font-variant-numeric: tabular-nums;
}

.corner-cabinet-note {
  margin: 10px 0 0;
  padding: 6px 8px;
  border-radius: 6px;
  background: #fbeac2;
  border: 1px solid #d9b25a;
  color: #5a3a06;
  font-size: 0.78rem;
  font-weight: 600;
}

.cabinet-corner-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.cabinet-corner-settings-grid label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.cabinet-corner-settings-grid select {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

.cabinet-advanced-interior-toggle {
  justify-content: center;
  width: 100%;
  min-height: 32px;
  margin-top: 2px;
}

.cabinet-shelf-height-button {
  justify-content: center;
  width: 100%;
  min-height: 32px;
  margin-top: 8px;
}

.cabinet-readout-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.cabinet-readout-grid.single {
  grid-template-columns: minmax(0, 1fr);
}

.cabinet-readout-grid label {
  gap: 5px;
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.cabinet-readout-grid input,
.cabinet-readout-grid select {
  min-height: 32px;
  padding: 0 8px;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

.cabinet-readout-checks {
  display: grid;
  gap: 4px;
  margin-top: 8px;
}

.cabinet-readout-checks label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 750;
}

.cabinet-readout-checks input {
  width: 16px;
  height: 16px;
  accent-color: var(--green);
}

.product-editor-dialog {
  width: min(1120px, calc(100vw - 32px));
  border: 0;
  border-radius: 10px;
  padding: 0;
  background: transparent;
}

.product-editor-dialog::backdrop {
  background: rgba(23, 31, 36, 0.42);
  backdrop-filter: blur(2px);
}

.product-editor-shell {
  max-height: min(840px, calc(100vh - 36px));
  overflow: auto;
  padding: 0;
}

.product-editor-top {
  position: sticky;
  top: 0;
  z-index: 3;
  display: grid;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 16px 18px 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 24px rgba(20, 26, 31, 0.08);
}

.product-editor-dialog.parts-active .product-editor-top {
  position: static;
}

.product-editor-head,
.product-render-heading {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.product-editor-top-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 0.64fr);
  gap: 16px;
  align-items: start;
}

.product-identity-form {
  display: grid;
  grid-template-columns: minmax(150px, 0.7fr) minmax(150px, 0.7fr) minmax(260px, 1.5fr);
  gap: 10px;
}

.product-identity-form input {
  min-height: 40px;
}

.product-editor-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
}

.product-editor-tabs button {
  min-width: 116px;
  min-height: 36px;
  padding: 0 14px;
  font-weight: 850;
}

.product-editor-tabs .active {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}

.product-editor-panels {
  padding: 16px 18px 0;
}

.product-editor-panel {
  display: none;
}

.product-editor-panel.active {
  display: block;
}

.product-station-placeholder {
  min-height: 180px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fbfcfd;
}

.product-face-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fbfcfd;
}

.product-face-svg {
  width: 100%;
  max-height: 430px;
  display: block;
}

.product-face-svg .face-carcass-outline {
  fill: #fff;
  stroke: var(--ink, #1f2a24);
  stroke-width: 1.6;
}

.product-face-svg .face-toe-band {
  fill: rgba(31, 42, 36, 0.06);
  stroke: var(--line);
  stroke-width: 1;
}

.product-face-svg .face-toe-label {
  fill: #7a837c;
  font-size: 10px;
  text-anchor: middle;
}

.product-face-svg .face-front-rect {
  fill: rgba(59, 111, 92, 0.08);
  stroke: var(--accent);
  stroke-width: 1.4;
  cursor: move;
  touch-action: none;
}

.product-face-svg .face-front-rect:hover {
  fill: rgba(59, 111, 92, 0.16);
}

.product-face-svg .face-front-rect.selected {
  fill: rgba(59, 111, 92, 0.22);
  stroke-width: 2.4;
}

.product-face-svg .face-front-drag-handle {
  fill: rgba(31, 118, 111, 0.2);
  stroke: rgba(31, 118, 111, 0.6);
  stroke-width: 1;
  cursor: ns-resize;
  touch-action: none;
}

.product-face-svg .face-front-drag-handle:hover {
  fill: rgba(31, 118, 111, 0.34);
}

.product-face-svg .face-empty-opening-rect {
  fill: rgba(238, 120, 54, 0.08);
  stroke: rgba(175, 84, 28, 0.65);
  stroke-width: 1.2;
  stroke-dasharray: 6 4;
  cursor: pointer;
}

.product-face-svg .face-empty-opening-rect:hover,
.product-face-svg .face-empty-opening-rect.selected {
  fill: rgba(238, 120, 54, 0.18);
  stroke-width: 2;
}

.product-face-svg .face-empty-opening-label {
  fill: #8a4318;
  font-size: 10px;
  font-weight: 850;
  text-anchor: middle;
  pointer-events: none;
}

.product-face-svg .face-front-rect.layer-structure,
.product-face-svg .face-front-rect.layer-interior {
  fill: rgba(59, 111, 92, 0.05);
}

.product-face-svg .face-front-split-line {
  stroke: var(--accent);
  stroke-width: 1;
  stroke-dasharray: 4 3;
  pointer-events: none;
}

.product-face-svg .face-front-letter {
  fill: var(--accent-dark);
  font-size: 15px;
  font-weight: 850;
  text-anchor: middle;
  pointer-events: none;
}

.product-face-svg .face-front-meta {
  fill: #4a544d;
  font-size: 10.5px;
  text-anchor: middle;
  pointer-events: none;
}

.product-face-svg .face-divider-rect {
  fill: rgba(185, 126, 43, 0.34);
  stroke: #9a611b;
  stroke-width: 1;
  cursor: pointer;
}

.product-face-svg .face-divider-rect:hover,
.product-face-svg .face-divider-rect.selected {
  fill: rgba(185, 126, 43, 0.58);
  stroke-width: 2;
}

.product-face-svg .face-divider-label {
  fill: #5c3810;
  font-size: 9.5px;
  font-weight: 850;
  text-anchor: middle;
  pointer-events: none;
}

.product-face-svg .face-frame-member-rect {
  fill: rgba(201, 150, 67, 0.32);
  stroke: #8a5c19;
  stroke-width: 1.1;
  cursor: pointer;
}

.product-face-svg .face-frame-member-rect:hover,
.product-face-svg .face-frame-member-rect.selected {
  fill: rgba(201, 150, 67, 0.58);
  stroke-width: 2;
}

.product-face-svg .face-frame-member-label {
  fill: #3f2a0e;
  font-size: 9px;
  font-weight: 900;
  text-anchor: middle;
  pointer-events: none;
}

.product-face-side {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.face-section-heading h4 {
  margin: 2px 0 0;
}

.face-control {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12.5px;
  font-weight: 650;
  color: #4a544d;
}

.face-control input,
.face-control select {
  width: 100%;
}

.face-control-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.face-layer-tabs {
  margin-bottom: 2px;
}

.face-button-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.face-button-row button {
  flex: 1;
  min-width: 0;
}

.face-global-actions {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.face-delete-button {
  width: 100%;
}

.face-editor-note {
  margin: 0;
}

.face-editor-hint {
  margin: 0;
  font-size: 12px;
  color: #7a837c;
}

.face-divider-summary,
.face-frame-member-summary,
.face-interior-list {
  display: grid;
  gap: 6px;
}

.face-divider-summary button,
.face-frame-member-summary button,
.face-interior-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px;
  background: #fff;
}

.face-divider-summary button.active,
.face-frame-member-summary button.active {
  border-color: #1f766f;
  background: #f2faf8;
}

.face-divider-summary span,
.face-divider-summary small,
.face-frame-member-summary span,
.face-frame-member-summary small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.face-interior-row input,
.face-interior-row select {
  width: 100%;
  min-width: 0;
  min-height: 30px;
}

.face-editor-warning {
  margin: 0;
  border: 1px solid #f0c36d;
  border-radius: 8px;
  padding: 7px 9px;
  background: #fff8e8;
  color: #7a4b0e;
  font-size: 12px;
  font-weight: 750;
}

@media (max-width: 900px) {
  .product-face-layout {
    grid-template-columns: 1fr;
  }
}

.product-editor-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.override-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.master-defaults-intro {
  margin: 0 0 18px;
  color: var(--ink-soft, #6a6a6a);
  font-size: 13px;
  line-height: 1.45;
  max-width: 640px;
}

.master-defaults-group {
  margin-bottom: 24px;
}

.master-defaults-group h4 {
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft, #6a6a6a);
  margin: 0 0 10px;
  font-weight: 600;
}

.master-defaults-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.override-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-height: 18px;
  margin-top: 2px;
}

.override-source {
  font-size: 11px;
  letter-spacing: 0.01em;
  color: var(--ink-soft, #6a6a6a);
  font-weight: 500;
}

.override-source.is-override {
  color: var(--accent, #0e6c5a);
}

.override-revert {
  font-size: 11px;
  padding: 2px 8px;
  border: 1px solid var(--line, #d6dcdb);
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
  color: var(--ink, #2b2b2b);
  letter-spacing: 0.01em;
}

.override-revert:hover {
  border-color: var(--accent, #0e6c5a);
  color: var(--accent, #0e6c5a);
}

.product-cabinet-render-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfd;
}

.product-cabinet-render-scene {
  display: block;
  width: 100%;
  min-height: 196px;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, #f6f8f8, #eef2f1);
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.product-cabinet-render-scene:active {
  cursor: grabbing;
}

.product-cabinet-board {
  stroke: #755632;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.product-cabinet-front {
  fill: #f6f1e4;
}

.product-cabinet-side {
  fill: #eee8d7;
}

.product-cabinet-back {
  fill: #e5ddc9;
}

.product-cabinet-board.door-frame {
  fill: #d0b06e;
  stroke: #72542e;
}

.product-cabinet-board.door-panel {
  fill: #ead8ad;
  stroke: #72542e;
}

.product-cabinet-board.selected {
  stroke: var(--accent-dark);
  stroke-width: 3;
}

.product-cabinet-groove {
  fill: rgba(31, 118, 111, 0.34);
  stroke: #17625c;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.product-cabinet-groove.selected {
  fill: rgba(190, 90, 35, 0.42);
  stroke: #a34c1b;
  stroke-width: 2.2;
}

.product-shape-editor {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfd;
}

.product-parts-overview {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.product-parts-workspace {
  display: grid;
  grid-template-columns: minmax(400px, 0.9fr) minmax(0, 1.25fr);
  gap: 16px;
  align-items: start;
}

.product-parts-table-wrap {
  max-height: 590px;
  overflow: auto;
}

.product-parts-table,
.product-parts-table tbody {
  display: block;
  min-width: 0;
  width: 100%;
}

.product-parts-table thead {
  display: none;
}

.product-parts-table tbody tr {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 10px;
  border-bottom: 1px solid var(--line);
  padding: 10px;
  width: 100%;
  box-sizing: border-box;
}

.product-parts-table tbody td {
  border: 0;
  min-width: 0;
  padding: 0;
}

.product-parts-table tbody td:nth-child(1) {
  grid-column: 1;
  grid-row: 1;
}

.product-parts-table tbody td:nth-child(2) {
  grid-column: 1 / -1;
  grid-row: 2;
  color: var(--muted);
  text-align: left;
}

.product-parts-table tbody td:nth-child(3) {
  grid-column: 1 / -1;
  grid-row: 3;
}

.product-parts-table tbody td:nth-child(4) {
  grid-column: 2;
  grid-row: 1;
  text-align: right;
}

.product-parts-workspace .product-shape-editor {
  position: sticky;
  top: 12px;
  min-width: 0;
}

.product-parts-table tbody tr {
  cursor: pointer;
}

.product-parts-table tbody tr:hover,
.product-parts-table tbody tr.active {
  background: #e8f3f1;
}

.product-parts-table td:first-child strong,
.product-parts-table td:first-child span {
  display: block;
}

.product-parts-table td:first-child span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.76rem;
}

.product-part-role {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
  text-transform: uppercase;
}

.product-part-material-select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 34px;
}

.product-part-material-source {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.7rem;
}

.product-parts-workspace .product-shape-layout {
  grid-template-columns: minmax(0, 1fr) 210px;
}

.product-shape-picker {
  min-width: 230px;
}

.product-shape-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 12px;
  align-items: start;
}

.product-part-mode-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  overflow-x: auto;
}

.product-part-mode-tabs button {
  min-width: 112px;
  min-height: 36px;
  padding: 0 12px;
}

.product-part-mode-tabs .active {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}

.product-shape-canvas {
  display: block;
  width: 100%;
  min-height: 260px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef1f3;
}

#productShapeGrid path {
  stroke: #d3d9de;
  stroke-width: 1;
}

.product-shape-polygon {
  fill: rgba(255, 255, 255, 0.78);
  stroke: #7274c9;
  stroke-width: 3;
}

.product-shape-vertex {
  cursor: pointer;
  fill: #fff;
  stroke: #155e57;
  stroke-width: 3;
}

.product-shape-vertex.selected {
  fill: #ffe5b6;
  stroke: #b35720;
}

.product-shape-actions {
  display: grid;
  gap: 10px;
}

.product-shape-actions button {
  min-height: 38px;
}

#productShapeActions,
#productOperationActions,
.product-banding-actions,
.product-operation-list {
  display: grid;
  gap: 8px;
}

.product-shape-point-list {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.product-shape-point-note {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.product-shape-point-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 3px 8px;
  align-items: start;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
  color: var(--text);
  text-align: left;
}

.product-shape-point-row.active {
  border-color: #b35720;
  background: #fff4df;
}

.product-shape-point-id {
  grid-row: span 2;
  min-width: 34px;
  color: #155e57;
  font-weight: 800;
}

.product-shape-point-coords {
  font-weight: 800;
}

.product-shape-point-reason {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.25;
}

.product-operation-settings {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfd;
}

.product-operation-settings h4 {
  margin: 0 0 10px;
}

.product-banding-toggle {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
}

.product-banding-edge {
  stroke: #d81f32;
  stroke-linecap: round;
  stroke-width: 7;
  pointer-events: none;
}

.cabinet-delete-button {
  margin-top: 12px;
  width: 100%;
}

.fabrication-shell {
  border: 1px solid rgba(216, 222, 223, 0.95);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.fabrication-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding: 4px 4px 14px;
}

.fabrication-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.fabrication-tabs button {
  min-width: 122px;
  font-weight: 850;
}

.fabrication-tabs .active {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}

.fabrication-grid {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr) 330px;
  gap: 12px;
  margin-top: 12px;
}

.fabrication-panel {
  display: grid;
  gap: 12px;
  align-content: start;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f8faf9;
}

.fabrication-panel[hidden] {
  display: none;
}

.dxf-preview-panel {
  grid-row: span 2;
}

.cabinet-builder-card {
  grid-column: 1 / -1;
  background: #eef7f4;
}

.cabinet-creator-layout {
  display: grid;
  grid-template-columns: minmax(240px, 280px) minmax(0, 1fr) minmax(360px, 410px);
  gap: 10px;
  align-items: stretch;
}

.cabinet-library-panel {
  display: grid;
  gap: 10px;
  align-content: start;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.cabinet-library-content,
.cabinet-left-controls {
  display: grid;
  gap: 10px;
  align-content: start;
  min-width: 0;
}

.cabinet-left-controls {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.cabinet-library-panel strong {
  font-size: 1rem;
}

.cabinet-library-field {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.82rem;
}

.cabinet-library-field select {
  width: 100%;
  min-width: 0;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

.cabinet-library-picker {
  display: grid;
  gap: 10px;
}

.cabinet-library-tab,
.cabinet-library-product {
  border-radius: 8px;
}

.cabinet-library-tab {
  min-height: 34px;
  border-color: var(--accent);
  color: var(--accent-dark);
  background: #eef7f4;
}

.cabinet-library-products {
  display: grid;
  gap: 8px;
}

.cabinet-library-product {
  display: grid;
  gap: 3px;
  min-height: 58px;
  padding: 8px 10px;
  background: #f8faf9;
  text-align: left;
}

.cabinet-library-product.active {
  border-color: var(--accent);
  background: #eef7f4;
}

.cabinet-library-product span {
  color: var(--muted);
  font-size: 0.78rem;
}

.cabinet-save-actions {
  display: grid;
  gap: 8px;
}

.cabinet-save-actions button {
  min-height: 34px;
  border-radius: 8px;
}

.cabinet-save-options {
  display: grid;
  gap: 6px;
}

.cabinet-save-options button {
  display: grid;
  gap: 2px;
  min-height: 48px;
  padding: 7px 9px;
  text-align: left;
  background: #fff;
}

.cabinet-save-options span {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.22;
}

.cabinet-remove-action {
  color: #7f1d1d;
  border-color: #f2b8b5;
  background: #fff5f5;
}

.cabinet-save-status {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.cabinet-cube-card {
  position: relative;
  min-height: 360px;
  border: 3px solid #8795a1;
  border-radius: 8px;
  background:
    linear-gradient(180deg, #e7edf0 0, #e7edf0 28px, #f8faf9 28px, #f8faf9 100%);
  box-shadow:
    0 10px 24px rgba(15, 23, 42, 0.12),
    inset 0 0 0 1px rgba(255, 255, 255, 0.72),
    inset 0 -6px 0 rgba(135, 149, 161, 0.56);
  overflow: hidden;
}

.cabinet-cube-card::before {
  content: "Preview window";
  position: absolute;
  top: 7px;
  left: 12px;
  z-index: 1;
  color: #46525d;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  pointer-events: none;
}

.cabinet-preview-toolbar {
  position: absolute;
  top: 4px;
  right: 8px;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, auto);
  gap: 4px;
  align-items: center;
}

.cabinet-preview-toolbar button {
  min-height: 20px;
  border-radius: 5px;
  padding: 0 7px;
  background: #fff;
  color: #46525d;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
}

.cabinet-preview-toolbar button:hover,
.cabinet-preview-toolbar button:focus {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.cabinet-creator-cube {
  display: block;
  width: 100%;
  min-height: 360px;
  padding-top: 18px;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.cabinet-creator-cube:active {
  cursor: grabbing;
}

.cabinet-cube-face {
  cursor: pointer;
  fill: rgba(127, 138, 145, 0.2);
  stroke: rgba(84, 96, 104, 0.72);
  stroke-linejoin: round;
  stroke-width: 2;
  transition: fill 120ms ease, stroke 120ms ease, stroke-width 120ms ease;
}

.cabinet-cube-face:hover,
.cabinet-cube-face:focus {
  stroke: var(--accent-dark);
  stroke-width: 3;
  outline: none;
}

.cabinet-cube-face.selected {
  fill: rgba(255, 244, 223, 0.34);
  stroke: #b35720;
  stroke-width: 4;
}

.cabinet-cube-hit {
  cursor: pointer;
  fill: rgba(255, 255, 255, 0.01);
  pointer-events: all;
  stroke: transparent;
  stroke-linejoin: round;
  stroke-width: 8;
}

.cabinet-cube-hit:hover,
.cabinet-cube-hit:focus {
  stroke: rgba(48, 124, 113, 0.36);
  outline: none;
}

.cabinet-cube-hit.selected {
  stroke: rgba(179, 87, 32, 0.72);
}

.cabinet-creator-board {
  opacity: 1;
}

.cabinet-creator-interior-board {
  fill: rgba(150, 110, 70, 0.32);
  stroke: rgba(120, 80, 40, 0.7);
  stroke-dasharray: 4 3;
  opacity: 0.85;
}

.cabinet-creator-footprint-face {
  fill: rgba(127, 138, 145, 0.16);
  stroke: rgba(84, 96, 104, 0.72);
}

.cabinet-creator-footprint-face.assigned {
  fill: #eee8d7;
  stroke: #755632;
}

.cabinet-creator-footprint-face.open-face {
  fill: transparent;
  stroke: rgba(84, 96, 104, 0.42);
  stroke-dasharray: 6 5;
}

.cabinet-creator-footprint-wire {
  fill: transparent;
  stroke: rgba(84, 96, 104, 0.62);
  stroke-dasharray: 5 4;
  pointer-events: none;
}

.cabinet-creator-front-piece {
  fill: #d49a68;
  stroke: #965f32;
  stroke-width: 2.2;
}

.cabinet-creator-front-piece.drawer {
  fill: #8fc0b8;
  stroke: #307c71;
}

.cabinet-creator-front-piece.stretcher {
  fill: #a68157;
  stroke: #755632;
}

.cabinet-creator-front-piece-label {
  font-size: 0.72rem;
  fill: var(--text);
}

.cabinet-face-work-outline {
  fill: #fffdf7;
  stroke: rgba(84, 96, 104, 0.72);
  stroke-width: 2.5;
}

.cabinet-face-work-part {
  fill: rgba(211, 180, 119, 0.84);
  stroke: #755632;
  stroke-linejoin: round;
  stroke-width: 2;
}

.cabinet-face-work-part.movable {
  cursor: ns-resize;
  fill: rgba(48, 124, 113, 0.28);
  stroke: var(--accent-dark);
  stroke-width: 3;
}

.cabinet-face-work-label {
  fill: #2f2a20;
  font-size: 13px;
  font-weight: 800;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.86);
  stroke-linejoin: round;
  stroke-width: 3px;
}

.cabinet-face-work-readout {
  fill: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.cabinet-shape-editor-face {
  fill: #fffdf7;
  stroke: rgba(84, 96, 104, 0.72);
  stroke-linejoin: round;
  stroke-width: 2.5;
}

.cabinet-shape-editor-edge-hit {
  cursor: pointer;
  pointer-events: stroke;
  stroke: rgba(255, 255, 255, 0.01);
  stroke-linecap: round;
  stroke-width: 26;
}

.cabinet-shape-editor-edge {
  pointer-events: none;
  stroke: #755632;
  stroke-linecap: round;
  stroke-width: 3;
}

.cabinet-shape-editor-edge.selected {
  stroke: var(--accent-dark);
  stroke-width: 5;
}

.cabinet-shape-editor-edge.locked {
  stroke-dasharray: 8 5;
}

.cabinet-shape-editor-label {
  cursor: pointer;
  pointer-events: all;
  fill: #2f2a20;
  font-size: 12px;
  font-weight: 800;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.9);
  stroke-linejoin: round;
  stroke-width: 4px;
}

.cabinet-shape-editor-point {
  cursor: grab;
  fill: #fff;
  stroke: var(--accent-dark);
  stroke-width: 2.5;
}

.cabinet-shape-editor-point.selected {
  fill: #ffbf6a;
  stroke: #9f4f19;
  stroke-width: 3;
}

.cabinet-dimension {
  cursor: text;
}

.cabinet-dimension-line,
.cabinet-dimension-tick {
  stroke: #4f6268;
  stroke-width: 1.4;
}

.cabinet-dimension-label-box {
  fill: #fff;
  stroke: rgba(79, 98, 104, 0.38);
  stroke-width: 1;
}

.cabinet-dimension-label {
  fill: #263238;
  font-size: 11px;
  font-weight: 800;
  pointer-events: none;
}

.cabinet-piece-editor-shape {
  fill: #fffdf7;
  stroke: rgba(84, 96, 104, 0.72);
  stroke-linejoin: round;
  stroke-width: 2.5;
}

.cabinet-piece-editor-operation {
  stroke: var(--accent-dark);
  stroke-width: 5;
  stroke-linecap: round;
}

.cabinet-piece-editor-operation-label,
.cabinet-piece-editor-point-label,
.cabinet-piece-editor-empty {
  fill: #2f2a20;
  font-size: 11px;
  font-weight: 800;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.86);
  stroke-linejoin: round;
  stroke-width: 3px;
}

.cabinet-piece-editor-point {
  fill: #fff;
  stroke: var(--accent-dark);
  stroke-width: 2;
}

.cabinet-cube-asset {
  cursor: pointer;
  fill: rgba(226, 164, 89, 0.84);
  stroke: #8b4d16;
  stroke-linejoin: round;
  stroke-width: 2.5;
}

.cabinet-cube-asset.selected {
  fill: rgba(255, 184, 98, 0.92);
  stroke: #b35720;
  stroke-width: 4;
}

.cabinet-cube-label {
  fill: #2f2a20;
  font-size: 17px;
  font-weight: 800;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.82);
  stroke-linejoin: round;
  stroke-width: 4px;
}

.cabinet-cube-label.asset-label {
  fill: #1e251f;
  font-size: 15px;
}

.cabinet-face-panel {
  display: grid;
  gap: 6px;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  background: #fff;
  min-width: 0;
  overflow: hidden;
}

.cabinet-face-panel > .eyebrow {
  display: none;
}

.cabinet-face-panel strong {
  font-size: 1rem;
}

.cabinet-face-panel > .muted-line {
  display: none;
}

.cabinet-asset-palette {
  display: none;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.cabinet-asset-card {
  display: grid;
  gap: 3px;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #f8faf9;
  color: var(--text);
  text-align: left;
  cursor: grab;
}

.cabinet-asset-card:active {
  cursor: grabbing;
}

.cabinet-asset-card span {
  color: var(--muted);
  font-size: 0.82rem;
}

.cabinet-assignment-list {
  display: grid;
  gap: 6px;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
}

.cabinet-assignment-summary {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  justify-content: space-between;
  gap: 6px;
  color: var(--muted);
  font-size: 0.76rem;
  min-width: 0;
}

.cabinet-assignment-list strong {
  color: var(--text);
  font-size: 0.82rem;
  text-align: right;
  overflow-wrap: anywhere;
}

.cabinet-parameter-panel {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  margin-top: 2px;
  padding-top: 12px;
  min-width: 0;
}

.cabinet-logic-panel {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.cabinet-logic-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.cabinet-logic-header .cabinet-secondary-action {
  min-height: 30px;
  padding: 0 10px;
  font-size: 0.78rem;
}

.cabinet-logic-method {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cabinet-logic-method button {
  border: 1px solid rgba(48, 124, 113, 0.22);
  border-radius: 999px;
  padding: 4px 8px;
  background: #eef7f4;
  color: var(--accent-dark);
  font-size: 0.74rem;
  font-weight: 700;
}

.cabinet-logic-method button:hover,
.cabinet-logic-method button:focus {
  border-color: rgba(48, 124, 113, 0.55);
  background: #dff0ec;
}

.cabinet-custom-param-list {
  display: grid;
  gap: 6px;
}

.cabinet-custom-param-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.cabinet-custom-param-row button {
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: #f8faf9;
}

.cabinet-custom-param-row button:first-child {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 8px;
  text-align: left;
}

.cabinet-custom-param-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cabinet-custom-param-row strong {
  font-size: 0.78rem;
}

.cabinet-custom-param-row button:last-child {
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.68rem;
}

.cabinet-face-empty,
.cabinet-piece-panel {
  display: grid;
  gap: 8px;
}

.cabinet-piece-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.cabinet-piece-picker.all-pieces {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  margin-top: 2px;
  padding-top: 10px;
}

.cabinet-piece-picker.all-pieces > .eyebrow {
  grid-column: 1 / -1;
}

.cabinet-asset-card.is-cross-face {
  background: #fff;
  border-style: dashed;
}

.cabinet-asset-card.is-create {
  background: #eef7f4;
  border-color: rgba(48, 124, 113, 0.36);
}

.cabinet-mirror-prompt {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(48, 124, 113, 0.32);
  border-radius: 8px;
  padding: 10px;
  background: #eef7f4;
}

.cabinet-mirror-prompt strong {
  font-size: 0.92rem;
}

.cabinet-mirror-prompt p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.cabinet-mirror-prompt div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.cabinet-drawer-rule-prompt {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(48, 124, 113, 0.32);
  border-radius: 8px;
  padding: 10px;
  background: #eef7f4;
}

.cabinet-drawer-rule-prompt strong {
  font-size: 0.92rem;
}

.cabinet-drawer-rule-prompt p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.cabinet-soft-check {
  display: grid;
  gap: 3px;
  border: 1px solid rgba(168, 85, 45, 0.34);
  border-radius: 8px;
  padding: 9px;
  background: #fff7ed;
  color: #7c2d12;
}

.cabinet-soft-check span {
  font-size: 0.8rem;
  line-height: 1.35;
}

.cabinet-drawer-rule-prompt label {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.cabinet-drawer-rule-prompt input {
  min-width: 0;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 8px;
  color: var(--text);
  font: inherit;
}

.cabinet-drawer-rule-prompt div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.cabinet-face-work-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px;
  background: #fff;
}

.cabinet-face-work-summary div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px;
  color: var(--muted);
  font-size: 0.74rem;
}

.cabinet-face-work-summary label {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px;
  align-items: center;
  color: var(--muted);
  font-size: 0.74rem;
}

.cabinet-face-work-summary input {
  width: 18px;
  height: 18px;
}

.cabinet-face-work-summary input[type="text"] {
  width: 100%;
  min-width: 0;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 8px;
  font: inherit;
}

.cabinet-face-work-summary select {
  width: 100%;
  min-width: 0;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

.cabinet-shape-work-summary .cabinet-secondary-action {
  min-height: 28px;
  font-size: 0.76rem;
}

.cabinet-face-work-summary strong {
  color: var(--text);
  font-size: 0.76rem;
}

.cabinet-box-parameters,
.cabinet-side-parameters {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px;
  background: #fff;
}

.cabinet-box-parameters {
  border: 0;
  padding: 0;
  background: transparent;
}

.cabinet-end-setup {
  display: grid;
  gap: 9px;
  padding: 10px;
  margin: 4px 0;
  border: 1px solid #b8d8d2;
  border-radius: 8px;
  background: #f2faf8;
}

.cabinet-end-setup-note,
.cabinet-end-material-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.4;
}

.cabinet-end-material-note {
  color: #27665e;
}

.cabinet-box-parameters .cabinet-piece-toggle {
  min-height: 32px;
}

.cabinet-front-workflow,
.cabinet-front-section,
.cabinet-front-plan-list,
.cabinet-interior-work-list,
.cabinet-structure-divider-list {
  display: grid;
  gap: 6px;
}

.cabinet-front-workflow {
  border-top: 1px solid var(--line);
  padding-top: 6px;
}

.cabinet-front-section {
  border: 1px solid rgba(48, 124, 113, 0.18);
  border-radius: 8px;
  padding: 7px;
  background: #fbfefd;
}

.cabinet-layout-layer-tabs,
.face-layer-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.cabinet-layout-layer-tabs button,
.face-layer-tabs button {
  min-height: 30px;
  border-radius: 7px;
  padding: 0 6px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
}

.cabinet-layout-layer-tabs button.active,
.face-layer-tabs button.active {
  border-color: #1f766f;
  background: #25877c;
  color: #fff;
}

.cabinet-front-preset-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}

.cabinet-front-preset-grid button {
  min-height: 30px;
  border-radius: 7px;
  padding: 0 5px;
  font-size: 0.78rem;
  font-weight: 800;
}

.cabinet-front-plan-row,
.cabinet-interior-work-row,
.cabinet-shelf-pin-status {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px;
  background: #fff;
}

.cabinet-front-plan-row {
  grid-template-columns: minmax(0, 1fr) minmax(72px, auto);
  align-items: stretch;
}

.cabinet-front-plan-title {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) minmax(105px, 0.55fr);
  gap: 5px;
}

.cabinet-front-plan-title input,
.cabinet-front-plan-title select,
.cabinet-front-plan-fields input {
  width: 100%;
  min-width: 0;
  min-height: 0;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 6px;
  background: #fff;
  color: var(--text);
  font-size: 0.84rem;
}

.cabinet-front-plan-fields {
  display: grid;
  grid-column: 1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}

.cabinet-front-plan-fields label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
}

.cabinet-front-stretcher-toggle {
  display: grid;
  grid-column: 1;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px 6px;
  background: #fff;
  color: var(--text);
  font-size: 0.74rem;
  font-weight: 800;
}

.cabinet-front-height-mode {
  display: grid;
  grid-column: 1;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  min-height: 28px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.cabinet-front-height-mode select {
  width: 100%;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 6px;
  background: #fff;
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 800;
}

.cabinet-front-plan-row > .cabinet-secondary-action {
  grid-column: 2;
  grid-row: 2 / span 2;
  align-self: stretch;
  min-height: 0;
  padding: 0 8px;
  font-size: 0.78rem;
}

.cabinet-front-stretcher-toggle input {
  width: 16px;
  height: 16px;
  min-height: 0;
}

.cabinet-interior-work-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  column-gap: 6px;
}

.cabinet-interior-work-row > div,
.cabinet-shelf-pin-status div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.cabinet-interior-work-title input {
  width: 100%;
  min-height: 26px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 3px 6px;
  background: #fff;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 800;
}

.cabinet-interior-work-fields {
  display: grid;
  gap: 2px;
}

.cabinet-interior-work-fields label {
  display: inline-grid;
  grid-template-columns: auto minmax(0, 64px);
  align-items: center;
  gap: 4px;
  font-size: 0.74rem;
  color: var(--muted);
  font-weight: 800;
}

.cabinet-interior-work-fields input {
  min-height: 0;
  min-height: 24px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 5px;
  background: #fff;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 700;
  text-align: right;
}

.cabinet-interior-work-fields select {
  min-height: 24px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 5px;
  background: #fff;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 700;
}

.cabinet-structure-divider-row {
  display: grid;
  grid-template-columns: minmax(76px, auto) minmax(0, 1fr) minmax(84px, 0.45fr);
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px;
  background: #fff;
}

.cabinet-structure-divider-row strong {
  font-size: 0.78rem;
}

.cabinet-structure-divider-row select,
.cabinet-structure-divider-row input {
  width: 100%;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 6px;
  background: #fff;
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 800;
}

.cabinet-structure-divider-row label {
  display: grid;
  gap: 2px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
}

.cabinet-face-frame-member-row {
  border-color: rgba(138, 92, 25, 0.32);
  background: #fffaf0;
}

.cabinet-face-frame-member-row > span {
  color: #7a4f17;
  font-size: 0.72rem;
  font-weight: 850;
}

.cabinet-interior-work-fields small {
  font-size: 0.68rem;
  color: var(--muted);
}

.cabinet-interior-work-row strong,
.cabinet-shelf-pin-status strong {
  font-size: 0.82rem;
}

.cabinet-interior-work-row span,
.cabinet-shelf-pin-status span {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.25;
}

.cabinet-interior-work-row button,
.cabinet-shelf-pin-status button {
  min-height: 28px;
  border-radius: 7px;
  padding: 0 8px;
  font-weight: 800;
}

.cabinet-shelf-pin-status {
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
}

.cabinet-shelf-pin-targets {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}

.cabinet-shelf-pin-targets label,
.cabinet-board-visibility-row,
.cabinet-piece-visibility-toggle {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px 6px;
  background: #fff;
  color: var(--text);
  font-size: 0.74rem;
  font-weight: 800;
}

.cabinet-piece-visibility-toggle {
  grid-template-columns: minmax(0, 1fr) auto;
}

.cabinet-shelf-pin-targets input,
.cabinet-board-visibility-row input,
.cabinet-piece-visibility-toggle input {
  width: 16px;
  height: 16px;
}

.cabinet-board-visibility {
  display: grid;
  gap: 5px;
  border-top: 1px solid var(--line);
  padding-top: 6px;
}

.cabinet-board-visibility-row {
  grid-template-columns: auto minmax(0, 1fr);
}

.cabinet-board-visibility-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cabinet-exploded-distance {
  display: grid;
  grid-template-columns: minmax(68px, auto) minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px 7px;
  background: #fff;
  color: var(--text);
  font-size: 0.74rem;
  font-weight: 800;
}

.cabinet-exploded-distance input {
  width: 100%;
  min-width: 0;
  accent-color: var(--accent);
}

.cabinet-exploded-distance strong {
  color: var(--muted);
  font-size: 0.72rem;
}

.cabinet-shelf-pin-status.review {
  border-color: rgba(202, 138, 4, 0.42);
  background: #fefce8;
  color: #854d0e;
}

.cabinet-shelf-pin-status.confirmed {
  border-color: rgba(48, 124, 113, 0.42);
  background: #eef7f4;
  color: #245f57;
}

.cabinet-shelf-pin-status.none {
  background: #fafafa;
}

.cabinet-face-button.needs-confirmation {
  border-color: rgba(202, 138, 4, 0.48);
  background: #fefce8;
  color: #854d0e;
}

.cabinet-face-button.needs-action {
  border-color: rgba(185, 28, 28, 0.42);
  background: #fff1f2;
  color: #991b1b;
}

.cabinet-guided-actions {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.cabinet-guided-action-card {
  display: grid;
  gap: 6px;
}

.cabinet-guided-action-toggle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  border-radius: 8px;
  padding: 7px 9px;
  text-align: left;
}

.cabinet-guided-action-toggle span {
  min-width: 0;
  font-weight: 800;
}

.cabinet-guided-action-toggle strong {
  font-size: 0.78rem;
}

.cabinet-guided-action-toggle em {
  border-radius: 999px;
  padding: 2px 7px;
  font-style: normal;
  font-size: 0.7rem;
  font-weight: 800;
}

.cabinet-guided-action-toggle.pending {
  border-color: rgba(185, 28, 28, 0.36);
  background: #fff1f2;
  color: #991b1b;
}

.cabinet-guided-action-toggle.review {
  border-color: rgba(202, 138, 4, 0.42);
  background: #fefce8;
  color: #854d0e;
}

.cabinet-guided-action-toggle.confirmed {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.cabinet-guided-action-toggle.confirmed em {
  background: rgba(255, 255, 255, 0.18);
}

.cabinet-guided-action-detail {
  display: grid;
  gap: 7px;
}

.cabinet-guided-action-detail > span,
.cabinet-guided-subchoice > span {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.cabinet-guided-subchoice {
  display: grid;
  gap: 6px;
}

.cabinet-guided-save {
  min-height: 34px;
  border-radius: 8px;
  border-color: var(--accent);
  background: #fff;
  color: var(--accent);
  font-weight: 800;
}

.cabinet-action-warning {
  border: 1px solid rgba(168, 85, 45, 0.34);
  border-radius: 8px;
  padding: 7px 8px;
  background: #fff7ed;
  color: #7c2d12;
  font-size: 0.78rem;
  line-height: 1.35;
}

.cabinet-box-param-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 2px 8px;
}

.cabinet-box-param-header .eyebrow {
  grid-column: 1 / -1;
  font-size: 0.62rem;
}

.cabinet-box-param-header strong {
  font-size: 0.86rem;
}

.cabinet-box-param-header small {
  justify-self: end;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}
}

.cabinet-box-param-tabs {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cabinet-box-param-section {
  display: grid;
  gap: 8px;
}

.cabinet-box-param-row,
.cabinet-box-param-field,
.cabinet-box-param-check {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.76rem;
}

.cabinet-box-param-row strong {
  color: var(--text);
  text-align: right;
}

.cabinet-box-param-field input,
.cabinet-box-param-field select {
  width: 100%;
  min-width: 0;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 7px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

.cabinet-box-param-check input {
  justify-self: end;
  width: 18px;
  height: 18px;
}

.cabinet-piece-editor-summary {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #fff;
}

.cabinet-piece-editor-summary > strong {
  font-size: 0.92rem;
}

.cabinet-piece-editor-summary > span {
  color: var(--muted);
  font-size: 0.82rem;
}

.cabinet-piece-editor-summary div {
  display: grid;
  gap: 2px;
  border-top: 1px solid var(--line);
  padding-top: 6px;
  color: var(--muted);
  font-size: 0.78rem;
}

.cabinet-piece-editor-summary div strong {
  color: var(--text);
  font-size: 0.78rem;
}

.cabinet-primary-action,
.cabinet-secondary-action,
.cabinet-piece-toggle,
.cabinet-param-toggle,
.cabinet-param-trash {
  border-radius: 8px;
}

.cabinet-primary-action,
.cabinet-secondary-action {
  min-height: 32px;
}

.cabinet-primary-action {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.cabinet-secondary-action {
  background: #fff;
}

.cabinet-piece-toggle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 9px;
  text-align: left;
  background: #fff;
}

.cabinet-piece-toggle strong {
  color: var(--muted);
  font-size: 0.76rem;
}

.cabinet-parameter-panel h4 {
  margin: 0;
  font-size: 0.98rem;
}

.cabinet-parameter-row {
  display: grid;
  grid-template-columns: minmax(86px, 0.72fr) minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 8px;
  background: #fff;
  color: var(--muted);
  font-size: 0.82rem;
  min-width: 0;
}

.cabinet-parameter-row strong {
  color: var(--text);
  text-align: right;
}

.cabinet-param-item {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.cabinet-param-item.open {
  border-color: rgba(48, 124, 113, 0.48);
}

.cabinet-param-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px;
  align-items: stretch;
}

.cabinet-param-toggle {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  align-items: center;
  gap: 8px;
  min-height: 42px;
  border: 0;
  border-radius: 0;
  padding: 0 10px;
  background: transparent;
  color: var(--muted);
  text-align: left;
}

.cabinet-param-toggle strong {
  color: var(--text);
  font-size: 0.86rem;
  text-align: right;
  overflow-wrap: anywhere;
}

.cabinet-param-trash {
  min-width: 0;
  border-width: 0 0 0 1px;
  border-radius: 0;
  padding: 0;
  background: #fff;
  color: var(--muted);
  font-size: 0.68rem;
}

.cabinet-param-trash:hover,
.cabinet-param-trash:focus {
  color: #9b3427;
}

.cabinet-param-trash.is-static {
  display: block;
  border-left: 1px solid var(--line);
  background: #fff;
}

.cabinet-param-editor {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding: 10px;
  background: #f8faf9;
}

.cabinet-param-editor input,
.cabinet-param-editor select {
  width: 100%;
  min-width: 0;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

.cabinet-param-dialog {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(48, 124, 113, 0.42);
  border-radius: 8px;
  padding: 10px;
  background: #eef7f4;
}

.cabinet-param-dialog strong {
  font-size: 0.92rem;
}

.cabinet-param-dialog label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.82rem;
}

.cabinet-param-dialog input {
  width: 100%;
  min-width: 0;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 8px;
  background: #fff;
  font: inherit;
}

.cabinet-param-choice-grid,
.cabinet-param-dialog-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.cabinet-param-choice-grid.compact {
  gap: 6px;
}

.cabinet-param-choice-grid button,
.cabinet-param-stack button {
  min-height: 30px;
  border-radius: 7px;
  background: #fff;
}

.cabinet-param-choice-grid button {
  display: grid;
  gap: 2px;
  align-content: center;
}

.cabinet-param-choice-grid button span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.2;
}

.cabinet-param-choice-grid button em {
  color: #9a3412;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 800;
  line-height: 1.18;
}

.cabinet-param-choice-grid button.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.cabinet-param-choice-grid button.review {
  border-color: rgba(202, 138, 4, 0.46);
  background: #fefce8;
  color: #854d0e;
}

.cabinet-param-choice-grid button.active span {
  color: rgba(255, 255, 255, 0.82);
}

.cabinet-param-choice-grid button.active em {
  color: rgba(255, 255, 255, 0.9);
}

.cabinet-param-stack {
  display: grid;
  gap: 8px;
}

.cabinet-param-stack button {
  display: grid;
  gap: 3px;
  padding: 8px 10px;
  text-align: left;
}

.cabinet-param-stack span {
  color: var(--muted);
  font-size: 0.78rem;
}

.cabinet-parameter-row input,
.cabinet-parameter-row select {
  width: 100%;
  min-width: 0;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

.cabinet-parameter-toggle {
  display: grid;
  align-items: center;
  grid-template-columns: minmax(0, 1fr) auto;
}

.cabinet-parameter-toggle input {
  width: 18px;
  height: 18px;
  padding: 0;
}

.cabinet-parameter-action {
  width: 100%;
  min-height: 34px;
  border-radius: 8px;
  font-size: 0.86rem;
}

.cabinet-face-buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.cabinet-library-panel .cabinet-face-buttons {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.cabinet-face-button {
  min-height: 30px;
  padding: 0 7px;
  border-radius: 7px;
  font-size: 0.8rem;
}

.cabinet-face-button.active {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}

.two-column {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.fabrication-actions {
  display: flex;
  gap: 8px;
}

.fabrication-actions button {
  flex: 1;
}

.dxf-setup-panel label:has(#dxfToolDiameter),
.dxf-setup-panel label:has(#dxfToolStyle),
.dxf-setup-panel label:has(#dxfToolNumber),
.dxf-setup-panel label:has(#dxfLengthOffset),
.dxf-setup-panel label:has(#dxfSafeZ),
.dxf-setup-panel label:has(#dxfCutDepth),
.dxf-setup-panel label:has(#dxfStepdown),
.dxf-setup-panel label:has(#dxfFeedRate),
.dxf-setup-panel label:has(#dxfPlungeRate),
.dxf-setup-panel label:has(#dxfSpindleRpm),
.dxf-setup-panel label:has(#dxfWorkOffset) {
  display: none;
}

.dxf-preview {
  display: block;
  width: 100%;
  min-height: 430px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eceeef;
}

#dxfGrid path {
  stroke: #d3d9de;
  stroke-width: 1;
}

.dxf-path {
  fill: none;
  stroke: #244f7a;
  stroke-linejoin: round;
  stroke-width: 2.8;
}

.dxf-art-path {
  fill: none;
  stroke: rgba(36, 79, 122, 0.28);
  stroke-linejoin: round;
  stroke-width: 1.4;
}

.dxf-art-path.closed {
  fill: rgba(36, 79, 122, 0.035);
}

.dxf-tool-envelope {
  fill: none;
  stroke: rgba(164, 82, 45, 0.17);
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dxf-depth-pass {
  fill: none;
  stroke: rgba(36, 79, 122, 0.38);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.2;
}

.dxf-depth-pass.through,
.dxf-depth-pass.remove-onion-skin {
  stroke: rgba(164, 82, 45, 0.68);
  stroke-width: 1.8;
}

.dxf-depth-pass.onion-skin {
  stroke: rgba(31, 118, 111, 0.68);
  stroke-dasharray: 6 5;
}

.dxf-tab-marker {
  stroke: #1769d1;
  stroke-linecap: round;
  stroke-width: 2.2;
}

.dxf-toolpath-segment {
  stroke: rgba(31, 118, 111, 0.34);
  stroke-linecap: round;
  stroke-width: 1.6;
}

.dxf-toolpath-arrow {
  fill: #1f766f;
  stroke: #fff;
  stroke-width: 0.8;
  paint-order: stroke;
}

.dxf-workpiece {
  fill: rgba(255, 255, 255, 0.8);
  stroke: #7d8993;
  stroke-width: 2;
}

.dxf-safe-area {
  fill: rgba(31, 118, 111, 0.05);
  stroke: rgba(31, 118, 111, 0.52);
  stroke-dasharray: 8 6;
  stroke-width: 1.8;
}

.dxf-workpiece-label {
  fill: #4f5963;
  font-size: 13px;
  font-weight: 900;
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 4px;
}

.dxf-path.closed {
  fill: rgba(36, 79, 122, 0.06);
}

.dxf-path.engrave {
  stroke: #a4522d;
}

.dxf-path.relief {
  stroke: #1f766f;
}

.dxf-path.cutout {
  stroke: #244f7a;
}

.dxf-path-start {
  fill: #b35720;
  stroke: #fff;
  stroke-width: 1.5;
}

.dxf-path-list {
  display: grid;
  gap: 8px;
}

.machine-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.dxf-warning {
  border: 1px solid rgba(164, 82, 45, 0.35);
  border-radius: 8px;
  margin: 0;
  padding: 10px;
  color: #713512;
  background: #fff3e8;
  font-size: 0.88rem;
  font-weight: 750;
}

.post-panel textarea {
  min-height: 270px;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.82rem;
  line-height: 1.45;
}

.checkbox-field {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
}

.checkbox-field input {
  width: auto;
  min-height: auto;
}

.dxf-3d-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfd;
}

.dxf-product-preview-3d {
  display: block;
  width: 100%;
  min-height: 230px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #edf1f2;
}

.dxf-3d-top {
  fill: rgba(255, 255, 255, 0.88);
  stroke: #7d8993;
  stroke-width: 1.6;
}

.dxf-3d-side {
  fill: #d7dee0;
  stroke: #7d8993;
  stroke-width: 1.2;
}

.dxf-3d-art {
  fill: none;
  stroke: rgba(36, 79, 122, 0.36);
  stroke-linejoin: round;
}

.dxf-3d-tool {
  fill: none;
  opacity: 0.5;
  stroke: #244f7a;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dxf-3d-tool.engrave {
  stroke: #a4522d;
}

.dxf-3d-tool.relief {
  stroke: #1f766f;
}

.part-editor-shell {
  border: 1px solid rgba(216, 222, 223, 0.95);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.part-editor-tabs {
  display: flex;
  gap: 5px;
  margin-bottom: 10px;
}

.part-editor-tabs button {
  min-width: 110px;
  min-height: 38px;
  font-weight: 850;
}

.part-editor-tabs .active {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}

.part-editor-layout {
  display: grid;
  grid-template-columns: minmax(250px, 0.78fr) minmax(360px, 1.35fr) minmax(300px, 0.95fr);
  gap: 12px;
}

.part-operation-rail,
.part-settings-panel,
.part-canvas-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f5f7f8;
}

.part-operation-rail,
.part-settings-panel {
  display: grid;
  gap: 10px;
  align-content: start;
  min-width: 0;
  padding: 10px;
}

.part-operation-rail h2 {
  font-size: 0.92rem;
}

#partToolPanel {
  display: grid;
  gap: 10px;
}

.part-rail-button {
  width: 100%;
  min-height: 58px;
  padding: 8px;
  background: #e7eaed;
  font-weight: 850;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.2;
}

.part-rail-button.primary {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}

.part-selected-line {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(26, 122, 113, 0.28);
  border-radius: 8px;
  padding: 10px;
  background: #eef7f4;
}

.part-selected-line span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
  text-transform: uppercase;
}

.part-selected-line strong {
  font-size: 1.02rem;
}

.part-mini-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.part-line-list {
  display: grid;
  gap: 6px;
}

.part-line-row {
  display: flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 9px;
  text-align: left;
}

.part-line-row.active {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}

.part-line-row span,
.part-line-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
}

.part-canvas-panel {
  display: grid;
  grid-template-rows: auto minmax(420px, 1fr) auto;
  min-width: 0;
  overflow: hidden;
}

.part-panel-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 8px;
  background: #f9fbfc;
}

.part-tool-icons {
  display: flex;
  gap: 4px;
}

.part-tool-icons button {
  width: 32px;
  min-height: 30px;
  padding: 0;
  font-weight: 900;
}

.part-editor-canvas {
  display: block;
  width: 100%;
  height: 520px;
  background: #eceeef;
}

#partEditorGrid path {
  stroke: #d3d9de;
  stroke-width: 1;
}

.part-canvas-bg {
  fill: #eef1f3;
}

.part-shape {
  fill: rgba(255, 255, 255, 0.78);
  stroke: #7274c9;
  stroke-width: 3;
}

.part-groove {
  cursor: pointer;
  fill: rgba(33, 126, 118, 0.22);
  stroke: #1f7d76;
  stroke-width: 2.4;
}

.part-groove.selected {
  fill: rgba(179, 87, 32, 0.24);
  stroke: #b35720;
  stroke-width: 3.6;
}

.part-drill-hole {
  fill: rgba(33, 126, 118, 0.32);
}

.part-groove-centerline {
  stroke: rgba(31, 125, 118, 0.72);
  stroke-width: 1.5;
  stroke-dasharray: 8 5;
  pointer-events: none;
}

.part-edge-line {
  stroke: #7274c9;
  stroke-width: 4;
  pointer-events: none;
}

.part-edge-line.selected {
  stroke: var(--accent);
  stroke-width: 8;
}

.part-edge-hit {
  cursor: pointer;
  pointer-events: stroke;
  stroke: rgba(26, 122, 113, 0.001);
  stroke-linecap: round;
  stroke-width: 26;
}

.part-edge-label,
.part-vertex-label {
  fill: #1f2a35;
  font-size: 13px;
  font-weight: 900;
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 4px;
  pointer-events: none;
}

.part-vertex {
  cursor: pointer;
  fill: #fff;
  stroke: #155e57;
  stroke-width: 3;
}

.part-vertex.selected {
  fill: #ffe5b6;
  stroke: #b35720;
}

.part-grain-line {
  stroke: #d81f32;
  stroke-width: 8;
  pointer-events: none;
}

.part-centerline {
  stroke: #c2c7cc;
  stroke-width: 2;
  stroke-dasharray: 9 7;
}

.part-dimension-line {
  stroke: #5d6670;
  stroke-width: 1.6;
}

.part-dimension-label {
  fill: #4f5963;
  font-size: 14px;
  font-weight: 900;
  paint-order: stroke;
  stroke: #eef1f3;
  stroke-width: 4px;
}

.part-operation-table {
  overflow-x: auto;
  border-top: 1px solid var(--line);
  padding: 8px;
  background: #b2b2b2;
}

.part-operation-table table {
  min-width: 720px;
}

.part-operation-table th {
  color: #fff;
  background: #244f7a;
}

.part-operation-table tbody tr.active td {
  background: #fff3cf;
}

.part-point-input {
  width: 110px;
  min-height: 36px;
  padding: 6px 8px;
}

.part-table-action {
  min-height: 32px;
  padding: 4px 10px;
  font-weight: 850;
}

.part-field-card,
.part-anchor-pad,
.part-readout {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfd;
}

.part-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.part-anchor-grid {
  display: grid;
  grid-template-columns: repeat(3, 44px);
  grid-template-areas:
    ". top ."
    "left center right"
    ". bottom .";
  justify-content: center;
  gap: 6px;
}

.part-anchor-grid [data-part-anchor="top"] {
  grid-area: top;
}

.part-anchor-grid [data-part-anchor="left"] {
  grid-area: left;
}

.part-anchor-grid [data-part-anchor="center"] {
  grid-area: center;
}

.part-anchor-grid [data-part-anchor="right"] {
  grid-area: right;
}

.part-anchor-grid [data-part-anchor="bottom"] {
  grid-area: bottom;
}

.part-anchor-grid .active {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}

.part-readout {
  display: grid;
  gap: 8px;
}

.part-readout p {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
}

.part-readout span {
  color: var(--muted);
}

.part-readout strong {
  font-variant-numeric: tabular-nums;
}

.part-3d-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfd;
}

.part-3d-heading {
  display: grid;
  gap: 10px;
}

.part-3d-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.part-3d-controls button {
  min-height: 34px;
  padding: 0 8px;
}

.part-render-scene {
  display: block;
  width: 100%;
  min-height: 220px;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, #f6f8f8, #eef2f1);
  touch-action: none;
}

.part-render-side {
  fill: #d7b36c;
  stroke: #866239;
  stroke-width: 1.5;
}

.part-render-top {
  fill: #ecd59f;
  stroke: #866239;
  stroke-width: 1.8;
}

.part-render-edge {
  stroke: #5f472c;
  stroke-width: 1.7;
  pointer-events: none;
}

.part-render-groove {
  fill: rgba(55, 94, 89, 0.58);
  stroke: #24443e;
  stroke-width: 1.2;
}

.part-render-groove.selected {
  fill: rgba(136, 72, 30, 0.68);
  stroke: #693714;
}

.preview-empty-text {
  fill: var(--muted);
  font-size: 18px;
  font-weight: 850;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background: var(--panel-glass);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.quiet-panel {
  background: rgba(255, 255, 255, 0.7);
  box-shadow: none;
}

.section-heading,
.section-subheading {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-subheading {
  margin-top: 18px;
}

.compact-heading {
  margin-top: 8px;
}

.setup-grid,
#doorForm,
.manual-door-form,
.rules-grid {
  display: grid;
  gap: 14px;
}

.setup-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.wide-field {
  grid-column: 1 / -1;
}

.job-library-panel,
.job-access-panel {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfc;
}

.job-library-panel {
  grid-template-columns: 1fr;
}

.job-library-actions,
.job-backup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.job-library-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.job-library-status {
  grid-column: 1 / -1;
  min-height: 1.2em;
  margin: 0;
}

.job-access-panel h3,
.job-access-panel p {
  margin: 0;
}

.rules-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.manual-door-panel {
  background:
    linear-gradient(90deg, rgba(226, 235, 229, 0.82), rgba(255, 255, 255, 0.9));
}

.manual-door-form {
  grid-template-columns: 1.15fr 1.25fr 92px repeat(4, minmax(138px, 1fr)) auto auto;
  align-items: end;
}

.manual-door-form .primary-action {
  min-width: 178px;
  white-space: nowrap;
}

.manual-intro {
  margin-top: -4px;
  margin-bottom: 14px;
}

.preset-hint {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.post-library-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 8px;
}

.post-compatibility-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  margin: 10px 0 14px;
  background: #fff;
}

.post-compatibility-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.post-compatibility-heading span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
  text-transform: uppercase;
}

#postCompatibilityStatus {
  color: #1f5f53;
}

#postCompatibilityStatus[data-status="imported"],
#postCompatibilityStatus[data-status="parsed"] {
  color: #8a4b18;
}

.post-report-grid {
  display: grid;
  grid-template-columns: minmax(118px, 0.36fr) 1fr;
  gap: 8px 12px;
  font-size: 0.88rem;
}

.post-report-grid span {
  color: var(--muted);
}

.post-report-grid strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.error-text {
  color: #a33a2b;
}

.manual-groups-wrap {
  margin-top: 18px;
}

.manual-groups-wrap tbody tr {
  cursor: default;
}

.manual-groups-wrap tbody tr:hover {
  background: rgba(226, 235, 229, 0.48);
}

.muted {
  color: var(--muted);
  font-size: 0.84rem;
}

.job-backup-status {
  min-height: 1.2em;
  margin-top: 10px;
}

.job-backup-status.status-error {
  color: #b1431f;
  font-weight: 600;
}

.job-backup-status.status-success {
  color: #2f6f3a;
  font-weight: 600;
}

.row-actions {
  display: flex;
  gap: 8px;
  white-space: nowrap;
}

.row-actions button {
  min-height: 34px;
  padding: 0 10px;
}

.cutlist-source-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin: -2px 0 14px;
}

.cutlist-source-bar span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.cutlist-source-bar button {
  min-height: 36px;
  padding: 0 14px;
}

.cutlist-source-bar button.active-tool {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}

.cutlist-source-bar p {
  flex-basis: 100%;
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.manufacturing-preflight-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 12px 0;
  border: 1px solid var(--line);
  border-left: 5px solid #64748b;
  border-radius: 8px;
  padding: 11px 12px;
  background: #f8fafc;
}

.manufacturing-preflight-bar > div {
  display: grid;
  gap: 3px;
}

.manufacturing-preflight-bar.is-passed {
  border-left-color: #21835f;
  background: #f2fbf7;
}

.manufacturing-preflight-bar.is-review {
  border-left-color: #c47c18;
  background: #fff9ed;
}

.manufacturing-preflight-bar.is-blocked {
  border-left-color: #b44727;
  background: #fff5f2;
}

.manufacturing-preflight-dialog {
  width: min(620px, calc(100vw - 32px));
  border: 0;
  border-radius: 10px;
  padding: 0;
  background: transparent;
}

.manufacturing-preflight-dialog::backdrop {
  background: rgba(23, 31, 36, 0.46);
  backdrop-filter: blur(2px);
}

.manufacturing-preflight-shell {
  display: grid;
  gap: 14px;
  max-height: min(760px, calc(100vh - 36px));
  overflow: auto;
}

.manufacturing-preflight-issues {
  display: grid;
  gap: 10px;
}

.manufacturing-preflight-issue {
  border: 1px solid #e2c37b;
  border-left: 5px solid #c47c18;
  border-radius: 8px;
  padding: 12px 14px;
  background: #fffaf0;
}

.manufacturing-preflight-issue > span {
  color: #8a5a14;
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.manufacturing-preflight-issue h3 {
  margin: 3px 0 6px;
  font-size: 1rem;
}

.manufacturing-preflight-issue p {
  margin: 0;
  color: var(--ink);
  line-height: 1.45;
}

.manufacturing-preflight-issue .manufacturing-preflight-note {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.82rem;
}

.manufacturing-preflight-fix-actions {
  display: grid;
  gap: 7px;
  margin-top: 11px;
}

.manufacturing-preflight-fix-actions button {
  min-height: 38px;
  border-color: var(--accent);
  color: var(--accent-dark);
  background: #fff;
  font-weight: 850;
  text-align: left;
}

.manufacturing-preflight-fix-actions button:hover {
  color: #fff;
  background: var(--accent);
}

.manufacturing-preflight-issue details {
  margin-top: 9px;
}

.manufacturing-preflight-issue summary {
  width: fit-content;
  color: var(--accent);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 800;
}

.manufacturing-preflight-issue pre {
  margin: 8px 0 0;
  color: var(--muted);
  font: inherit;
  font-size: 0.78rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.door-schedule-panel {
  display: grid;
  gap: 14px;
}

.door-schedule-dialog {
  width: min(1480px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  border: 0;
  border-radius: 10px;
  padding: 0;
  background: transparent;
}

.door-schedule-dialog::backdrop {
  background: rgba(20, 26, 31, 0.46);
  backdrop-filter: blur(2px);
}

.door-schedule-shell {
  display: grid;
  gap: 14px;
}

.door-schedule-config {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
  border: 1px solid #78aa9f;
  border-left: 6px solid var(--accent);
  border-radius: 8px;
  padding: 12px 14px;
  background: #eef7f4;
}

.door-schedule-config .eyebrow {
  margin: 0 0 8px;
}

.door-schedule-config-summary {
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  gap: 8px;
}

.door-schedule-config-summary > div {
  display: grid;
  gap: 2px;
}

.door-schedule-config-summary span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.door-schedule-config-summary strong {
  font-size: 0.84rem;
}

.door-schedule-dialog .panel {
  box-shadow: none;
  backdrop-filter: none;
}

.door-production-paths {
  display: grid;
  grid-template-columns: minmax(250px, 1fr) auto;
  gap: 10px 18px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 14px;
  background: #fbfcfd;
}

.door-production-paths h3 {
  margin: 3px 0 4px;
}

.door-production-paths .eyebrow,
.door-production-paths .muted-line {
  margin: 0;
}

.door-production-path-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.door-production-path-actions .is-preferred {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(31, 122, 115, 0.12);
}

.door-production-path-actions .is-preferred::after {
  content: " · Preferred";
}

.door-production-path-note {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.door-schedule-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.door-schedule-quick-actions button,
.door-material-select {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.door-schedule-quick-actions button {
  padding: 0.55rem 0.75rem;
  font-weight: 700;
  color: var(--ink);
}

.door-material-select {
  width: min(100%, 15rem);
  padding: 0.45rem 0.55rem;
  font-weight: 700;
}

.door-source-badge,
.door-verification-status {
  display: inline-flex;
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 8px;
  background: #f7f9fa;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
  white-space: nowrap;
}

.door-verification-status {
  border-color: #e2c37b;
  background: #fffaf0;
  color: #8a5a14;
  cursor: pointer;
}

.door-build-select {
  width: min(190px, 100%);
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 750;
}

.door-verification-status.is-verified {
  border-color: #78aa9f;
  background: #eef7f4;
  color: var(--accent-dark);
}

.door-verification-dialog {
  width: min(580px, calc(100vw - 32px));
  border: 0;
  border-radius: 10px;
  padding: 0;
  background: transparent;
}

.door-verification-dialog::backdrop {
  background: rgba(20, 26, 31, 0.52);
}

.door-verification-shell {
  display: grid;
  gap: 14px;
}

.door-verification-calculated {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  border-radius: 8px;
  padding: 12px 14px;
  background: #eef7f4;
}

.door-verification-calculated span,
.door-verification-calculated small {
  color: var(--muted);
  font-size: 0.78rem;
}

.door-verification-calculated strong {
  font-size: 1.25rem;
}

.door-verification-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.door-verification-fields label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.door-verification-feedback {
  min-height: 48px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--muted);
  background: #f7f9fa;
  line-height: 1.4;
}

.door-verification-feedback.is-match {
  border-color: #78aa9f;
  color: var(--accent-dark);
  background: #eef7f4;
}

.door-verification-feedback.is-mismatch {
  border-color: #e2c37b;
  color: #8a5a14;
  background: #fffaf0;
}

.door-production-batches {
  display: grid;
  gap: 12px;
}

.door-production-batch {
  display: grid;
  grid-template-columns: minmax(230px, 0.72fr) minmax(0, 1.6fr);
  gap: 16px;
  border: 1px solid var(--line);
  border-left: 6px solid var(--accent);
  border-radius: 9px;
  padding: 14px;
  background: #fbfcfd;
}

.door-production-batch > div > span {
  color: var(--accent-dark);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.door-production-batch h3 {
  margin: 4px 0 5px;
  font-size: 1rem;
}

.door-production-batch p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.door-production-batch table {
  align-self: start;
  font-size: 0.82rem;
}

.door-production-batch th,
.door-production-batch td {
  padding: 6px 8px;
}

.simple-door-cutlist-sheet {
  display: grid;
  gap: 18px;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #fff;
}

.simple-door-cutlist-sheet[hidden] {
  display: none;
}

.simple-door-cutlist-head h2,
.simple-door-cutlist-head p,
.simple-door-cutlist-sheet h3 {
  margin: 0;
}

.simple-door-cutlist-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.simple-door-cutlist-head p {
  color: var(--muted);
}

.simple-door-cutlist-sheet section {
  display: grid;
  gap: 8px;
}

.simple-cutlist-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.simple-cutlist-table th,
.simple-cutlist-table td {
  border-bottom: 1px solid var(--line);
  padding: 7px 8px;
  text-align: left;
}

.simple-cutlist-table th {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.cutlist-detail-section {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.cutlist-detail-section h3 {
  margin: 2px 0 0;
  font-size: 1rem;
}

.face-frame-stock-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.face-frame-stock-summary[hidden] {
  display: none;
}

.face-frame-stock-summary span {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f7faf8;
  color: var(--muted);
  font-size: 0.82rem;
}

.face-frame-stock-summary strong {
  color: var(--ink);
  font-size: 1rem;
}

.face-frame-cut strong {
  white-space: nowrap;
  font-size: 1.08rem;
}

.face-frame-size-heading th {
  padding: 11px 13px;
  border-top: 8px solid var(--panel);
  background: #e8f3f1;
  color: var(--ink);
  text-align: left;
}

.face-frame-size-heading:first-child th {
  border-top: 0;
}

.face-frame-size-heading strong {
  margin-right: 10px;
  font-size: 1rem;
  text-transform: uppercase;
}

.face-frame-size-heading span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 650;
}

.face-frame-piece-breakdown {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.face-frame-piece-breakdown summary {
  width: fit-content;
  color: var(--accent);
  cursor: pointer;
  font-weight: 800;
}

.face-frame-piece-breakdown[open] summary {
  margin-bottom: 10px;
}

.outsource-sheet {
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
}

.outsource-sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: #f7faf8;
}

.outsource-sheet-head h2 {
  margin: 2px 0 6px;
}

.outsource-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.outsource-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1px;
  border-bottom: 1px solid var(--line);
  background: var(--line);
}

.outsource-summary div {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  background: #fff;
}

.outsource-summary span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.outsource-summary strong {
  font-size: 1rem;
}

.outsource-warnings {
  margin: 14px 20px 0;
  padding: 12px 14px;
  border: 1px solid #f0b45d;
  border-radius: 6px;
  background: #fff7e8;
  color: #4d3411;
}

.outsource-warnings strong {
  display: block;
  margin-bottom: 6px;
}

.outsource-warnings ul {
  margin: 0;
  padding-left: 18px;
}

.outsource-warnings li + li {
  margin-top: 4px;
}

.outsource-table-wrap {
  border: 0;
  border-radius: 0;
}

.outsource-table th {
  white-space: nowrap;
}

.outsource-table td {
  vertical-align: top;
}

.outsource-signoff {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding: 22px 20px 20px;
  border-top: 1px solid var(--line);
}

.outsource-signoff span {
  min-height: 38px;
  border-bottom: 1px solid #9ba7a2;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
  text-transform: uppercase;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.workflow-list {
  display: grid;
  gap: 12px;
}

.workflow-list div {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 13px;
  background: var(--field);
}

.workflow-list div strong {
  font-size: 0.92rem;
  letter-spacing: 0;
}

.workflow-list span,
.preview span {
  color: var(--muted);
  font-size: 0.86rem;
}

.room-tools {
  display: grid;
  grid-template-columns: repeat(5, minmax(82px, 1fr));
  gap: 8px;
}

.room-tools button.active-tool {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}

.draw-wall-action {
  width: 100%;
  border-color: var(--accent-dark);
  color: #fff;
  background: var(--accent);
  font-weight: 850;
}

.draw-wall-action.active-tool {
  background: var(--accent-dark);
}

.room-danger-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}

.subtle-danger-button {
  border-color: rgba(169, 88, 45, 0.36);
  color: #824622;
  background: rgba(246, 232, 222, 0.72);
}

.subtle-danger-button:hover {
  border-color: rgba(169, 88, 45, 0.68);
  color: #642f14;
  background: rgba(244, 218, 199, 0.9);
}

.room-hint {
  margin-top: 14px;
}

.room-hint.active-hint {
  border-color: var(--accent);
  color: var(--accent-dark);
  background: var(--sage);
}

.wall-editor {
  margin-top: 18px;
}

.drawing-panel {
  min-height: 620px;
}

.room-canvas {
  display: block;
  width: 100%;
  min-height: 580px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9faf8;
  cursor: crosshair;
  overflow: hidden;
  touch-action: none;
}

.canvas-bg {
  fill: #f9faf8;
}

.canvas-grid {
  fill: url("#gridPattern");
}

#gridPattern path {
  stroke: #d7dedf;
  stroke-width: 1;
}

#productGridPattern path {
  stroke: rgba(15, 20, 25, 0.06);
  stroke-width: 1;
}

.drawn-wall {
  stroke: #2d3841;
  stroke-width: 9;
  stroke-linecap: square;
  cursor: move;
}

.drawn-wall.selected {
  stroke: var(--accent);
}

.drawn-wall.island-line {
  stroke: var(--accent-dark);
  stroke-width: 6;
  stroke-dasharray: 14 8;
}

.drawn-wall.island-line.selected {
  stroke: var(--copper);
}

.wall-placement-guide {
  stroke: rgba(28, 122, 112, 0.72);
  stroke-width: 3;
  stroke-dasharray: 9 7;
  pointer-events: none;
}

.wall-placement-guide.right {
  stroke: rgba(180, 91, 43, 0.72);
}

.wall-hit-target {
  fill: none;
  stroke: rgba(0, 0, 0, 0.001);
  stroke-width: 18;
  pointer-events: stroke;
  cursor: move;
}

.wall-side-badge {
  display: inline-flex;
  justify-content: center;
  min-width: 52px;
  border: 1px solid rgba(28, 122, 112, 0.32);
  border-radius: 999px;
  padding: 3px 7px;
  color: var(--accent-dark);
  background: rgba(28, 122, 112, 0.08);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.wall-side-badge.right {
  border-color: rgba(180, 91, 43, 0.34);
  color: #8b4627;
  background: rgba(180, 91, 43, 0.08);
}

.wall-side-badge.both {
  border-color: rgba(99, 86, 156, 0.34);
  color: #5d4e91;
  background: rgba(99, 86, 156, 0.08);
}

.preview-wall {
  stroke: var(--copper);
  stroke-width: 5;
  stroke-dasharray: 10 8;
  pointer-events: none;
}

.angle-guide {
  stroke: rgba(164, 82, 45, 0.28);
  stroke-width: 2;
  stroke-dasharray: 7 9;
  pointer-events: none;
}

.wall-point {
  fill: #fff;
  stroke: var(--accent-dark);
  stroke-width: 3;
  cursor: grab;
  pointer-events: all;
}

.wall-point:active {
  cursor: grabbing;
}

.wall-point.snap-target {
  fill: #f7e4d6;
  stroke: var(--copper);
  stroke-width: 5;
}

.wall-label {
  fill: #53626e;
  font-size: 15px;
  font-weight: 850;
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 5px;
  pointer-events: none;
}

.selected-row {
  background: var(--sage);
}

.link-button {
  min-height: auto;
  border: 0;
  padding: 0;
  color: var(--accent-dark);
  background: transparent;
  font-weight: 850;
}

.wall-delete-button {
  color: #824622;
  font-weight: 700;
  padding: 0 4px;
}

.wall-delete-button:hover {
  color: #642f14;
}

.preview {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f5f8f6;
}

.door-preview {
  display: grid;
  grid-template-columns: 16px 1fr 16px;
  grid-template-rows: 16px 72px 16px;
  width: 90px;
  height: 116px;
  border: 2px solid var(--accent-dark);
  background: #e8dbca;
}

.rail,
.stile {
  background: #bd7445;
}

.rail.top,
.rail.bottom {
  grid-column: 1 / 4;
}

.stile.left {
  grid-row: 2;
}

.stile.right {
  grid-column: 3;
  grid-row: 2;
}

.panel-fill {
  grid-column: 2;
  grid-row: 2;
  background:
    linear-gradient(45deg, rgba(255, 255, 255, 0.36), transparent),
    #e4c8a8;
}

.preview p {
  margin: 0 0 5px;
  font-weight: 850;
}

.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-color: var(--accent-dark);
  color: #fff;
  background: var(--accent);
  font-weight: 850;
}

.icon-button {
  width: 42px;
  padding: 0;
}

.actions,
.dialog-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.actions button,
.section-heading > button,
.section-subheading > button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
}

.split-stack,
.rules-section {
  display: grid;
  gap: 18px;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.summary-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--sage);
}

.summary-item span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.summary-item strong {
  display: block;
  margin-top: 4px;
  font-size: 1.05rem;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.compact-table table {
  min-width: 520px;
}

.table-input {
  min-height: 38px;
  padding: 0 10px;
}

.tool-library-panel {
  display: grid;
  gap: 12px;
}

.tooling-actions,
.tool-catalog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
}

.tooling-actions button {
  min-width: 118px;
}

.toolset-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 88px minmax(180px, 1fr);
  gap: 8px;
  align-items: end;
  margin-bottom: 12px;
}

.toolset-controls select,
.toolset-controls button {
  min-height: 34px;
}

.toolset-controls span {
  align-self: center;
}

.profile-setup-shell {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 12px;
}

.profile-recipe-list {
  display: grid;
  gap: 8px;
  align-self: start;
}

.profile-recipe-list-head,
.profile-recipe-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.profile-recipe-card {
  width: 100%;
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.profile-recipe-card.selected {
  border-color: var(--accent);
  background: var(--sage);
}

.profile-recipe-card span,
.profile-recipe-card small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.profile-recipe-card strong {
  font-size: 0.92rem;
}

.profile-recipe-detail {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.profile-recipe-heading {
  display: flex;
  gap: 12px;
  align-items: start;
  justify-content: space-between;
}

.profile-recipe-heading h4 {
  margin: 2px 0 0;
}

.profile-recipe-fields {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 0.7fr);
  gap: 10px;
}

.profile-stage-table {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.profile-stage-row {
  display: grid;
  grid-template-columns: 38px minmax(96px, 0.7fr) minmax(170px, 1.15fr) 96px 72px 72px minmax(190px, 1fr) 172px;
  gap: 8px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 8px 10px;
  font-size: 0.86rem;
}

.profile-stage-row:last-child {
  border-bottom: 0;
}

.profile-stage-row.header {
  color: var(--muted);
  background: var(--field);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.profile-stage-order {
  color: var(--muted);
  font-weight: 900;
}

.profile-stage-row input,
.profile-stage-row select,
.profile-recipe-fields input,
.profile-recipe-fields select {
  min-height: 32px;
  padding: 0 8px;
}

.profile-stage-check {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  min-height: 32px;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
}

.profile-stage-overrides {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.profile-stage-actions {
  display: flex;
  gap: 5px;
  justify-content: flex-end;
}

.profile-stage-actions button {
  min-height: 28px;
  padding: 0 8px;
}

.profile-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.tool-catalog-panel {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfd;
}

.tool-catalog-filters {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 150px;
}

.tool-catalog-filters input,
.tool-catalog-filters select {
  min-height: 34px;
}

.tool-catalog-status {
  margin: 0;
}

.tool-catalog-results {
  display: grid;
  gap: 6px;
  max-height: 290px;
  overflow: auto;
}

.tool-catalog-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 66px;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 7px 8px;
  background: #fff;
}

.tool-catalog-result strong,
.tool-catalog-result span,
.tool-catalog-result small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tool-catalog-result strong {
  font-size: 0.78rem;
}

.tool-catalog-result span {
  font-size: 0.84rem;
  font-weight: 750;
}

.tool-catalog-result small {
  color: var(--muted);
  font-size: 0.74rem;
}

.tool-catalog-result button {
  min-height: 30px;
  padding: 0 10px;
  font-size: 0.8rem;
}

.tooling-table-wrap {
  background: #fff;
}

.tooling-table {
  min-width: 860px;
}

.tooling-table th,
.tooling-table td {
  padding: 3px 6px;
  vertical-align: middle;
}

.tooling-table th {
  font-size: 0.7rem;
}

.tooling-table .table-input {
  min-height: 28px;
  border-radius: 7px;
  padding: 0 8px;
  font-size: 0.82rem;
}

.tooling-table .tool-name-input {
  min-width: 160px;
}

.tooling-table .tool-small-input {
  min-width: 64px;
}

.tooling-table .tool-measure-input {
  min-width: 82px;
}

.tooling-table .tool-style-input {
  min-width: 122px;
}

.tooling-table tr.selected {
  background: rgba(226, 235, 229, 0.78);
}

.tool-name-link {
  display: block;
  width: 100%;
  min-height: 0;
  overflow: hidden;
  border: 0;
  padding: 0;
  color: var(--accent-dark);
  background: transparent;
  font-size: 0.84rem;
  font-weight: 850;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tool-detail-panel {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.tool-detail-media {
  display: grid;
  min-height: 132px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
}

.tool-detail-media img {
  max-width: 112px;
  max-height: 124px;
  object-fit: contain;
}

.tool-image-fallback {
  display: grid;
  width: 92px;
  height: 118px;
  place-items: end center;
  border-radius: 999px 999px 12px 12px;
  padding: 0 8px 16px;
  color: var(--muted);
  background:
    linear-gradient(140deg, #fefefe, #cfd8da 46%, #f6f8f8 48%, #aeb9bb 72%, #eef2f2);
  font-size: 0.74rem;
  font-weight: 900;
  text-align: center;
}

.tool-detail-main {
  display: grid;
  gap: 10px;
}

.tool-detail-title {
  display: flex;
  gap: 12px;
  align-items: start;
  justify-content: space-between;
}

.tool-detail-title h4 {
  margin: 1px 0 0;
  font-size: 1rem;
}

.tool-detail-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1.45fr) repeat(4, minmax(84px, 1fr));
  gap: 8px;
}

.tool-detail-grid input,
.tool-detail-grid select {
  min-height: 32px;
  padding: 0 9px;
}

.tool-detail-operations {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.tool-detail-operations > span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.tool-detail-operations > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tool-detail-operation {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--ink);
  background: var(--field);
  font-size: 0.78rem;
  font-weight: 850;
}

.tool-detail-operation input {
  width: auto;
  min-height: 0;
  margin: 0;
}

.tool-detail-notes {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tool-operation-select {
  position: relative;
  width: 150px;
  font-size: 0.82rem;
  font-weight: 800;
}

.tool-operation-select summary {
  display: block;
  min-height: 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 5px 28px 4px 8px;
  background: var(--field);
  cursor: pointer;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tool-operation-select summary::after {
  position: absolute;
  top: 9px;
  right: 9px;
  border: 4px solid transparent;
  border-top-color: var(--muted);
  content: "";
}

.tool-operation-menu {
  position: absolute;
  z-index: 12;
  top: calc(100% + 4px);
  left: 0;
  display: grid;
  gap: 2px;
  width: 164px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(32, 40, 45, 0.16);
}

.tool-operation-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  border-radius: 6px;
  padding: 3px 6px;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.tool-operation-option:hover {
  background: var(--sage);
}

.tool-operation-option input {
  width: auto;
  min-height: 0;
  margin: 0;
}

.tool-remove-button {
  min-height: 28px;
  padding: 0 10px;
  font-size: 0.78rem;
}

.empty-state {
  display: none;
  margin: 14px 0 0;
  color: var(--muted);
}

.formula-note {
  display: grid;
  gap: 5px;
  margin-top: 16px;
  border: 1px solid #d9c6b7;
  border-radius: 8px;
  padding: 12px;
  color: #5d3a27;
  background: var(--warning);
}

.delete-row {
  min-height: 34px;
  padding: 0 10px;
}

.number {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.error {
  border-color: #b33c37 !important;
  background: #fff5f4;
}

.parameters-dialog {
  width: min(1120px, calc(100vw - 36px));
  max-height: calc(100vh - 36px);
  border: 0;
  border-radius: 8px;
  padding: 0;
  background: transparent;
}

.parameters-dialog::backdrop {
  background: rgba(25, 31, 36, 0.42);
}

.dialog-shell {
  max-height: calc(100vh - 36px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: var(--panel);
  box-shadow: 0 26px 70px rgba(20, 26, 31, 0.28);
}

.nesting-dialog {
  width: min(1180px, calc(100vw - 36px));
  max-height: calc(100vh - 36px);
  border: 0;
  border-radius: 8px;
  padding: 0;
  background: transparent;
}

.nesting-dialog::backdrop {
  background: rgba(25, 31, 36, 0.42);
}

.nesting-shell {
  display: grid;
  gap: 14px;
}

.hidden {
  display: none !important;
}

.nesting-step-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.nesting-step-tabs button {
  justify-content: center;
  font-weight: 850;
}

.nesting-step-tabs .active {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}

.nesting-step {
  display: none;
}

.nesting-step.active {
  display: grid;
  gap: 14px;
}

.nesting-setup {
  display: grid;
  grid-template-columns: minmax(170px, 1.2fr) repeat(3, minmax(120px, 1fr));
  gap: 12px;
}

.optimize-setup {
  grid-template-columns: minmax(170px, 1.2fr) minmax(170px, 1.1fr) repeat(3, minmax(120px, 1fr));
}

.nesting-optimize-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 10px;
}

.nesting-optimize-actions button {
  min-height: 52px;
  justify-content: center;
  font-weight: 850;
}

.nesting-optimize-actions button.active-tool {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}

.manual-nest-tray {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  border: 1px dashed rgba(26, 122, 113, 0.45);
  border-radius: 8px;
  padding: 10px;
  background: #f7fbfa;
}

.manual-nest-tray-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.manual-nest-part {
  display: grid;
  gap: 2px;
  min-width: 150px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
  cursor: grab;
}

.manual-nest-part:active {
  cursor: grabbing;
}

.nesting-toggles {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.nesting-toggles label {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
}

.nesting-material-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.nesting-material-choice {
  display: flex;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfd;
}

.nesting-material-choice span {
  display: grid;
  gap: 3px;
}

.nesting-material-choice em {
  color: var(--muted);
  font-size: 0.84rem;
  font-style: normal;
}

.nesting-pdf-dialog {
  width: min(520px, calc(100vw - 28px));
}

.nesting-pdf-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.nesting-pdf-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  font-weight: 750;
}

/* Parts tab two-panel layout */
.nesting-parts-layout {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  height: 100%;
}

.nesting-parts-review {
  flex: 1 1 0;
  min-width: 0;
}

.nesting-parts-review .table-wrap {
  max-height: min(56vh, 540px);
  overflow: auto;
}

.parts-review-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.parts-review-table th,
.parts-review-table td {
  padding: 5px 8px;
  text-align: left;
  border-bottom: 1px solid #e0e0e0;
  white-space: nowrap;
}

.parts-review-table th {
  background: #f5f5f5;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .03em;
  position: sticky;
  top: 0;
}

.parts-review-table td.number,
.parts-review-table th.number {
  text-align: right;
}

.parts-review-table .parts-shape-cell {
  width: 44px;
  padding: 3px 4px;
}

.parts-row {
  cursor: pointer;
}

.parts-row:hover {
  background: #f0f7f0;
}

.parts-row--selected {
  background: #c8e6c9 !important;
}

.muted {
  color: #888;
}

/* Parts sidebar */
.nesting-parts-sidebar {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 0 0 148px;
  padding-top: 2px;
}

.sidebar-action-btn {
  display: block;
  width: 100%;
  padding: 8px 10px;
  font-size: 13px;
  text-align: left;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fafafa;
  cursor: pointer;
  line-height: 1.3;
}

.sidebar-action-btn:hover:not(:disabled) {
  background: #f0f7f0;
  border-color: #4caf50;
}

.sidebar-action-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.sidebar-action-btn--danger:hover:not(:disabled) {
  background: #fff3f3;
  border-color: #e53935;
  color: #e53935;
}

/* Part editor dialog */
.nesting-part-editor-dialog {
  width: min(92vw, 1100px);
  max-height: 92vh;
  padding: 0;
  border: none;
  border-radius: 10px;
  box-shadow: 0 8px 40px rgba(0,0,0,.28);
  overflow: hidden;
}

.nesting-part-editor-dialog .dialog-shell {
  display: flex;
  flex-direction: column;
  min-height: min(860px, 88vh);
  max-height: 92vh;
}

.nesting-part-editor-dialog #nestingPartEditorMount {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.nesting-part-editor-dialog #nestingPartEditorMount .part-editor-shell {
  min-height: 100%;
  box-shadow: none;
}

.nesting-cnc-setup {
  display: none;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.nesting-cnc-setup.active {
  display: grid;
}

.toolpath-dev-panel {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfd;
}

.toolpath-dev-panel > div:first-child {
  display: grid;
  gap: 3px;
}

.toolpath-dev-panel span {
  color: var(--muted);
  font-size: 0.86rem;
}

.toolpath-dev-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.toolpath-dev-actions button {
  min-height: 34px;
  padding: 0 10px;
}

.toolpath-dev-actions label {
  display: flex;
  gap: 6px;
  align-items: center;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 800;
}

.toolpath-dev-actions input[type="range"] {
  width: 110px;
}

.nesting-sheets {
  display: grid;
  gap: 16px;
}

.nest-material {
  display: grid;
  gap: 12px;
}

.nest-material h3 {
  margin: 0;
}

.nest-sheet-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfd;
}

.nest-sheet-heading {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.nest-sheet-heading span {
  color: var(--muted);
  font-size: 0.86rem;
}

.nest-sheet-svg {
  display: block;
  width: 100%;
  min-height: 240px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef1f3;
}

.nest-sheet-bg {
  fill: #fff;
  stroke: #7d8993;
  stroke-width: 0.08;
}

.nest-strip {
  fill: rgba(33, 126, 118, 0.08);
  stroke: #217e76;
  stroke-width: 0.06;
}

.nest-piece {
  fill: rgba(232, 207, 151, 0.78);
  stroke: #8b6736;
  stroke-width: 0.04;
}

.cnc-piece {
  fill: rgba(218, 236, 220, 0.86);
  stroke: #168038;
}

.nest-piece-label,
.nest-rip-label {
  fill: #1f2933;
  font-size: 2.5px;
  font-weight: 850;
  text-anchor: middle;
  dominant-baseline: middle;
  pointer-events: none;
}

.nest-rip-label {
  fill: #155e57;
  text-anchor: start;
}

.toolpath-layer {
  pointer-events: none;
}

.cnc-piece {
  cursor: grab;
}

.cnc-piece:active {
  cursor: grabbing;
}

.nest-sheet-svg[data-cnc-sheet-id] {
  cursor: crosshair;
}

.nest-remnant rect {
  fill: rgba(255, 255, 255, 0.22);
  stroke: #a86a2a;
  stroke-width: 0.18;
  stroke-dasharray: 1.4 1.1;
}

.nest-remnant text {
  fill: #7a461b;
  font-size: 2.2px;
  font-weight: 800;
  text-anchor: middle;
  dominant-baseline: middle;
  pointer-events: none;
}

.toolpath-line {
  fill: none;
  stroke: #1769d1;
  stroke-width: 0.18;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.toolpath-line.toolpath-tool-t8 {
  stroke: #b85f18;
}

.toolpath-active-segment {
  stroke: transparent;
  stroke-width: 0.55;
  stroke-linecap: round;
}

.toolpath-active-segment.active {
  stroke: #34a3ff;
}

.toolpath-active-segment.toolpath-tool-t8.active {
  stroke: #f09a3e;
}

.toolpath-arrow {
  fill: #1769d1;
}

.toolpath-arrow.toolpath-tool-t8 {
  fill: #b85f18;
}

.toolpath-tab-marker {
  stroke: #1769d1;
  stroke-width: 0.32;
  stroke-linecap: round;
  pointer-events: none;
}

.toolpath-tab-marker.toolpath-tool-t8 {
  stroke: #b85f18;
}

.toolpath-start {
  stroke: #1769d1;
  stroke-width: 0.42;
  stroke-linecap: round;
}

.toolpath-start.toolpath-tool-t8 {
  stroke: #b85f18;
}

.toolpath-drill-hole {
  fill: rgba(23, 105, 209, 0.18);
  stroke: #1769d1;
  stroke-width: 0.18;
  pointer-events: none;
}

.toolpath-drill-hole.toolpath-tool-t2 {
  fill: rgba(23, 105, 209, 0.2);
  stroke: #1769d1;
}

.toolpath-cutter {
  display: none;
  fill: #fff;
  stroke: #0b4ea2;
  stroke-width: 0.45;
}

.toolpath-cutter.active {
  display: block;
}

.nesting-warning {
  margin: 0;
}

.parameters-shell {
  padding: 0;
}

.parameters-top {
  position: sticky;
  top: 0;
  z-index: 4;
  display: grid;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 16px 18px 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 24px rgba(20, 26, 31, 0.08);
}

.parameters-head {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.parameters-top-grid {
  display: grid;
  grid-template-columns: minmax(160px, 0.8fr) minmax(190px, 1fr) minmax(190px, 1fr) 120px;
  gap: 10px;
  align-items: end;
}

.parameters-top-grid input,
.parameters-top-grid select {
  min-height: 40px;
}

.parameters-top-grid button {
  min-height: 40px;
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
  font-weight: 850;
}

.account-primary-tabs {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.account-primary-tabs button {
  min-width: 118px;
  min-height: 40px;
  font-weight: 850;
}

.account-primary-tabs .active {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}

.parameters-workflow {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 16px;
  padding: 16px 18px 0;
}

.parameters-workflow .account-primary-tabs {
  grid-column: 1;
  grid-row: 1 / span 2;
  flex-direction: column;
  align-self: start;
  margin-top: 0;
}

.parameters-workflow .account-primary-tabs button {
  width: 100%;
  justify-content: flex-start;
  padding: 0 12px;
}

.parameters-nav {
  display: flex;
  grid-column: 2;
  grid-row: 1;
  gap: 8px;
  align-self: start;
  flex-wrap: wrap;
}

.parameters-nav button {
  min-width: 118px;
  padding: 0 14px;
  justify-content: center;
  text-align: center;
  font-weight: 850;
}

.parameters-nav .active {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}

.parameter-panel {
  display: none;
}

.parameter-panel.active {
  display: block;
}

.parameters-panels {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
}

.pricing-defaults-form {
  display: grid;
  gap: 14px;
}

.pricing-defaults-form .rules-grid {
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  align-items: end;
}

.material-pricing-table {
  display: grid;
  gap: 8px;
}

.material-pricing-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.2fr) repeat(3, minmax(100px, 0.62fr)) minmax(110px, 0.5fr) minmax(128px, 0.58fr);
  gap: 10px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fbfcfd;
}

.material-pricing-row.is-used {
  border-color: #78aa9f;
  background: #eef7f4;
}

.material-pricing-name {
  display: grid;
  gap: 3px;
  align-self: center;
}

.material-pricing-name strong {
  color: var(--text);
  font-size: 0.92rem;
}

.material-pricing-name span,
.material-pricing-name em {
  color: var(--muted);
  font-size: 0.76rem;
  font-style: normal;
}

.material-pricing-name em {
  color: var(--accent-dark);
  font-weight: 850;
}

.material-pricing-row label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.material-pricing-row input {
  min-height: 34px;
  padding: 0 9px;
  font-variant-numeric: tabular-nums;
}

.material-pricing-rate {
  display: grid;
  gap: 4px;
  align-self: stretch;
  justify-content: end;
  border-left: 1px solid var(--line);
  padding-left: 10px;
  text-align: right;
}

.material-pricing-rate span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.material-pricing-rate strong {
  color: var(--accent-dark);
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}

.material-cnc-button {
  display: grid;
  gap: 2px;
  align-content: center;
  min-height: 44px;
  padding: 6px 10px;
  text-align: left;
}

.material-cnc-button strong {
  color: var(--text);
  font-size: 0.82rem;
}

.material-cnc-button span {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.2;
}

.material-cnc-dialog {
  width: min(720px, calc(100vw - 32px));
  border: 0;
  border-radius: 10px;
  padding: 0;
  background: transparent;
}

.hardware-item-dialog {
  width: min(760px, calc(100vw - 32px));
  border: 0;
  border-radius: 10px;
  padding: 0;
  background: transparent;
}

.material-cnc-dialog::backdrop {
  background: rgba(20, 26, 31, 0.42);
}

.hardware-item-dialog::backdrop {
  background: rgba(20, 26, 31, 0.42);
}

.hardware-inventory-table,
.misc-inventory-table {
  display: grid;
  gap: 8px;
}

.hardware-assignment-status:empty {
  display: none;
}

.hardware-inventory-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  overflow: hidden;
}

.hardware-inventory-group summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 14px;
  cursor: pointer;
  list-style: none;
}

.hardware-inventory-group summary::-webkit-details-marker {
  display: none;
}

.hardware-inventory-group summary::before {
  content: "+";
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  width: 22px;
  height: 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-align: center;
  line-height: 20px;
  font-weight: 850;
  color: var(--accent-dark);
}

.hardware-inventory-group[open] summary::before {
  content: "-";
}

.hardware-inventory-group summary strong {
  color: var(--text);
}

.hardware-inventory-group summary span {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.25;
}

.hardware-inventory-group-body {
  display: grid;
  gap: 7px;
  border-top: 1px solid var(--line);
  padding: 8px;
  overflow-x: auto;
}

.hardware-inventory-row {
  display: grid;
  grid-template-columns: minmax(96px, 0.62fr) minmax(210px, 1.35fr) minmax(150px, 0.9fr) minmax(86px, 0.52fr) minmax(86px, 0.52fr) minmax(94px, 0.58fr) minmax(96px, 0.55fr) minmax(100px, 0.58fr);
  gap: 8px;
  align-items: end;
  min-width: 940px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 11px;
  background: #fff;
}

.hardware-inventory-row > *,
.misc-inventory-row > * {
  min-width: 0;
}

.misc-inventory-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.25fr) repeat(3, minmax(82px, 0.55fr)) minmax(86px, 0.5fr) 34px;
  gap: 6px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 9px;
  background: #fbfcfd;
}

.hardware-inventory-row.is-tracked,
.misc-inventory-row.is-tracked {
  border-color: #78aa9f;
  background: #eef7f4;
}

.hardware-inventory-row.has-plate-color {
  border-left: 8px solid var(--hardware-link-color);
}

.hardware-inventory-row label,
.misc-inventory-row label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.hardware-name-field {
  position: relative;
}

.hardware-name-field input {
  transition: width 0.12s ease, box-shadow 0.12s ease;
}

.hardware-name-field input:focus {
  position: relative;
  z-index: 8;
  width: calc(100% + 112px);
  box-shadow: 0 0 0 2px rgba(48, 124, 113, 0.16), 0 8px 18px rgba(20, 26, 31, 0.12);
}

.hardware-inventory-row input,
.hardware-inventory-row select,
.misc-inventory-row input {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  padding: 0 8px;
  font-variant-numeric: tabular-nums;
  font-size: 0.88rem;
}

.hardware-inventory-row input[type="color"] {
  min-height: 32px;
  padding: 3px;
}

.markup-control span {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  gap: 5px;
}

.markup-type-button {
  min-height: 32px;
  padding: 0;
  border-color: var(--accent);
  background: #fff;
  color: var(--accent-dark);
  font-weight: 900;
}

.plate-select-wrap {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 5px;
  align-items: stretch;
}

.plate-select-wrap::before {
  content: "";
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--hardware-link-color);
}

.hardware-link-placeholder {
  min-height: 32px;
}

.hardware-price-readout {
  display: grid;
  gap: 2px;
  align-self: stretch;
  justify-content: end;
  border-left: 1px solid var(--line);
  padding-left: 7px;
  text-align: right;
}

.hardware-price-readout span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.hardware-price-readout strong {
  color: var(--accent-dark);
  font-size: 0.94rem;
  font-variant-numeric: tabular-nums;
}

.inventory-row-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px;
  gap: 5px;
  align-items: end;
}

.hardware-assign-button {
  min-height: 32px;
  padding: 0 7px;
  font-size: 0.8rem;
  font-weight: 850;
}

.inventory-remove-button {
  min-height: 32px;
  border-color: rgba(185, 28, 28, 0.38);
  background: #fff;
  color: #991b1b;
  padding: 0;
  font-weight: 900;
}

.material-cnc-shell {
  padding: 18px;
}

.hardware-item-shell {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.material-cnc-form {
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  margin-top: 16px;
}

.hardware-item-basics,
.hardware-hinge-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 10px;
}

.hardware-item-basics {
  grid-template-columns: minmax(150px, 0.65fr) minmax(240px, 1fr) repeat(2, minmax(110px, 0.45fr));
}

.hardware-item-workspace {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfd;
}

.hardware-item-workspace[hidden] {
  display: none;
}

.hardware-hinge-wide {
  grid-column: 1 / -1;
}

.hardware-hinge-reference {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(210px, 0.46fr);
  gap: 12px;
  align-items: stretch;
}

.hardware-hinge-reference svg {
  width: 100%;
  min-height: 300px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.hardware-hinge-reference-copy {
  display: grid;
  gap: 8px;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  background: #fff;
}

.hardware-hinge-reference-copy ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hardware-hinge-reference-copy li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid #ead6ba;
  border-radius: 6px;
  padding: 9px 10px;
  background: #fff7ed;
}

.hardware-hinge-reference-copy strong {
  color: #6b341a;
  font-size: 0.82rem;
}

.hardware-hinge-reference-copy span {
  color: #9a3412;
  font-size: 0.9rem;
  font-weight: 900;
  white-space: nowrap;
}

.hardware-hinge-grid label[data-unit] {
  position: relative;
}

.hardware-hinge-grid label[data-unit]::after {
  content: attr(data-unit);
  position: absolute;
  right: 8px;
  bottom: 8px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
  pointer-events: none;
}

.hardware-hinge-grid label[data-unit] input {
  padding-right: 34px;
}

.hardware-side-badge {
  justify-self: end;
  border: 1px solid rgba(28, 122, 112, 0.28);
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--accent-dark);
  background: #eef7f4;
  font-size: 0.76rem;
  font-weight: 850;
}

.hardware-item-note {
  margin: 0;
}

.hardware-item-status {
  min-height: 1.2em;
  margin: 0;
}

.hardware-machining-summary {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 8px;
  color: var(--muted);
  font-size: 0.8rem;
}

.hardware-machining-summary strong {
  color: var(--accent-dark);
}

.cabinet-params-form {
  display: block;
}

.box-parameter-editor {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.box-parameter-nav {
  display: grid;
  gap: 8px;
}

.box-parameter-nav button {
  min-height: 38px;
  justify-content: center;
  font-weight: 800;
}

.box-parameter-nav .active {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}

.box-parameter-panels {
  min-width: 0;
}

.box-parameter-panel {
  display: none;
}

.box-parameter-panel.active {
  display: block;
}

.box-parameter-panel .rules-grid {
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  align-items: end;
}

.box-parameter-panel .muted {
  margin: 10px 0 0;
}

.cabinet-creator-box-content {
  padding: 18px;
}

.cabinet-creator-box-content .box-parameter-editor {
  grid-template-columns: 170px minmax(0, 1fr);
}

.dado-rule-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfd;
}

.dado-rule-card + .dado-rule-card {
  margin-top: 14px;
}

.dado-rule-card h4 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.primary-dado-rules {
  background:
    linear-gradient(90deg, rgba(226, 235, 229, 0.78), rgba(255, 255, 255, 0.96));
}

.dado-basic-grid {
  grid-template-columns: minmax(180px, 1.1fr) repeat(4, minmax(130px, 1fr));
}

.dado-advanced summary {
  cursor: pointer;
  list-style: none;
}

.dado-advanced summary::-webkit-details-marker {
  display: none;
}

.dado-advanced summary span {
  display: grid;
  gap: 3px;
}

.dado-advanced summary strong {
  font-size: 1rem;
}

.dado-advanced summary em {
  color: var(--muted);
  font-size: 0.86rem;
  font-style: normal;
}

.dado-advanced-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.dado-table {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.dado-table label {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 8px 10px;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 700;
  background: #fff;
}

.dado-table label:last-child {
  border-bottom: 0;
}

.dado-table input {
  min-height: 34px;
  padding: 0 9px;
  font-variant-numeric: tabular-nums;
}

.dado-note {
  margin-top: 14px;
}

.dialog-actions {
  align-items: center;
  justify-content: flex-end;
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.parameters-shell > .dialog-actions,
.parameters-shell > .formula-note {
  margin-right: 18px;
  margin-left: 18px;
}

.dialog-actions span {
  margin-right: auto;
  color: var(--muted);
  font-size: 0.86rem;
}

@media (max-width: 1100px) {
  .app-toolbar,
  .stage-grid,
  .products-grid,
  .product-tool-layout,
  .product-editor-top-grid,
  .product-parts-workspace,
  .parameters-workflow,
  .room-grid,
  .room-commandbar,
  .fabrication-grid,
  .part-editor-layout {
    grid-template-columns: 1fr;
  }

  .product-parts-workspace .product-shape-editor {
    position: static;
  }

  .stage-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .settings-workflow-tabs,
  .settings-build-layout,
  .settings-cutting-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .door-workspace-layout {
    grid-template-columns: 1fr;
  }

  .door-workspace-panel,
  .door-workspace-preview {
    grid-column: 1;
    grid-row: auto;
  }

  .save-pill {
    justify-self: stretch;
  }

  .room-picker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .room-tools {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .product-tool-layout > section:not(.product-room-stage):not(.cabinet-editor) {
    grid-column: auto;
  }

  .part-operation-rail {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .part-operation-rail h2 {
    grid-column: 1 / -1;
  }

  .door-production-batch {
    grid-template-columns: 1fr;
  }

  .door-schedule-config,
  .door-schedule-config-summary,
  .door-production-paths {
    grid-template-columns: 1fr;
  }

  .door-production-path-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .app-shell {
    width: min(100% - 20px, 560px);
    padding-top: 10px;
  }

  .settings-workflow-tabs,
  .settings-build-layout,
  .settings-cutting-grid,
  .door-cutting-actions.has-workspace.has-cnc,
  .door-workspace-grid,
  .door-workspace-size-grid,
  .hardware-item-basics,
  .hardware-hinge-grid,
  .hardware-hinge-reference,
  .settings-scope-actions {
    grid-template-columns: 1fr;
  }

  #productsView.active {
    width: auto;
    margin-inline: 0;
  }

  .brand-lockup,
  .fabrication-heading,
  .part-editor-tabs,
  .section-heading,
  .section-subheading,
  .product-room-header,
  .dialog-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .stage-tabs,
  .setup-grid,
  .field-grid,
  .room-picker,
  .manual-door-form,
  .two-column,
  .part-field-grid,
  .cabinet-readout-grid,
  .summary-strip,
  .machine-summary,
  .rules-grid {
    grid-template-columns: 1fr;
  }

  .room-toolbar {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .room-tools,
  .part-operation-rail,
  .cabinet-front-plan-title,
  .cabinet-shelf-pin-status,
  .product-shape-layout,
  .product-identity-form,
  .parameters-top-grid,
  .dado-basic-grid,
  .dado-advanced-grid,
  .nesting-setup,
  .optimize-setup,
  .nesting-material-list,
  .nesting-cnc-setup,
  .fabrication-actions,
  .product-editor-form {
    grid-template-columns: 1fr;
  }

  .cabinet-front-plan-fields,
  .cabinet-front-preset-grid,
  .cabinet-shelf-pin-targets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .parameters-nav {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .parameters-workflow .account-primary-tabs,
  .parameters-nav,
  .parameters-panels {
    grid-column: auto;
    grid-row: auto;
  }

  .parameters-workflow .account-primary-tabs {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .preview {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .door-preview {
    width: 76px;
    height: 102px;
    grid-template-columns: 14px 1fr 14px;
    grid-template-rows: 14px 70px 14px;
  }
}

@media print {
  body {
    background: #fff;
  }

  body.printing-outsource-sheet * {
    visibility: hidden !important;
  }

  body.printing-outsource-sheet #outsourceDoorsSheet,
  body.printing-outsource-sheet #outsourceDoorsSheet * {
    visibility: visible !important;
  }

  body.printing-outsource-sheet #outsourceDoorsSheet {
    position: absolute;
    inset: 0 auto auto 0;
    display: block !important;
    width: 100%;
    margin: 0;
    border: 0;
    border-radius: 0;
    overflow: visible;
  }

  body.printing-outsource-sheet .outsource-actions {
    display: none !important;
  }

  body.printing-outsource-sheet .outsource-sheet-head {
    padding: 0 0 12px;
    background: #fff;
  }

  body.printing-outsource-sheet .outsource-summary {
    break-inside: avoid;
  }

  body.printing-outsource-sheet .outsource-table-wrap {
    overflow: visible;
  }

  body.printing-outsource-sheet .outsource-table {
    font-size: 10pt;
  }

  body.printing-outsource-sheet .outsource-table th,
  body.printing-outsource-sheet .outsource-table td {
    padding: 6px 7px;
  }

  body.printing-outsource-sheet .outsource-signoff {
    break-inside: avoid;
  }

  body.printing-simple-door-cutlist * {
    visibility: hidden !important;
  }

  body.printing-simple-door-cutlist #simpleDoorCutlistSheet,
  body.printing-simple-door-cutlist #simpleDoorCutlistSheet * {
    visibility: visible !important;
  }

  body.printing-simple-door-cutlist #simpleDoorCutlistSheet {
    position: absolute;
    inset: 0 auto auto 0;
    display: grid !important;
    width: 100%;
    margin: 0;
    border: 0;
    border-radius: 0;
    padding: 0;
    overflow: visible;
  }

  body.printing-simple-door-cutlist .simple-door-cutlist-head {
    padding-bottom: 10px;
  }

  body.printing-simple-door-cutlist .simple-door-cutlist-sheet section {
    break-inside: avoid;
  }

  body.printing-simple-door-cutlist .simple-cutlist-table {
    font-size: 10pt;
  }

  body.printing-simple-door-cutlist .simple-cutlist-table th,
  body.printing-simple-door-cutlist .simple-cutlist-table td {
    padding: 5px 6px;
  }

  .app-toolbar,
  #jobView,
  #settingsView,
  #roomView,
  #productsView,
  #partEditorView,
  #renderView,
  .actions {
    display: none !important;
  }

  .app-shell {
    width: 100%;
    padding: 0;
  }

  .panel,
  .table-wrap {
    border: 0;
    box-shadow: none;
  }

  #cutlistView {
    display: block !important;
  }
}

/* ==========================================================================
   Kabinetz Support widget
   Injected Help button + support panel. All classes namespaced `dsw-` to avoid
   colliding with Kabinetz styles. See src/app/14-kabinetz-support.js.
   ========================================================================== */
.dsw-overlay {
  --dsw-bg: #17212b;
  --dsw-bg-2: #1e2b38;
  --dsw-border: #2a3a4a;
  --dsw-text: #e6edf3;
  --dsw-muted: #8aa0b2;
  --dsw-accent: #4aa3ff;
  --dsw-accent-text: #ffffff;

  position: fixed;
  inset: 0;
  background: rgba(4, 9, 14, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2147483000;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}
.dsw-overlay.dsw-open {
  display: flex;
}
.dsw-panel {
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  background: var(--dsw-bg);
  color: var(--dsw-text);
  border: 1px solid var(--dsw-border);
  border-radius: 12px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.dsw-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--dsw-border);
}
.dsw-peak {
  color: var(--dsw-accent);
  font-size: 18px;
}
.dsw-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  flex: 1;
}
.dsw-close {
  background: transparent;
  border: none;
  color: var(--dsw-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}
.dsw-close:hover {
  color: var(--dsw-text);
  background: var(--dsw-bg-2);
}
.dsw-body {
  padding: 16px 18px;
  overflow: auto;
}
.dsw-label {
  display: block;
  font-size: 12px;
  color: var(--dsw-muted);
  margin: 12px 0 6px;
}
.dsw-body .dsw-label:first-child {
  margin-top: 0;
}
.dsw-select,
.dsw-textarea {
  width: 100%;
  box-sizing: border-box;
  background: var(--dsw-bg-2);
  color: var(--dsw-text);
  border: 1px solid var(--dsw-border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
}
.dsw-textarea {
  resize: vertical;
  min-height: 96px;
}
.dsw-select:focus,
.dsw-textarea:focus {
  outline: none;
  border-color: var(--dsw-accent);
}
.dsw-status {
  min-height: 18px;
  margin-top: 10px;
  font-size: 13px;
  color: var(--dsw-muted);
}
.dsw-status-error {
  color: #ff8a8a;
}
.dsw-status-success {
  color: #6ee7b7;
}
.dsw-status-pending {
  color: var(--dsw-accent);
}
.dsw-answer {
  margin-top: 12px;
}
.dsw-answer[hidden] {
  display: none;
}
.dsw-answer-card {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(74, 163, 255, 0.28);
  border-radius: 10px;
  padding: 12px;
  background: rgba(74, 163, 255, 0.08);
  color: var(--dsw-text);
  font-size: 13px;
  line-height: 1.45;
}
.dsw-answer-card p {
  margin: 0;
}
.dsw-answer-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
}
.dsw-answer-card li {
  margin: 0;
}
.dsw-muted {
  color: var(--dsw-muted);
  font-size: 12px;
}
.dsw-guide {
  margin-top: 14px;
  border: 1px solid var(--dsw-border);
  border-radius: 10px;
  overflow: hidden;
}
.dsw-guide[hidden] {
  display: none;
}
.dsw-guide-summary {
  cursor: pointer;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--dsw-text);
  background: rgba(74, 163, 255, 0.08);
  list-style: none;
}
.dsw-guide-summary::-webkit-details-marker {
  display: none;
}
.dsw-guide-summary::before {
  content: "▸ ";
  color: var(--dsw-muted);
}
.dsw-guide[open] .dsw-guide-summary::before {
  content: "▾ ";
}
.dsw-guide-body {
  display: grid;
  gap: 6px;
  padding: 12px;
}
.dsw-guide-actions {
  margin-top: 6px;
}
.dsw-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid var(--dsw-border);
}
.dsw-btn {
  background: var(--dsw-bg-2);
  color: var(--dsw-text);
  border: 1px solid var(--dsw-border);
  border-radius: 8px;
  padding: 9px 16px;
  font-size: 14px;
  cursor: pointer;
}
.dsw-btn:hover {
  border-color: var(--dsw-accent);
}
.dsw-btn-primary {
  background: var(--dsw-accent);
  color: var(--dsw-accent-text);
  border-color: var(--dsw-accent);
}
.dsw-btn-primary:disabled {
  opacity: 0.6;
  cursor: default;
}
.dsw-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 2147482000;
  background: var(--dsw-accent, #4aa3ff);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(74, 163, 255, 0.4);
}
.dsw-fab:hover {
  filter: brightness(1.08);
}
