/* «Geniş baxış» - a whole complex: buildings side by side, floors as rows, apartments as coloured cells */
.page.sw-page { max-width: none; }

.sw-filters { padding: 14px 18px; margin-bottom: 14px; }
.sw-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sw-row + .sw-row { margin-top: 12px; }
.sw-row .chips { margin: 0; }
.sw-label { flex: none; min-width: 72px; font-size: 13px; font-weight: 600; color: var(--muted); }
.sw-selects .select { width: auto; min-width: 170px; }
.sw-selects .search { flex: 1 1 240px; max-width: 360px; }
.sw-size { display: flex; gap: 6px; margin-left: auto; }

/* KPI strip */
.sw-kpis { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.sw-kpi {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 8px 14px; min-width: 108px;
}
.sw-kpi span { display: block; font-size: 12px; color: var(--muted); }
.sw-kpi b { font-size: 18px; font-variant-numeric: tabular-nums; }
.sw-kpi.is-late b { color: var(--st-issue); }

/* Legend: a swatch, the label and the count; pressed = picked out */
.sw-legend { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.sw-lg {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px 0 10px;
  border-radius: var(--r-pill); border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  font: 500 13px var(--font); cursor: pointer;
}
.sw-lg i { width: 14px; height: 14px; border-radius: 4px; flex: none; }
.sw-lg .n { color: var(--muted); font-variant-numeric: tabular-nums; }
.sw-lg[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); color: var(--ink); }
.sw-hint { font-size: 12.5px; color: var(--muted); }

/* Phases and the street of buildings */
.sw-phase + .sw-phase { margin-top: 28px; }
.sw-phead { font-size: 16px; margin-bottom: 12px; }
.sw-phead span { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 8px; }
.sw-street { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; }

.sw-bld {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--shadow-sm); padding: 12px 12px 10px; max-width: 100%;
}
.sw-bhead { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.sw-btitle h3 { font-size: 15px; }
.sw-btitle span { display: block; font-size: 12px; color: var(--muted); }
.sw-btitle em { font-style: normal; color: var(--st-issue); font-weight: 600; }
.sw-bprog { display: flex; align-items: center; gap: 8px; margin: 6px 0 10px; }
.sw-bprog .bm-track { height: 6px; }
.sw-bprog b { font-size: 12px; font-variant-numeric: tabular-nums; min-width: 32px; text-align: right; }
.sw-none { font-size: 13px; color: var(--muted); padding: 8px 0; }

/* Blocks side by side, lined up at the ground floor */
.sw-blocks { display: flex; align-items: flex-end; gap: 12px; padding-bottom: 2px; }
.sw-block { flex: none; }
.sw-bname { font-size: 11.5px; font-weight: 600; color: var(--ink-2); margin: 0 0 4px 20px; }
.sw-floors { display: flex; flex-direction: column; gap: 2px; border-bottom: 3px solid #C9CFD8; padding-bottom: 2px; }
.sw-floor { display: flex; align-items: center; gap: 4px; }
.sw-fno { width: 16px; flex: none; text-align: right; font-size: 10px; color: var(--muted); font-variant-numeric: tabular-nums; }
.sw-cells { display: flex; gap: 2px; }

.sw-cell {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; height: 22px; padding: 0 3px; border: 0; border-radius: 4px;
  font: 600 10.5px var(--font); font-variant-numeric: tabular-nums; cursor: pointer;
  background: #E3E6EB; color: var(--ink-2);
  transition: opacity .15s;
}
/* Hover marks the cell with a ring only - no scaling, so nothing around it moves or grows a scrollbar */
.sw-cell:hover { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ink); position: relative; z-index: 2; }
.sw-cell:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.sw-cell.is-dim { opacity: .16; }
.size-small .sw-cell { min-width: 12px; width: 12px; height: 11px; padding: 0; border-radius: 2px; }
.size-small .sw-cells, .size-small .sw-floors { gap: 1px; }
.size-small .sw-fno { font-size: 9px; }
.size-small .sw-floor { gap: 3px; }
.size-small .sw-cell:hover { box-shadow: 0 0 0 1px #fff, 0 0 0 3px var(--ink); }

/* Colours - one class per mode and group; the legend swatches wear the same classes */
.c-progress-full { background: #2E9E5B; color: #fff; }
.c-progress-part { background: #377EF6; color: #fff; }
.c-progress-start { background: #BBD3FB; color: #1E3D73; }
.c-progress-late { background: #E0711F; color: #fff; }
.c-progress-none { background: #E3E6EB; color: #6B7280; }

.c-sale-sold { background: #2C4A6E; color: #fff; }
.c-sale-reserved { background: #E0A030; color: #2C2929; }
.c-sale-free { background: #CDEBD7; color: #1F5C37; }

.c-rooms-studio { background: #9B7BE0; color: #fff; }
.c-rooms-r1 { background: #D6E5FD; color: #1E3D73; }
.c-rooms-r2 { background: #A7C6FA; color: #1E3D73; }
.c-rooms-r3 { background: #6A9EF4; color: #fff; }
.c-rooms-r4 { background: #2F6BD0; color: #fff; }
.c-rooms-r5 { background: #1B437F; color: #fff; }

.c-notes-problem { background: #D6453D; color: #fff; }
.c-notes-delay { background: #E0A030; color: #2C2929; }
.c-notes-other { background: #7A848F; color: #fff; }
.c-notes-clean { background: #E3E6EB; color: #6B7280; }

.c-status-NotReady { background: var(--st-notready); color: #fff; }
.c-status-Ready { background: var(--st-ready); color: #fff; }
.c-status-Scheduled { background: var(--st-scheduled); color: #2C2929; }
.c-status-HandedOver { background: var(--st-handedover); color: #fff; }
.c-status-Issue { background: var(--st-issue); color: #fff; }

/* Hover card */
.sw-tip {
  position: fixed; z-index: 80; pointer-events: none; max-width: 280px;
  background: var(--ink); color: #fff; border-radius: 10px; padding: 8px 11px;
  font-size: 12.5px; line-height: 1.45; box-shadow: var(--shadow-md);
}
.sw-tip b { font-size: 13.5px; }
.sw-tip span { display: block; color: rgba(255, 255, 255, .82); }
.sw-tip b + span { display: inline; margin-left: 4px; }
.sw-tip-g { display: flex !important; align-items: center; gap: 6px; margin-top: 3px; color: #fff !important; }
.sw-tip-g i { width: 10px; height: 10px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .5); }

@media (max-width: 760px) {
  .sw-filters { padding: 12px; }
  .sw-label { min-width: 0; width: 100%; }
  .sw-selects .select { flex: 1 1 45%; min-width: 0; }
  .sw-selects .search { flex: 1 1 100%; max-width: none; }
  .sw-size { margin-left: 0; }
  .sw-row .chips { width: 100%; }
  .sw-legend { flex-wrap: nowrap; overflow-x: auto; margin-left: -16px; margin-right: -16px; padding: 0 16px; scrollbar-width: none; }
  .sw-lg { flex: none; }
  .sw-hint { display: none; }
  .sw-bld { width: 100%; }
  /* A phone: a wide building scrolls sideways inside its card (the scrollbar is always there, so nothing jumps) */
  .sw-blocks { overflow-x: scroll; scrollbar-width: thin; padding: 4px 4px 6px; }
  .sw-kpi { min-width: 0; flex: 1 1 30%; padding: 6px 10px; }
  .sw-kpi b { font-size: 16px; }
}
