/* Smart Auction Clustering - Infath Visual Identity */

/* Global Styles */
.app-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, #f8fdfd 0%, #ecf8f8 50%, #e0f4f4 100%);
  position: relative;
}

.app-container::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 25% 25%, rgba(0, 128, 128, 0.1) 0%, transparent 25%),
    radial-gradient(circle at 75% 75%, rgba(0, 76, 76, 0.05) 0%, transparent 25%);
  pointer-events: none;
  z-index: 0;
}

.app-container > * {
  position: relative;
  z-index: 1;
}

/* Loading Screen */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--infath-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

.loading-content {
  text-align: center;
  color: white;
}

.infath-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
  gap: 1rem;
}

.infath-logo i {
  font-size: 3rem;
  color: var(--infath-light);
}

.infath-logo h2 {
  font-size: 2.5rem;
  font-weight: 700;
  color: white;
  margin: 0;
}

.loading-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 2rem auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-subtitle {
  font-size: 0.9rem;
  opacity: 0.8;
  margin-top: 0.5rem;
}

/* Header Styles */
.infath-header {
  background: var(--infath-gradient);
  color: white;
  padding: 1.5rem 2rem;
  box-shadow: var(--infath-shadow);
  position: relative;
  overflow: hidden;
}

.infath-header::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 100px;
  height: 200%;
  background: rgba(255, 255, 255, 0.05);
  transform: rotate(15deg);
}

.header-content {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  align-items: center;
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.header-left .infath-logo {
  justify-content: flex-start;
  margin: 0;
}

.logo-text h1 {
  font-size: 1.8rem;
  font-weight: 800;
  margin: 0;
  font-family: 'Inter', sans-serif;
}

.logo-text span {
  font-size: 0.8rem;
  opacity: 0.9;
  display: block;
  margin-top: 0.2rem;
}

.header-center {
  text-align: center;
}

.page-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0;
  font-family: 'Inter', sans-serif;
}

.page-subtitle {
  font-size: 1rem;
  opacity: 0.9;
  margin: 0.5rem 0 0 0;
  font-weight: 400;
}

.header-right {
  display: flex;
  justify-content: flex-end;
}

.stats-summary {
  display: flex;
  gap: 2rem;
}

.stat-item {
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--infath-light);
}

.stat-label {
  display: block;
  font-size: 0.8rem;
  opacity: 0.9;
  margin-top: 0.2rem;
}

/* Main Content */
.main-content {
  flex: 1;
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 1.5rem;
  padding: 1.5rem;
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
  min-height: calc(100vh - 120px);
}

/* Control Panel */
.control-panel {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  height: fit-content;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
}

.control-section {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: var(--border-radius-lg);
  padding: 1.5rem;
  box-shadow: 0 8px 32px rgba(0, 76, 76, 0.12);
  border: 1px solid rgba(0, 128, 128, 0.15);
  transition: all 0.3s ease;
}

.control-section:hover {
  box-shadow: 0 8px 30px rgba(0, 76, 76, 0.12);
  transform: translateY(-2px);
}

.control-section h3 {
  color: var(--infath-primary);
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0 0 1.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Inter', sans-serif;
}

.control-section h3 i {
  color: var(--infath-accent);
}

/* Weight Controls - Combined Slider */
.weight-controls {
  margin-bottom: 2rem;
}

.combined-weight-control {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.weight-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.weight-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--infath-text);
}

.weight-label.location-label {
  color: var(--infath-accent);
}

.weight-label.price-label {
  color: var(--infath-secondary);
}

.slider-container {
  position: relative;
  padding: 0.5rem 0;
}

.combined-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--infath-accent) 0%, var(--infath-primary) 50%, var(--infath-secondary) 100%);
  outline: none;
  transition: all 0.3s ease;
  position: relative;
  z-index: 2;
}

.combined-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: white;
  border: 3px solid #004c4c;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 76, 76, 0.4);
  transition: all 0.3s ease;
  position: relative;
  z-index: 3;
}

.combined-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 6px 20px rgba(0, 76, 76, 0.5);
  border-color: var(--infath-accent);
}

.combined-slider::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: white;
  border: 3px solid #004c4c;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 76, 76, 0.4);
  transition: all 0.3s ease;
}

.slider-track {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 12px;
  transform: translateY(-50%);
  border-radius: 6px;
  overflow: hidden;
  z-index: 1;
}

.slider-progress {
  height: 100%;
  background: linear-gradient(90deg, var(--infath-accent) 0%, var(--infath-primary) 50%, var(--infath-secondary) 100%);
  width: 50%;
  transition: all 0.3s ease;
  border-radius: 6px;
}



