:root {
  color-scheme: light;
  --ink: #1d1b18;
  --muted: #756f66;
  --soft: #f5f1ea;
  --paper: #fffdf9;
  --line: #e7e0d6;
  --gold: #b78b50;
  --gold-dark: #8d6737;
  --gold-soft: #f1e7d8;
  --danger: #b94a45;
  --shadow: 0 18px 40px rgba(54, 44, 31, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  overflow: hidden;
  background: #ede9e1;
  color: var(--ink);
  font-family: "DM Sans", "Segoe UI", sans-serif;
  font-size: 14px;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.app-shell {
  height: 100vh;
  min-height: 680px;
  display: grid;
  grid-template-rows: 76px 1fr;
}

.topbar {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 0 24px;
  background: rgba(255, 253, 249, 0.96);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 3px 20px rgba(48, 39, 28, 0.05);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 360px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--gold);
  border-radius: 50%;
  color: var(--gold-dark);
  font-family: "Playfair Display", serif;
  font-weight: 700;
  letter-spacing: -4px;
}

.brand-mark::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(183, 139, 80, 0.45);
  border-radius: inherit;
}

.brand h1 {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 19px;
  line-height: 1.15;
  letter-spacing: -0.2px;
}

.brand p {
  margin: 4px 0 0;
  color: var(--gold-dark);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.top-actions,
.tool-group,
.view-group {
  display: flex;
  align-items: center;
  gap: 7px;
}

.divider {
  width: 1px;
  height: 24px;
  margin: 0 5px;
  background: var(--line);
}

.button,
.icon-button,
.tool-button,
.view-button,
.mini-button {
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: 160ms ease;
}

.button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  vertical-align: middle;
}

.button.subtle,
.icon-button {
  background: var(--paper);
  border-color: var(--line);
}

.button.primary {
  background: var(--ink);
  color: white;
  box-shadow: 0 6px 15px rgba(29, 27, 24, 0.16);
}

.button.danger {
  background: #fff6f5;
  border-color: #ecd0ce;
  color: var(--danger);
}

.button:hover,
.icon-button:hover,
.mini-button:hover {
  transform: translateY(-1px);
  border-color: #cdbb9f;
  box-shadow: 0 5px 14px rgba(51, 42, 31, 0.08);
}

.icon-button {
  height: 38px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
}

.icon-button span {
  font-size: 17px;
}

button:disabled {
  opacity: 0.35;
  pointer-events: none;
}

.file-button input {
  display: none;
}

.workspace {
  position: relative;
  min-height: 0;
  display: grid;
  grid-template-columns: 282px minmax(420px, 1fr) 292px;
  transition: grid-template-columns 220ms ease;
}

.workspace.left-collapsed {
  grid-template-columns: 0 minmax(420px, 1fr) 292px;
}

.workspace.right-collapsed {
  grid-template-columns: 282px minmax(420px, 1fr) 0;
}

.workspace.left-collapsed.right-collapsed {
  grid-template-columns: 0 minmax(420px, 1fr) 0;
}

.sidebar {
  position: relative;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--paper);
}

.panel-toggle {
  width: 28px;
  height: 52px;
  position: absolute;
  z-index: 20;
  top: 50%;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #e1e5ed;
  background: rgba(255, 255, 255, 0.96);
  color: #6557e4;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  box-shadow: 0 7px 20px rgba(26, 31, 45, 0.13);
  transform: translateY(-50%);
  transition: 180ms ease;
}

.left-toggle {
  left: 282px;
  border-left: 0;
  border-radius: 0 12px 12px 0;
}

.right-toggle {
  right: 292px;
  border-right: 0;
  border-radius: 12px 0 0 12px;
}

.workspace.left-collapsed .left-panel,
.workspace.right-collapsed .right-panel {
  overflow: visible;
  padding: 0;
  border: 0;
}

.workspace.left-collapsed .left-panel > *,
.workspace.right-collapsed .right-panel > * {
  display: none;
}

.workspace.left-collapsed .left-toggle {
  left: 0;
}

.workspace.right-collapsed .right-toggle {
  right: 0;
}

