/* CSS 변수 선언 - 프리미엄 컬러 팔레트 */
:root {
  --font-main: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  
  /* 색상 테마 */
  --bg-app: radial-gradient(circle at top left, #f8fafc, #f1f5f9);
  --bg-glass: rgba(255, 255, 255, 0.75);
  --bg-card: #ffffff;
  --bg-darker: #0f172a;
  
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-light: #ffffff;
  
  /* 테마 포인트 컬러 */
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #e0e7ff;
  
  /* 상태 컬러 */
  --occupied: #10b981;
  --occupied-light: #ecfdf5;
  --occupied-border: #a7f3d0;
  
  --vacant: #f59e0b;
  --vacant-light: #fffbeb;
  --vacant-border: #fde68a;
  
  --maintenance: #f43f5e;
  --maintenance-light: #fff1f2;
  --maintenance-border: #fecdd3;
  
  /* 그림자 및 효과 */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 10px 25px -5px rgba(79, 70, 229, 0.08), 0 8px 16px -6px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 20px 40px -15px rgba(15, 23, 42, 0.12);
  --border-radius-sm: 8px;
  --border-radius-md: 16px;
  --border-radius-lg: 24px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 기본 리셋 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg-app);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
}

/* 헤더 스타일링 */
.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  margin-bottom: 24px;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  color: var(--primary);
  width: 32px;
  height: 32px;
}

.header-logo h1 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--primary), #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* 공유 배너 (협업 안내) */
.share-banner {
  background: linear-gradient(135deg, var(--bg-darker), #1e293b);
  color: var(--text-light);
  padding: 10px 20px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: var(--transition);
}

.share-banner strong {
  color: #38bdf8;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.share-icon {
  color: #38bdf8;
  width: 18px;
  height: 18px;
}

/* 대시보드 컨트롤 및 통계 */
.controls-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 32px;
}

/* 건물 선택기 */
.building-selector-container {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: var(--bg-glass);
  padding: 12px 18px;
  border-radius: var(--border-radius-md);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: var(--shadow-sm);
}

.select-wrapper {
  position: relative;
  min-width: 200px;
}

.building-select {
  width: 100%;
  padding: 10px 16px;
  padding-right: 40px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  background: var(--bg-card);
  border: 1px solid #cbd5e1;
  border-radius: var(--border-radius-sm);
  appearance: none;
  cursor: pointer;
  outline: none;
  transition: var(--transition);
}

.building-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.select-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--text-muted);
  width: 20px;
  height: 20px;
}