/* Cluster Control */
.cluster-control {
  margin-bottom: 2rem;
}

.cluster-control label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--infath-text);
  margin-bottom: 0.8rem;
}

.cluster-select {
  width: 100%;
  padding: 1rem;
  border: 2px solid #e1e8ed;
  border-radius: var(--border-radius);
  font-size: 1rem;
  background: white;
  color: var(--infath-text);
  transition: all 0.3s ease;
  font-family: 'Inter', sans-serif;
}

.cluster-select:focus {
  outline: none;
  border-color: var(--infath-accent);
  box-shadow: 0 0 0 3px rgba(0, 128, 128, 0.1);
}

/* Action Buttons */
.create-auctions-btn,
.export-excel-btn {
  width: 100%;
  padding: 1.5rem 2rem;
  background: var(--infath-gradient);
  color: white;
  border: none;
  border-radius: var(--border-radius-lg);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: 'Inter', sans-serif;
  box-shadow: var(--infath-shadow);
  position: relative;
  overflow: hidden;
  margin-bottom: 1rem;
}

.export-excel-btn {
  background: linear-gradient(135deg, #27ae60, #2ecc71);
  margin-bottom: 0;
}

.create-auctions-btn::before,
.export-excel-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.create-auctions-btn:hover::before,
.export-excel-btn:hover::before {
  left: 100%;
}

.create-auctions-btn:hover,
.export-excel-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 76, 76, 0.3);
}

.create-auctions-btn:active,
.export-excel-btn:active {
  transform: translateY(0);
}

.create-auctions-btn:disabled,
.export-excel-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.export-excel-btn:hover {
  box-shadow: 0 8px 25px rgba(39, 174, 96, 0.3);
}

.btn-subtitle {
  font-size: 0.85rem;
  opacity: 0.9;
  font-weight: 400;
}

/* Results Panel */
.results-panel {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  box-shadow: 0 12px 40px rgba(0, 76, 76, 0.15);
  border: 1px solid rgba(0, 128, 128, 0.15);
  animation: slideInUp 0.5s ease;
}

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

.results-panel h3 {
  color: var(--infath-primary);
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0 0 1.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Inter', sans-serif;
}

.results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

.result-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem;
  background: linear-gradient(135deg, #ffffff, #f8fdfd);
  border-radius: var(--border-radius-lg);
  border: 1px solid rgba(0, 76, 76, 0.08);
  box-shadow: 0 2px 12px rgba(0, 76, 76, 0.06);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.result-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--infath-gradient);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.result-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 76, 76, 0.15);
}

.result-card:hover::before {
  opacity: 1;
}

.result-icon {
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--infath-gradient);
  border-radius: 12px;
  color: white;
  box-shadow: 0 4px 12px rgba(0, 76, 76, 0.25);
  font-size: 1.1rem;
}

.result-content h4 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0;
  color: var(--infath-primary);
}

.result-content p {
  font-size: 0.85rem;
  margin: 0.2rem 0 0 0;
  color: var(--infath-text);
  opacity: 0.8;
}

.quality-excellent { color: var(--success-green) !important; }
.quality-good { color: var(--infath-accent) !important; }
.quality-fair { color: var(--warning-orange) !important; }
.quality-poor { color: var(--error-red) !important; }

/* Cluster Breakdown */
.cluster-breakdown {
  border-top: 2px solid #f0f4f8;
  padding-top: 1.5rem;
}

.cluster-breakdown h4 {
  color: var(--infath-primary);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  font-family: 'Inter', sans-serif;
}

.cluster-item {
  padding: 1rem;
  background: #f8fcfc;
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

.cluster-item:hover {
  background: #f0f8f8;
  transform: translateX(-2px);
}

.cluster-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
}

.cluster-name {
  font-weight: 600;
  color: var(--infath-primary);
}

.cluster-stats {
  font-size: 0.85rem;
  color: var(--infath-text);
  opacity: 0.8;
}