.left-panel {
  position: relative;
  z-index: 4;
  padding: 22px 17px 17px;
  border-right: 1px solid var(--line);
  box-shadow: 5px 0 18px rgba(43, 36, 28, 0.03);
}

.right-panel {
  position: relative;
  z-index: 4;
  overflow-y: auto;
  border-left: 1px solid var(--line);
}

.panel-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}

.panel-heading.compact {
  align-items: center;
}

.panel-heading h2 {
  margin: 3px 0 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 20px;
}

.eyebrow {
  color: var(--gold-dark);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}

.item-count {
  padding: 4px 7px;
  border-radius: 20px;
  background: var(--soft);
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
}

.search {
  height: 40px;
  margin: 19px 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbf9f5;
  color: var(--muted);
}

.search span {
  font-size: 22px;
  line-height: 0;
  transform: translateY(-2px);
}

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

.category-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding-bottom: 11px;
  scrollbar-width: none;
}

.category-tabs::-webkit-scrollbar {
  display: none;
}

.category-tab {
  padding: 6px 9px;
  border: 0;
  border-radius: 20px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.category-tab.active {
  background: var(--ink);
  color: white;
}

.object-library {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  overflow-y: auto;
  padding: 2px 3px 16px 0;
}

.object-library::-webkit-scrollbar,
.right-panel::-webkit-scrollbar {
  width: 5px;
}

.object-library::-webkit-scrollbar-thumb,
.right-panel::-webkit-scrollbar-thumb {
  border-radius: 5px;
  background: #d9d0c4;
}

.library-item {
  min-height: 105px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 9px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: linear-gradient(145deg, #fcfaf6, #f3eee6);
  cursor: pointer;
  text-align: left;
  transition: 180ms ease;
}

.library-item:hover {
  transform: translateY(-2px);
  border-color: #cdbb9f;
  box-shadow: 0 8px 18px rgba(60, 49, 35, 0.09);
}

.library-item:hover::after {
  content: "+";
  position: absolute;
  top: 8px;
  right: 8px;
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  font-size: 15px;
}

.library-icon {
  width: 100%;
  flex: 1;
  display: grid;
  place-items: center;
  color: var(--gold-dark);
  font-size: 34px;
  filter: drop-shadow(0 8px 8px rgba(84, 61, 34, 0.12));
}

.library-item strong {
  font-size: 10px;
  line-height: 1.25;
}

.library-item small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.help-card {
  display: flex;
  gap: 9px;
  padding: 11px;
  border: 1px solid #eadcca;
  border-radius: 9px;
  background: #fbf5eb;
}

.help-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--gold);
  border-radius: 50%;
  color: var(--gold-dark);
  font-size: 11px;
  font-weight: 700;
}

.help-card strong {
  font-size: 10px;
}

.help-card p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.5;
}

.viewport-section {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: 54px minmax(0, 1fr) 28px;
  background: #eae5dd;
}

.viewport-toolbar {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(210, 201, 188, 0.8);
  background: rgba(248, 245, 239, 0.92);
}

.tool-button,
.view-button {
  height: 32px;
  padding: 0 9px;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.tool-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.tool-symbol {
  font-size: 15px;
}

.tool-button.active,
.view-button.active,
.tool-button:hover,
.view-button:hover {
  background: var(--paper);
  border-color: var(--line);
  color: var(--ink);
  box-shadow: 0 3px 8px rgba(52, 44, 34, 0.06);
}

#viewport {
  min-height: 0;
  position: relative;
  overflow: hidden;
  cursor: default;
  background: radial-gradient(circle at center, #f4f1eb 0, #e5dfd6 100%);
}

#viewport.blueprint-mode {
  cursor: crosshair;
}

.blueprint-button.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #6758e8, #4d8cf0);
}

.blueprint-toolbar {
  position: absolute;
  z-index: 8;
  left: 50%;
  bottom: 18px;
  display: flex;
  align-items: center;
  gap: 7px;
  max-width: calc(100% - 28px);
  padding: 9px;
  border: 1px solid rgba(114, 100, 238, 0.24);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 35px rgba(26, 31, 45, 0.16);
  transform: translateX(-50%);
  backdrop-filter: blur(18px);
}