/* 버튼 공통 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--border-radius-sm);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  outline: none;
}

.btn i {
  width: 16px;
  height: 16px;
}

.btn-primary {
  background: var(--primary);
  color: var(--text-light);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

.btn-secondary {
  background: var(--primary-light);
  color: var(--primary);
}

.btn-secondary:hover {
  background: #cbd5e1;
  color: var(--text-main);
}

.btn-danger-outline {
  background: transparent;
  color: var(--maintenance);
  border: 1px solid var(--maintenance-border);
}

.btn-danger-outline:hover {
  background: var(--maintenance);
  color: var(--text-light);
  border-color: var(--maintenance);
}

.btn-full {
  width: 100%;
}

/* 통계 카드 그리드 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 40px;
}

.stat-card {
  background: var(--bg-card);
  padding: 20px;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid #e2e8f0;
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.stat-value {
  font-size: 28px;
  font-weight: 800;
}

.stat-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-icon-wrapper i {
  width: 24px;
  height: 24px;
}

.stat-card.total { border-left: 4px solid var(--primary); }
.stat-card.total .stat-icon-wrapper { background: var(--primary-light); color: var(--primary); }
.stat-card.occupied { border-left: 4px solid var(--occupied); }
.stat-card.occupied .stat-icon-wrapper { background: var(--occupied-light); color: var(--occupied); }
.stat-card.vacant { border-left: 4px solid var(--vacant); }
.stat-card.vacant .stat-icon-wrapper { background: var(--vacant-light); color: var(--vacant); }

/* 호실 현황판 섹션 */
.rooms-section {
  flex-grow: 1;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.section-header h2 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.sync-indicator {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.sync-indicator i {
  width: 14px;
  height: 14px;
}

/* ====================================================
   3D 건물 시각화 스타일링
   ==================================================== */
.building-3d-wrapper {
  perspective: 1200px;
  padding: 20px 0 40px;
  display: flex;
  justify-content: flex-start;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  scrollbar-width: thin;
  scrollbar-color: rgba(79, 70, 229, 0.3) transparent;
}

.building-3d-wrapper::-webkit-scrollbar {
  height: 6px;
}

.building-3d-wrapper::-webkit-scrollbar-track {
  background: transparent;
}

.building-3d-wrapper::-webkit-scrollbar-thumb {
  background-color: rgba(79, 70, 229, 0.3);
  border-radius: 99px;
}

.building-3d {
  display: flex;
  flex-direction: column;
  gap: 0;
  transform-style: preserve-3d;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  flex-shrink: 0;
}

.building-unit {
  width: 100%;
  min-width: 680px; /* 모바일 가로 찌그러짐 방지 */
  box-sizing: border-box;
  flex-shrink: 0;
}

/* 옥상 장식 */
.building-roof {
  background: linear-gradient(135deg, #334155, #475569);
  height: 18px;
  border-radius: 6px 6px 0 0;
  margin: 0 -2px;
  box-shadow: 
    0 -4px 16px rgba(79, 70, 229, 0.12),
    inset 0 2px 4px rgba(255,255,255,0.08);
  position: relative;
  z-index: 10;
  transform: translateZ(4px);
}

/* 각 층 컨테이너 */
.floor-container {
  position: relative;
  transform-style: preserve-3d;
}

.floor-slab {
  display: flex;
  align-items: stretch;
  gap: 0;
  position: relative;
  border-bottom: 4px solid #cbd5e1;
  background: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%);
  box-shadow: 
    0 4px 6px rgba(0,0,0,0.06),
    inset 0 1px 0 rgba(255,255,255,0.6);
}

.floor-slab::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #94a3b8, #cbd5e1, #94a3b8);
}

/* 층 라벨 */
.floor-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 900;
  color: #ffffff;
  background: linear-gradient(180deg, var(--primary), #6366f1);
  min-width: 48px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
  user-select: none;
  position: relative;
  z-index: 2;
  cursor: pointer;
  transition: var(--transition);
}

.floor-label:hover {
  background: linear-gradient(180deg, var(--primary-hover), var(--primary));
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.2);
}

.floor-label span {
  display: block;
  white-space: nowrap;
}

.btn-floor-add-room {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #ffffff;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  padding: 0;
}

.btn-floor-add-room:hover {
  background: #ffffff;
  color: var(--primary);
  transform: scale(1.1);
}

.btn-floor-add-room i {
  width: 14px;
  height: 14px;
}

.floor-label::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 0;
  bottom: 0;
  width: 6px;
  background: linear-gradient(180deg, #4338ca, #4f46e5);
  display: none; /* 보라띠 제거 요청으로 숨김 처리 */
}

/* 호실 가로 배열 컨테이너 */
.floor-rooms {
  display: flex; /* flexbox 사용으로 남는 여백 없는 꽉 찬 레이아웃 지원 */
  align-items: stretch;
  gap: 0;
  flex-grow: 1;
  width: 100%;
}

/* ====================================================
   개별 호실 3D 블록 - 실제 원룸/투룸 느낌
   ==================================================== */
.room-3d {
  position: relative;
  height: 140px; /* min-height 대신 고정 높이를 주어 상가/원룸 형태에 따른 층 세로 비대칭 완전 해결 */
  cursor: pointer;
  border-right: 1px solid #d1d5db;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  background: #ffffff;
}

.room-3d:last-child {
  border-right: none;
}

/* 벽 텍스처 배경 */
.room-3d::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image: 
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 20px,
      #94a3b8 20px,
      #94a3b8 21px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 30px,
      #94a3b8 30px,
      #94a3b8 31px
    );
  pointer-events: none;
  z-index: 0;
}

