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

body {
  font-family: 'Noto Sans', sans-serif;
  background: #fff;
  color: #222;
  overflow: hidden;
  touch-action: pan-y;
}

#app {
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.header {
  padding: 12px 16px;
  background: #000;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.stats {
  display: flex;
  gap: 16px;
  font-size: 14px;
}

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

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

.stat-value {
  font-weight: bold;
}

.main {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.building {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  max-width: 500px;
  margin: 0 auto;
  width: 100%;
}

.log-panel {
  max-width: 500px;
  margin: 0 auto;
  width: 100%;
  background: #f9f9f9;
  border-radius: 8px;
  overflow: hidden;
}

.log-title {
  background: #000;
  color: #fff;
  padding: 10px 12px;
  font-weight: bold;
  font-size: 14px;
}

.log-list {
  max-height: 200px;
  overflow-y: auto;
  padding: 8px;
}

.log-item {
  display: flex;
  gap: 8px;
  padding: 6px 8px;
  font-size: 12px;
  border-bottom: 1px solid #e0e0e0;
}

.log-item:last-child {
  border-bottom: none;
}

.log-time {
  color: #999;
  flex-shrink: 0;
  font-family: 'Space Mono', monospace;
}

.log-message {
  flex: 1;
}

.log-income {
  color: #27ae60;
}

.log-expense {
  color: #e74c3c;
}

.log-warning {
  color: #f39c12;
}

.log-error {
  color: #c0392b;
}

.log-info {
  color: #333;
}

.room {
  background: #f5f5f5;
  border: 2px solid #ddd;
  border-radius: 8px;
  padding: 12px;
  position: relative;
}

.room.has-complaint {
  border-color: #ff6b6b;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { border-color: #ff6b6b; }
  50% { border-color: #ff9999; }
}

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

.room-number {
  font-weight: bold;
}

.room-rent {
  color: #2ecc71;
  font-weight: bold;
}

.room-quality {
  font-size: 12px;
  color: #666;
}

.complaint {
  background: #fff;
  border: 1px solid #ff6b6b;
  border-radius: 6px;
  padding: 10px;
  margin-top: 8px;
  font-size: 13px;
}

.complaint-text {
  margin-bottom: 8px;
  color: #c0392b;
}

.complaint-actions {
  display: flex;
  gap: 8px;
}

.btn {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.1s;
  flex: 1;
}

.btn:active {
  transform: scale(0.95);
}

.btn-fix {
  background: #3498db;
  color: #fff;
}

.btn-ignore {
  background: #95a5a6;
  color: #fff;
}

.btn-upgrade {
  background: #2ecc71;
  color: #fff;
}

.upgrade-section {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #ddd;
}

.upgrade-btn {
  width: 100%;
  margin-top: 4px;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background: #fff;
  padding: 24px;
  border-radius: 12px;
  max-width: 300px;
  text-align: center;
  animation: slideUp 0.3s;
}

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

.modal-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 12px;
}

.modal-text {
  margin-bottom: 16px;
  font-size: 14px;
  line-height: 1.5;
}

.modal-btn {
  width: 100%;
  padding: 12px;
  background: #000;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
}

.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: #000;
  color: #fff;
  padding: 12px 20px;
  border-radius: 24px;
  font-size: 14px;
  animation: toastIn 0.3s, toastOut 0.3s 2.7s;
  z-index: 2000;
}

@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 20px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translate(-50%, 0); }
  to { opacity: 0; transform: translate(-50%, 20px); }
}