:root {
  --ink: #172126;
  --muted: #697477;
  --line: #d8dfdf;
  --paper: #f5f7f5;
  --lime: #c7fa48;
  --scale: 54px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font:
    14px/1.4 Inter,
    Arial,
    sans-serif;
}
button,
input {
  font: inherit;
}
button {
  cursor: pointer;
}
.planner {
  display: grid;
  grid-template-columns: 275px minmax(620px, 1fr) 245px;
  min-height: calc(100vh - 70px);
}
.catalog-panel,
.plan-panel {
  padding: 24px 17px;
  background: #fff;
}
.catalog-panel {
  border-right: 1px solid var(--line);
  overflow: auto;
}
.plan-panel {
  border-left: 1px solid var(--line);
  overflow: auto;
}
.panel-title h1,
.panel-title h2,
.canvas-top h2 {
  margin: 3px 0 0;
  font:
    800 28px/1 "Roboto Condensed",
    sans-serif;
  text-transform: uppercase;
}
.panel-title small,
.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
}
.search {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 22px 0 17px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.search input {
  width: 100%;
  height: 40px;
  border: 0;
  outline: 0;
}
.catalog-error {
  margin: 0 0 14px;
  padding: 9px 10px;
  border-radius: 6px;
  background: #fff0ec;
  color: #9b392b;
  font-size: 11px;
}
.catalog-group {
  --cat: #4389ff;
  margin-bottom: 6px;
}
.catalog-group h3 {
  margin: 0;
}
.catalog-group-toggle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 12px;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 38px;
  padding: 0 8px;
  border: 0;
  border-left: 3px solid var(--cat);
  border-radius: 0 6px 6px 0;
  background: #f6f8f7;
  color: var(--cat);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-align: left;
  text-transform: uppercase;
}
.catalog-group-toggle:hover,
.catalog-group-toggle:focus-visible {
  background: #edf3f0;
}
.catalog-group-count {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0;
}
.catalog-group-toggle i {
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translate(-1px, 1px);
  transition: transform .15s ease;
}
.catalog-group.is-open .catalog-group-toggle i {
  transform: rotate(225deg) translate(-1px, 1px);
}
.catalog-group-items {
  padding-top: 6px;
}
.catalog-group-items[hidden] {
  display: none;
}
.product,
.plan-row {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 7px;
  border: 0;
  border-left: 3px solid var(--cat);
  border-radius: 0 7px 7px 0;
  background: #fff;
  text-align: left;
}
.product:hover,
.product:focus-visible,
.plan-row:hover,
.plan-row.active {
  background: #edf3f0;
  outline: 0;
}
.product img,
.product-icon {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 5px;
  background: color-mix(in srgb, var(--cat) 12%, white);
}
.product-icon {
  display: grid;
  place-items: center;
  color: var(--cat);
  font-weight: 800;
}
.product b,
.product small,
.plan-row b,
.plan-row small {
  display: block;
}
.product small,
.plan-row small {
  color: var(--muted);
  font-size: 10px;
}
.canvas-panel {
  min-width: 0;
  padding: 24px 25px 12px;
  overflow: hidden;
}
.canvas-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 15px;
}
.canvas-top > div:first-child {
  min-width: 0;
  flex: 1 1 280px;
}
.canvas-top h2 {
  font-size: 32px;
}
.canvas-top p:not(.eyebrow) {
  margin: 7px 0 0;
  color: var(--muted);
}
.top-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 4px;
  max-width: 100%;
}
.top-actions button,
.top-actions output {
  height: 35px;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: #fff;
  display: grid;
  place-items: center;
  white-space: nowrap;
}
.primary {
  border-color: var(--ink) !important;
  border-radius: 7px !important;
  background: var(--ink) !important;
  color: #fff;
}
.settings {
  display: none;
  align-items: end;
  flex-wrap: wrap;
  gap: 14px;
  margin: 17px 0 2px;
  padding: 13px;
  border: 1px solid #bcc7c3;
  border-radius: 9px;
  background: #fff;
}
.settings.open {
  display: flex;
}
.settings-fields {
  display: flex;
  gap: 9px;
}
.settings label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 10px;
}
.settings input {
  width: 125px;
  height: 34px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--ink);
}
.settings button {
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  font-weight: 700;
}
.opening-tools {
  display: flex;
  align-items: end;
  gap: 6px;
}
.opening-tools > span {
  align-self: center;
  margin-right: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}