.blueprint-toolbar > div {
  min-width: 170px;
  padding: 0 7px;
}

.blueprint-toolbar strong,
.blueprint-toolbar span {
  display: block;
}

.blueprint-toolbar strong {
  font-size: 10px;
}

.blueprint-toolbar span {
  margin-top: 2px;
  color: #777e90;
  font-size: 7px;
}

.blueprint-action {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 1px solid #e1e5ed;
  border-radius: 8px;
  background: #f8f9fb;
  color: #5d6474;
  cursor: pointer;
  font-size: 8px;
  font-weight: 700;
  white-space: nowrap;
}

.blueprint-action.primary {
  border-color: transparent;
  background: #6f61e9;
  color: #fff;
}

.blueprint-action.success {
  border-color: transparent;
  background: #2d9a67;
  color: #fff;
}

.blueprint-action.danger {
  color: #d64d5b;
}

.blueprint-action input {
  display: none;
}

.blueprint-opacity {
  min-width: 80px;
}

.blueprint-opacity input {
  width: 80px;
  accent-color: #7061ec;
}

.blueprint-action:disabled {
  opacity: 0.35;
  cursor: default;
}

@media (max-width: 1100px) {
  .blueprint-toolbar {
    flex-wrap: wrap;
    justify-content: center;
  }

  .blueprint-toolbar > div {
    width: 100%;
    text-align: center;
  }
}

#viewport canvas {
  width: 100%;
  height: 100%;
  display: block;
  outline: 0;
}

.loading-screen {
  position: absolute;
  z-index: 10;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  background: #ede8df;
  color: var(--muted);
  transition: opacity 300ms ease, visibility 300ms ease;
}

.loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold);
  border-radius: 50%;
  color: var(--gold-dark);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 19px;
  animation: breathe 1.4s ease-in-out infinite alternate;
}

.loading-screen p {
  margin-top: 14px;
  font-size: 11px;
}

@keyframes breathe {
  to {
    transform: scale(1.06);
    box-shadow: 0 0 0 8px rgba(183, 139, 80, 0.08);
  }
}

.viewport-hint {
  position: absolute;
  right: 13px;
  bottom: 13px;
  display: flex;
  gap: 5px;
  pointer-events: none;
}

.viewport-hint span {
  padding: 5px 8px;
  border: 1px solid rgba(222, 214, 202, 0.9);
  border-radius: 5px;
  background: rgba(255, 253, 249, 0.8);
  color: #777066;
  font-size: 8px;
  backdrop-filter: blur(8px);
}

.selection-pill {
  position: absolute;
  left: 14px;
  top: 14px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid #dcc5a4;
  border-radius: 20px;
  background: rgba(255, 253, 249, 0.9);
  color: var(--ink);
  font-size: 9px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.selection-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
}

.hidden {
  display: none !important;
}

.statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  border-top: 1px solid rgba(210, 201, 188, 0.8);
  background: #f8f5ef;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.2px;
}

.statusbar span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.status-dot {
  width: 5px;
  height: 5px;
  display: inline-block;
  border-radius: 50%;
}

.status-dot.ready {
  background: #65a879;
}

.status-dot.syncing {
  background: #d4a647;
}

.status-dot.local {
  background: #6d83d8;
}

.status-dot.offline {
  background: #e04f5f;
}

@media (hover: none) and (pointer: coarse) {
  button,
  .button,
  .file-button,
  .library-item,
  .category-tab,
  .tool-button,
  .view-button,
  .panel-toggle,
  .floor-material,
  .blueprint-action {
    min-height: 44px;
    touch-action: manipulation;
  }

  input,
  textarea,
  select {
    font-size: 16px;
  }
}

.inspector-section {
  padding: 22px 18px;
  border-bottom: 1px solid var(--line);
}

.empty-selection {
  margin: 18px 0 0;
  padding: 25px 10px;
  border: 1px dashed #ddd3c5;
  border-radius: 9px;
  color: var(--muted);
  text-align: center;
}

.empty-icon {
  margin-bottom: 8px;
  color: var(--gold);
  font-size: 27px;
}

