:root {
  /* Primary Colors from landing page */
  --primary-orange: #FF6B35;
  --solar-gold: #F7B731;
  --warm-amber: #FFA726;
  --deep-blue: #1B263B;
  --navy-dark: #0D1B2A;
  --soft-gray: #F8F9FA;
  --light-gray: #E9ECEF;
  --medium-gray: #6C757D;
  --success-green: #28A745;
  --text-dark: #2C3E50;

  /* Gradients from landing page */
  --gradient-sunset: linear-gradient(135deg, #FF6B35 0%, #F7B731 100%);
  --gradient-sky: linear-gradient(135deg, #74B9FF 0%, #0984E3 100%);
  --gradient-brand: linear-gradient(90deg, var(--primary-orange) 0%, var(--solar-gold) 100%);
  
  /* Shadows */
  --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-medium: 0 8px 30px rgba(0, 0, 0, 0.12);
  --shadow-strong: 0 12px 40px rgba(0, 0, 0, 0.15);

  /* System Colors */
  --background-light: #ffffff;
  --background-dark: var(--deep-blue);
  --text-primary: var(--text-dark);
  --text-secondary: var(--medium-gray);
  --border-color: var(--light-gray);

  /* Component Colors */
  --btn-primary: var(--primary-orange);
  --btn-secondary: var(--solar-gold);
  --card-background: var(--background-light);
  --input-border: var(--light-gray);
  --input-focus: var(--primary-orange);

  /* Urban/Rural - Natural tones */
  --urban-blue: #3B82F6;
  --rural-green: #10B981;

  /* System Colors */
  --background-color: #F3F4F6;
  --text-color: #1F2937;

  /* Accent Colors */
  --accent-blue: #3B82F6;
  --accent-indigo: #6366F1;
  --accent-teal: #14B8A6;
  --accent-emerald: #10B981;

  /* Gradients - Subtle and modern */
  --solar-gradient: linear-gradient(135deg, #3B82F6 0%, #14B8A6 100%);
  --brand-gradient: linear-gradient(90deg, #3B82F6 0%, #14B8A6 100%);
  --btn-gradient: linear-gradient(90deg, #3B82F6 0%, #14B8A6 100%);
  --viz-bg-1: linear-gradient(135deg, #3B82F6 0%, #10B981 100%);
  --viz-bg-2: linear-gradient(135deg, #14B8A6 0%, #6366F1 100%);
  --viz-bg-3: linear-gradient(135deg, #10B981 0%, #3B82F6 100%);
  --viz-bg-4: linear-gradient(135deg, #6366F1 0%, #14B8A6 100%);
  --viz-bg-5: linear-gradient(135deg, #0EA5E9 0%, #10B981 100%);

  /* Base styles */
  --primary-color: #3B82F6;
  --secondary-color: #6366F1;
  --accent-color: #14B8A6;
  --background-color: #F3F4F6;
  --text-color: #1F2937;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  padding-top: 75px;
  background: var(--soft-gray);
  color: var(--text-dark);
  line-height: 1.6;
  min-height: 100vh;
  overflow-y: auto;
  padding-bottom: 2rem;
}

.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 107, 53, 0.1);
  transition: all 0.3s ease;
}

.navbar-brand {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary-orange) !important;
}

.nav-link {
  color: var(--text-dark) !important;
  font-weight: 500;
  padding: 0.8rem 1.5rem !important;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.nav-link.active {
  background: var(--gradient-sunset) !important;
  color: white !important;
  box-shadow: var(--shadow-soft);
}

.nav-link:not(.active):hover {
  background: rgba(255, 107, 53, 0.1);
  color: var(--primary-orange) !important;
}

.control-card, .results-card, .viz-card {
  background: var(--card-background);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-soft);
  transition: all 0.3s ease;
}

.control-card:hover, .results-card:hover, .viz-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.btn-primary {
  background: var(--gradient-sunset);
  border: none;
  color: white;
  font-weight: 500;
  padding: 0.8rem 1.5rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-soft);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-medium);
}

.btn-outline-primary {
  border: 2px solid var(--primary-orange);
  color: var(--primary-orange);
  font-weight: 500;
  padding: 0.8rem 1.5rem;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.btn-outline-primary:hover {
  background: var(--gradient-sunset);
  border-color: transparent;
  color: white;
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.form-control, .form-select {
  border: 1px solid var(--input-border);
  border-radius: 8px;
  padding: 0.8rem 1rem;
  transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
  border-color: var(--input-focus);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.control-title, .results-title, .viz-title {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 1.5rem;
}

.text-gradient {
  background: var(--gradient-sunset);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-section {
  background: var(--solar-gradient);
  color: #fff;
}

.hero-gradient-text {
  background: linear-gradient(90deg, #FFD700 0%, #FF6B35 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.counties-highlight {
  color: #FFD700;
  font-weight: bold;
  background: #fff3cd;
  padding: 0 0.3em;
  border-radius: 0.3em;
}

.btn-gradient {
  background: var(--btn-gradient);
  color: #fff !important;
  border: none;
  box-shadow: 0 2px 8px rgba(46,49,146,0.12);
  transition: background 0.3s, box-shadow 0.3s;
}

.btn-gradient:hover, .btn-gradient:focus {
  background: linear-gradient(90deg, #1BFFFF 0%, #2E3192 100%);
  color: #fff !important;
  box-shadow: 0 4px 16px rgba(46,49,146,0.18);
}

.btn-outline-gradient {
  border: 2px solid #1BFFFF;
  color: #1BFFFF !important;
  background: transparent;
  transition: background 0.3s, color 0.3s;
}
.btn-outline-gradient:hover {
  background: #1BFFFF;
  color: #fff !important;
}

.hero-img {
  max-height: 320px;
  border: 6px solid #fff;
  box-shadow: 0 8px 32px rgba(255,107,53,0.15);
}

.section-gradient-text {
  background: linear-gradient(90deg, #6C63FF 0%, #25C481 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

#visualizations {
  background: linear-gradient(120deg, #fffbe7 0%, #e0ffe9 100%);
}

.viz-card {
  background: var(--background-light) !important;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}

.viz-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.viz-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 2rem;
  box-shadow: 0 0 12px rgba(0,0,0,0.09);
  margin-bottom: 1rem;
  background: var(--solar-gradient) !important;
  opacity: 0.9;
}

.sustainability-card {
  border-left: 6px solid var(--accent-teal);
  background: var(--background-light);
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  color: #333;
}

.county-dropdown {
  background: linear-gradient(90deg, #25C481 0%, #6C63FF 100%);
  color: #fff;
  border: none;
  font-weight: 500;
  border-radius: 8px;
  padding: 0.5em 1.2em;
  margin-left: 0.5em;
  margin-right: 0.5em;
  box-shadow: 0 2px 8px rgba(37,196,129,0.08);
}

footer {
  font-size: 0.95rem;
  background: linear-gradient(90deg, #2E3192 0%, #1BFFFF 100%);
  color: #fff;
}

footer a {
  color: #FFD700 !important;
  transition: color 0.2s;
}
footer a:hover {
  color: #fff !important;
  text-decoration: underline;
}

@media (max-width: 991px) {
  .hero-section { text-align: center; }
  .hero-img { margin-top: 2rem; }
  .county-dropdown { width: 100%; margin: 1em 0; }
}

/* Chart Container */
.chart-container {
  background-color: var(--background-light);
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  min-height: 400px;
  height: 100%;
  position: relative;
  margin-bottom: 1rem;
  flex-grow: 1;
}

/* Form Controls */
.form-select {
  border-radius: 8px;
  border: 2px solid #e2e8f0;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.form-select:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

/* Legend */
.legend {
  display: none;
}

/* Tooltip */
#tooltip {
  position: absolute;
  display: none;
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 12px;
  max-width: 320px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  pointer-events: none;
  font-size: 14px;
  line-height: 1.4;
}

.tooltip-content {
  margin: 0;
  padding: 0;
}

.tooltip-metric {
  color: #3B82F6;
  font-weight: bold;
  font-size: 13px;
  margin-bottom: 0.25rem;
}

.tooltip-details small {
  color: #6B7280;
  line-height: 1.3;
}

.tooltip-title {
  font-size: 16px;
  font-weight: 600;
  color: #1F2937;
  margin-bottom: 8px;
}

.tooltip-description {
  color: #4B5563;
  margin-bottom: 12px;
  font-size: 13px;
  line-height: 1.4;
}

.tooltip-stats {
  border-top: 1px solid #E5E7EB;
  padding-top: 8px;
}

.tooltip-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
  font-size: 13px;
}

.tooltip-row .label {
  color: #6B7280;
  margin-right: 12px;
}

.tooltip-row .value {
  color: #1F2937;
  font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
  .chart-container {
    padding: 1rem;
    margin: 1rem -0.5rem;
    border-radius: 8px;
  }
  
  .legend {
    gap: 1rem;
  }
  
  .legend-item {
    font-size: 0.8rem;
  }
  
  .form-select {
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
  }
}

/* Animation */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.chart-container {
  animation: fadeIn 0.5s ease-out;
}

/* Accessibility */
.form-select:focus-visible {
  outline: 3px solid var(--accent-blue);
  outline-offset: 2px;
}

/* Loading State */
#loading {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(3px);
}

#loading .spinner-border {
  width: 3rem;
  height: 3rem;
}

.control-card {
  background: white;
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.control-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1F2937;
  margin-bottom: 1.25rem;
}

.form-label {
  font-weight: 500;
  color: #4B5563;
  margin-bottom: 0.5rem;
}

.form-select, .form-range {
  margin-bottom: 0.5rem;
}

.text-muted {
  font-size: 0.85rem;
}

.btn-outline-primary {
  border-color: #3B82F6;
  color: #3B82F6;
}

.btn-outline-primary:hover {
  background-color: #3B82F6;
  color: white;
}

.btn-outline-secondary {
  border-color: #6B7280;
  color: #6B7280;
}

.btn-outline-secondary:hover {
  background-color: #6B7280;
  color: white;
}

.alert-info {
  background-color: #EFF6FF;
  border-color: #BFDBFE;
  color: #1E40AF;
}

.graph-tooltip {
  background: white;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  max-width: 300px;
}

.graph-tooltip-title {
  font-weight: 600;
  color: #1F2937;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #E5E7EB;
}

.graph-tooltip-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.graph-tooltip-label {
  color: #6B7280;
}

.graph-tooltip-value {
  color: #1F2937;
  font-weight: 500;
}

/* Chart Cards */
.chart-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  padding: 1.5rem;
  height: auto !important;
  min-height: 400px;
  display: flex;
  flex-direction: column;
}

.chart-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.chart-title {
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
}

.chart-description {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

/* Metric Cards */
.metric-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  padding: 1.5rem;
  height: 100%;
  transition: transform 0.2s;
  cursor: help;
}

.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.metric-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #4B5563;
  margin-bottom: 0.5rem;
}

.metric-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1F2937;
}

/* Loading Overlay */
.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

/* Insights Card */
.insights-card {
  background: var(--background-light);
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  border-radius: 12px;
  padding: 1.5rem;
  margin-top: 2rem;
}

.insights-title {
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.insights-content {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Chart Container Responsiveness */
.chart-container {
  position: relative;
  height: 300px;
  width: 100%;
}

/* Legend Enhancements */
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 1rem;
}

.legend-item {
  display: flex;
  align-items: center;
  font-size: 0.875rem;
  color: #4a5568;
  padding: 0.25rem 0.75rem;
  background: rgba(0, 0, 0, 0.03);
  border-radius: 20px;
  transition: background 0.2s ease;
}

.legend-item:hover {
  background: rgba(0, 0, 0, 0.06);
}

/* Animations */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chart-card {
  animation: slideIn 0.5s ease-out;
}

.metric-card {
  animation: slideIn 0.3s ease-out;
}

/* Loading Animations */
@keyframes pulse {
  0% { opacity: 0.6; }
  50% { opacity: 1; }
  100% { opacity: 0.6; }
}

.placeholder {
  animation: pulse 1.5s infinite;
}

/* Grid Network Visualization Styles */
.control-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.control-title {
    color: #2d3748;
    font-weight: 600;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.metrics-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.metrics-title {
    color: #2d3748;
    font-weight: 600;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.metric-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.metric-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.metric-item label {
    color: #718096;
    font-size: 0.875rem;
}

.metric-item .metric-value {
    font-weight: 600;
    color: #2d3748;
}

.graph-card {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    height: 600px;
    position: relative;
}

#3d-graph {
    width: 100%;
    height: 100%;
}

.analysis-card {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.analysis-title {
    color: #2d3748;
    font-weight: 600;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

#distance-histogram,
#connectivity-matrix {
    height: 300px;
    margin-top: 1rem;
}

/* Range Input Styling */
.form-range {
    height: 1.5rem;
    padding: 0;
    background: transparent;
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
}

.form-range:focus {
    outline: none;
}

.form-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-blue);
    cursor: pointer;
    margin-top: -6px;
}

.form-range::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    cursor: pointer;
}

.form-range::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-blue);
    cursor: pointer;
    border: none;
}

.form-range::-moz-range-track {
    width: 100%;
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    cursor: pointer;
}

/* Matrix Cell Hover Effect */
.cell:hover {
    stroke: #2d3748;
    stroke-width: 2px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .graph-card {
        height: 400px;
    }
    
    #distance-histogram,
    #connectivity-matrix {
        height: 200px;
    }
    
    .control-card,
    .metrics-card,
    .analysis-card {
        padding: 0.75rem;
    }
}

/* Infrastructure Map Styles */
.map-container {
    position: relative;
    width: 100%;
    height: 600px;
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#map {
    width: 100%;
    height: 100%;
}

#map svg {
    width: 100%;
    height: 100%;
    display: block;
}

.map-overlay {
    position: absolute;
    bottom: 16px;
    left: 16px;
    background: rgba(255, 255, 255, 0.9);
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.875rem;
    color: #495057;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    pointer-events: none;
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.county {
    fill: #e9ecef;
    stroke: #fff;
    stroke-width: 0.5;
    transition: fill 0.2s ease;
}

.county:hover {
    fill: #dee2e6;
    cursor: pointer;
}

.county.selected {
    stroke: #0d6efd;
    stroke-width: 2;
}

.zoom-controls {
    position: absolute;
    top: 16px;
    right: 16px;
    background: white;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 4px;
}

.zoom-controls button {
    display: block;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background: white;
    color: #495057;
    cursor: pointer;
    transition: background-color 0.2s;
}

.zoom-controls button:hover {
    background: #f8f9fa;
}

.zoom-controls button:not(:last-child) {
    border-bottom: 1px solid #dee2e6;
}

.legend-symbol {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 8px;
    border-radius: 2px;
}

.legend-symbol.installation {
    background: #6C63FF;
}

.legend-symbol.substation {
    background: #FF6B35;
}

.legend-symbol.connection {
    background: #25C481;
}

#colorScale {
    margin: 1rem 0;
}

/* Analysis Charts */
#capacityChart,
#efficiencyChart {
    height: 180px;
    margin-top: 0.25rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .map-container {
        height: 400px;
    }
    
    #capacityChart,
    #efficiencyChart {
        height: 160px;
    }
    
    .legend-symbol {
        width: 10px;
        height: 10px;
        margin-right: 6px;
    }
}

/* Installation Types */
.installation-rooftop { background-color: var(--accent-blue); }
.installation-ground { background-color: var(--accent-indigo); }
.installation-parking { background-color: var(--accent-teal); }

/* Urban/Rural */
.urban-area { background-color: var(--urban-blue); }
.rural-area { background-color: var(--rural-green); }

/* Network Elements */
.node { fill: var(--accent-blue); }
.node.highlighted { fill: var(--accent-teal); }
.link { stroke: var(--accent-indigo); }

/* Infrastructure Elements */
.installation-marker { fill: var(--accent-blue); }
.substation-marker { fill: var(--accent-indigo); }
.connection-line { stroke: var(--accent-teal); }

/* Trends */
.trend-indicator.positive {
  color: var(--rural-green);
}

.trend-indicator.negative {
  color: var(--primary-red);
}

/* Insights */
.insight-item {
  border-left: 3px solid var(--accent-blue);
  padding-left: 12px;
  margin-bottom: 12px;
}

.insight-item i {
  color: var(--primary-indigo);
  margin-right: 8px;
}

/* Connection Items */
.connection-item {
  border-bottom: 1px solid var(--border-color);
  padding: 8px 0;
}

.connection-strength {
  color: var(--primary-indigo);
  font-weight: 600;
}

.connection-counties {
  color: var(--text-secondary);
  font-size: 0.9em;
}

/* Land Use Page Specific Styles */
.text-gradient {
  background: linear-gradient(45deg, #3B82F6, #14B8A6);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.control-card {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  height: 100%;
}

.control-title {
  color: #1F2937;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.metric-card {
  background: #fff;
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  text-align: center;
  transition: transform 0.2s ease;
  height: 100%;
}

.metric-card:hover {
  transform: translateY(-2px);
}

.metric-icon {
  font-size: 1.75rem;
  color: var(--accent-blue);
  margin-bottom: 0.75rem;
}

.metric-card label {
  display: block;
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.metric-card .metric-value {
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 600;
}

.legend-color {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  margin-right: 10px;
  vertical-align: middle;
}

.legend-color.rooftop {
  background: #FF4D4D;
}

.legend-color.ground {
  background: #4DFF4D;
}

.legend-color.parking {
  background: #4D4DFF;
}

.legend-line {
  display: inline-block;
  width: 30px;
  height: 3px;
  margin-right: 10px;
  vertical-align: middle;
}

.legend-line.strong {
  background: #FF9933;
  height: 4px;
}

.legend-line.medium {
  background: #FFCC33;
  height: 3px;
}

.legend-line.weak {
  background: #CCCCCC;
  height: 2px;
}

.legend-item {
  display: flex;
  align-items: center;
  padding: 0.5rem;
  border-radius: 6px;
  transition: background-color 0.2s ease;
}

.legend-item:hover {
  background: rgba(0, 0, 0, 0.03);
}

.insights-card {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.insights-title {
  color: #1F2937;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.insights-content {
  padding: 1rem;
  background: #F9FAFB;
  border-radius: 8px;
}

.insight-item {
  display: flex;
  align-items: center;
  padding: 0.75rem;
  background: #fff;
  border-radius: 6px;
  margin-bottom: 0.5rem;
  border-left: 4px solid #3B82F6;
}

.insight-item i {
  font-size: 1.25rem;
  color: #3B82F6;
  margin-right: 1rem;
}

.insight-item span {
  color: #4B5563;
  font-size: 0.9rem;
}

/* Enhanced Tooltip Styles */
.tooltip {
  position: absolute;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  pointer-events: none;
  z-index: 1000;
  min-width: 200px;
  transition: opacity 0.2s ease-in-out;
}

.tooltip-content {
  font-family: 'Inter', sans-serif;
}

.tooltip-content h6 {
  color: #1f2937;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid #e5e7eb;
}

.tooltip-details p {
  color: #4b5563;
  font-size: 12px;
  line-height: 1.4;
  margin: 0;
}

.tooltip-details strong {
  color: #1f2937;
  font-weight: 500;
}

/* Loading Overlay */
.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .chart-container {
    height: 250px;
  }
  
  .metric-card {
    margin-bottom: 1rem;
  }
  
  .chart-card {
    margin-bottom: 1rem;
  }
  
  .metric-value {
    font-size: 1.25rem;
  }
  
  .legend {
    flex-direction: column;
  }
  
  .legend-item {
    margin-bottom: 0.5rem;
  }
}

/* Chart Specific Styles */
#landuse-chart rect {
  transition: opacity 0.2s ease;
}

#size-chart path {
  transition: opacity 0.2s ease;
}

#grid-chart rect {
  transition: opacity 0.2s ease;
}

#urban-rural-chart path {
  transition: opacity 0.2s ease;
}