.opening-tools button {
  display: flex;
  align-items: center;
  gap: 6px;
}
.tool-window,
.tool-door {
  display: block;
  width: 16px;
  height: 12px;
  border: 2px solid #4389ff;
}
.tool-door {
  border-color: #df8b42;
  border-top: 0;
  border-right-style: dashed;
}
.settings-hint {
  max-width: 185px;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}
.settings .settings-done {
  border-color: var(--lime);
  background: var(--lime);
}
.workspace {
  position: relative;
  min-height: 680px;
  padding: 90px 90px 120px;
  overflow: auto;
}
.room {
  position: relative;
  box-sizing: content-box;
  width: 540px;
  height: 324px;
  outline: none;
  background-color: #fcfdfc;
  background-image:
    linear-gradient(#e0e7e3 1px, transparent 1px),
    linear-gradient(90deg, #e0e7e3 1px, transparent 1px);
  background-size: var(--scale) var(--scale);
  border: 7px solid #343c3f;
  box-shadow: 0 8px 20px #1721261a;
}
.room:focus-visible {
  box-shadow:
    0 0 0 3px #4389ff,
    0 8px 20px #1721261a;
}
.dimension {
  position: absolute;
  color: #667173;
  font-size: 11px;
}
.dimension.x {
  top: 68px;
  left: 90px;
  border-top: 1px solid #aeb9b5;
  text-align: center;
}
.dimension.y {
  left: 63px;
  top: 90px;
  border-left: 1px solid #aeb9b5;
  writing-mode: vertical-rl;
  text-align: center;
}
#objects {
  position: absolute;
  inset: 0;
}
.plan-object {
  position: absolute;
  padding: 0;
  border: 0;
  background: transparent;
  transform-origin: center;
  touch-action: none;
  cursor: grab;
}
.plan-object:active,
.plan-object.is-dragging {
  cursor: grabbing;
}
.plan-object {
  user-select: none;
  -webkit-user-select: none;
}
.plan-object img {
  pointer-events: none;
  -webkit-user-drag: none;
}
.plan-object:focus-visible {
  outline: 3px solid #4389ff;
  outline-offset: 3px;
}
.surface {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 5px;
  background: #e9eeee;
  box-shadow: 0 1px 2px #15202555;
}
.is-selected .surface {
  box-shadow:
    0 0 0 3px var(--lime),
    0 0 0 5px #172126;
}
.equipment .surface {
  border: 1px solid #bcc8c4;
}
.asset-viewport {
  display: block;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.product .asset-viewport {
  width: 42px;
  height: 42px;
  border-radius: 5px;
  background: color-mix(in srgb, var(--cat) 12%, white);
}
.equipment .asset-viewport {
  position: absolute;
  inset: 1px;
  pointer-events: none;
}
.asset-viewport img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0;
  background: transparent;
  margin: 0;
  pointer-events: none;
  -webkit-user-drag: none;
}
.infrastructure .surface {
  border: 2px solid #52a66c;
  background: #eef6ef;
  font-weight: 800;
}
.opening {
  z-index: 3;
}
.opening .surface {
  overflow: visible;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.window::before {
  content: "";
  position: absolute;
  inset: -10px 0;
}
.window.side-left::before,
.window.side-right::before {
  inset: 0 -10px;
}
.window .window-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 7px;
  transform: translateY(-50%);
  border: 2px solid #4389ff;
  background: #d9f2ff;
}
.window.side-left .window-line,
.window.side-right .window-line {
  inset: 0 auto 0 50%;
  width: 7px;
  height: auto;
  transform: translateX(-50%);
}
.door-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.door-svg .gap {
  stroke: #fff;
  stroke-width: 9;
}
.door-svg .leaf {
  stroke: #df8b42;
  stroke-width: 3;
}
.door-svg .swing {
  fill: none;
  stroke: #df8b42;
  stroke-width: 2;
  stroke-dasharray: 4 3;
}
.object-actions {
  position: absolute;
  z-index: 8;
}
.object-actions:empty {
  display: none;
}
.action-label {
  display: block;
  width: max-content;
  max-width: 190px;
  margin-bottom: 4px;
  padding: 4px 6px;
  border-radius: 4px;
  background: #172126;
  color: #fff;
  font-size: 10px;
}
.action-label small {
  display: block;
  color: #cbd4d0;
  font-size: 8px;
  letter-spacing: 0.05em;
}
.action-row {
  display: flex;
  gap: 3px;
  padding: 4px;
  border: 1px solid #cbd4d0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 7px 18px #17212627;
}
.action-row button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: #edf2ef;
}
.action-row button:hover {
  background: var(--lime);
}
.action-row .rotate-button {
  border: 1px solid #d5ddda;
  border-radius: 50%;
  background: #fff;
}
.rotate-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: #172126;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.size-row {
  display: flex;
  align-items: center;
  gap: 4px;
  padding-top: 4px;
  font-size: 10px;
}
.size-row input {
  width: 48px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 4px;
}
.opening-editor {
  width: 216px;
  padding: 8px;
  border: 1px solid #cbd4d0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 7px 18px #17212627;
}
.opening-editor .size-row {
  padding: 0 0 7px;
}
.opening-editor fieldset {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 0;
  padding: 0;
  border: 0;
}
.opening-editor legend {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 9px;
}
.opening-editor fieldset button {
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  font-size: 9px;
}
.opening-editor fieldset button.active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}
.opening-editor .remove-opening {
  width: 100%;
  margin-top: 6px;
  height: 28px;
  border: 0;
  border-radius: 4px;
  background: #f7e9e6;
  color: #9b392b;
  font-size: 10px;
  font-weight: 700;
}
.fill-rack {
  width: 100%;
  margin-top: 4px;
  padding: 7px;
  border: 1px solid #172126;
  border-radius: 6px;
  background: #fff;
  color: #172126;
  font-size: 10px;
  font-weight: 800;
  box-shadow: 0 5px 14px #17212618;
}
.equipment-labels {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
}
.equipment-callout {
  position: absolute;
  width: 140px;
  padding: 5px 7px;
  border: 1px solid #bac5c1;
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 3px 10px #1721261f;
  font-size: 9px;
  line-height: 1.2;
}
.equipment-callout b,
.equipment-callout small {
  display: block;
}
.equipment-callout small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.05em;
}
.equipment-callout::before {
  content: "";
  position: absolute;
  top: 17px;
  width: 28px;
  border-top: 1px solid #52605c;
}
.equipment-callout::after {
  content: "";
  position: absolute;
  top: 14px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #52605c;
}
.equipment-callout.to-right::before {
  left: -28px;
}
.equipment-callout.to-right::after {
  left: -31px;
}
.equipment-callout.to-left::before {
  right: -28px;
}
.equipment-callout.to-left::after {
  right: -31px;
}
.plan-panel h2 {
  font-size: 24px;
}
.plan-empty {
  color: var(--muted);
  font-size: 11px;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 7px;
}
.composition-section {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.composition-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.composition-heading h3 {
  margin: 0;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.composition-heading span {
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 12px;
  background: #edf2ef;
  font-size: 11px;
  font-weight: 800;
}
.composition-section > p {
  margin: 5px 0 12px;
  color: var(--muted);
  font-size: 10px;
}
.completion-section {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.completion-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 5px;
}
.completion-heading h4 {
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
}
.completion-heading span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}
.plan-entry {
  margin-bottom: 8px;
}
.plan-row {
  --cat: #4389ff;
  border: 1px solid #e0e6e3;
  border-left: 4px solid var(--cat);
}
.plan-row > span:last-child {
  min-width: 0;
}
.plan-thumb {
  display: grid;
  place-items: center;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  overflow: hidden;
  border-radius: 5px;
  background: #f5f6f3;
}
.plan-thumb img {
  width: 100%;
  height: 100%;
  padding: 3px;
  object-fit: contain;
  mix-blend-mode: multiply;
}
.plan-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--cat);
}
.rack-content {
  margin-left: 8px;
  padding: 7px 7px 7px 10px;
  border-left: 2px solid #5c7f91;
  background: #f7f9f8;
}
.rack-content-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}
.rack-content-head button {
  padding: 3px 5px;
  border: 0;
  background: transparent;
  color: #172126;
  text-decoration: underline;
  font-size: 9px;
}
.rack-content > p {
  margin: 4px 0;
  color: var(--muted);
  font-size: 9px;
}
.extra-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  padding: 6px 0;
  border-bottom: 1px solid #e1e6e3;
}
.extra-row:last-child {
  border-bottom: 0;
}
.extra-row > img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  background: #fff;
}
.extra-row b,
.extra-row small {
  display: block;
}
.extra-row b {
  font-size: 10px;
  line-height: 1.2;
}
.extra-row small {
  color: var(--muted);
  font-size: 8px;
}
.quantity {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
}
.quantity button {
  width: 25px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
}
.quantity output {
  min-width: 22px;
  text-align: center;
  font-size: 10px;
  font-weight: 800;
}
.unlink-extra {
  grid-column: 2/-1;
  justify-self: start;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 8px;
  text-decoration: underline;
}
.secondary-action {
  width: 100%;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid #172126;
  border-radius: 6px;
  background: #fff;
  font-weight: 800;
}
.completion-dialog,
.rack-delete-dialog {
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 1px solid #aab5b1;
  border-radius: 10px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 24px 70px #17212655;
}
.completion-dialog::backdrop,
.rack-delete-dialog::backdrop {
  background: #17212699;
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 22px 12px;
}
.dialog-head small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
}
.dialog-head h2,
.rack-delete-dialog h2 {
  margin: 4px 0;
  font:
    800 26px/1 "Roboto Condensed",
    sans-serif;
  text-transform: uppercase;
}
.dialog-head p,
.rack-delete-dialog p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11px;
}
.dialog-close {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  font-size: 21px;
}
.completion-search {
  margin: 0 22px 14px;
}
.completion-catalog {
  padding: 0 22px 24px;
}
.completion-group h3 {
  margin: 17px 0 6px;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.completion-product {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.completion-product img {
  width: 50px;
  height: 50px;
  object-fit: contain;
}
.completion-product b,
.completion-product small {
  display: block;
}
.completion-product small,
.completion-current {
  color: var(--muted);
  font-size: 9px;
}
.completion-product button {
  height: 34px;
  padding: 0 10px;
  border: 1px solid #172126;
  border-radius: 5px;
  background: #fff;
  font-size: 10px;
  font-weight: 800;
}
.completion-product button:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}
.capacity {
  position: sticky;
  top: 0;
  z-index: 1;
  margin: 0;
  padding: 8px 10px;
  border-radius: 5px;
  background: #edf3f0;
  font-size: 10px;
  font-weight: 800;
}
.capacity.is-full {
  background: #fff0ec;
  color: #9b392b;
}
.rack-delete-dialog {
  padding: 24px;
}
.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 20px;
}
.dialog-actions button {
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  font-size: 11px;
}
.dialog-actions .danger-action {
  border-color: #9b392b;
  background: #9b392b;
  color: #fff;
}
footer {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
}
@media (min-width: 1101px) {
  html,
  body.pc-site {
    height: 100%;
    overflow: hidden;
  }
  .planner {
    height: calc(100dvh - 76px);
    min-height: 0;
  }
  .catalog-panel,
  .plan-panel {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }
  .canvas-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
  }
  .workspace {
    flex: 1 1 auto;
    min-height: 0;
  }
  .canvas-panel footer {
    flex: 0 0 auto;
  }
}
@media (max-width: 1100px) {
  .planner {
    grid-template-columns: 250px 1fr;
  }
  .plan-panel {
    grid-column: 1/-1;
    border-top: 1px solid var(--line);
  }
  .settings {
    flex-wrap: wrap;
  }
}
@media (max-width: 760px) {
  .planner {
    grid-template-columns: 1fr;
  }
  .catalog-panel {
    border-bottom: 1px solid var(--line);
  }
  .canvas-panel {
    padding: 18px 12px;
  }
  .canvas-top {
    display: block;
  }
  .top-actions {
    margin-top: 12px;
    flex-wrap: wrap;
  }
  .settings input {
    width: 110px;
  }
  .settings-fields,
  .opening-tools {
    flex-wrap: wrap;
  }
  .workspace {
    min-height: 560px;
    padding: 74px 38px 100px;
  }
  .dimension.x {
    top: 52px;
    left: 38px;
  }
  .dimension.y {
    left: 14px;
    top: 74px;
  }
  .room {
    transform: scale(0.7);
    transform-origin: top left;
  }
  .completion-product {
    grid-template-columns: 44px minmax(0, 1fr) auto;
  }
  .completion-current {
    display: none;
  }
  .completion-product img {
    width: 44px;
    height: 44px;
  }
  .dialog-head,
  .completion-catalog {
    padding-left: 16px;
    padding-right: 16px;
  }
  .completion-search {
    margin-left: 16px;
    margin-right: 16px;
  }
  .dialog-actions {
    display: grid;
  }
  .dialog-actions button {
    width: 100%;
  }
}