.empty-selection strong {
  display: block;
  color: var(--ink);
  font-size: 11px;
}

.empty-selection p {
  margin: 6px 0 0;
  font-size: 9px;
  line-height: 1.55;
}

.selected-object-card {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 15px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--soft);
}

.selected-preview {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: white;
  color: var(--gold-dark);
  font-size: 23px;
}

.selected-object-card span {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 8px;
}

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

.property-group {
  margin-top: 17px;
}

.property-label,
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
}

.property-label span,
.section-title h3 {
  margin: 0;
  font-size: 10px;
  font-weight: 700;
}

.property-label small,
.section-title span {
  color: var(--muted);
  font-size: 8px;
}

.input-grid {
  display: grid;
  gap: 6px;
}

.input-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.input-grid label {
  min-width: 0;
}

.input-grid label > span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 600;
}

.input-grid input {
  width: 100%;
  height: 33px;
  padding: 0 7px;
  outline: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfaf7;
  color: var(--ink);
  font-size: 10px;
}

.input-grid input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(183, 139, 80, 0.12);
}

.range-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 45px;
  align-items: center;
  gap: 8px;
}

.range-row input {
  accent-color: var(--gold-dark);
}

.range-row output {
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfaf7;
  font-size: 9px;
}

.color-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  gap: 6px;
}

.color-picker {
  height: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfaf7;
  color: var(--muted);
  cursor: pointer;
  font-size: 9px;
}

.color-picker input,
.material-row input {
  width: 22px;
  height: 22px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 4px;
  background: none;
  cursor: pointer;
}

.mini-button {
  background: #fbfaf7;
  border-color: var(--line);
  color: var(--muted);
}

.object-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 18px;
}

.section-title {
  margin-bottom: 13px;
}

.room-settings .property-group {
  margin-top: 18px;
}

.material-row,
.toggle-row {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #eee8df;
  color: var(--muted);
  font-size: 9px;
}

.material-row > span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.material-swatch {
  width: 14px;
  height: 14px;
  display: inline-block;
  border: 1px solid rgba(0, 0, 0, 0.09);
  border-radius: 3px;
}

.material-swatch.floor {
  background: #d4c4ac;
}

.material-swatch.wall {
  background: #f1eee7;
}

.toggle-row {
  margin-top: 8px;
  color: var(--ink);
  font-weight: 600;
}

.toggle-row input {
  display: none;
}

.toggle-row i {
  width: 31px;
  height: 17px;
  position: relative;
  border-radius: 20px;
  background: #d6d0c6;
  transition: 160ms ease;
}

.toggle-row i::after {
  content: "";
  width: 13px;
  height: 13px;
  position: absolute;
  top: 2px;
  left: 2px;
  border-radius: 50%;
  background: white;
  transition: 160ms ease;
}

.toggle-row input:checked + i {
  background: var(--gold);
}

.toggle-row input:checked + i::after {
  transform: translateX(14px);
}

.shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 12px;
  padding: 14px 18px;
  color: var(--muted);
  font-size: 8px;
}

kbd {
  padding: 2px 4px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--soft);
  color: var(--ink);
  font-family: inherit;
  font-size: 7px;
  box-shadow: 0 1px 0 #d5cec3;
}

.toast-container {
  position: fixed;
  z-index: 30;
  right: 18px;
  bottom: 18px;
  display: grid;
  gap: 8px;
  pointer-events: none;
}

.toast {
  min-width: 220px;
  padding: 11px 13px;
  border: 1px solid #ded5c8;
  border-radius: 8px;
  background: rgba(255, 253, 249, 0.95);
  box-shadow: var(--shadow);
  color: var(--ink);
  font-size: 10px;
  animation: toast-in 220ms ease;
  backdrop-filter: blur(9px);
}

.toast strong {
  display: block;
  margin-bottom: 2px;
}

.toast span {
  color: var(--muted);
}

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

@media (max-width: 1160px) {
  .workspace {
    grid-template-columns: 240px minmax(360px, 1fr) 250px;
  }

  .top-actions .icon-button {
    font-size: 0;
  }

  .top-actions .icon-button span {
    font-size: 17px;
  }

  .button {
    padding: 0 10px;
  }
}

