@font-face {
  font-family: FiraGO;
  src: url('assets/fonts/firago-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: FiraGO;
  src: url('assets/fonts/firago-600.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}
:root {
  --ink: #162c25;
  --green: #162c25;
  --muted: #797979;
  --line: #eeeeee;
  --soft: #f5f5f5;
  --blue: #cbdef3;
  --hover: #b43e35;
  --sidebar: 440px;
  font-family: FiraGO, Arial, sans-serif;
  color: var(--ink);
  color-scheme: light;
  font-synthesis: none;
  font-size: 14px;
}
* { box-sizing: border-box; }
body { margin: 0; background: #fff; }
button, select, input { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; }
button:disabled { cursor: default; }
*:focus, *:focus-visible { outline: none; }
button:focus-visible, summary:focus-visible { filter: brightness(.92); }
svg { fill: none; stroke: currentColor; stroke-width: 1.5; }
button > svg { width: 22px; height: 22px; flex-shrink: 0; }
[hidden] { display: none !important; }
.selector {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  height: 100vh;
  height: 100dvh;
  min-height: 520px;
  overflow: hidden;
}
.sidebar {
  min-height: 0;
  background: #fff;
  border-right: 1px solid var(--line);
  z-index: 20;
}
.sidebar-content {
  height: 100%;
  padding: 30px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #d0d4d1 transparent;
}
.filters-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}
.floor-filter {
  min-width: 0;
  min-height: 54px;
  border: 1px solid #e2e2e2;
  border-radius: 8px;
  padding: 8px 13px 5px;
  order: 0;
}
.floor-filter label { display: block; color: var(--muted); font-size: 10px; }
.floor-filter select {
  width: 100%;
  border: 0;
  background: #fff;
  font-size: 12px;
  padding: 6px 0 4px;
  cursor: pointer;
}
.catalogue-area-control { order: 1; }
.catalogue-number-filter { order: 2; }
#filters-grid .catalogue-area-panel { left: auto; right: 0; }
.favorites-toggle {
  order: 3;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid #e2e2e2;
  border-radius: 8px;
  font-size: 12px;
  padding: 10px;
}
.favorites-toggle.is-active { border-color: #a5b6ac; }
.favorites-toggle.is-active > svg { fill: #162c251f; }
.viewer { min-width: 0; overflow: hidden; position: relative; isolation: isolate; background: #fff; }
.viewer-toolbar {
  position: absolute;
  top: 30px;
  right: 30px;
  left: 30px;
  z-index: 10;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  pointer-events: none;
}
.viewer-toolbar > * { pointer-events: auto; }
.view-tabs { display: flex; overflow: hidden; border-radius: 5px; background: #fff; box-shadow: 0 1px 5px #162c2510; }
.view-tabs button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-right: 1px solid #f0f0f0;
  font-size: 13px;
  white-space: nowrap;
}
.view-tabs button:last-child { border-right: 0; }
.view-tabs button.is-active { color: #fff; background: var(--green); }
.icon-button {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 27px;
  background: #fff;
}
.icon-button:hover { background: #eef1ef; }
.mobile-filters { display: none; }
.collapse-sidebar {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  z-index: 12;
  height: 46px;
  width: 27px;
  border: 1px solid var(--line);
  border-left: 0;
  border-radius: 0 12px 12px 0;
  background: #fff;
  display: grid;
  place-items: center;
}
.collapse-sidebar > svg { width: 20px; height: 20px; }
.selector.is-sidebar-collapsed { grid-template-columns: 0 minmax(0, 1fr); }
.is-sidebar-collapsed .sidebar { visibility: hidden; }
.is-sidebar-collapsed .collapse-sidebar > svg { transform: rotate(180deg); }
.model-view { position: absolute; inset: 0; background: #f7f8f6; }
.model-view > canvas { width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.model-view > canvas:active { cursor: grabbing; }
.model-loading { position: absolute; top: 48%; left: 15%; right: 15%; text-align: center; line-height: 1.8; color: var(--muted); pointer-events: none; }
.model-controls { position: absolute; bottom: 28px; left: 30px; right: 30px; display: flex; align-items: center; justify-content: space-between; pointer-events: none; }
.model-controls > * { pointer-events: auto; }
.rotation-controls, .zoom-controls { display: flex; align-items: center; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 6px #162c2510; }
.rotation-controls button, .zoom-controls button { height: 44px; min-width: 40px; padding: 0 10px; font-size: 23px; }
.rotation-controls button:hover, .zoom-controls button:hover { background: #eef2ef; }
.zoom-controls button:disabled { opacity: .3; }
#plan-zoom-reset { font-size: 12px; min-width: 54px; }
.floor-rail {
  position: absolute;
  top: 112px;
  bottom: 110px;
  right: 23px;
  width: 46px;
  z-index: 7;
  overflow-y: auto;
  background: #fff;
  border-radius: 9px;
  scrollbar-width: none;
  box-shadow: 0 1px 7px #162c250d;
}
.floor-rail::-webkit-scrollbar { display: none; }
.rail-button { display: block; width: 100%; height: 34px; border-bottom: 1px solid var(--line); font-size: 15px; font-variant-numeric: tabular-nums; }
.rail-button:hover { background: #edf2ef; }
.rail-button.is-active { background: var(--green); color: white; }
.plan-view { position: absolute; inset: 0; background: #fff; padding: 108px 85px 24px 40px; display: flex; flex-direction: column; }
.plan-header { display: flex; align-items: center; justify-content: space-between; padding-bottom: 18px; gap: 14px; }
.plan-header h1 { margin: 0; font-size: 19px; font-weight: 400; }
.plan-header > span { color: var(--muted); font-size: 12px; }
.plan-canvas { flex: 1; min-height: 0; overflow: auto; position: relative; scrollbar-width: thin; scrollbar-color: #ccd5d0 transparent; }
.floor-plan-frame { position: relative; margin: 0 auto; }
.floor-plan-frame > img { width: 100%; height: 100%; display: block; }
.plan-overlay { width: 100%; height: 100%; position: absolute; inset: 0; overflow: visible; stroke: none; }
.plan-unit { fill: #cbdef326; stroke: transparent; stroke-width: 2px; vector-effect: non-scaling-stroke; cursor: pointer; fill-rule: evenodd; transition: fill .12s ease; }
.plan-unit:hover, .plan-unit.is-hovered, .plan-unit.is-selected, .plan-unit:focus-visible { fill: #b43e35c7; stroke: white; outline: none; }
.has-hovered-unit .plan-unit.is-selected:not(.is-hovered) { fill: #cbdef326; stroke: transparent; }
.plan-unit.is-filtered-out { fill: #e7e7e744; stroke: transparent; pointer-events: none; }
.plan-unit-label { font-family: FiraGO, sans-serif; font-size: 1.7px; fill: #1b3047; stroke: none; pointer-events: none; }
.plan-bottom { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-top: 14px; min-height: 58px; }
.plan-bottom p { font-size: 11px; line-height: 1.8; color: var(--muted); margin: 0; max-width: 60%; }
.plan-unavailable { text-align: center; font-size: 14px; color: var(--muted); padding: 25vh 25px; line-height: 1.9; }
.unit-preview {
  position: fixed;
  z-index: 18;
  width: 225px;
  padding: 44px 16px 16px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 5px 28px #122c2526;
  max-height: calc(100dvh - 94px);
  overflow-y: auto;
}
.has-preview-rail .model-view { right: 257px; }
.has-preview-rail .plan-view { right: 257px; padding-left: 14px; padding-right: 14px; }
.has-preview-rail .plan-header { flex-wrap: wrap; }
.has-preview-rail .plan-bottom { display: none; }
.preview-close, .preview-save { position: absolute; top: 10px; width: 32px; height: 32px; padding: 0; display: grid; place-items: center; line-height: 1; }
.preview-close { left: 10px; font-size: 29px; font-weight: 400; }
.preview-save { right: 10px; font-size: 26px; }
.preview-open { display: flex; flex-direction: column; width: 100%; padding: 0; align-items: flex-start; text-align: left; gap: 10px; }
.preview-open > img { width: 100%; height: 155px; object-fit: contain; margin-bottom: 7px; }
.preview-number { background: var(--green); color: #fff; padding: 5px 7px; border-radius: 3px; font-size: 13px; }
#preview-area, #preview-floor { font-size: 13px; color: var(--muted); }
.preview-more { padding: 10px; margin-top: 4px; border: 1px solid #e0e5e1; width: 100%; text-align: center; border-radius: 7px; font-size: 12px; }
.preview-open:hover .preview-more { border-color: #7a8d82; }
.is-saved { color: #263c30; }
.is-saved > svg { fill: currentColor; }
#unit-save, #unit-save:hover, .preview-save, .preview-save:hover { background: transparent; }
.grid-view { position: absolute; inset: 0; padding: 110px 30px 35px; background: #fff; display: flex; flex-direction: column; overflow: hidden; }
.grid-view > h1 { font-size: 18px; font-weight: 400; margin: 0 0 26px; }
.availability-grid { min-height: 0; overflow: auto; scrollbar-width: thin; }
.availability-grid table { border-collapse: separate; border-spacing: 5px; margin: 0 auto; }
.availability-grid th { font-size: 12px; font-weight: 400; color: var(--muted); min-width: 42px; }
.availability-grid thead th { position: sticky; top: 0; background: #fff; z-index: 2; padding-bottom: 12px; }
.availability-grid tbody th { position: sticky; left: 0; background: #fff; z-index: 1; }
.availability-grid tbody th button { width: 42px; height: 37px; border-radius: 4px; font-size: 14px; }
.availability-grid tbody th button:hover { background: var(--soft); }
.grid-unit, .grid-missing { width: 42px; height: 37px; display: grid; place-items: center; border-radius: 4px; font-size: 11px; background: #dce7f1; border: 1px solid transparent; font-variant-numeric: tabular-nums; }
.grid-unit:hover, .grid-unit.is-hovered, .grid-unit.is-selected { background: var(--hover); color: #fff; border-color: #fff; }
.has-hovered-unit .grid-unit.is-selected:not(.is-hovered) { background: #dce7f1; color: var(--ink); border-color: transparent; }
.grid-unit:disabled { background: #f2f3f2; color: #c3c7c3; }
.grid-missing { color: #b6bdb8; background: #f5f5f5; }
#grid-empty { text-align: center; color: var(--muted); font-size: 13px; }
.is-unit-view { display: block; }
.is-unit-view > .sidebar { display: none; }
.is-unit-view > .viewer { height: 100%; }
.is-unit-view .viewer-toolbar, .is-unit-view .collapse-sidebar { display: none; }
.unit-view { position: absolute; inset: 0; z-index: 20; background: #fff; display: flex; flex-direction: column; }
.unit-page-header { height: 86px; min-height: 86px; padding: 0 34px; display: flex; align-items: center; justify-content: space-between; background: #fff; border-bottom: 1px solid #f3f3f3; }
.unit-back { display: flex; align-items: center; gap: 14px; padding: 10px 0; font-size: 14px; }
.unit-back > svg { height: 28px; width: 28px; padding: 4px; background: var(--soft); border-radius: 50%; }
.unit-page-tools { display: flex; gap: 8px; }
.unit-page-tools .icon-button { background: var(--soft); }
.unit-page-body { min-height: 0; flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 420px; }
.unit-visual { padding: 28px 34px 22px; background: #f5f5f5; min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 20px; }
.unit-plan-image { position: relative; flex: 1; min-height: 0; background: white; border-radius: 14px; overflow: hidden; padding: 24px; }
.unit-plan-image > img { display: block; height: 100%; width: 100%; object-fit: contain; }
.unit-plan-image > .icon-button { position: absolute; right: 18px; bottom: 18px; background: var(--soft); }
.unit-plan-image:fullscreen { background: white; padding: 40px; }
.unit-placement { display: flex; justify-content: center; }
.unit-placement button { min-height: 46px; padding: 12px 22px; font-size: 14px; background: #fff; border: 1px solid transparent; }
.unit-placement button:first-child { border-radius: 10px 0 0 10px; }
.unit-placement button:last-child { border-radius: 0 10px 10px 0; }
.unit-placement button.is-active { border-color: var(--ink); }
.unit-information { overflow-y: auto; padding: 42px 36px; }
.unit-information > h1 { font-size: 28px; margin: 10px 0 32px; font-weight: 600; color: #172d43; }
.unit-floor-label { color: #172d43; font-size: 16px; margin: 0; line-height: 1.8; }
.unit-facts dl { margin: 0; }
.unit-facts dl > div { display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid #ececec; padding: 20px 0; }
.unit-facts dt { color: var(--muted); font-size: 14px; }
.unit-facts dd { margin: 0; font-size: 18px; font-weight: 600; white-space: nowrap; }
.unit-location-options { margin-top: 50px; }
.unit-location-options h2 { font-size: 18px; margin: 0 0 20px; }
.unit-location-options button { width: 100%; min-height: 54px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 14px; text-align: left; font-size: 13px; padding: 16px 0; }
.unit-location-options button > svg { width: 18px; height: 18px; }
.unit-location-options button:hover { color: #5c7d6c; }
.viewer-notice { position: absolute; left: 50%; bottom: 90px; transform: translateX(-50%); z-index: 40; background: var(--green); color: #fff; padding: 13px 18px; border-radius: 9px; font-size: 12px; line-height: 1.8; max-width: 85%; }
.sidebar-backdrop { position: fixed; inset: 0; background: #152c2550; z-index: 19; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (min-width: 1400px) { :root { --sidebar: 460px; } }
@media (max-width: 1100px) {
  :root { --sidebar: 350px; }
  .sidebar-content { padding: 22px; }
  .viewer-toolbar { top: 22px; right: 22px; left: 22px; gap: 8px; }
  .view-tabs button { padding: 12px; font-size: 12px; }
  .viewer-toolbar > .icon-button { display: none; }
  .unit-page-body { grid-template-columns: minmax(0, 1fr) 340px; }
  .unit-information { padding: 28px; }
  .unit-visual { padding: 24px; }
}
@media (max-width: 700px) {
  .selector { display: block; min-height: 450px; }
  .viewer { height: 100%; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: min(420px, 88vw); transform: translateX(-102%); transition: transform .2s ease; box-shadow: 0 0 30px #162c2520; }
  .is-sidebar-open .sidebar { transform: translateX(0); }
  .sidebar-content { padding: 22px 18px; }
  .is-sidebar-collapsed .sidebar { visibility: visible; }
  .collapse-sidebar { display: none; }
  .viewer-toolbar { top: 16px; left: 14px; right: 14px; justify-content: space-between; }
  .mobile-filters { display: flex; align-items: center; gap: 8px; min-height: 45px; padding: 10px 12px; background: white; border-radius: 8px; font-size: 11px; box-shadow: 0 1px 6px #162c2510; }
  .mobile-filters > svg { width: 18px; height: 18px; }
  .view-tabs button { font-size: 11px; padding: 11px 10px; gap: 6px; }
  .view-tabs button > svg { width: 18px; height: 18px; }
  .floor-rail { right: 12px; width: 35px; top: 91px; bottom: 96px; }
  .rail-button { font-size: 13px; height: 31px; }
  .model-controls { left: 14px; right: 14px; bottom: 20px; }
  .rotation-controls button, .zoom-controls button { min-width: 36px; height: 42px; }
  .plan-view { padding: 91px 57px 20px 18px; }
  .plan-header { padding-bottom: 15px; }
  .plan-header h1 { font-size: 16px; }
  .plan-header > span { font-size: 11px; }
  .plan-bottom { gap: 8px; }
  .plan-bottom p { font-size: 9px; max-width: 50%; }
  .plan-bottom .zoom-controls button { min-width: 28px; padding: 0 6px; }
  #plan-zoom-reset { min-width: 43px; font-size: 10px; }
  .grid-view { padding: 94px 15px 24px; }
  .grid-view > h1 { font-size: 16px; }
  .availability-grid table { border-spacing: 4px; }
  .unit-page-header { height: 70px; min-height: 70px; padding: 0 17px; }
  .unit-back { font-size: 12px; gap: 8px; }
  .unit-page-tools { gap: 5px; }
  .unit-page-tools .icon-button { width: 41px; height: 41px; }
  .unit-page-body { display: flex; flex-direction: column; overflow-y: auto; }
  .unit-visual { padding: 16px; min-height: 65vh; flex-shrink: 0; gap: 15px; }
  .unit-plan-image { min-height: 48vh; padding: 15px; }
  .unit-placement button { font-size: 12px; padding: 12px 17px; }
  .unit-information { padding: 26px 24px 40px; flex-shrink: 0; overflow: visible; }
  .unit-information > h1 { font-size: 24px; margin-bottom: 20px; }
  .unit-floor-label { font-size: 14px; }
  .unit-location-options { margin-top: 30px; }
  .unit-preview { width: 225px; }
  .viewer-notice { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
