:root {
  --bg: #0f0f1a;
  --bg2: #16162a;
  --bg3: #1e1e35;
  --surface: #252540;
  --surface2: #2e2e50;
  --border: rgba(255,255,255,0.1);
  --border2: rgba(255,255,255,0.18);
  --text: #e8e8f0;
  --text2: #9898b8;
  --text3: #5a5a80;
  --accent: #3a7bd5;
  --accent-light: rgba(58,123,213,0.15);
  --accent-border: rgba(58,123,213,0.4);
  --danger: #ef4444;
  --danger-bg: rgba(239,68,68,0.12);
  --success: #22c55e;
  --radius: 10px;
  --radius-sm: 6px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --mono: 'SF Mono', 'Fira Code', 'Consolas', 'Courier New', monospace;
  --header-h: 52px;
  --tabs-h: 40px;
  --fab-area-h: 80px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  user-select: none;
  -webkit-user-select: none;
}

/* HEADER */
.app-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 100;
}
.header-left { display: flex; align-items: center; gap: 10px; }
.app-logo { color: var(--accent); display: flex; align-items: center; }
.app-title { font-size: 16px; font-weight: 700; letter-spacing: -0.3px; }
.header-right { display: flex; align-items: center; gap: 6px; }

/* FLOOR TABS */
.floor-tabs {
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0;
  height: var(--tabs-h);
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 4px;
  overflow-x: auto;
  z-index: 99;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.floor-tabs::-webkit-scrollbar { display: none; }
.floor-tab {
  flex-shrink: 0;
  padding: 5px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  color: var(--text2);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--font);
  letter-spacing: 0.2px;
}
.floor-tab.active {
  background: var(--accent-light);
  border-color: var(--accent-border);
  color: var(--accent);
}
.floor-tab:hover:not(.active) { background: var(--surface); color: var(--text); }

/* CANVAS */
.canvas-wrap {
  position: fixed;
  top: calc(var(--header-h) + var(--tabs-h));
  left: 0; right: 0;
  bottom: var(--fab-area-h);
  background: var(--bg3);
  overflow: hidden;
  cursor: grab;
}
.canvas-wrap.grabbing { cursor: grabbing; }
#planCanvas { display: block; }

.canvas-hint {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: var(--text3);
  pointer-events: none;
}
.hint-icon { margin-bottom: 12px; opacity: 0.4; }
.canvas-hint p { font-size: 14px; line-height: 1.6; }
.canvas-hint strong { color: var(--text2); }

/* CANVAS CONTROLS */
.canvas-controls {
  position: fixed;
  right: 14px;
  bottom: calc(var(--fab-area-h) + 14px);
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 50;
}
.btn-canvas-ctrl {
  width: 38px; height: 38px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 20px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-family: var(--font);
  transition: background 0.15s;
}
.btn-canvas-ctrl:hover { background: var(--surface2); }
.btn-canvas-ctrl svg { display: block; }

/* FAB AREA */
.fab-area {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--fab-area-h);
  background: linear-gradient(to top, var(--bg2) 60%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 0 20px 12px;
  z-index: 100;
}
.fab-primary {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  color: white;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(58,123,213,0.4);
  transition: transform 0.15s, box-shadow 0.15s;
  flex-shrink: 0;
}
.fab-primary:active { transform: scale(0.93); box-shadow: 0 2px 10px rgba(58,123,213,0.3); }

.fab-secondary {
  padding: 10px 18px;
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  display: flex; align-items: center; gap: 8px;
  transition: background 0.15s;
}
.fab-secondary:hover { background: var(--surface2); }

/* BUTTONS */
.btn-icon {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text2);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-icon:hover { background: var(--surface); color: var(--text); border-color: var(--border); }

.btn-primary {
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  border: none;
  color: white;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: opacity 0.15s;
}
.btn-primary:hover { opacity: 0.9; }
.btn-primary.btn-full { width: 100%; }

.btn-secondary {
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.15s;
}
.btn-secondary:hover { background: var(--surface2); }
.btn-secondary.btn-full { width: 100%; }

.btn-danger {
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  background: var(--danger-bg);
  border: 1px solid rgba(239,68,68,0.25);
  color: var(--danger);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
}
.btn-danger.btn-full { width: 100%; }

.btn-small {
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  background: var(--accent-light);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
}