@media (max-width: 900px) {
  body {
    overflow: auto;
  }

  .app-shell {
    min-width: 760px;
  }

  .right-panel {
    display: none;
  }

  .workspace {
    grid-template-columns: 230px minmax(500px, 1fr);
  }
}

/* Modern interface refresh */
:root {
  --ink: #171a23;
  --muted: #747b8d;
  --soft: #f4f6fa;
  --paper: #ffffff;
  --line: #e5e8ef;
  --gold: #7868f2;
  --gold-dark: #5b4ddb;
  --gold-soft: #eeecff;
  --danger: #e04f5f;
  --shadow: 0 18px 50px rgba(27, 31, 45, 0.12);
}

body {
  background: #e9edf4;
  color: var(--ink);
  font-family: "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
}

.app-shell {
  grid-template-rows: 72px 1fr;
}

.topbar {
  padding: 0 20px;
  background: rgba(255, 255, 255, 0.94);
  border-color: #e7e9ef;
  box-shadow: 0 8px 28px rgba(27, 31, 45, 0.07);
  backdrop-filter: blur(18px);
}

.brand-mark {
  width: 42px;
  height: 42px;
  padding: 4px;
  overflow: hidden;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(135deg, #7868f2, #4b9cf8);
  color: white;
  box-shadow: 0 9px 22px rgba(102, 90, 225, 0.3);
}

.brand-mark::before {
  display: none;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.brand h1,
.panel-heading h2 {
  font-family: inherit;
  font-weight: 700;
  letter-spacing: -0.55px;
}

.brand h1 {
  font-size: 17px;
}

.brand p {
  color: #7d8494;
  letter-spacing: 1.2px;
}

.button,
.icon-button,
.tool-button,
.view-button,
.mini-button {
  border-radius: 9px;
}

.button.primary {
  background: linear-gradient(135deg, #6758e8, #4d8cf0);
  box-shadow: 0 8px 20px rgba(91, 77, 219, 0.25);
}

.button.subtle,
.icon-button {
  background: #f8f9fb;
  border-color: #e6e9f0;
}

.left-panel {
  padding: 22px 16px 16px;
  background: #191c27;
  border: 0;
  box-shadow: 8px 0 30px rgba(25, 28, 39, 0.16);
}

.left-panel .panel-heading h2 {
  color: #fff;
}

.left-panel .eyebrow {
  color: #a99fff;
}

.left-panel .item-count {
  background: rgba(255, 255, 255, 0.08);
  color: #b9bfd0;
}

.search {
  border-color: rgba(255, 255, 255, 0.08);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.06);
  color: #aeb4c5;
}

.search input {
  color: white;
}

.search input::placeholder {
  color: #858b9c;
}

.category-tab {
  color: #9ca3b5;
}

.category-tab.active {
  background: #7264ee;
  box-shadow: 0 5px 14px rgba(114, 100, 238, 0.25);
}

.object-library {
  gap: 10px;
}

.library-item {
  min-height: 110px;
  border-color: rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.035));
  color: white;
}

.library-item:hover {
  border-color: rgba(143, 130, 255, 0.7);
  background: linear-gradient(145deg, rgba(123, 107, 243, 0.28), rgba(255, 255, 255, 0.06));
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
}

.library-item:hover::after {
  background: #7b6cf2;
}

.library-icon {
  color: #b6adff;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.22));
}

.library-item small {
  color: #9299ab;
}

.help-card {
  border-color: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: white;
}

.help-icon {
  border-color: #8e82f6;
  color: #b6adff;
}

.help-card p {
  color: #9aa1b2;
}

.viewport-section {
  background: #e9edf3;
}

.viewport-toolbar {
  padding: 0 14px;
  border-color: #e2e6ed;
  background: rgba(249, 250, 252, 0.93);
  backdrop-filter: blur(16px);
}

.tool-button.active,
.view-button.active,
.tool-button:hover,
.view-button:hover {
  border-color: #e4e6ed;
  background: white;
  box-shadow: 0 6px 16px rgba(34, 38, 54, 0.08);
}

