/* Kreator i modale. */
dialog {
  width: min(880px, calc(100% - 28px));
  max-height: 92dvh;
  border: 1px solid #3a4657;
  border-radius: 16px;
  background: var(--panel);
  color: var(--text);
  padding: 25px;
}
dialog.narrow {
  max-width: 560px;
}
dialog.board-modal {
  width: min(1240px, calc(100% - 42px));
  max-height: 90dvh;
  padding: 0;
  overflow: hidden;
}
dialog.board-modal .modalhead {
  margin: 0;
  padding: 22px 26px 18px;
  border-bottom: 1px solid var(--line);
}
dialog.board-modal .modalhead h2 { font-size: 25px; }
dialog.print-preview-modal {
  width: min(calc(100% - 24px), 1500px);
  height: min(calc(100% - 24px), 1100px);
  max-height: none;
  padding: 0;
  overflow: hidden;
}
dialog.print-preview-modal .modalhead {
  margin: 0;
  padding: 17px 24px;
  border-bottom: 1px solid var(--line);
}
dialog::backdrop {
  background: #000b;
  backdrop-filter: blur(5px);
}
.modalhead {
  margin-bottom: 23px;
}
.modalhead h2 {
  margin: 0;
}
.modalhead button {
  padding: 5px 8px;
  background: transparent;
}
.modal-actions-center {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding-top: 12px;
}
.icon-action {
  width: 192px;
  height: 40px;
  padding: 0;
  font-size: 21px;
  line-height: 1;
}
.team-member-form input:focus,
.team-member-form input:focus-visible {
  outline: none;
  border-color: #37404d;
  box-shadow: none;
}
.accessory-form { gap: 20px; }
.accessory-form .grid.two { align-items: end; }
.accessory-form h3 { margin: 0; font-size: 16px; }
.accessory-section-label { margin: 0; }
.accessory-instruction-row { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 10px; align-items: center; }
.accessory-remove-link { width: 44px; }
.accessory-instructions,
.accessory-dimensions { border-top: 1px solid var(--line); padding-top: 18px; }
.project-create-form input:focus,
.project-create-form input:focus-visible {
  outline: none;
  border-color: #37404d;
  box-shadow: none;
}
.project-create-form {
  grid-template-columns: 1fr;
  gap: 18px;
}
.delete-confirmation input[readonly] { cursor: default; }
.wizard {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 24px;
}
.individual-creator {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 450px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.cabinet-creator-screen {
  height: calc(100dvh - 82px);
  min-height: calc(100dvh - 82px);
  display: grid;
  grid-template-rows: minmax(0, 1fr);
}
.cabinet-creator-screen .individual-creator {
  min-height: 0;
  height: 100%;
  border-radius: 0;
  border-left: 0;
  border-right: 0;
}
.creator-main {
  max-width: none;
  margin: 0;
  padding: 0;
}
.creator-main .tabs {
  margin: 0;
  padding: 38px 48px 0;
}
.creator-main .cabinet-creator-screen .individual-creator {
  border-top: 0;
  border-bottom: 0;
}
.creator-tools {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 18px;
  background: #11161e;
  border-right: 1px solid var(--line);
}
.creator-tools small { margin: 0 0 5px; color: var(--muted); font-size: 11px; letter-spacing: .8px; }
.creator-tools button { justify-content: flex-start; padding: 12px 10px; background: transparent; border-color: transparent; }
.creator-tools button span { width: 25px; height: 25px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 5px; font-size: 12px; }
.creator-tools button.active { color: #a2ceff; background: var(--blue-soft); border-color: #0080ff36; }
.creator-workspace { display: grid; place-items: stretch; padding: 0; background: #161b22; }
.creator-workspace > small { color: var(--muted); font-size: 12px; }
.creator-grid { width: 100%; height: 100%; min-height: 0; border: 0; background-image: linear-gradient(#263142 1px, transparent 1px), linear-gradient(90deg, #263142 1px, transparent 1px); background-size: calc(100% / 120) calc(100% / 72); }
.creator-cell { min-width: 0; min-height: 0; padding: 0; border: 0; border-radius: 0; background: transparent; }
.creator-cell:hover { background: #0080ff20; }
.creator-cell.has-piece { display: grid; place-items: center; background: #0080ff2b; color: #a8d4ff; }
.creator-cell.piece-leg { background: #5d9ce533; }
.creator-cell.piece-side { background: #0080ff42; }
.creator-cell.piece-rail { background: #6b94ca42; }
.creator-cell span { font-size: 11px; font-weight: 700; }
.typechoices {
  display: grid;
  gap: 7px;
  align-content: start;
}
.typechoices button {
  text-align: left;
  justify-content: flex-start;
  font-size: 12px;
  padding: 11px;
  background: #131820;
}
.typechoices button.selected {
  background: var(--blue-soft);
  border-color: var(--blue);
  color: #a7d2ff;
}
.preview {
  display: grid;
  grid-template-columns: 140px 1fr;
  align-items: center;
  gap: 14px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #121720;
}
.preview svg {
  width: 140px;
  height: 133px;
}
.preview strong {
  display: block;
  margin: 7px 0;
}
.preview small {
  font-size: 11px;
}
.wizardfooter {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.step {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 1px;
  margin-bottom: 10px;
}
#toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 99;
  max-width: calc(100% - 48px);
  padding: 14px 20px;
  border: 1px solid #2a74b9;
  background: #152a40;
  box-shadow: 0 10px 40px #0006;
  color: #e1efff;
  border-radius: 10px;
  font-size: 13px;
}
#printRoot {
  display: none;
}