.cluster-properties {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.property-tag {
  background: var(--infath-accent);
  color: white;
  padding: 0.3rem 0.6rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 500;
}

.more-count {
  background: var(--infath-secondary);
  color: white;
  padding: 0.3rem 0.6rem;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 500;
}

/* Map Container */
.map-container {
  position: relative;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 12px 40px rgba(0, 76, 76, 0.15);
  overflow: hidden;
  border: 1px solid rgba(0, 128, 128, 0.15);
}

.map {
  width: 100%;
  height: calc(100vh - 140px);
  min-height: 500px;
  border-radius: var(--border-radius-lg);
}

/* Custom pin-style markers */
.property-pin {
  background: transparent !important;
  border: none !important;
}

.pin-marker {
  width: 25px;
  height: 30px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  position: relative;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
  border: 2px solid white;
  transition: all 0.3s ease;
}

.pin-marker:hover {
  transform: rotate(-45deg) scale(1.1);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

.pin-icon {
  position: absolute;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
  color: white;
  font-size: 12px;
  font-weight: bold;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Ensure consistent pin marker styling */
.property-pin .pin-marker {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.property-pin .pin-icon {
  font-size: 12px;
  z-index: 2;
}

.map-container.fullscreen .map {
  height: 100vh;
  border-radius: 0;
}

/* Map Legend */
.map-legend {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(15px);
  border-radius: var(--border-radius-lg);
  padding: 1.8rem;
  box-shadow: 0 8px 32px rgba(0, 76, 76, 0.15);
  max-width: 280px;
  z-index: 1000;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.map-legend h4 {
  color: var(--infath-primary);
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Inter', sans-serif;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

.legend-color {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.legend-item:hover .legend-color {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.legend-text {
  display: flex;
  flex-direction: column;
}

.legend-title {
  font-weight: 600;
  color: var(--infath-primary);
  font-size: 0.9rem;
}

.legend-count {
  font-size: 0.8rem;
  color: var(--infath-secondary);
  font-weight: 500;
}

/* Map Controls */
.map-controls {
  position: absolute;
  top: 20px;
  left: 20px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 1000;
}

.map-control-btn {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 76, 76, 0.2);
  border-radius: var(--border-radius);
  padding: 0.8rem;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--infath-primary);
  font-weight: 500;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.map-control-btn:hover {
  background: var(--infath-primary);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 76, 76, 0.3);
}

/* Cluster Markers */
.cluster-center-marker {
  background: transparent;
  border: none;
}

.cluster-label {
  width: 55px;
  height: 55px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 4px solid white;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  font-weight: 700;
  color: white;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.cluster-label:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.cluster-label::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: inherit;
  border-radius: 50%;
  z-index: -1;
  filter: brightness(1.1);
}

.cluster-number {
  font-size: 1.3rem;
  line-height: 1;
  font-weight: 800;
}

.cluster-info {
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
}

/* Popups */
.asset-popup,
.cluster-popup {
  min-width: 200px;
  font-family: 'Inter', sans-serif;
}

.popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #eee;
}

.popup-header h4 {
  color: var(--infath-primary);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
}

.property-type {
  background: var(--infath-accent);
  color: white;
  padding: 0.2rem 0.5rem;
  border-radius: 15px;
  font-size: 0.7rem;
  font-weight: 500;
}

.cluster-color {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.popup-details p {
  margin: 0.3rem 0;
  font-size: 0.85rem;
  color: var(--infath-text);
}

.popup-btn {
  width: 100%;
  margin-top: 0.8rem;
  padding: 0.6rem 1rem;
  background: var(--infath-gradient);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Inter', sans-serif;
}

.popup-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 76, 76, 0.3);
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  animation: fadeIn 0.3s ease;
}

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

.modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  border-radius: var(--border-radius-lg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 800px;
  width: 90%;
  max-height: 90%;
  overflow: hidden;
  animation: slideInScale 0.3s ease;
}

@keyframes slideInScale {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem;
  background: var(--infath-gradient);
  color: white;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
}

.modal-close {
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

.modal-body {
  padding: 2rem;
  max-height: 60vh;
  overflow-y: auto;
}

/* Asset Details */
.asset-details {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.asset-info {
  width: 100%;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.info-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--infath-accent);
}

.info-value {
  font-size: 1rem;
  color: var(--infath-text);
  font-weight: 500;
}

.price-highlight {
  color: var(--infath-primary);
  font-weight: 700;
  font-size: 1.2rem;
}

.asset-description {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, #f8fcfc, #ffffff);
  border-radius: var(--border-radius);
  border: 1px solid rgba(0, 76, 76, 0.1);
}

.asset-description h4 {
  color: var(--infath-primary);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.8rem 0;
  font-family: 'Inter', sans-serif;
}

.asset-description p {
  color: var(--infath-text);
  line-height: 1.6;
  margin: 0;
}

.asset-actions {
  display: flex;
  gap: 1rem;
}

.action-btn {
  flex: 1;
  padding: 1rem 1.5rem;
  border: none;
  border-radius: var(--border-radius);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: 'Inter', sans-serif;
}

.action-btn.primary {
  background: var(--infath-gradient);
  color: white;
}

.action-btn.secondary {
  background: transparent;
  color: var(--infath-primary);
  border: 2px solid var(--infath-accent);
}

.action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 76, 76, 0.3);
}

.action-btn.secondary:hover {
  background: var(--infath-accent);
  color: white;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .main-content {
    grid-template-columns: 350px 1fr;
  }
  
  .header-content {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
  }
}

@media (max-width: 992px) {
  .main-content {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1rem;
  }
  
  .control-panel {
    order: 2;
    max-height: none;
    overflow-y: visible;
  }
  
  .map-container {
    order: 1;
  }
  
  .map {
    height: 60vh;
    min-height: 400px;
  }
  
  .header-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 1rem;
  }
  
  .stats-summary {
    justify-content: center;
  }
  
  .asset-details {
    gap: 1rem;
  }
  
  .results-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
  }
  
  .control-section {
    padding: 1.2rem;
  }
}

@media (max-width: 768px) {
  .main-content {
    padding: 0.8rem;
    gap: 0.8rem;
  }
  
  .infath-header {
    padding: 1rem;
  }
  
  .header-content {
    gap: 0.8rem;
  }
  
  .control-section,
  .results-panel {
    padding: 1rem;
  }
  
  .page-title {
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
  }
  
  .page-subtitle {
    font-size: 0.9rem;
  }
  
  .logo-text h1 {
    font-size: 1.4rem;
  }
  
  .logo-text span {
    font-size: 0.7rem;
  }
  
  .map {
    height: 50vh;
    min-height: 350px;
  }
  
  .modal-content {
    width: 95%;
    margin: 1rem;
  }
  
  .modal-body {
    padding: 1rem;
  }
  
  .asset-actions {
    flex-direction: column;
  }
  
  .info-grid {
    grid-template-columns: 1fr;
  }
  
  .results-grid {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }
  
  .combined-weight-control {
    gap: 0.8rem;
  }
  
  .weight-labels {
    flex-direction: row;
    justify-content: space-between;
  }
  
  .weight-label {
    font-size: 0.85rem;
  }
  
  .stat-item {
    margin-bottom: 0.5rem;
  }
}

@media (max-width: 480px) {
  .main-content {
    padding: 0.5rem;
    gap: 0.5rem;
  }
  
  .combined-weight-control {
    gap: 0.6rem;
  }
  
  .weight-label {
    font-size: 0.8rem;
  }
  
  .stats-summary {
    flex-direction: row;
    gap: 1.5rem;
    justify-content: center;
  }
  
  .stat-item {
    text-align: center;
    margin-bottom: 0;
  }
  
  .stat-value {
    font-size: 1.3rem;
  }
  
  .stat-label {
    font-size: 0.75rem;
  }
  
  .map-legend {
    position: fixed;
    bottom: 80px;
    left: 0.5rem;
    right: 0.5rem;
    top: auto;
    background: rgba(255, 255, 255, 0.98);
    max-width: none;
    border-radius: var(--border-radius);
    z-index: 1001;
  }
  
  .map-controls {
    flex-direction: row;
    top: 10px;
    left: 10px;
    right: 10px;
    justify-content: space-between;
  }
  
  .map-control-btn {
    padding: 0.6rem;
    font-size: 0.8rem;
    min-width: 80px;
  }
  
  .cluster-properties {
    justify-content: flex-start;
    gap: 0.3rem;
  }
  
  .property-tag,
  .more-count {
    font-size: 0.6rem;
    padding: 0.2rem 0.4rem;
  }
  
  .control-section h3 {
    font-size: 1.1rem;
  }
  
  .create-auctions-btn {
    padding: 1.2rem 1.5rem;
    font-size: 1rem;
  }
  
  .page-title {
    font-size: 1.1rem;
  }
  
  .infath-header {
    padding: 0.8rem;
  }
}

/* Dark theme support for system preference */
@media (prefers-color-scheme: dark) {
  :root {
    --infath-text: #e2e8f0;
    --infath-light: #f0f8f8;
  }
  
  .control-section,
  .results-panel {
    background: rgba(0, 76, 76, 0.05);
    border-color: rgba(0, 76, 76, 0.2);
  }
  
  .map-legend,
  .map-control-btn {
    background: rgba(0, 76, 76, 0.9);
    color: white;
  }
}

/* Print styles */
@media print {
  .infath-header,
  .control-panel,
  .map-controls,
  .modal {
    display: none !important;
  }
  
  .main-content {
    grid-template-columns: 1fr;
    padding: 0;
  }
  
  .map {
    height: 80vh;
    border-radius: 0;
  }
}