/* MODALS */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.modal {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 600px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.25s cubic-bezier(0.32, 0.72, 0, 1);
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 18px 0;
  flex-shrink: 0;
}
.modal-header h2 { font-size: 17px; font-weight: 700; }
.modal-body {
  overflow-y: auto;
  padding: 16px 18px;
  flex: 1;
  -webkit-overflow-scrolling: touch;
}
.modal-footer {
  padding: 12px 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.modal-footer-right { display: flex; gap: 8px; }

/* FORM FIELDS */
.field-group { margin-bottom: 16px; }
.field-label { display: block; font-size: 12px; font-weight: 600; color: var(--text2); margin-bottom: 7px; letter-spacing: 0.5px; text-transform: uppercase; }
.field-input {
  width: 100%;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 15px;
  font-family: var(--font);
  outline: none;
  transition: border-color 0.15s;
  -webkit-appearance: none;
}
.field-input:focus { border-color: var(--accent-border); background: var(--surface2); }
.field-input::placeholder { color: var(--text3); }
select.field-input { cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235a5a80' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 28px; }

/* WALLS */
.walls-section { margin-bottom: 16px; }
.walls-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.walls-title { font-size: 12px; font-weight: 600; color: var(--text2); letter-spacing: 0.5px; text-transform: uppercase; }
.walls-list { display: flex; flex-direction: column; gap: 10px; }

.wall-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
}
.wall-label { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.wall-name { font-size: 13px; font-weight: 600; color: var(--accent); font-family: var(--mono); }
.wall-inputs { display: grid; grid-template-columns: 1fr 1.1fr; gap: 8px; align-items: end; }
.wall-rounded-field { display: none !important; }
.wall-field label, .wall-direction label { display: block; font-size: 11px; color: var(--text3); margin-bottom: 4px; }
.wall-field .field-input, .wall-direction .field-input { padding: 8px 10px; font-size: 14px; }
.wall-actions { display: flex; justify-content: flex-end; margin-top: 8px; }
.btn-wall-delete {
  width: 28px; height: 28px;
  border-radius: var(--radius-sm);
  background: var(--danger-bg);
  border: 1px solid rgba(239,68,68,0.2);
  color: var(--danger);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}

/* POSITION */
.position-group .position-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pos-field { display: flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 10px; }
.pos-label { font-size: 12px; font-weight: 700; color: var(--text3); min-width: 14px; font-family: var(--mono); }
.pos-field .field-input { background: none; border: none; padding: 0; font-size: 14px; flex: 1; min-width: 0; }
.pos-field .field-input:focus { border: none; background: none; }
.pos-unit { font-size: 11px; color: var(--text3); }

/* SHAPE PREVIEW */
.shape-preview-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  margin-bottom: 4px;
}
.shape-preview-wrap canvas { display: block; width: 100%; }
.preview-label { display: block; text-align: center; font-size: 11px; color: var(--text3); padding: 6px 0 8px; }

/* ROOMS LIST */
.rooms-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.room-list-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: background 0.15s;
}
.room-list-item:hover { background: var(--surface2); }
.room-item-left { display: flex; flex-direction: column; gap: 3px; }
.room-item-name { font-size: 15px; font-weight: 600; }
.room-item-dims { font-size: 12px; color: var(--text2); font-family: var(--mono); }
.room-item-area {
  font-size: 13px; font-weight: 700;
  color: var(--accent);
  background: var(--accent-light);
  padding: 4px 10px;
  border-radius: 20px;
  font-family: var(--mono);
}
.rooms-summary {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.summary-stat { display: flex; flex-direction: column; gap: 3px; }
.summary-label { font-size: 11px; color: var(--text3); text-transform: uppercase; letter-spacing: 0.5px; }
.summary-value { font-size: 18px; font-weight: 700; font-family: var(--mono); color: var(--text); }

/* FLOORS LIST */
.floors-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.floor-list-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.floor-item-info { display: flex; flex-direction: column; gap: 3px; }
.floor-item-name { font-size: 15px; font-weight: 600; }
.floor-item-rooms { font-size: 12px; color: var(--text2); }
.floor-item-actions { display: flex; gap: 6px; align-items: center; }
.btn-floor-go {
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  background: var(--accent-light);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
}
.btn-floor-delete {
  width: 30px; height: 30px;
  border-radius: var(--radius-sm);
  background: var(--danger-bg);
  border: 1px solid rgba(239,68,68,0.2);
  color: var(--danger);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}

/* TOGGLE ROW */
.toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text2);
  flex-wrap: wrap;
}
.toggle { display: flex; align-items: center; }
.toggle input[type=radio] { display: none; }
.toggle span {
  display: inline-block;
  width: 38px; height: 22px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 11px;
  cursor: pointer;
  position: relative;
  transition: background 0.2s;
}
.toggle span::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--text3);
  transition: all 0.2s;
}
.toggle input:checked + span { background: var(--accent-light); border-color: var(--accent-border); }
.toggle input:checked + span::after { background: var(--accent); left: 19px; }

