* { box-sizing: border-box; margin: 0; padding: 0; }
body, html { height: 100%; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: #1a1a1a; color: #eee; overflow: hidden; }

#app { display: grid; grid-template-rows: 56px 1fr; height: 100vh; }

header {
  background: #2a2a2a;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 24px;
  border-bottom: 1px solid #3a3a3a;
}
header h1 { font-size: 18px; font-weight: 600; }
header nav { display: flex; gap: 16px; margin-left: auto; }
header nav a { color: #aaa; text-decoration: none; padding: 8px 12px; border-radius: 6px; }
header nav a:hover { background: #3a3a3a; color: #fff; }

#legend { display: flex; gap: 14px; font-size: 13px; }
.legend-item { display: flex; align-items: center; gap: 6px; }
.swatch { width: 14px; height: 14px; border-radius: 3px; display: inline-block; }
.swatch.available { background: #4caf50; }
.swatch.reserved { background: #ffc107; }
.swatch.sold { background: #f44336; }
.swatch.booked { background: #2196f3; }

#renderCanvas { width: 100%; height: 100%; outline: none; touch-action: none; }

#info-panel {
  position: absolute;
  top: 70px;
  right: 20px;
  width: 300px;
  background: #2a2a2a;
  border: 1px solid #3a3a3a;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,.4);
  transition: transform .2s, opacity .2s;
}
#info-panel.hidden { display: none; }
#info-panel h2 { margin-bottom: 12px; font-size: 20px; }
#info-panel button#close-panel {
  position: absolute; top: 8px; right: 12px;
  background: transparent; color: #aaa; border: none; cursor: pointer; font-size: 20px;
}
.info-row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid #333; font-size: 14px; }
.info-row label { color: #888; }
.info-row span { color: #fff; text-align: right; }
.status-badge { padding: 2px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; text-transform: uppercase; }
.status-badge.available { background: #4caf50; color: #000; }
.status-badge.reserved { background: #ffc107; color: #000; }
.status-badge.sold { background: #f44336; color: #fff; }
.status-badge.booked { background: #2196f3; color: #fff; }

#loading { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 16px; color: #888; }
.hidden { display: none !important; }

/* Admin styles */
.admin-form { padding: 20px; max-width: 600px; margin: 0 auto; background: #2a2a2a; border-radius: 8px; }
.admin-form .form-row { margin-bottom: 14px; }
.admin-form label { display: block; font-size: 13px; color: #888; margin-bottom: 4px; }
.admin-form input, .admin-form select, .admin-form textarea {
  width: 100%; padding: 8px 10px; background: #1a1a1a; color: #fff;
  border: 1px solid #444; border-radius: 4px; font-size: 14px;
}
.admin-form button {
  padding: 10px 20px; background: #2196f3; color: #fff; border: none;
  border-radius: 4px; cursor: pointer; font-size: 14px; font-weight: 600;
}
.admin-form button:hover { background: #1976d2; }
.admin-list { padding: 20px; }
.plot-card {
  background: #2a2a2a; padding: 12px 16px; margin-bottom: 8px;
  border-radius: 6px; display: flex; justify-content: space-between; align-items: center; cursor: pointer;
}
.plot-card:hover { background: #333; }