/* 상태별 배경 색상 */
.room-3d.occupied {
  background: linear-gradient(160deg, #ffffff 60%, var(--occupied-light));
}

.room-3d.vacant {
  background: linear-gradient(160deg, #fefefe 60%, var(--vacant-light));
}

.room-3d.maintenance {
  background: linear-gradient(160deg, #ffffff 60%, var(--maintenance-light));
}

/* 호버 효과 최적화 (3D transform 제거로 렉 방지) */
.room-3d:hover {
  z-index: 2;
  box-shadow: 
    0 4px 12px rgba(79, 70, 229, 0.12),
    inset 0 0 0 2px var(--primary);
  border-radius: 4px;
}

.room-3d.occupied:hover {
  box-shadow: 
    0 4px 12px rgba(16, 185, 129, 0.15),
    inset 0 0 0 2px var(--occupied);
}

.room-3d.vacant:hover {
  box-shadow: 
    0 4px 12px rgba(245, 158, 11, 0.15),
    inset 0 0 0 2px var(--vacant);
}

.room-3d.maintenance:hover {
  box-shadow: 
    0 4px 12px rgba(244, 63, 94, 0.15),
    inset 0 0 0 2px var(--maintenance);
}

/* 호실 내부 요소들 */
.room-3d-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

.room-number {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
}

.room-badge-status {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.room-badge-status.occupied { background: var(--occupied-light); color: var(--occupied); border: 1px solid var(--occupied-border); }
.room-badge-status.vacant { background: var(--vacant-light); color: var(--vacant); border: 1px solid var(--vacant-border); }
.room-badge-status.maintenance { background: var(--maintenance-light); color: var(--maintenance); border: 1px solid var(--maintenance-border); }

/* 문과 창문 시각 장식 */
.room-visual {
  display: flex;
  gap: 6px;
  align-items: flex-end;
  height: 44px; /* 높이 44px 고정으로 상가 비주얼 높이와 통일 */
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

.room-door {
  width: 18px;
  height: 30px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, #78350f, #92400e);
  border: 1px solid #451a03;
  position: relative;
  flex-shrink: 0;
}

.room-door::after {
  content: '';
  position: absolute;
  right: 3px;
  top: 50%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #fbbf24;
}

.room-window {
  width: 22px;
  height: 20px;
  border-radius: 2px;
  border: 2px solid #94a3b8;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.room-window.occupied-window {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border-color: #d97706;
  box-shadow: 0 0 6px rgba(251, 191, 36, 0.3);
}

.room-window.vacant-window {
  background: linear-gradient(135deg, #e0f2fe, #bae6fd);
  border-color: #94a3b8;
}

.room-window.maintenance-window {
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 3px,
    #fda4af 3px,
    #fda4af 6px
  );
  border-color: #f43f5e;
}

.room-window::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: #94a3b8;
}

.room-window::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #94a3b8;
}

/* 세입자 정보 */
.room-3d-info {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  z-index: 1;
}

.tenant-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.tenant-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.tenant-contact {
  font-size: 10px;
  color: var(--text-muted);
}

.empty-room-text {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
}

/* 호실 하단 아이콘 정보 (사진/이력 개수) */
.room-3d-footer {
  border-top: 1px dashed #e2e8f0;
  padding-top: 6px;
  margin-top: 6px;
  display: flex;
  justify-content: flex-start;
  gap: 12px;
  font-size: 10px;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
}

.footer-item {
  display: flex;
  align-items: center;
  gap: 3px;
}

.footer-item i {
  width: 12px;
  height: 12px;
}

/* 빈 호실 슬롯 (호실 추가 가능 공간) */
.room-3d.room-empty-slot {
  background: transparent;
  border-right: 1px dashed #d1d5db;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  height: 140px; /* 고정 높이 140px 적용 */
  opacity: 0.45;
  transition: all 0.25s ease;
}

.room-3d.room-empty-slot:last-child {
  border-right: none;
}

.room-3d.room-empty-slot:hover {
  opacity: 1;
  background: var(--primary-light);
  transform: none;
  box-shadow: none;
  border-radius: 0;
}

.room-3d.room-empty-slot i {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
}

.room-3d.room-empty-slot span {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
}

/* 호실 추가 버튼 (건물 하단) */
.building-add-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  margin-top: 4px;
  background: var(--bg-glass);
  border: 2px dashed #cbd5e1;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  transition: var(--transition);
  max-width: 900px;
  width: 100%;
}

.building-add-btn:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

.building-add-btn i {
  width: 16px;
  height: 16px;
}

/* 모달 디자인 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-container {
  background: #ffffff;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  transform: scale(0.95);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.modal-overlay.active .modal-container {
  transform: scale(1);
}

/* 모달 크기 */
.modal-small {
  width: 100%;
  max-width: 400px;
}

.modal-large {
  width: 100%;
  max-width: 960px;
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 800;
}

.room-title-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.room-badge {
  background: var(--primary-light);
  color: var(--primary);
  padding: 4px 12px;
  border-radius: var(--border-radius-sm);
  font-size: 16px;
  font-weight: 800;
}

.modal-close {
  background: none;
  border: none;
  font-size: 28px;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  transition: var(--transition);
}

.modal-close:hover {
  color: var(--text-main);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex-grow: 1;
}

/* 모달 2열 구조 */
.grid-2-col {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 24px;
}

@media (max-width: 768px) {
  .grid-2-col {
    grid-template-columns: 1fr;
  }
}

.modal-left-pane,
.modal-right-pane {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* 폼 스타일링 */
.info-section {
  background: #f8fafc;
  padding: 18px;
  border-radius: var(--border-radius-md);
  border: 1px solid #e2e8f0;
}

.pane-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 6px;
}

.pane-title i {
  width: 18px;
  height: 18px;
  color: var(--primary);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.form-group label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  border: 1px solid #cbd5e1;
  border-radius: var(--border-radius-sm);
  background: #ffffff;
  outline: none;
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

/* 업로드 영역 */
.upload-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.file-upload-wrapper {
  position: relative;
  width: 100%;
}

.file-input {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  left: 0;
  top: 0;
}

.file-label {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  border: 2px dashed #cbd5e1;
  border-radius: var(--border-radius-sm);
  padding: 14px;
  cursor: pointer;
  background: #ffffff;
  transition: var(--transition);
}

.file-label:hover {
  background: var(--primary-light);
  border-color: var(--primary);
}

.file-label i {
  color: var(--text-muted);
}

.file-label span {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.upload-input-group {
  display: flex;
  gap: 8px;
}

.upload-input-group input {
  flex-grow: 1;
  padding: 10px 14px;
  font-size: 14px;
  border: 1px solid #cbd5e1;
  border-radius: var(--border-radius-sm);
  outline: none;
}

/* 이미지 갤러리 */
.facility-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 12px;
  max-height: 180px;
  overflow-y: auto;
  padding: 4px;
}

.gallery-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  border: 1px solid #cbd5e1;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-item-name {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(15, 23, 42, 0.7);
  color: #ffffff;
  font-size: 10px;
  padding: 2px 4px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.delete-gallery-item {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(244, 63, 94, 0.9);
  color: #ffffff;
  border: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: var(--transition);
  font-size: 12px;
  line-height: 1;
}

.gallery-item:hover .delete-gallery-item {
  opacity: 1;
}

.empty-text {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  padding: 12px 0;
  grid-column: 1 / -1;
}

/* 설비 이력 추가 폼 */
.ac-history-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
  background: #ffffff;
  padding: 12px;
  border-radius: var(--border-radius-sm);
  border: 1px solid #e2e8f0;
}

.ac-form-inputs {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 8px;
}

.ac-form-desc {
  display: flex;
  gap: 8px;
}

.ac-form-desc input {
  flex-grow: 1;
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: var(--border-radius-sm);
  outline: none;
  font-size: 13px;
}

.ac-form-inputs input,
.ac-form-inputs select {
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: var(--border-radius-sm);
  font-size: 13px;
}

/* 설비 이력 타임라인 */
.ac-history-timeline {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 180px;
  overflow-y: auto;
  padding-left: 4px;
}

.timeline-item {
  position: relative;
  padding-left: 20px;
  border-left: 2px solid #e2e8f0;
  padding-bottom: 8px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
}

.timeline-item.purchase::before {
  background: var(--occupied);
}

.timeline-item.maintenance::before {
  background: var(--vacant);
}

.timeline-content {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--border-radius-sm);
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.timeline-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.timeline-date {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}

.timeline-desc {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.btn-timeline-delete {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-timeline-delete:hover {
  color: var(--maintenance);
}

.btn-timeline-delete i {
  width: 14px;
  height: 14px;
}

.room-action-area {
  margin-top: 12px;
}

/* 모달 하단 */
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: #f8fafc;
}

/* 푸터 */
.main-footer {
  text-align: center;
  padding: 24px 0;
  margin-top: auto;
  border-top: 1px solid #e2e8f0;
  color: var(--text-muted);
  font-size: 13px;
}

/* 애니메이션 및 특수 상태 */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.spin {
  animation: spin 3s linear infinite;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.8; }
  100% { transform: scale(1); opacity: 1; }
}

.animate-pulse {
  animation: pulse 2s infinite ease-in-out;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ----------------------------------------------------
   QR 코드 팝오버 스타일링
   ---------------------------------------------------- */
.share-banner-container {
  position: relative;
  display: inline-block;
}

.share-banner {
  display: flex;
  align-items: center;
  gap: 10px;
}

.qr-btn {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #38bdf8;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-left: 8px;
  transition: var(--transition);
}

.qr-btn:hover {
  background: var(--primary);
  color: #ffffff;
}

.qr-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  background: #ffffff;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-lg);
  border: 1px solid #cbd5e1;
  width: 220px;
  padding: 16px;
  z-index: 110;
  display: none;
  flex-direction: column;
  gap: 12px;
  animation: slideDown 0.2s ease-out;
}

.qr-popover.active {
  display: flex;
}

.qr-popover-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 800;
  color: var(--text-main);
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 6px;
}

#qrCloseBtn {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--text-muted);
  cursor: pointer;
}