/* COLOR THEMES */
.color-themes { display: flex; gap: 10px; }
.theme-btn {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--tc);
  border: 3px solid transparent;
  cursor: pointer;
  transition: border-color 0.15s;
}
.theme-btn.active { border-color: white; }

/* SETTINGS ACTIONS */
.settings-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }

/* TOAST */
.toast {
  position: fixed;
  bottom: calc(var(--fab-area-h) + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--surface2);
  border: 1px solid var(--border2);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: 24px;
  pointer-events: none;
  opacity: 0;
  transition: all 0.2s;
  white-space: nowrap;
  z-index: 300;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* SCROLLBAR */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }

/* ROOM COLOR DOT */
.room-color-dot {
  width: 10px; height: 10px; border-radius: 50%;
  display: inline-block; flex-shrink: 0;
}

/* UNIT SELECTOR */
.unit-selector {
  display: flex;
  gap: 6px;
}
.unit-btn {
  flex: 1;
  padding: 8px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text2);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}
.unit-btn.active {
  background: var(--accent-light);
  border-color: var(--accent-border);
  color: var(--accent);
}

/* WALL DIR HINT */
.wall-dir-hint {
  font-size: 11px;
  color: var(--text3);
  font-style: italic;
}
.wall-item.focused {
  border-color: var(--accent-border);
  background: var(--surface2);
}
.wall-item.focused .wall-name { color: #fff; }

/* PREVIEW CANVAS larger */
.shape-preview-wrap canvas { height: 200px; }

/* Hide rounded fields for now */
.wall-field:has(.wall-rounded) { display: none; }

/* Fallback: hide by label content */
.wall-rounded { display: none; }
.wall-rounded-label { display: none; }

/* 2-col grid when rounded hidden */
.wall-inputs { grid-template-columns: 1fr 1.2fr; }

/* OBSERVER SELECTOR */
.observer-group { margin-bottom: 14px; }
.observer-selector {
  display: flex;
  gap: 6px;
  margin-bottom: 7px;
}
.obs-btn {
  flex: 1;
  padding: 8px 4px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text2);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}
.obs-btn.active {
  background: var(--accent-light);
  border-color: var(--accent-border);
  color: var(--accent);
}
.observer-hint {
  display: block;
  font-size: 11px;
  color: var(--text3);
  line-height: 1.4;
}

/* PREVIEW BLOCK (top of modal) */
.preview-block {
  margin-bottom: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.preview-block .shape-preview-wrap {
  background: none;
  border: none;
  border-radius: 0;
  margin-bottom: 0;
}
.preview-block canvas {
  display: block;
  width: 100%;
  min-height: 120px;
  max-height: 220px;
}
.base-wall-row {
  padding: 7px 12px 9px;
  border-top: 1px solid var(--border);
}
.base-wall-label {
  font-size: 11px;
  color: var(--text3);
  display: block;
  text-align: center;
}

/* ── STEP UI ─────────────────────────────────────────────── */
.preview-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 14px;
}
.preview-hint-row {
  padding: 7px 12px 8px;
  border-top: 1px solid var(--border);
  min-height: 30px;
  display: flex; align-items: center;
}
#previewHint {
  font-size: 11px;
  color: var(--text3);
  text-align: center;
  width: 100%;
}
.step-panel { margin-bottom: 4px; }
.step-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 6px;
}
.step-desc {
  font-size: 13px;
  color: var(--text2);
  margin-bottom: 12px;
  line-height: 1.5;
}
.order-actions { display: flex; gap: 8px; }
.order-actions .btn-primary { flex: 1; }

/* Measure input */
.measure-input-block { display: flex; flex-direction: column; gap: 10px; }
.measure-wall-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  padding: 4px 0;
}
.measure-field-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.measure-input {
  flex: 1;
  font-size: 22px !important;
  font-weight: 600;
  text-align: center;
  padding: 12px !important;
}
.measure-unit {
  font-size: 14px;
  color: var(--text2);
  min-width: 24px;
}
.measure-hint {
  font-size: 12px;
  color: var(--text3);
  text-align: center;
  min-height: 16px;
}
.measure-actions { display: flex; gap: 8px; }
.measure-actions .btn-primary { flex: 1; }
.measure-pick-block {
  margin-top: 8px;
  padding: 14px;
  background: var(--accent-light);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius);
  text-align: center;
}
.measure-pick-hint {
  font-size: 13px;
  color: var(--accent);
  line-height: 1.5;
}

