Skip to content

Self-hosted house planner: true-scale 2D floor plan, 3D, satellite map overlay, sewer, electrical, water and underfloor heating with calculations, priced bill of materials. React + PHP, no database. By the team behind homedesignsai.pro

9.7 KB
Raw Blame
html {
  font: var(--text-md) / 1.4 var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.card--padded {
  padding: var(--space-4);
}

.eyebrow {
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.muted {
  color: var(--muted);
  font-size: 13px;
}

.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-4) var(--space-2);
}

.panel__title {
  font-size: var(--text-lg);
  font-weight: 650;
}

.panel__actions {
  display: flex;
  gap: var(--space-1);
}

.panel__body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: var(--space-2) var(--space-4) var(--space-4);
}

.panel__foot {
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--line);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: var(--control-h);
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 550;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.btn--sm {
  height: var(--control-h-sm);
  padding: 0 10px;
  font-size: 12.5px;
}

.btn:hover:not(:disabled),
.btn--pressed {
  border-color: var(--line-strong);
  background: #faf8f5;
}

.btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.btn--primary,
.btn--primary:hover:not(:disabled) {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.btn--primary:hover:not(:disabled) {
  background: var(--accent-hover);
}

.btn--ghost {
  border-color: transparent;
  background: transparent;
  color: var(--ink-2);
}

.btn--ghost:hover:not(:disabled) {
  border-color: transparent;
  background: var(--surface-2);
}

.btn--danger {
  color: var(--danger);
}

.btn--danger:hover:not(:disabled) {
  border-color: #f3c9c2;
  background: var(--danger-soft);
}

.btn__icon {
  display: inline-flex;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: var(--control-h);
  height: var(--control-h);
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.icon-btn--sm {
  width: var(--control-h-sm);
  height: var(--control-h-sm);
}

.icon-btn:hover:not(:disabled) {
  background: var(--surface-2);
  color: var(--ink);
}

.icon-btn--active,
.icon-btn--active:hover:not(:disabled) {
  background: var(--accent);
  color: #fff;
}

.icon-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.segmented {
  display: inline-flex;
  flex: none;
  gap: 2px;
  height: 36px;
  padding: 3px;
  border-radius: 10px;
  background: var(--surface-3);
}

.segmented--sm {
  height: 30px;
}

.segmented__item {
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.segmented--sm .segmented__item {
  padding: 0 9px;
  font-size: 12px;
}

.segmented__item:hover {
  color: var(--ink);
  text-decoration: none;
}

.segmented__item--active,
.segmented__item--active:hover {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 20px;
  padding: 0 8px;
  border-radius: var(--radius-pill);
  background: var(--surface-3);
  color: var(--ink-2);
  font-size: var(--text-xs);
  font-weight: 600;
  white-space: nowrap;
}

.badge--accent {
  background: var(--accent-soft);
  color: var(--accent);
}

.badge--ok {
  background: var(--ok-soft);
  color: var(--ok);
}

.badge--warn {
  background: var(--warn-soft);
  color: var(--accent-ink);
}

.badge--danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.field {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
}

.field__label {
  color: var(--muted);
  font-size: 12px;
}

.input {
  display: inline-flex;
  align-items: center;
  height: var(--control-h);
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.input--sm {
  height: var(--control-h-sm);
  border-radius: var(--radius-xs);
}

.input:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.input--invalid {
  border-color: var(--danger);
}

.input__control {
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.input__suffix {
  flex: none;
  margin-left: 4px;
  color: var(--muted);
  font-size: 12px;
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.checkbox__control {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.checkbox__box {
  width: 16px;
  height: 16px;
  flex: none;
  border: 1.5px solid var(--line-strong);
  border-radius: 5px;
  background: var(--surface);
  transition: background 0.15s, border-color 0.15s;
}

.checkbox__control:checked + .checkbox__box {
  border-color: var(--accent);
  background: var(--accent)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / 14px no-repeat;
}

.checkbox__control:focus-visible + .checkbox__box {
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.table-wrap {
  overflow: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table th {
  position: sticky;
  top: 0;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.table--dense th,
.table--dense td {
  padding: 5px 8px;
}

.table tbody tr:hover td {
  background: #fcfbf9;
}

.table__row--muted td {
  color: var(--muted);
}

.table th.num {
  text-align: right;
}

.canvas-toolbar {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  border-radius: 14px;
  z-index: var(--z-chrome);
}

.canvas-toolbar--column {
  flex-direction: column;
}

.canvas-toolbar--top-left {
  top: var(--chrome-top);
  left: var(--chrome-left, 12px);
}

.canvas-toolbar--top-right {
  top: var(--chrome-top);
  right: 12px;
}

.canvas-toolbar--top-center {
  top: var(--chrome-top);
  left: 50%;
  transform: translateX(-50%);
}

.canvas-toolbar--bottom-left {
  bottom: 12px;
  left: var(--chrome-left, 12px);
}

.canvas-toolbar--bottom-right {
  right: 12px;
  bottom: 12px;
}

.canvas-toolbar--bottom-center {
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
}

.canvas-toolbar__sep {
  align-self: stretch;
  width: 1px;
  margin: 4px 2px;
  background: var(--line);
}

.canvas-toolbar--column .canvas-toolbar__sep {
  width: auto;
  height: 1px;
  margin: 2px 4px;
}

.menu {
  position: relative;
}

.menu__panel {
  position: absolute;
  top: calc(100% + 8px);
  max-height: 70vh;
  overflow: auto;
  padding: 6px;
  box-shadow: var(--shadow-lg);
  z-index: var(--z-popover);
}

.menu__panel--right {
  right: 0;
}

.menu__panel--left {
  left: 0;
}

.menu__section + .menu__section {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}

.menu__title {
  padding: 6px 8px 4px;
}

.menu__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 32px;
  padding: 6px 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.menu__item:hover:not(:disabled) {
  background: var(--surface-2);
}

.menu__item:disabled {
  color: var(--muted);
  cursor: default;
}

.menu__label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.menu__hint {
  flex: none;
  color: var(--muted);
  font-size: 12px;
}

.menu__scroll {
  max-height: 320px;
  overflow: auto;
}

.menu__note {
  padding: 6px 8px;
  color: var(--muted);
  font-size: 12.5px;
}

.menu__note--error {
  color: var(--danger);
}

.is-demo {
  --demo-h: 24px;
}

.is-demo #root {
  height: calc(100% - var(--demo-h));
  margin-top: var(--demo-h);
}

.demo-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--demo-h, 24px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  white-space: nowrap;
}

.demo-banner__text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.demo-banner__text--short {
  display: none;
}

@media (max-width: 760px) {
  .demo-banner__text--long {
    display: none;
  }

  .demo-banner__text--short {
    display: inline;
  }
}

.demo-banner__link {
  flex: none;
  color: var(--accent-ink);
  font-weight: 600;
}