.tool-button.active {
  color: #6557e4;
}

#viewport {
  background: radial-gradient(circle at center, #f5f7fa 0, #e4e8ef 100%);
}

.selection-pill {
  border: 1px solid rgba(114, 100, 238, 0.25);
  background: rgba(255, 255, 255, 0.9);
}

.selection-dot {
  background: #7264ee;
  box-shadow: 0 0 0 4px rgba(114, 100, 238, 0.14);
}

.statusbar {
  border-color: #e2e6ed;
  background: #f9fafc;
}

.right-panel {
  border-color: #e5e8ef;
  background: #fff;
  box-shadow: -8px 0 30px rgba(26, 31, 45, 0.045);
}

.inspector-section {
  border-color: #edf0f4;
}

.eyebrow {
  color: #695be2;
}

.empty-selection {
  border-color: #dfe3eb;
  border-radius: 13px;
  background: #fafbfc;
}

.selected-object-card {
  border-color: #e5e8ef;
  border-radius: 12px;
  background: #f5f6fa;
}

.selected-preview {
  border-radius: 10px;
  color: #6658e5;
}

.input-grid input,
.range-row output,
.color-picker,
.mini-button {
  border-color: #e2e6ed;
  border-radius: 8px;
  background: #f8f9fb;
}

.input-grid input:focus {
  border-color: #7a6cf0;
  box-shadow: 0 0 0 3px rgba(122, 108, 240, 0.13);
}

.range-row input {
  accent-color: #7061ec;
}

.property-note {
  margin: 0;
  padding: 9px 10px;
  border-radius: 9px;
  background: #f2f0ff;
  color: #6e6689;
  font-size: 8px;
  line-height: 1.5;
}

.floor-material-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.floor-material {
  min-width: 0;
  padding: 5px;
  border: 1px solid #e4e7ed;
  border-radius: 9px;
  background: #fff;
  color: #6d7484;
  cursor: pointer;
  font-size: 7px;
  font-weight: 700;
  transition: 160ms ease;
}

.floor-material:hover {
  transform: translateY(-1px);
  border-color: #aaa1f5;
  box-shadow: 0 7px 15px rgba(35, 40, 58, 0.08);
}

.floor-material.active {
  border-color: #7769ef;
  color: #5d50d6;
  box-shadow: 0 0 0 2px rgba(119, 105, 239, 0.12);
}

.floor-material span {
  display: block;
  padding: 5px 1px 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.floor-preview {
  height: 37px;
  display: block;
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.floor-preview.concrete-light {
  background-color: #d6d3ce;
  background-image: radial-gradient(#aaa 0.6px, transparent 0.7px);
  background-size: 5px 5px;
}

.floor-preview.oak {
  background: repeating-linear-gradient(0deg, #ba8652 0 8px, #855a35 9px, #c9955d 10px 17px);
}

.floor-preview.herringbone {
  background-color: #a87849;
  background-image: linear-gradient(45deg, transparent 43%, rgba(55, 30, 14, 0.45) 44% 47%, transparent 48%),
    linear-gradient(-45deg, transparent 43%, rgba(255, 235, 195, 0.3) 44% 47%, transparent 48%);
  background-size: 14px 14px;
}

.floor-preview.marble {
  background: linear-gradient(115deg, #ececea, #c9cccd 35%, #f4f4f0 37%, #d5d7d7 53%, #f1f1ed 56%);
}

.floor-preview.terrazzo {
  background-color: #d8d0c2;
  background-image: radial-gradient(#8b735e 1px, transparent 2px), radial-gradient(#b17861 1px, transparent 2px);
  background-position: 0 0, 7px 7px;
  background-size: 12px 12px;
}

.floor-preview.tile-dark {
  background-color: #34383d;
  background-image: linear-gradient(#73777b 1px, transparent 1px), linear-gradient(90deg, #73777b 1px, transparent 1px);
  background-size: 13px 13px;
}

.material-custom-label {
  margin-top: 16px;
}

.toggle-row input:checked + i {
  background: #7061ec;
}

.toast {
  border-color: #e3e6ed;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
}