/* Chart Header Hover */
.chart-header {
  cursor: help;
  padding: 1rem;
  border-radius: 8px;
  transition: background-color 0.2s ease;
  margin-bottom: 1.5rem;
}

.chart-header:hover {
  background-color: rgba(59, 130, 246, 0.05);
}

.chart-header .chart-title {
  transition: color 0.2s ease;
}

.chart-header:hover .chart-title {
  color: var(--accent-blue);
}

/* Grid Network Page Specific Styles */
.intro-card {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  margin-bottom: 2rem;
}

.section-title {
  color: var(--text-primary);
  font-size: 1.75rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.section-description {
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.usage-tips {
  background: #f8fafc;
  border-radius: 8px;
  padding: 1.5rem;
  margin-top: 1rem;
}

.usage-tips h5 {
  color: var(--text-primary);
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.usage-tips ul {
  color: var(--text-secondary);
  padding-left: 1.5rem;
  margin-bottom: 0;
}

.usage-tips li {
  margin-bottom: 0.5rem;
}

.control-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.control-title {
  color: var(--text-primary);
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.form-label {
  color: var(--text-primary);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.text-muted {
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* Installation Type Colors */
.installation-rooftop {
  background: var(--accent-blue);
}

.installation-ground {
  background: var(--accent-indigo);
}

.installation-parking {
  background: var(--accent-teal);
}

.connection-line {
  background: var(--accent-emerald);
}

/* Legend Styling */
.legend-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.legend-title {
  color: var(--text-primary);
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.legend-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1.25rem;
  padding: 0.5rem;
  border-radius: 8px;
  transition: background-color 0.2s ease;
}

.legend-item:hover {
  background: #f8fafc;
}

.legend-color {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  margin-right: 1rem;
  flex-shrink: 0;
}

.legend-item div {
  flex-grow: 1;
}

.legend-item span {
  display: block;
  color: var(--text-primary);
  font-weight: 500;
  margin-bottom: 0.25rem;
}

/* Metrics Card Styling */
.metrics-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.metrics-title {
  color: var(--text-primary);
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.metric-item {
  padding: 1rem;
  border-radius: 8px;
  background: #f8fafc;
  margin-bottom: 1rem;
  transition: transform 0.2s ease;
}

.metric-item:hover {
  transform: translateY(-2px);
}

.metric-item label {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.metric-value {
  display: block;
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

/* Graph Card Styling */
.graph-card {
  background: white;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  height: 600px;
  position: relative;
}

/* Analysis Card Styling */
.analysis-card {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.analysis-title {
  color: var(--text-primary);
  font-size: 1.4rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.analysis-description {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.chart-title {
  color: var(--text-primary);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.chart-description {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

/* Enhanced 3D Graph Tooltips */
.graph-tooltip {
  background: rgba(17, 24, 39, 0.95);
  border-radius: 8px;
  padding: 1rem;
  color: white;
  font-size: 0.9rem;
  line-height: 1.5;
  max-width: 300px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.graph-tooltip-title {
  color: var(--accent-blue);
  font-weight: 600;
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.graph-tooltip-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.25rem;
}

.graph-tooltip-label {
  color: rgba(255, 255, 255, 0.7);
}

.graph-tooltip-value {
  color: white;
  font-weight: 500;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .graph-card {
    height: 400px;
  }
  
  .control-card,
  .metrics-card,
  .legend-card {
    margin-bottom: 1rem;
  }
  
  .section-title {
    font-size: 1.5rem;
  }
  
  .section-description {
    font-size: 1rem;
  }
}

/* Explanation Card Styles */
.explanation-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.explanation-title {
  color: var(--text-primary);
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.explanation-section {
  margin-bottom: 1.5rem;
}

.explanation-section:last-child {
  margin-bottom: 0;
}

.explanation-section h6 {
  color: var(--text-primary);
  font-size: 1rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.explanation-section p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.explanation-section ul {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  padding-left: 1.25rem;
  margin-bottom: 0;
}

.explanation-section li {
  margin-bottom: 0.5rem;
}

.explanation-section li:last-child {
  margin-bottom: 0;
}

/* Adjust Graph Card Height */
.graph-card {
  height: calc(100vh - 120px);
  min-height: 400px;
  max-height: 800px;
}

/* Make the 3D graph container responsive */
#3d-graph {
  width: 100%;
  height: 100%;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .graph-card {
    height: 400px;
    margin-top: 1rem;
  }
  
  .explanation-card,
  .metrics-card,
  .legend-card {
    margin-bottom: 1rem;
  }
}

/* Grid Network Page Layout */
.viz-container {
  margin-top: 76px;
  padding-bottom: 2rem;
  min-height: auto;
  overflow-y: auto;
}

.control-panel {
  padding: 1rem;
  height: calc(100vh - 56px);
  overflow-y: auto;
}

.sticky-top {
  position: sticky;
  top: 90px;
  z-index: 100;
}

.control-card {
  background: var(--card-background);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-soft);
  transition: all 0.3s ease;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

.control-card:hover {
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.12);
}

.form-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: #4B5563;
  margin-bottom: 0.25rem;
}

.legend-compact {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  font-size: 0.85rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.legend-color {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.legend-color.rooftop {
  background: #FF4D4D;
}

.legend-color.ground {
  background: #4DFF4D;
}

.legend-color.parking {
  background: #4D4DFF;
}

.legend-line {
  display: inline-block;
  width: 20px;
  height: 2px;
}

.legend-line.strong {
  background: #FF9933;
  height: 3px;
}

.legend-line.medium {
  background: #FFCC33;
  height: 2px;
}

.legend-line.weak {
  background: #CCCCCC;
  height: 1px;
}

.graph-card {
  position: relative;
  height: calc(100vh - 56px);
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

#3d-graph {
  width: 100%;
  height: 100%;
}

.interaction-tips {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.9);
  padding: 0.5rem;
  border-radius: 8px;
  font-size: 0.8rem;
  z-index: 100;
}

.tip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #4B5563;
}

.tip i {
  font-size: 1rem;
  color: #3B82F6;
}

.tooltip {
  position: absolute;
  background: white;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  pointer-events: none;
  z-index: 1000;
  max-width: 300px;
}

.graph-tooltip {
  background: white;
  padding: 0.75rem;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  font-size: 0.85rem;
}

.graph-tooltip-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #1F2937;
}

.graph-tooltip-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.25rem;
}

.graph-tooltip-label {
  color: #6B7280;
}

.graph-tooltip-value {
  font-weight: 500;
  color: #1F2937;
}

/* AI Insights Page Styles */
.results-container {
    padding: 1rem;
    height: calc(100vh - 56px);
    overflow-y: auto;
}

.results-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.ai-response {
    min-height: 200px;
}

.visualization-area {
    min-height: 400px;
    position: relative;
}

.history-item {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.history-item:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.history-query {
    color: var(--text-primary);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.history-time {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.recommendation-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.recommendation-item i {
    color: var(--accent-blue);
    font-size: 1.1rem;
}

.insight-section {
    margin-bottom: 1.5rem;
}

.insight-section h6 {
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.insight-section h6 i {
    color: var(--accent-blue);
}

/* Model Settings */
.form-check-input:checked {
    background-color: var(--accent-blue);
    border-color: var(--accent-blue);
}

/* Quick Queries */
.btn-outline-primary.text-start {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
}

.btn-outline-primary.text-start i {
    font-size: 1.1rem;
}

/* Loading States */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .results-container {
        height: auto;
        padding: 0.5rem;
    }
    
    .visualization-area {
        min-height: 300px;
    }
    
    .results-card {
        padding: 1rem;
    }
}

/* Chatbot Styles */
.chatbot-container {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: all 0.3s ease;
    overflow: hidden;
}

.chatbot-container.minimized {
    height: 0;
    opacity: 0;
    pointer-events: none;
}

.chatbot-header {
    padding: 16px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-title {
    display: flex;
    align-items: center;
    font-weight: 600;
    color: #1e293b;
    font-size: 1rem;
}

.chatbot-title i {
    margin-right: 8px;
    color: #3b82f6;
    font-size: 1.2rem;
}

.chatbot-actions {
    display: flex;
    align-items: center;
}

.chatbot-actions .btn-link {
    color: #64748b;
    transition: color 0.2s ease;
}

.chatbot-actions .btn-link:hover {
    color: #1e293b;
}

.chatbot-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

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

.message {
    max-width: 85%;
    padding: 12px;
    border-radius: 12px;
    animation: messageIn 0.3s ease;
}

.message.user {
    align-self: flex-end;
    background: #3b82f6;
    color: white;
}

.message.assistant {
    align-self: flex-start;
    background: #f1f5f9;
    color: #1e293b;
}

.message.system {
    align-self: center;
    background: #f8fafc;
    color: #64748b;
    font-size: 0.9rem;
    text-align: center;
    max-width: 90%;
}

.message-content {
    line-height: 1.4;
    font-size: 0.95rem;
}

.chat-input {
    padding: 16px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.chat-input textarea {
    flex: 1;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 12px;
    resize: none;
    max-height: 120px;
    font-size: 0.95rem;
    line-height: 1.4;
    transition: all 0.2s ease;
}

.chat-input textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.btn-send {
    background: #3b82f6;
    color: white;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-send:hover {
    background: #2563eb;
    color: white;
}

.chatbot-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 25px;
    background: #3b82f6;
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.2s ease;
}

.chatbot-toggle:hover {
    background: #2563eb;
    transform: scale(1.05);
}

.chatbot-toggle i {
    font-size: 1.4rem;
}

.chatbot-toggle .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    border: 2px solid white;
    border-radius: 10px;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
}

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

@media (max-width: 768px) {
    .chatbot-container {
        width: calc(100% - 40px);
        height: 60vh;
        bottom: 90px;
    }
}

#landuse-chart,
#size-chart,
#grid-chart,
#urban-rural-chart {
  width: 100%;
  height: 100%;
  min-height: 350px;
}

/* Ensure the row containing charts doesn't have a fixed height */
.row.g-4 {
  margin-bottom: 2rem;
  height: auto;
}

/* Make sure columns don't have fixed heights */
.col-md-6 {
  margin-bottom: 2rem;
}

/* Ensure bars are clickable */
#landuse-chart rect.bar {
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.chatbot-status {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-left: 8px;
}

.chatbot-status.connected {
    background-color: #22c55e;
    box-shadow: 0 0 4px rgba(34, 197, 94, 0.5);
}

.chatbot-status.disconnected {
    background-color: #ef4444;
    box-shadow: 0 0 4px rgba(239, 68, 68, 0.5);
}

/* Streamgraph Styles */
#streamGraph {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stream {
    transition: all 0.3s ease;
}

.stream:hover {
    opacity: 0.8;
}

.axis-label {
    font-size: 12px;
    fill: #6B7280;
}

.tooltip-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 1rem;
    font-size: 0.875rem;
    max-width: 300px;
}

.tooltip-content hr {
    margin: 0.5rem 0;
    border-color: #E5E7EB;
}

.tooltip-content strong {
    color: var(--text-color);
    font-size: 1rem;
}

.x-axis line, .y-axis line {
    stroke: #ddd;
}

.x-axis path, .y-axis path {
    stroke: #999;
}

.x-axis text, .y-axis text {
    fill: #666;
    font-size: 11px;
}

/* Compact Filter Controls */
.control-card.compact {
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.control-card.compact .control-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #495057;
  margin-bottom: 0.75rem;
}

.control-card.compact .form-label.small {
  font-size: 0.75rem;
  font-weight: 500;
  color: #6c757d;
  margin-bottom: 0.25rem;
}

.control-card.compact .form-select-sm {
  font-size: 0.8rem;
  padding: 0.375rem 0.75rem;
}

.control-card.compact .form-group {
  margin-bottom: 0.75rem;
}

.control-card.compact .form-group:last-child {
  margin-bottom: 0;
}

/* Compact Metric Cards */
.metric-card.compact {
  padding: 0.75rem;
  height: auto;
  min-height: 80px;
}

.metric-card.compact .metric-icon.small {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.metric-card.compact .metric-title.small {
  font-size: 0.75rem;
  margin-bottom: 0.25rem;
}

.metric-card.compact .metric-value.small {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
}

/* Size Definition Card */
.definition-card {
  background: var(--background-light);
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  border-radius: 12px;
  padding: 1.5rem;
  margin-top: 2rem;
}

.definition-title {
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.definition-content {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

.size-definition {
  background: #f8fafc;
  border-radius: 8px;
  padding: 1rem;
  height: 100%;
  text-align: center;
  transition: transform 0.2s ease;
}

.size-definition:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.size-label {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.size-range {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1F2937;
  margin-bottom: 0.5rem;
}

.size-description {
  font-size: 0.8rem;
  color: #6B7280;
  line-height: 1.4;
  margin-bottom: 0;
}

/* Horizontal Metrics Strip */
.metrics-strip {
  background: #f8fafc;
  border-radius: 8px;
  padding: 0.75rem;
  border: 1px solid #e2e8f0;
}

.metric-pill {
  background: white;
  border-radius: 6px;
  padding: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 60px;
  transition: transform 0.2s ease;
}

.metric-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.metric-pill i {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.metric-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}

.metric-label {
  font-size: 0.7rem;
  font-weight: 500;
  color: #6B7280;
  line-height: 1;
  margin-bottom: 0.25rem;
  text-align: center;
}

.metric-value {
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
  text-align: center;
}

/* Responsive adjustments for metrics */
@media (max-width: 768px) {
  .metric-pill {
    height: 50px;
    padding: 0.4rem;
  }
  
  .metric-pill i {
    font-size: 1rem;
  }
  
  .metric-label {
    font-size: 0.65rem;
  }
  
  .metric-value {
    font-size: 0.8rem;
  }
}

/* Horizontal Control Card */
.control-card.horizontal {
  background: #f8fafc;
  border-radius: 8px;
  padding: 1rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.control-card.horizontal .control-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #495057;
  margin-bottom: 0.75rem;
  text-align: center;
}

.control-card.horizontal .form-label.small {
  font-size: 0.75rem;
  font-weight: 500;
  color: #6c757d;
  margin-bottom: 0.25rem;
}

.control-card.horizontal .form-select-sm {
  font-size: 0.8rem;
  padding: 0.375rem 0.75rem;
}