.qr-popover-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.qr-popover-body img {
  width: 140px;
  height: 140px;
  border: 1px solid #e2e8f0;
  padding: 4px;
  background: #ffffff;
  border-radius: var(--border-radius-sm);
}

.qr-popover-body p {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.3;
}

@keyframes slideDown {
  from { transform: translateY(-10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ----------------------------------------------------
   모바일 최적화 미디어 쿼리 (주요 사용 환경)
   ---------------------------------------------------- */
@media (max-width: 768px) {
  .main-header {
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
    text-align: center;
  }
  
  .header-logo {
    justify-content: center;
  }
  
  .share-banner-container {
    align-self: center;
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .share-banner {
    width: 100%;
    max-width: 450px;
    justify-content: center;
  }

  .qr-popover {
    right: 50%;
    transform: translateX(50%);
    top: calc(100% + 8px);
  }
  
  @keyframes slideDown {
    from { transform: translate(50%, -10px); opacity: 0; }
    to { transform: translate(50%, 0); opacity: 1; }
  }

  .controls-section {
    gap: 16px;
  }

  .building-selector-container {
    justify-content: center;
  }
}

@media (max-width: 576px) {
  .app-container {
    padding: 0 12px;
  }

  .main-header {
    padding: 16px 0;
  }

  .header-logo h1 {
    font-size: 20px;
  }

  .share-banner {
    font-size: 12px;
    padding: 8px 16px;
  }

  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .stat-card {
    padding: 10px 8px;
    border-radius: var(--border-radius-sm);
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .stat-value {
    font-size: 16px;
  }

  .stat-label {
    font-size: 10px;
  }

  .stat-icon-wrapper {
    display: none;
  }
  }

  .stat-icon-wrapper {
    width: 36px;
    height: 36px;
  }

  .stat-icon-wrapper i {
    width: 18px;
    height: 18px;
  }

  /* 모바일에서 3D 건물 뷰 조정 */

  .floor-label {
    min-width: 32px;
    font-size: 12px;
    letter-spacing: 1px;
  }

  .room-3d {
    height: 120px; /* 모바일 고정 높이 */
    padding: 10px 8px;
  }
 
  .room-number {
    font-size: 13px;
  }
 
  .room-visual {
    gap: 4px;
    height: 32px; /* 모바일 비주얼 고정 높이 */
  }
 
  .room-door {
    width: 14px;
    height: 24px;
  }
 
  .room-window {
    width: 16px;
    height: 14px;
  }
 
  .tenant-name {
    font-size: 11px;
  }
 
  .room-3d-footer {
    font-size: 9px;
  }
 
  .room-3d.room-empty-slot {
    height: 120px; /* 모바일 고정 높이 */
  }
  
  .room-3d.room-empty-cell {
    height: 120px; /* 모바일 고정 높이 */
  }

  .store-visual {
    height: 32px; /* 모바일 상가 비주얼 고정 높이 */
    padding: 4px;
  }

  .room-structure-emoji {
    height: 32px; /* 모바일 이모지 고정 높이 */
  }

  .store-empty-visual {
    height: 32px; /* 모바일 상가 빈칸 고정 높이 */
  }

  /* 모바일 네이티브 바텀 시트 */
  .modal-overlay {
    align-items: flex-end;
  }

  .modal-overlay.active .modal-container {
    transform: translateY(0);
  }

  .modal-container {
    width: 100%;
    max-width: 100%;
    height: 92vh;
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.32, 0.94, 0.6, 1);
  }

  .modal-header {
    padding: 16px 20px;
  }

  .modal-body {
    padding: 16px;
  }

  /* iOS 자동 확대 방지 */
  .form-group input, 
  .form-group select, 
  .form-group textarea,
  .upload-input-group input,
  .ac-form-inputs input,
  .ac-form-inputs select,
  .ac-form-desc input {
    font-size: 16px;
    padding: 12px;
  }

  .btn {
    padding: 12px 18px;
    font-size: 15px;
  }
}

/* ----------------------------------------------------
   추가 보완 디자인 (건물 헤더, 동적 버튼, 상가 및 뱃지)
   ---------------------------------------------------- */

.building-name-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-darker);
  color: var(--text-light);
  padding: 12px 20px;
  border-radius: var(--border-radius-sm) var(--border-radius-sm) 0 0;
  font-size: 16px;
  font-weight: 800;
  margin-top: 24px;
  border-bottom: 2px solid var(--primary);
}

.btn-building-delete {
  background: transparent;
  color: #f43f5e;
  border: 1px solid rgba(244, 63, 94, 0.4);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-building-delete:hover {
  background: #f43f5e;
  color: #ffffff;
  border-color: #f43f5e;
}

.btn-building-delete i {
  width: 12px;
  height: 12px;
}

.building-unit {
  background: var(--bg-glass);
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-top: none;
  border-radius: 0 0 var(--border-radius-md) var(--border-radius-md);
  padding: 24px;
  margin-bottom: 30px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

/* 방 타입 뱃지 */
.room-badges {
  display: flex;
  gap: 4px;
  align-items: center;
}

.room-type-badge {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}
.room-type-badge.type-oneroom { background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; }
.room-type-badge.type-tworoom { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.room-type-badge.type-store { background: #faf5ff; color: #6b21a8; border: 1px solid #e9d5ff; }
.room-type-badge.type-full { background: #fff1f2; color: #be123c; border: 1px solid #fecdd3; }

/* 임대 유형 뱃지 */
.lease-badge {
  display: inline-block;
  align-self: flex-start;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
  margin-top: 6px;
}
.lease-badge.lease-jeonse { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.lease-badge.lease-wolse { background: #fff7ed; color: #c2410c; border: 1px solid #ffedd5; }
.lease-badge.lease-banjeonse { background: #fdf2f8; color: #be185d; border: 1px solid #fbcfe8; }

/* 상가 비주얼 */
.store-visual {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: stretch;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 6px;
  height: 44px; /* 기존 54px에서 44px로 축소하여 다른 호실 비주얼 높이와 완벽 통일 */
}
.store-sign {
  background: #1e293b;
  color: #f8fafc;
  font-size: 10px;
  font-weight: 800;
  text-align: center;
  padding: 2px 4px;
  border-radius: 2px;
  border: 1px solid #0f172a;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.store-glass {
  flex-grow: 1;
  background: linear-gradient(135deg, rgba(186, 230, 253, 0.4), rgba(125, 211, 252, 0.6));
  border: 2px solid #64748b;
  border-radius: 2px;
  position: relative;
  box-shadow: inset 0 0 6px rgba(255,255,255,0.6);
}
.store-glass::after {
  content: '';
  position: absolute;
  top: 0;
  left: 25%;
  width: 1px;
  height: 100%;
  background: rgba(255,255,255,0.4);
  transform: skewX(-20deg);
}

/* 건물 선택 탭 디자인 */
.building-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 8px;
  overflow-x: auto;
  scrollbar-width: none; /* Firefox */
}

.building-tabs::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.building-tab {
  background: var(--bg-glass);
  color: var(--text-muted);
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: var(--border-radius-sm);
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.building-tab:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}

.building-tab.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

/* 빈 호실 단순 슬롯 디자인 */
.room-3d.room-empty-cell {
  background: repeating-linear-gradient(
    45deg,
    #faf5ff,
    #faf5ff 4px,
    #ffffff 4px,
    #ffffff 8px
  );
  border-right: 1px solid #cbd5e1;
  border-bottom: 1px solid #cbd5e1;
  opacity: 0.25;
  cursor: default;
  pointer-events: none;
  height: 140px; /* 고정 높이 140px 적용 */
}

.room-3d.room-empty-cell:last-child {
  border-right: none;
}

/* 탭바 레이아웃 정돈 */
.building-tabs-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 8px;
  flex-wrap: wrap;
  gap: 12px;
}

.building-tabs {
  border-bottom: none !important;
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
  flex-grow: 1;
}

.building-tabs-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

/* 상가 2칸 뱃지 스타일 */
.room-type-badge.type-store2 {
  background: #fdf4ff;
  color: #86198f;
  border: 1px solid #f5d0fe;
}

/* 호실 구조 이모지 스타일링 */
.room-structure-emoji {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: var(--border-radius-sm);
  padding: 4px 8px;
  margin-bottom: 6px;
  height: 44px; /* 기존 38px에서 44px로 조정하여 다른 호실 비주얼 높이와 완벽 통일 */
  font-size: 14px;
  font-weight: 700;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.06);
  position: relative;
  z-index: 1;
}

.room-structure-emoji span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-main);
}

/* 상가 빈 구조 비주얼 (기본 빈칸) */
.store-empty-visual {
  height: 44px; /* 기존 38px에서 44px로 조정하여 다른 호실 비주얼 높이와 완벽 통일 */
  margin-bottom: 6px;
  background: transparent;
  border: none;
}

/* 이모지 추천 목록 */
.emoji-suggestions {
  margin-top: 8px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.emoji-btn {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.emoji-btn:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

/* 드래그앤드롭 스타일링 */
.room-3d[draggable="true"] {
  user-select: none;
}

.room-3d.dragging {
  opacity: 0.4;
  border: 2px dashed var(--primary) !important;
  background: var(--primary-light) !important;
  transform: scale(0.95);
  transition: transform 0.1s ease;
}

.room-3d.drag-over {
  border-left: 3px solid var(--primary);
}

/* 동적 세입자 1줄(1 row) 스타일링 */
.tenant-row-item {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
  width: 100%;
}

.tenant-row-item .form-group {
  margin-bottom: 0 !important;
  flex: 1;
}

.tenant-row-item .form-group label {
  display: none !important;
}

.tenant-row-item input {
  padding: 8px 12px;
  font-size: 13px;
  width: 100%;
}

.btn-remove-tenant-row {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 4px 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.btn-remove-tenant-row:hover {
  color: var(--maintenance);
}

/* 구조 이모지 팝오버 팝업 스타일 */
.emoji-popover {
  display: none;
  position: absolute;
  bottom: 100%;
  left: 0;
  width: 100%;
  min-width: 280px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-lg);
  padding: 12px;
  z-index: 100;
  margin-bottom: 8px;
}

.emoji-popover.active {
  display: block;
  animation: slideUp 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.emoji-popover-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 4px;
}

.btn-emoji-help {
  background: transparent;
  border: none;
  color: var(--primary);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-emoji-help:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

#emojiPopoverCloseBtn {
  background: transparent;
  border: none;
  font-size: 16px;
  cursor: pointer;
  color: var(--text-muted);
  line-height: 1;
}

#emojiPopoverCloseBtn:hover {
  color: var(--text-main);
}

@keyframes slideUp {
  from { transform: translateY(8px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* 1칸인 경우 텍스트 한 줄 정돈 스타일 */
.room-number {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tenant-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.tenant-contact {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.room-badges {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
  overflow: hidden;
}

.room-type-badge {
  white-space: nowrap;
}

.room-badge-status {
  white-space: nowrap;
}

/* 셀렉트 박스 브라우저 기본 화살표 제거 (중복 버그 수정) */
.select-wrapper select {
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
}

/* 전체 탭 건물 가로배치 레이아웃 */
.building-3d.all-buildings-layout {
  flex-direction: row !important;
  flex-wrap: wrap !important;
  justify-content: center !important; /* 가로 배치 시 가운데 정렬로 시각적 안정감 부여 */
  align-items: flex-start !important;
  gap: 24px !important;
  max-width: 100% !important;
}

.building-3d.all-buildings-layout .building-unit-container {
  flex: 0 0 calc(50% - 12px) !important; /* 다시 폭 늘림: 50% 비율로 확장 */
  width: calc(50% - 12px) !important;
  min-width: 380px; /* 모바일 대응 최소 너비 */
  margin-bottom: 0 !important;
}

@media (max-width: 992px) {
  .building-3d.all-buildings-layout .building-unit-container {
    flex: 0 0 100% !important;
    width: 100% !important;
    min-width: 680px !important; /* 모바일 가로 찌그러짐 방지 */
  }
}

/* 모바일 화면 최적화 (한 화면에 다 나오도록 스크롤 제거 및 크기 축소) */
@media (max-width: 768px) {
  .app-container {
    padding: 0 8px;
  }
  .main-header {
    padding: 16px 0;
    margin-bottom: 16px;
  }
  .header-logo h1 {
    font-size: 20px;
  }
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 24px;
  }
  
  /* 모바일 한 화면 맞춤형 건물 레이아웃 */
  .building-3d {
    min-width: 100% !important;
    margin: 0 auto !important;
  }
  
  .building-unit {
    min-width: 100% !important;
  }
  
  .building-3d.all-buildings-layout {
    justify-content: center !important;
  }

  .building-3d.all-buildings-layout .building-unit-container {
    min-width: 100% !important;
  }

  /* 호실 카드 압축 */
  .room-3d {
    padding: 6px 4px !important;
    height: 105px !important;
  }
  
  .room-3d.room-empty-slot,
  .room-3d.room-empty-cell {
    height: 105px !important;
  }

  /* 텍스트 크기 축소 및 배치 최적화 */
  .room-number {
    font-size: 11px !important;
    font-weight: 800 !important;
  }
  
  .room-badge-status {
    display: none !important; /* 배경색으로 구분되므로 숨김 */
  }

  /* 도어 및 창문 비주얼 크기 축소 */
  .room-visual {
    height: 20px !important;
    margin-bottom: 2px !important;
    gap: 2px !important;
  }
  
  .room-door {
    width: 11px !important;
    height: 18px !important;
    border-width: 1px !important;
  }
  
  .room-window {
    width: 12px !important;
    height: 12px !important;
    border-width: 1px !important;
  }
  
  .room-window::before,
  .room-window::after {
    display: none !important; /* 창틀 십자선은 작아서 숨김 */
  }

  /* 구조 이모지 크기 및 넘침 방지 */
  .room-visual.room-structure-emoji {
    height: auto !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }
  
  .room-visual.room-structure-emoji span {
    font-size: 10px !important;
    letter-spacing: -1px;
  }

  /* 세입자 정보 축소 */
  .tenant-name {
    font-size: 10px !important;
  }
  
  .tenant-contact {
    display: none !important; /* 모달에서 확인 가능하므로 숨김 */
  }
  
  .empty-room-text {
    font-size: 9px !important;
  }

  /* 임대 계약 정보 뱃지 */
  .lease-badge {
    font-size: 8px !important;
    padding: 1px 3px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: inline-block;
  }
  
  /* 아이콘 개수 푸터 숨김 */
  .room-3d-footer {
    display: none !important;
  }
  
  /* 층 표시 라벨 폭 축소 */
  .floor-label {
    min-width: 36px !important;
    font-size: 12px !important;
  }
  
  .btn-floor-add-room {
    width: 18px !important;
    height: 18px !important;
  }
  
  .btn-floor-add-room i {
    width: 10px !important;
    height: 10px !important;
  }
}