/* Walls summary */
.walls-summary { display: flex; flex-direction: column; gap: 6px; }
.wall-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
}
.wall-summary-name { font-size: 13px; color: var(--text2); }
.wall-summary-val { font-size: 15px; font-weight: 700; font-family: var(--mono); color: var(--accent); }

/* Wall edit rows in done step */
.wall-edit-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  transition: border-color 0.15s;
  flex-wrap: wrap;
}
.wall-edit-row.editing {
  border-color: var(--accent-border);
  background: var(--surface2);
}
.wall-edit-num {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--accent-light);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.wall-edit-name {
  font-size: 13px; color: var(--text2);
  min-width: 90px;
  flex-shrink: 0;
}
.wall-edit-input {
  flex: 1;
  min-width: 80px;
  font-size: 15px !important;
  font-weight: 600;
  padding: 6px 8px !important;
  text-align: right;
}
.wall-edit-unit {
  font-size: 12px; color: var(--text3);
  flex-shrink: 0;
}
.wall-edit-sugg {
  width: 100%;
  font-size: 12px; color: var(--text2);
  display: flex; align-items: center; gap: 8px;
  padding-top: 4px;
}
.btn-sugg-yes {
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  background: var(--accent-light);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font-size: 12px; font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
}

.btn-sugg-no {
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text2);
  font-size: 12px; font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
}

/* TRANSFER MODAL */
.transfer-section { margin-bottom: 4px; }
.transfer-section-label {
  font-size: 11px; font-weight: 700; color: var(--accent);
  text-transform: uppercase; letter-spacing: 0.6px; margin-bottom: 6px;
}
.transfer-desc { font-size: 13px; color: var(--text2); margin-bottom: 12px; line-height: 1.5; }
.transfer-export-actions { display: flex; flex-direction: column; gap: 8px; }
.transfer-divider {
  height: 1px; background: var(--border); margin: 18px 0;
}
.transfer-or {
  text-align: center; font-size: 12px; color: var(--text3);
  margin: 10px 0;
}
.import-file-label {
  display: block; text-align: center; cursor: pointer;
}
.import-textarea {
  width: 100%; height: 80px; resize: vertical;
  font-size: 12px !important; font-family: var(--mono) !important;
  margin-top: 0;
}
.import-status {
  font-size: 13px; margin-top: 8px; min-height: 20px;
  text-align: center;
}
.import-status.ok  { color: var(--success); }
.import-status.err { color: var(--danger); }

.btn-scale-label { font-size: 10px; font-weight: 700; font-family: var(--mono); min-width: 38px; }

/* FLOORS LIST EXPANDED */
.floor-list-item--expanded {
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0;
  overflow: hidden;
}
.floor-item-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
}
.floor-name-input {
  flex: 1;
  font-size: 14px !important;
  font-weight: 600;
  padding: 6px 8px !important;
  background: transparent !important;
  border-color: transparent !important;
}
.floor-name-input:hover { border-color: var(--border) !important; }
.floor-name-input:focus { border-color: var(--accent-border) !important; background: var(--surface2) !important; }

.floor-rooms-list {
  border-top: 1px solid var(--border);
  padding: 6px 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.floor-room-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.floor-room-name {
  flex: 1;
  font-size: 13px;
  color: var(--text2);
}
.floor-room-transfer {
  font-size: 12px !important;
  padding: 4px 8px !important;
  width: auto;
  flex-shrink: 0;
  color: var(--accent) !important;
  background: var(--accent-light) !important;
  border-color: var(--accent-border) !important;
}
.floor-room-only {
  font-size: 11px;
  color: var(--text3);
}
.floor-rooms-empty {
  padding: 6px 12px 8px;
  font-size: 12px;
  color: var(--text3);
  border-top: 1px solid var(--border);
}

/* ROUND BUTTONS */
.round-btns {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.btn-round-step {
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text2);
  font-size: 12px;
  font-weight: 600;
  font-family: var(--mono);
  cursor: pointer;
  transition: all 0.12s;
  flex: 1;
  text-align: center;
}
.btn-round-step:hover {
  background: var(--accent-light);
  border-color: var(--accent-border);
  color: var(--accent);
}
.btn-round-step:active { opacity: 0.75; }

/* Round buttons inside wall edit rows */
.wall-edit-row .round-btns {
  width: 100%;
  margin-top: 5px;
}
.wall-edit-row .btn-round-step {
  font-size: 11px;
  padding: 3px 6px;
}
